Elm  2
ELM is a library providing generic data structures, OS-independent interface, plugins and XML.
DLNode Class Reference

#include <>>

+ Inheritance diagram for DLNode:

Public Member Functions

DLNodenext (void) const
 
DLNodeprevious (void) const
 
bool atBegin (void) const
 
bool atEnd (void) const
 
void replace (DLNode *node)
 
void insertAfter (DLNode *node)
 
void insertBefore (DLNode *node)
 
void remove (void)
 
void removeNext (void)
 
void removePrevious (void)
 

Detailed Description

This class represents node in the DL list. In order to use the list, a user class must inherit from this one for attaching data.

Member Function Documentation

◆ atBegin()

bool atBegin ( void  ) const
inline

Test if the current node is at the list begin. This method is used for back-traversing the list. When the current node is at begin, the traversal must be stopped.

Returns
True if it is the list begin.

Referenced by DLNode::removePrevious().

◆ atEnd()

bool atEnd ( void  ) const
inline

Test if the current node is at the list end. This method is used for traversing the list. When the current node is at end, the traversal must be stopped.

Returns
True if it is the list end.

Referenced by SimpleGC::doGC(), and DLNode::removeNext().

◆ insertAfter()

void insertAfter ( DLNode node)
inline

Insert a node after the current one.

Parameters
nodeNode to insert.

Referenced by DLList::addFirst().

◆ insertBefore()

void insertBefore ( DLNode node)
inline

Insert a node before the current one.

Parameters
nodeNode to insert.

Referenced by DLList::addLast().

◆ next()

DLNode * next ( void  ) const
inline

Get the next node in the list.

Returns
Next node.

◆ previous()

DLNode * previous ( void  ) const
inline

Get the previous node in the list.

Returns
Previous node.

◆ remove()

void remove ( void  )
inline

Remove the current node from the list. Does not perform the deletion of the node.

Referenced by DLNode::removeNext(), DLNode::removePrevious(), and Temp::~Temp().

◆ removeNext()

void removeNext ( void  )
inline

Remove the next node from the list. It is an error to call this method on the last node of the list. Does not perform the deletion of the node.

References DLNode::atEnd(), and DLNode::remove().

Referenced by DLList::removeFirst().

◆ removePrevious()

void removePrevious ( void  )
inline

Remove the previous node from the list. It is an error to call this method on the first node of the list. Does not perform the deletion of the node.

References DLNode::atBegin(), and DLNode::remove().

Referenced by DLList::removeLast().

◆ replace()

void replace ( DLNode node)
inline

Replace the current node by the given one.

Parameters
nodeRemplacement node.

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