This template class describes a doubly linked list. More...
Public Member Functions | |
SBCContainerListLink (const ValueType &v, SBCContainerListLink< ValueType > *n=0, SBCContainerListLink< ValueType > *p=0) | |
Constructs a link holding value v , with next link n and previous link p . | |
virtual | ~SBCContainerListLink () |
Destructs the link. More... | |
ValueType & | getValue () |
Returns a reference to the value hold by the link. | |
ValueType const & | getValue () const |
Returns a reference to the value hold by the link. | |
SBCContainerListLink< ValueType > * | getNextLink () const |
Returns a pointer to the next link. | |
SBCContainerListLink< ValueType > * | getPreviousLink () const |
Returns a pointer to the previous link. | |
void | deleteLinkFromList () |
Deletes a link from the list while preserving the list. More... | |
unsigned int | getMemoryFootprint () const |
Returns the memory footprint of the link. | |
ValueType | The type of the value hold in the link |
The class SBCContainerListLink is a template defining a link from a doubly-linked list. It may be used as is, to define a non-encapsulated doubly-linked list that may hold values of type ValueType
, or through SBCContainerList, which defines an encapsulated list. When using it alone, proper care must be taken to avoid memory leaks.
Short name: SBListLink
|
inlinevirtual |
This destructor does not do anything. In particular, it does not delete the next and previous link.
|
inline |
This function deletes the link while preserving the list: