Elm  1.0
ELM is a library providing generic data structures, OS-independent interface, plugins and XML.
 All Classes Namespaces Functions Variables Typedefs Enumerations Enumerator Friends Groups Pages
elm::inhstruct::DLNode Class Reference

#include <>>

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

bool elm::inhstruct::DLNode::atBegin ( void  ) const

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 removePrevious().

bool elm::inhstruct::DLNode::atEnd ( void  ) const

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 removeNext().

void elm::inhstruct::DLNode::insertAfter ( DLNode node)

Insert a node after the current one.

Parameters
nodeNode to insert.

Referenced by elm::inhstruct::DLList::addFirst().

void elm::inhstruct::DLNode::insertBefore ( DLNode node)

Insert a node before the current one.

Parameters
nodeNode to insert.

Referenced by elm::inhstruct::DLList::addLast().

DLNode * elm::inhstruct::DLNode::next ( void  ) const

Get the next node in the list.

Returns
Next node.
DLNode * elm::inhstruct::DLNode::previous ( void  ) const

Get the previous node in the list.

Returns
Previous node.
void elm::inhstruct::DLNode::remove ( void  )

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

Referenced by removeNext(), and removePrevious().

void elm::inhstruct::DLNode::removeNext ( void  )

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 atEnd(), and remove().

Referenced by elm::inhstruct::DLList::removeFirst().

void elm::inhstruct::DLNode::removePrevious ( void  )

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 atBegin(), and remove().

Referenced by elm::inhstruct::DLList::removeLast().

void elm::inhstruct::DLNode::replace ( DLNode node)

Replace the current node by the given one.

Parameters
nodeRemplacement node.

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