Bridges-Python 3.5.1
Bridges(Python API)
Loading...
Searching...
No Matches
Public Member Functions | Protected Attributes | Properties | List of all members
bridges.dl_element.DLelement Class Reference

This class is used to create doubly linked element objects. More...

Inheritance diagram for bridges.dl_element.DLelement:
bridges.sl_element.SLelement bridges.element.Element bridges.circ_dl_element.CircDLelement

Public Member Functions

None __init__ (self, *args, **kwargs)
 Constructor for DLelement.
 
str get_data_structure_type (self)
 This method gets the data structure type.
 
dict get_data_structure_representation (self)
 Getter for the json representation of this list.
 
 reverse_iterator (self)
 This iterator is used with range loops.
 
- Public Member Functions inherited from bridges.sl_element.SLelement
 list_helper (start)
 helper method for graph adjacency list
 
 get_list_elements (self, nodes)
 Get the elements of the list (for internal use only)
 
 iterator (self)
 used for range loops
 
- Public Member Functions inherited from bridges.element.Element
LinkVisualizer get_link_visualizer (self, el)
 Getter for the link visualizer object that links this element to another element specified by the argument.
 
None set_link_visualizer (self, el)
 Setter for the link visualizer of this element.
 
None remove_link_visualizer (self, el)
 Deleter function for the lik visualizer of this element.
 
 set_location (self, locX, locY)
 Setter for the element's location.
 
 get_locationX (self)
 Getter for the element's location in X.
 
 get_locationY (self)
 Getter for the element's location in Y.
 
 get_element_representation (self)
 Getter for the element's JSON representation (for internal use)
 
 get_link_representation (self, lv, src, dest)
 Getter for the JSON representation of the element's link (for internal use)
 

Protected Attributes

 _next
 
 _prev
 
- Protected Attributes inherited from bridges.sl_element.SLelement
 _next
 
- Protected Attributes inherited from bridges.element.Element
 _link_visualizer
 
 _ids
 
 _identifier
 
 _visualizer
 
 _value
 
 _label
 

Properties

 next = property
 Getter for the next element in Dlelement.
 
 prev = property
 Getter for the prev element in Dlelement.
 
- Properties inherited from bridges.sl_element.SLelement
 value = property
 Getter for the SLelement value to hold.
 
- Properties inherited from bridges.element.Element
 identifier = property
 Getter for the element identifier.
 
 visualizer = property
 Getter for the element visualizer.
 
 label = property
 Getter for the element's label.
 
 size = property
 Getter for the element's size.
 
 color = property
 Getter for the element's color.
 
 opacity = property
 Getter for the element's opacity.
 
 shape = property
 Getter for the element's shape type.
 
 id = property
 Get numer of ids of element object.
 

Additional Inherited Members

- Static Public Attributes inherited from bridges.element.Element
int ids = 0
 

Detailed Description

This class is used to create doubly linked element objects.

This class extends Element and takes a generic parameter <E> representing application specific data. This element forms the basic building block for doubly linked lists. Doubly linked elements have two links, "next" and "previous", that point to the previous and succeeding nodes along the list.

Elements contain a visualizer (ElementVisualizer) object for setting visual attributes (color, shape, opacity, size), necessary for displaying them in a web browser.

Elements also have a LinkVisualizer object that is used when they are linked to another element, appropriate for setting link attributes, such as in linked lists, between the current element and its next or previous nodes.

Author
Mihai Mehedint, Kalpathi Subramanian
Date
2018, 6/24/19
See also
Doubly Linked List tutorial : https://bridgesuncc.github.io/tutorials/DoublyLinkedList.html

Constructor & Destructor Documentation

◆ __init__()

None bridges.dl_element.DLelement.__init__ (   self,
args,
**  kwargs 
)

Constructor for DLelement.

       (object) e: the genereic application specific object that DLelement is holding
Parameters
nextthe DLelement that should be assigned to the next pointer
prevthe DLelement that should be assigned to the prev pointer (str) label: the label for this DLelement
Return
None

Reimplemented from bridges.sl_element.SLelement.

Reimplemented in bridges.circ_dl_element.CircDLelement.

Member Function Documentation

◆ get_data_structure_representation()

dict bridges.dl_element.DLelement.get_data_structure_representation (   self)

Getter for the json representation of this list.

Returns
dict representing the JSON format

Reimplemented from bridges.sl_element.SLelement.

◆ get_data_structure_type()

str bridges.dl_element.DLelement.get_data_structure_type (   self)

This method gets the data structure type.

Returns
str representing the data structure type

Reimplemented from bridges.sl_element.SLelement.

Reimplemented in bridges.circ_dl_element.CircDLelement.

◆ reverse_iterator()

bridges.dl_element.DLelement.reverse_iterator (   self)

This iterator is used with range loops.

Reimplemented in bridges.circ_dl_element.CircDLelement.

Member Data Documentation

◆ _next

bridges.dl_element.DLelement._next
protected

◆ _prev

bridges.dl_element.DLelement._prev
protected

Property Documentation

◆ next

bridges.dl_element.DLelement.next = property
static

Getter for the next element in Dlelement.

Returns
element pointed to by this element

◆ prev

bridges.dl_element.DLelement.prev = property
static

Getter for the prev element in Dlelement.

Returns
element that is prior to this element

The documentation for this class was generated from the following file: