PPL
1.2
|
A simple kind of embedded list (i.e., a doubly linked objects where the links are embedded in the objects themselves). More...
#include <ppl.hh>
Public Types | |
typedef EList_Iterator< const T > | const_iterator |
A const iterator to traverse the list. | |
typedef EList_Iterator< T > | iterator |
A non-const iterator to traverse the list. | |
Public Member Functions | |
EList () | |
Constructs an empty list. | |
~EList () | |
Destructs the list and all the elements in it. | |
void | push_front (T &obj) |
Pushes obj to the front of the list. | |
void | push_back (T &obj) |
Pushes obj to the back of the list. | |
iterator | insert (iterator position, T &obj) |
Inserts obj just before position and returns an iterator that points to the inserted object. | |
iterator | erase (iterator position) |
Removes the element pointed to by position , returning an iterator pointing to the next element, if any, or end(), otherwise. | |
bool | empty () const |
Returns true if and only if the list is empty. | |
iterator | begin () |
Returns an iterator pointing to the beginning of the list. | |
iterator | end () |
Returns an iterator pointing one past the last element in the list. | |
const_iterator | begin () const |
Returns a const iterator pointing to the beginning of the list. | |
const_iterator | end () const |
Returns a const iterator pointing one past the last element in the list. | |
bool | OK () const |
Checks if all the invariants are satisfied. | |
A simple kind of embedded list (i.e., a doubly linked objects where the links are embedded in the objects themselves).