|
Public Types |
|
typedef TXmListIterator< C > | iterator |
| | Type definition of the iterator for referencing list elements.
|
|
typedef TXmListIterAll< C > | iter_all |
| | Type definition for a the iterator template used to iterate all elements within the list.
|
Public Member Functions |
|
| TXmList () |
| | Construct an empty instance of the container.
|
|
| TXmList (int size, const C &c=C()) |
| | Construct a container including size elements, which are initialized as a copy from the given element.
|
|
| TXmList (const TXmList< C > &src) |
| | Construct a container copying the elements from the given list.
|
|
int | size () const |
| | Return the number of elements.
|
|
bool | empty () const |
| | Return true, if the list is empty.
|
|
iterator | begin () const |
| | Return an iterator referencing the first element.
|
|
iterator | end () const |
| | Return an iterator pointing behind the last element.
|
|
iterator | insert (iterator before, const C &item) |
| | Insert the given item before the item referenced by the given iterator.
|
|
void | insert (iterator before, iterator first, iterator last) |
| | Insert a copy of the given items [first, last) in front of the the given before parameter.
|
|
void | insert (iterator before, int num, const C &val) |
| | Insert num items as a copy of val in front of the before iterator.
|
|
iterator | push_back (const C &item) |
| | Push a copy of the given item to the tail of the list.
|
|
C & | push_back () |
| | Push a default constructed item to the tail of the list.
|
|
void | pop_back () |
| | Remove one item from the back of the list.
|
|
iterator | push_front (const C &item) |
| | Push a copy of the given item to the front of the list.
|
|
void | pop_front () |
| | Remove one item from at the front of the list.
|
|
C & | front () const |
| | Return a reference to the first item in the list.
|
|
C & | back () const |
| | Return a reference to the last item in the list.
|
|
void | erase (iterator box) |
| | Delete the item referenced by the given iterator.
|
|
void | erase (iterator first, iterator last) |
| | Delete the items in the range [first, last).
|
|
void | clear () |
| | Delete all items in the list.
|
|
void | swap (TXmList< C > &l) |
| | Swap the items of two lists in constant time.
|