![]() |
Bridges-C++
3.1.1
Bridges(C++API)
|
#include <CircDLelement.h>
This class can be used to instantiate Circular Doubly Linked List Elements.
Structurally they are the same as doubly linked elements except that each node constructed with the next and the previous pointers pointing to itself.
User's implementation of the circularly linked list needs to ensure that the last node's next pointer points to the first node and the first node's previous pointer points to the last node, as the visualization generation is dependent on this.
Elements have labels (string) that are displayed on the visualization. Elements take an generic object E as a user defined parameter, which can any native type or object. Elements contain a visualizer object for setting visual attributes (color, shape, opacity, size), necessary for displaying them in a web browser
Classes | |
| class | CircDLelement_constlisthelper |
| these are helper classes for CircDLelement 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 | CircDLelement_listhelper |
| these are helper classes for CircDLelement 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 | |
| CircDLelement () | |
| CircDLelement (E e, string label) | |
| CircDLelement (CircDLelement< E > next, CircDLelement< E > prev) | |
| CircDLelement (E e, CircDLelement< E > next, CircDLelement< E > prev) | |
| virtual const string | getDStype () const override |
| const CircDLelement< E > * | getNext () const override |
| virtual CircDLelement< E > * | getNext () override |
| void | setNext (CircDLelement< E > *next) |
| CircDLelement< E > * | getPrev () override |
| const CircDLelement< E > * | getPrev () const override |
| void | setPrev (CircDLelement< E > *prev) |
Public Member Functions inherited from bridges::datastructure::DLelement< E > | |
| DLelement (DLelement *n, DLelement *p=nullptr, const E &val=E(), const string &lab=string()) | |
| DLelement (const E &val=E(), const string &lab=string()) | |
| void | setNext (DLelement *n) |
| 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()) | |
| SLelement (const E &val=E(), const string &lab=string()) | |
| 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 () |
| const ElementVisualizer * | getVisualizer () const |
| LinkVisualizer * | getLinkVisualizer (const Element *el) |
| LinkVisualizer * | getLinkVisualizer (const Element *el) const |
| string const & | getLabel () const |
| void | setLabel (const string &lab) |
| E const & | getValue () const |
| E & | getValue () |
| void | setValue (const E &val) |
| void | setSize (const double &sz) |
| Sets size of the element. More... | |
| double | getSize () const |
| 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) |
| 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) |
| double | getLocationX () const |
| double | getLocationY () const |
Public Member Functions inherited from bridges::datastructure::DataStructure | |
| virtual | ~DataStructure ()=default |
Additional Inherited Members | |
Protected Member Functions inherited from bridges::datastructure::SLelement< E > | |
| virtual const pair< string, string > | generateJSON (vector< const SLelement< E > *> nodes) const |
| virtual void | getListElements (vector< const SLelement< E > *> &nodes) const |
Protected Member Functions inherited from bridges::datastructure::Element< E > | |
| virtual const string | getElementRepresentation () const |
Static Protected Member Functions inherited from bridges::datastructure::Element< E > | |
| static const string | getLinkRepresentation (const LinkVisualizer &lv, const string &src, const string &dest) |
Protected Attributes inherited from bridges::datastructure::SLelement< E > | |
| SLelement * | next = nullptr |
Protected Attributes inherited from bridges::datastructure::Element< E > | |
| unordered_map< Element *, LinkVisualizer > | links |
|
inline |
Constructs an empty CircDLelement with next and prev pointers set to itself
|
inline |
Constructs a CircDLelement labeled "label", holding an object "e", with next and prev pointers set to itself
| e | the genereic object that this CircDLelement is holding |
| label | the label for this CircDLelement that shows up on the Bridges visualization |
|
inline |
Constructs an empty DLelement with the next pointer set to the CircDLelement "next" and the prev pointer set to CircDLelement "prev".
|
inline |
Constructs a DLelement holding an object "e", with the next pointer set to the DLelement "next" and the prev pointer set to DLelement "prev".
| e | the genereic object that this CircDLelement is holding |
| next | the CircDLelement that should be assigned to the next pointer |
| prev | the CircDLelement that should be assigned to the prev pointer |
|
inlineoverridevirtual |
This method gets the data structure type
Reimplemented from bridges::datastructure::DLelement< E >.
|
inlineoverridevirtual |
This method returns the pointer to the next DLelement - const version
Reimplemented from bridges::datastructure::DLelement< E >.
|
inlineoverridevirtual |
Retrieves the next CircSLelement
Reimplemented from bridges::datastructure::DLelement< E >.
|
inlineoverridevirtual |
This method returns the pointer to the previous DLelement
Reimplemented from bridges::datastructure::DLelement< E >.
|
inlineoverridevirtual |
This method returns the pointer to the previous DLelement
Reimplemented from bridges::datastructure::DLelement< E >.
|
inline |
|
inline |
1.8.13