#include <t_list.h>
Public Types | |
typedef iterator | const_iterator |
typedef reverse_iterator | const_reverse_iterator |
typedef tBody | value_type |
Public Methods | |
reverse_iterator | rbegin (void) const |
Like std::list::rbegin(). | |
reverse_iterator | rend (void) const |
Like std::list::rend(). | |
iterator | begin (void) const |
Like std::list::begin(). | |
iterator | end (void) const |
Like std::list::end(). | |
iterator | insert (iterator anIt, const tBody &theThing) |
Like std::list::insert(). More... | |
iterator | erase (iterator anIt) |
Like std::list::erase(). | |
iterator | erase (iterator first, iterator last) |
Like std::list::erase(). | |
void | clear (void) |
Like std::list::clear(). | |
LookTLList () | |
Constructor. | |
~LookTLList () | |
Destructor. | |
void | push_back (const tBody &a) |
Like std::list::push_back(). | |
void | push_front (const tBody &a) |
Like std::list::push_front(). | |
void | pop_back (void) |
Like std::list::pop_back(). | |
void | pop_front (void) |
Like std::list::pop_front(). | |
tBody& | back (void) |
Like std::list::back(). | |
tBody& | front (void) |
Like std::list::front(). | |
void | pushIfAbsent (const tBody &a) |
push_back() if absent. More... | |
tBody& | at (size_t i) const |
Almost like std::deque::at(). More... | |
size_t | size (void) const |
Like std::vector::size(). | |
tBody& | operator[] (size_t i) const |
Same as at(). | |
void | assign (const_iterator first, const_iterator last) |
Same as std::list::assign(). | |
bool | empty (void) |
Same as std::list::empty(). | |
Protected Methods | |
void | append (const tBody &a) |
void | prepend (const tBody &a) |
void | InvalidateMemoryIterator (void) |
void | MoveMemoryIteratorToItemAt (size_t i) const |
Protected Attributes | |
ListItem* | itsFirstItem |
ListItem* | itsLastItem |
ListItem* | itsMemoryItem |
size_t | itsMemoryItemNumber |
size_t | itsNumberOfItems |
Friends | |
class | iterator |
class | reverse_iterator |
This is quite like std::list. It originally existed because some compilers we used didn't have the STL.
It also has access by index and size() is constant time. The former uses a cached internal iterator, and the latter is because it stores the number of elements.
|
Almost like std::deque::at(). If i is out of range (too big or negative) the last item obtained by at() is returned, or the first item in the list if the memory iterator was invalidated. (The first item may of course not exist). Ie results are undefined if you try to access out of range. |
|
Like std::list::insert(). Insert before anIt. |
|
push_back() if absent. This is one of the differences from the STL. It only inserts if there is no matching (using ==) item. |