Defines a very simple double-linked list that stores unique elements. More...
#include <set.h>
Classes | |
class | const_iterator |
Public Types | |
typedef CSetIterator< T, T > | iterator |
Public Member Functions | |
CSet () | |
Class constructor. More... | |
CSet (const CSet &c_set) | |
Class copy constructor. More... | |
~CSet () | |
Class destructor. More... | |
CSet & | operator= (const CSet &c_set) |
Assignment operator. More... | |
bool | empty () const |
Returns true if the list is empty. More... | |
size_t | size () const |
Returns the number of elements in the list. More... | |
T & | first () |
const T & | first () const |
T & | last () |
const T & | last () const |
void | insert (const T &t_element, C comp=C()) |
Inserts an element to the list. More... | |
void | erase (const T &t_element) |
Removes the passed element from the list. More... | |
void | erase (iterator &c_it) |
Removes the passed element from the list. More... | |
void | clear () |
Erases the contents of the list. More... | |
bool | exists (const T &t_element) |
Returns true if the given element is in the list. More... | |
iterator | begin () const |
Returns an iterator to the first element. More... | |
iterator | end () const |
Returns an invalid iterator. More... | |
iterator | find (const T &t_element) |
Searches for an element in the list. More... | |
Defines a very simple double-linked list that stores unique elements.
The interface of this class is STL-compatible, but internally it behaves differently from standard containers. In fact, it only stores pointers to objects, and never copies them like STL containers do. The pointers are used to decide whether an element is already present in the list or not. Internally, the list is ordered using the comparator C. By default, the comparator uses the pointer values.
typedef CSetIterator<T, T> argos::CSet< T, C >::iterator |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |