PPL
1.1pre9
|
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. | |
Additional Inherited Members | |
![]() | |
Doubly_Linked_Object () | |
Default constructor. | |
Doubly_Linked_Object (Doubly_Linked_Object *f, Doubly_Linked_Object *b) | |
Creates a chain element with forward link f and backward link b . | |
void | insert_before (Doubly_Linked_Object &y) |
Inserts y before *this . | |
void | insert_after (Doubly_Linked_Object &y) |
Inserts y after *this . | |
Doubly_Linked_Object * | erase () |
Erases *this from the chain and returns a pointer to the next element. | |
~Doubly_Linked_Object () | |
Erases *this from the chain. | |
A simple kind of embedded list (i.e., a doubly linked objects where the links are embedded in the objects themselves).