Elm
1.0
ELM is a library providing generic data structures, OS-independent interface, plugins and XML.
|
#include <elm/genstruct/DLList.h>
Classes | |
class | AbstractIterator |
class | BackIterator |
class | Iterator |
Public Member Functions | |
~DLList (void) | |
int | count (void) const |
bool | contains (const T &value) const |
bool | isEmpty (void) const |
operator bool (void) const | |
void | clear (void) |
void | add (const T &item) |
template<template< class _ > class C> | |
void | addAll (const C< T > &items) |
void | remove (const T &value) |
template<template< class _ > class C> | |
void | removeAll (const C< T > &items) |
void | remove (const AbstractIterator &iter) |
const T & | first (void) const |
const T & | last (void) const |
Iterator | find (const T &item) const |
Iterator | find (const T &item, const Iterator &iter) const |
void | addFirst (const T &value) |
void | addLast (const T &value) |
void | removeFirst (void) |
void | removeLast (void) |
void | addAfter (const AbstractIterator &pos, const T &item) |
void | addBefore (const AbstractIterator &pos, const T &item) |
void | set (const AbstractIterator &pos, const T &item) |
const T & | head (void) const |
T | get (void) |
void | put (const T &item) |
void | reset (void) |
A generic implementation of a double-link list. It may be traversed using the Iterator class or BackIterator class.
T | Type of items stored in the list. |
elm::genstruct::DLList< T, E >::~DLList | ( | void | ) |
References elm::array::clear().
void elm::genstruct::DLList< T, E >::add | ( | const T & | item | ) |
References elm::genstruct::DLList< T, E >::addLast().
void elm::genstruct::DLList< T, E >::addAfter | ( | const AbstractIterator & | pos, |
const T & | item | ||
) |
void elm::genstruct::DLList< T, E >::addAll | ( | const C< T > & | items | ) |
void elm::genstruct::DLList< T, E >::addBefore | ( | const AbstractIterator & | pos, |
const T & | item | ||
) |
void elm::genstruct::DLList< T, E >::addFirst | ( | const T & | value | ) |
void elm::genstruct::DLList< T, E >::addLast | ( | const T & | value | ) |
Referenced by elm::genstruct::DLList< T, E >::add(), and elm::genstruct::DLList< T, E >::put().
void elm::genstruct::DLList< T, E >::clear | ( | void | ) |
Remove all items from the list.
Referenced by elm::genstruct::DLList< T, E >::reset().
bool elm::genstruct::DLList< T, E >::contains | ( | const T & | value | ) | const |
Test if the given item is in the list. Notice that the T item type must implement the equality / inequality operators.
Item | to look for. |
References elm::value().
int elm::genstruct::DLList< T, E >::count | ( | void | ) | const |
Count the items in the list.
Iterator elm::genstruct::DLList< T, E >::find | ( | const T & | item | ) | const |
Iterator elm::genstruct::DLList< T, E >::find | ( | const T & | item, |
const Iterator & | iter | ||
) | const |
T elm::genstruct::DLList< T, E >::first | ( | void | ) | const |
Get the first item of the list.
References elm::value().
Referenced by elm::genstruct::DLList< T, E >::get(), and elm::genstruct::DLList< T, E >::head().
T elm::genstruct::DLList< T, E >::get | ( | void | ) |
const T& elm::genstruct::DLList< T, E >::head | ( | void | ) | const |
References elm::genstruct::DLList< T, E >::first().
bool elm::genstruct::DLList< T, E >::isEmpty | ( | void | ) | const |
Test if the list is empty.
Referenced by elm::genstruct::DLList< T, E >::operator bool().
T elm::genstruct::DLList< T, E >::last | ( | void | ) | const |
Get the last item of the list.
References elm::value().
elm::genstruct::DLList< T, E >::operator bool | ( | void | ) | const |
References elm::genstruct::DLList< T, E >::isEmpty().
void elm::genstruct::DLList< T, E >::put | ( | const T & | item | ) |
References elm::genstruct::DLList< T, E >::addLast().
void elm::genstruct::DLList< T, E >::remove | ( | const T & | value | ) |
References elm::value().
void elm::genstruct::DLList< T, E >::remove | ( | const AbstractIterator & | iter | ) |
void elm::genstruct::DLList< T, E >::removeAll | ( | const C< T > & | items | ) |
void elm::genstruct::DLList< T, E >::removeFirst | ( | void | ) |
Remove the first item from the list.
Referenced by elm::genstruct::DLList< T, E >::get().
void elm::genstruct::DLList< T, E >::removeLast | ( | void | ) |
Remove the last item from the list.
void elm::genstruct::DLList< T, E >::reset | ( | void | ) |
References elm::genstruct::DLList< T, E >::clear().
void elm::genstruct::DLList< T, E >::set | ( | const AbstractIterator & | pos, |
const T & | item | ||
) |