Elm
1.0
ELM is a library providing generic data structures, OS-independent interface, plugins and XML.
|
#include <>>
Public Member Functions | |
SLList (void) | |
SLNode * | first (void) const |
SLNode * | last (void) const |
int | count (void) const |
bool | isEmpty (void) const |
void | addFirst (SLNode *node) |
void | addLast (SLNode *node) |
void | removeFirst (void) |
void | removeLast (void) |
This class implements a single-link list data structure with nodes (SLNode) that must be extended to contain useful information.
elm::inhstruct::SLList::SLList | ( | void | ) |
void elm::inhstruct::SLList::addFirst | ( | SLNode * | node | ) |
Add a node at the first position in the list.
node | Node to add. |
Referenced by elm::genstruct::SLList< pair_t, CompareEquiv< pair_t, DelegateComparator< pair_t, AssocComparator< string, string, C > > > >::addFirst(), and addLast().
void elm::inhstruct::SLList::addLast | ( | SLNode * | node | ) |
Add a node to the end of the list.
node | Node to add at the last position of the list. Remark that this method is really inefficient.bIts working time is in O(n), n number of nodes in the list. Use it only with small list or revert to more powerful data structures. |
References addFirst(), elm::inhstruct::SLNode::insertAfter(), and last().
Referenced by elm::genstruct::SLList< pair_t, CompareEquiv< pair_t, DelegateComparator< pair_t, AssocComparator< string, string, C > > > >::addLast().
int elm::inhstruct::SLList::count | ( | void | ) | const |
Count the nodes in the list.
References elm::inhstruct::SLNode::next().
Referenced by elm::genstruct::SLList< pair_t, CompareEquiv< pair_t, DelegateComparator< pair_t, AssocComparator< string, string, C > > > >::count().
SLNode * elm::inhstruct::SLList::first | ( | void | ) | const |
Get te first node of the list.
bool elm::inhstruct::SLList::isEmpty | ( | void | ) | const |
Test if the list is empty.
Referenced by elm::genstruct::SLList< pair_t, CompareEquiv< pair_t, DelegateComparator< pair_t, AssocComparator< string, string, C > > > >::clear(), and elm::genstruct::SLList< pair_t, CompareEquiv< pair_t, DelegateComparator< pair_t, AssocComparator< string, string, C > > > >::isEmpty().
SLNode * elm::inhstruct::SLList::last | ( | void | ) | const |
Get te first node of the list. Remark that this method is really inefficient. Its working time is in O(n), n number of nodes in the list. Use it only with small list or revert to more powerful data structures.
References elm::inhstruct::SLNode::next().
Referenced by addLast().
void elm::inhstruct::SLList::removeFirst | ( | void | ) |
Remove the first node of the list.
References elm::inhstruct::SLNode::next().
Referenced by elm::genstruct::SLList< pair_t, CompareEquiv< pair_t, DelegateComparator< pair_t, AssocComparator< string, string, C > > > >::clear(), and elm::genstruct::SLList< pair_t, CompareEquiv< pair_t, DelegateComparator< pair_t, AssocComparator< string, string, C > > > >::removeFirst().
void elm::inhstruct::SLList::removeLast | ( | void | ) |
Remove the last node of the list.
References elm::inhstruct::SLNode::next(), and elm::inhstruct::SLNode::removeNext().