Elm
1.0
ELM is a library providing generic data structures, OS-independent interface, plugins and XML.
|
#include <>>
Public Member Functions | |
DLList (void) | |
DLList (DLList &list) | |
DLNode * | first (void) const |
DLNode * | last (void) const |
bool | isEmpty (void) const |
int | count (void) const |
void | addFirst (DLNode *node) |
void | addLast (DLNode *node) |
void | removeFirst (void) |
void | removeLast (void) |
This class implements a double-linked list using node inherited from the user.
elm::inhstruct::DLList::DLList | ( | void | ) |
Build an empty list.
void elm::inhstruct::DLList::addFirst | ( | DLNode * | node | ) |
Add a node as the first node in the list.
node | Node to add. |
References elm::inhstruct::DLNode::insertAfter().
void elm::inhstruct::DLList::addLast | ( | DLNode * | node | ) |
Add a node as the last node in the list.
node | Node to add. |
References elm::inhstruct::DLNode::insertBefore().
int elm::inhstruct::DLList::count | ( | void | ) | const |
Count the number of nodes in the list.
DLNode * elm::inhstruct::DLList::first | ( | void | ) | const |
Get the first node in the list.
bool elm::inhstruct::DLList::isEmpty | ( | void | ) | const |
Test if the list is empty.
Referenced by DLList(), removeFirst(), and removeLast().
DLNode * elm::inhstruct::DLList::last | ( | void | ) | const |
Get the last node in the list.
void elm::inhstruct::DLList::removeFirst | ( | void | ) |
Remove the first node of the list. Does not perform the deletion of the node. It is an error to call this method when the list is empty.
References isEmpty(), and elm::inhstruct::DLNode::removeNext().
void elm::inhstruct::DLList::removeLast | ( | void | ) |
Remove the last node of the list. Does not perform the deletion of the node. It is an error to call this method when the list is empty.
References isEmpty(), and elm::inhstruct::DLNode::removePrevious().