#include <CTBsimpleList.hxx>
Inheritance diagram for CTBsimpleListHead:
Public Methods | |
CTBsimpleListHead () | |
~CTBsimpleListHead () | |
TC * | First () const |
TC * | Last () const |
bool | operator! () const |
operator bool () const | |
Private Methods | |
CTBsimpleListHead (const CTBsimpleListHead< TC > &rhs) | |
CTBsimpleListHead< TC > & | operator= (const CTBsimpleListHead< TC > &rhs) |
Private Attributes | |
TC * | mp_first |
TC * | mp_last |
Friends | |
class | CTBsimpleListLink< TC > |
For a detailed description see class CTBsimpleListLink
.
Definition at line 67 of file CTBsimpleList.hxx.
|
Default constructor, results in empty list.
Definition at line 315 of file CTBsimpleList.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 CTBsimpleListHead 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); } 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 349 of file CTBsimpleList.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 364 of file CTBsimpleList.icc. Referenced by CTBcallbackSourceBase::Execute(), CTBcallbackSourceBase::NConnect(), and CTBcallbackSourceBase::~CTBcallbackSourceBase().
|
|
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 379 of file CTBsimpleList.icc. |
|
Returns
Definition at line 388 of file CTBsimpleList.icc. |
|
Returns
Definition at line 397 of file CTBsimpleList.icc. |
|
|
|
Definition at line 69 of file CTBsimpleList.hxx. |
|
Definition at line 92 of file CTBsimpleList.hxx. |
|
Definition at line 93 of file CTBsimpleList.hxx. |