template<typename E>
class bridges::datastructure::CircDLelement< E >
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
- See also
- There is a tutorial about Circular Doubly Linked Lists : https://bridgesuncc.github.io/tutorials/CircularDoublyLinkedList.html
- Author
- Kalpathi Subramanian
- Date
- 10/5/16, 7/12/19
|
| 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) |
|
| 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) |
|
| 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...
|
|
void | setNext (SLelement *n) |
|
| 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...
|
|
virtual | ~DataStructure ()=default |
|