|
|
| 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.
|
| |
|
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.
|
| |
|
unsigned int | getMemoryFootprint () const |
| | Returns the memory footprint of the link.
|
| |
template<class ValueType>
class SBCContainerListLink< ValueType >
- Template Parameters
-
| 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.
SBListLink<SBAtom*>* l = 0;
for (unsigned int i = 0; i<10; i++)
for (SBListLink<SBAtom*>* i = l; i != 0; i = i->getNextLink())
i->getValue()->getPosition().print();
SBMStructuralModelNodeAtom SBAtom
The short name of SBMStructuralModelNodeAtom.
Definition: SBMStructuralModelNodeAtom.hpp:666
@ Carbon
The type of the Carbon element.
Definition: SBMElement.hpp:48
Short name: SBListLink
- See also
- SBCContainerList