Elm
2
ELM is a library providing generic data structures, OS-independent interface, plugins and XML.
|
#include </home/casse/Dev/elm/src/concepts.h>
Public Member Functions | |
T & | first (void) |
T & | last (void) |
void | addFirst (const T &item) |
void | addLast (const T &item) |
void | removeFirst (void) |
void | removeLast (void) |
void | addAfter (const Iter< T > &pos, const T &item) |
void | addBefore (const Iter< T > &pos, const T &item) |
void | removeBefore (const Iter< T > &pos) |
void | removeAfter (const Iter< T > &pos) |
void | set (const Iterator< T > &pos, const T &item) |
T & | operator[] (int i) |
Public Member Functions inherited from List< T > | |
const T & | first (void) const |
const T & | last (void) const |
Iter< T > | find (const T &item) |
Iter< T > | find (const T &item, const Iterator &start) |
Iter< T > | nth (int i) |
const T & | operator[] (int i) const |
Public Member Functions inherited from Collection< T > | |
int | count (void) |
bool | contains (const T &item) |
template<template< class _ > class C> | |
bool | containsAll (const C< T > &collection) |
bool | isEmpty (void) |
operator bool (void) | |
Iter | begin (void) const |
Iter | end (void) const |
bool | equals (const Collection &coll) |
bool | operator== (const Collection &coll) |
bool | operator!= (const Collection &coll) |
Public Member Functions inherited from MutableCollection< T > | |
MutableIter< T > | begin () |
MutableIter< T > | end () |
void | clear (void) |
void | add (const T &item) |
void | addAll (const Collection< T > &items) |
void | remove (const T &item) |
void | removeAll (const Collection< T > &items) |
void | remove (const Iterator< T > &iter) |
MutableCollection< T > & | operator+= (const T &item) |
MutableCollection< T > & | operator-= (const T &item) |
void | copy (const Collection< T > &items) |
MutableCollection & | operator= (const Collection< T > &c) |
Additional Inherited Members | |
Public Types inherited from Collection< T > | |
typedef T | t |
typedef Collection< T > | self_t |
Static Public Attributes inherited from Collection< T > | |
static const Collection | null |
static const Collection< T > | null |
A list is an ordered sequence of items. It implements the MutableCollection concept but the iterator traverse the list in the sequence of the items.
Add an item after another one.
pos | Position to add after. |
item | Item to add. |
Add an item before another one.
pos | Position to add before. |
item | Item to add. |
void addFirst | ( | const T & | item | ) |
Add an item as the first item before other items..
item | Item to add. |
void addLast | ( | const T & | item | ) |
Add an item as the last item after other items.
item | Item to add. |
T& first | ( | void | ) |
Get the reference to the first item of the list.
T& last | ( | void | ) |
Get the reference to the the last item of the list.
T& operator[] | ( | int | i | ) |
Get the reference on the ith element. It is an error if this function is call with a i greater than list length.
i | Index of looked element. |
Remove element after the given position. It is an error to call this function with pos pointing on the last element.
Remove element before the given position. It is an error to call this function with pos pointing on the first element.
pos | Position to remove before. |
Change an item in the list.
pos | Position of the item to change. |
item | New item to replace with. |