![]() |
Bridges-C++ 3.5.0
Bridges(C++ API)
|
The doubly linked list element, derived from SLelement. More...
#include <DLelement.h>
Classes | |
| class | DLelement_constlisthelper |
| these are helper classes for DLelement for easy iteration in a range for loop. It is not meant to be created by the bridges user. But it may be returned by Bridges to provide an STL compliant list API. More... | |
| class | DLelement_listhelper |
| these are helper classes for DLelement for easy iteration in a range for loop. It is not meant to be created by the bridges user. But it may be returned by Bridges to provide an STL compliant list API. More... | |
Public Member Functions | |
| DLelement (DLelement *n, DLelement *p=nullptr, const E &val=E(), const string &lab=string()) | |
| DLelement (const E &val=E(), const string &lab=string()) | |
| virtual const string | getDStype () const override |
| virtual DLelement * | getNext () override |
| virtual const DLelement * | getNext () const override |
| void | setNext (DLelement *n) |
| virtual DLelement * | getPrev () |
| virtual const DLelement * | getPrev () const |
| virtual void | setPrev (DLelement *p) |
Public Member Functions inherited from bridges::datastructure::SLelement< E > | |
| SLelement (SLelement *next, const E &val=E(), const string &lab=string()) | |
| Constructs an slelement with the provided value. More... | |
| SLelement (const E &val=E(), const string &lab=string()) | |
| Constructs an slelement with the provided value. More... | |
| virtual const string | getDStype () const override |
| Returns the data structure name. More... | |
| virtual SLelement * | getNext () |
| Returns the next element in the list. More... | |
| virtual const SLelement * | getNext () const |
| Returns the next element in the list - Constant version. More... | |
| void | setNext (SLelement *n) |
Public Member Functions inherited from bridges::datastructure::Element< E > | |
| Element (const E &val=E(), const string &lab=string()) | |
| Element (const Element &e) | |
| Element & | operator= (const Element &e) |
| E & | operator= (E const &e) |
| virtual | ~Element () |
| ElementVisualizer * | getVisualizer () |
| Get the element visualizer object. More... | |
| const ElementVisualizer * | getVisualizer () const |
| Get the element visualizer object - constant version. More... | |
| LinkVisualizer * | getLinkVisualizer (const Element *el) |
| Returns the LinkVisualizer of element. More... | |
| LinkVisualizer * | getLinkVisualizer (const Element *el) const |
| Returns the LinkVisualizer of element. More... | |
| string const & | getLabel () const |
| Gets the label of this element. More... | |
| void | setLabel (const string &lab) |
| Sets label of this element. More... | |
| E const & | getValue () const |
| Gets the object held in the generic object E. More... | |
| E & | getValue () |
| Gets the object held in the generic object E. More... | |
| void | setValue (const E &val) |
| Sets generic object to "val". More... | |
| void | setSize (const double &sz) |
| Sets size of the element. More... | |
| double | getSize () const |
| Get element size. More... | |
| void | setColor (const Color &col) |
| Set the color of the Element. More... | |
| void | setColor (const string col) |
| Set the color by name. More... | |
| Color | getColor () const |
| Get the current color of the element. More... | |
| void | setOpacity (double opacity) |
| Set opacity of element - use the 4th color component. More... | |
| double | getOpacity () |
| void | setShape (const Shape &shp) |
| Set the shape of the element. More... | |
| Shape | getShape () const |
| Returns the shape of the element. More... | |
| void | setLocation (const double &locX, const double &locY) |
| Sets the location attributes of an element. More... | |
| double | getLocationX () const |
| Gets the X coordinate of the location. More... | |
| double | getLocationY () const |
| Gets the Y coordinate of the location. More... | |
Public Member Functions inherited from bridges::datastructure::DataStructure | |
| virtual | ~DataStructure ()=default |
| virtual const string | getDStype () const =0 |
Additional Inherited Members | |
Protected Member Functions inherited from bridges::datastructure::SLelement< E > | |
| virtual const pair< string, string > | generateJSON (vector< const SLelement< E > * > nodes) const |
| Generates the JSON representation of the element. More... | |
| virtual void | getListElements (vector< const SLelement< E > * > &nodes) const |
| Get the list of nodes. More... | |
Protected Member Functions inherited from bridges::datastructure::Element< E > | |
| virtual const string | getElementRepresentation () const |
| Gets the JSON string of the element representation. More... | |
Static Protected Member Functions inherited from bridges::datastructure::Element< E > | |
| static const string | getLinkRepresentation (const LinkVisualizer &lv, const string &src, const string &dest) |
| static void | getLinkRepresentation (const LinkVisualizer &lv, const string &src, const string &dest, rapidjson::Document &d) |
Protected Attributes inherited from bridges::datastructure::SLelement< E > | |
| SLelement * | next = nullptr |
Protected Attributes inherited from bridges::datastructure::Element< E > | |
| unordered_map< Element *, LinkVisualizer > | links |
The doubly linked list element, derived from SLelement.
This class extends the SLelelement class by adding a previous DLelement pointer
There is a tutorial about Doubly Linked Lists : https://bridgesuncc.github.io/tutorials/DoublyLinkedList.html
| E | the application data type |
|
inline |
|
inline |
Constructs a dlelement with the provided value and label, setting the next and previous dlelements to NULL. The defaults will be used if not provided.
| val | The data to hold |
| lab | The label to show |
|
inlineoverridevirtual |
Return the data structure type
Reimplemented from bridges::datastructure::SLelement< E >.
Reimplemented in bridges::datastructure::CircDLelement< E >.
|
inlineoverridevirtual |
Constant version
Reimplemented from bridges::datastructure::SLelement< E >.
Reimplemented in bridges::datastructure::CircDLelement< E >.
|
inlineoverridevirtual |
Return the next DL element.
Reimplemented from bridges::datastructure::SLelement< E >.
Reimplemented in bridges::datastructure::CircDLelement< E >.
|
inlinevirtual |
Returns the previous element in the list
Reimplemented in bridges::datastructure::CircDLelement< E >.
|
inlinevirtual |
Returns the previous element - Constant version
Reimplemented in bridges::datastructure::CircDLelement< E >.
|
inline |
Sets next element to "n"
| n | The next DLelement |
|
inlinevirtual |
Sets prev element to "p"
| p | The previous element |