Elm
1.0
ELM is a library providing generic data structures, OS-independent interface, plugins and XML.
|
#include <>>
Public Member Functions | |
DLNode * | next (void) const |
DLNode * | previous (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) |
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.
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.
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.
Referenced by removeNext().
void elm::inhstruct::DLNode::insertAfter | ( | DLNode * | node | ) |
Insert a node after the current one.
node | Node to insert. |
Referenced by elm::inhstruct::DLList::addFirst().
void elm::inhstruct::DLNode::insertBefore | ( | DLNode * | node | ) |
Insert a node before the current one.
node | Node to insert. |
Referenced by elm::inhstruct::DLList::addLast().
DLNode * elm::inhstruct::DLNode::next | ( | void | ) | const |
Get the next node in the list.
DLNode * elm::inhstruct::DLNode::previous | ( | void | ) | const |
Get the previous node in the list.
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.
node | Remplacement node. |