#include <CTBbasicList.hxx>
Collaboration diagram for CTBbasicListHead:
Public Methods | |
CTBbasicListHead () | |
~CTBbasicListHead () | |
TC * | First () const |
TC * | Last () const |
bool | operator! () const |
operator bool () const | |
Private Methods | |
CTBbasicListHead (const CTBbasicListHead< TC > &rhs) | |
CTBbasicListHead< TC > & | operator= (const CTBbasicListHead< TC > &rhs) |
Private Attributes | |
TC * | mp_first |
TC * | mp_last |
Friends | |
class | CTBbasicListLink< TC > |
For a detailed description see class CTBbasicListLink
.
Definition at line 64 of file CTBbasicList.hxx.
|
Default constructor, results in empty list.
Definition at line 286 of file CTBbasicList.icc. |
|
Destructor. The list must be empty by the time the destructor is executed. It is the responsibility of the destructor of the class embedding the CTBbasicListHead object to remove all elements from the list and decide about ownership and live time of those objects. If the embedding class does not control the live time of the list objects a typical cleanup code look like
hd::~hd() { while (m_head) m_head.First()->Remove(&el::m_link,m_head); } If the embedding class owns the linked objects and is therefore obliged to delete them a typical cleanup code look like
hd::~hd() { while (m_head) delete m_head.First(); } Definition at line 320 of file CTBbasicList.icc. |
|
|
|
Returns a pointer to the first list element, or null if empty. A typical head-to-tail traversal of a list is implemented like for (el* p = m_head.First(); p; p = p->m_link.Next()) {...} Definition at line 335 of file CTBbasicList.icc. |
|
Returns a pointer to the last list element, or null if empty. A typical tail-to-head traversal of a list is implemented like for (el* p = m_head.Last(); p; p = p->m_link.Prev()) {...} Definition at line 350 of file CTBbasicList.icc. |
|
Returns
Definition at line 359 of file CTBbasicList.icc. |
|
Returns
Definition at line 368 of file CTBbasicList.icc. |
|
|
|
Definition at line 66 of file CTBbasicList.hxx. |
|
Definition at line 89 of file CTBbasicList.hxx. |
|
Definition at line 90 of file CTBbasicList.hxx. |