Maintains a list of instances of details. More...
#include <Inventor/lists/SoDetailList.h>
Public Member Functions | |
SoDetailList () | |
Constructor. | |
SoDetailList (int size) | |
Constructor that pre-allocates storage for size pointers. | |
SoDetailList (const SoDetailList &l) | |
Constructor that copies the contents of another list. | |
virtual | ~SoDetailList () |
Destructor. | |
void | append (SoDetail *detail) |
Adds a detail to the end of the list. | |
void | insert (SoDetail *detail, int addBefore) |
Inserts given detail in list before detail with given index. | |
virtual void | truncate (int start) |
Removes all details after one with given index, inclusive. | |
void | copy (const SoDetailList &l) |
Copies a list, making a copy of each detail instance in the list. | |
SoDetailList & | operator= (const SoDetailList &l) |
Copies a list, making a copy of each detail instance in the list. | |
SoDetail * | operator[] (int i) const |
Returns pointer with given index. | |
void | set (int i, SoDetail *detail) |
Sets an element of a list, deleting the old entry first. | |
Public Member Functions inherited from SbPList | |
SbPList () | |
Default constructor. | |
SbPList (int initSize) | |
Constructor. | |
SbPList (const SbPList &pl) | |
Constructor. | |
virtual | ~SbPList () |
Destructor. | |
void | append (void *ptr) |
Adds given pointer to end of list. | |
int | find (const void *ptr) const |
Returns index of given pointer in list, or -1 if not found. | |
void | insert (void *ptr, int addBefore) |
Inserts given pointer in list before pointer with given index. | |
virtual void | remove (int which) |
Removes pointer with given index. | |
int | getLength () const |
Returns number of pointers in list. | |
void | copy (const SbPList &pl) |
Copies a list. | |
SbPList & | operator= (const SbPList &pl) |
Assignment operator: copies list into this list. | |
void *& | operator[] (const int index) const |
Returns pointer with given index. | |
int | operator== (const SbPList &pl) const |
Equality operator. | |
int | operator!= (const SbPList &pl) const |
Inequality operator. | |
void | swap (int index1, int index2) |
Swaps element having index1 with the one having index2. | |
Maintains a list of instances of details.
This subclass of SbPList holds lists of instances of classes derived from SoDetail.
Definition at line 73 of file SoDetailList.h.
|
inline |
Constructor.
Definition at line 79 of file SoDetailList.h.
|
inline |
Constructor that pre-allocates storage for size pointers.
Definition at line 84 of file SoDetailList.h.
SoDetailList::SoDetailList | ( | const SoDetailList & | l | ) |
Constructor that copies the contents of another list.
|
inlinevirtual |
Destructor.
Definition at line 94 of file SoDetailList.h.
|
inline |
Adds a detail to the end of the list.
Definition at line 99 of file SoDetailList.h.
void SoDetailList::copy | ( | const SoDetailList & | l | ) |
Copies a list, making a copy of each detail instance in the list.
|
inline |
Inserts given detail in list before detail with given index.
Definition at line 105 of file SoDetailList.h.
|
inline |
Copies a list, making a copy of each detail instance in the list.
Definition at line 123 of file SoDetailList.h.
|
inline |
Returns pointer with given index.
If requested index does not exists, list is grown to return a valid pointer.
Definition at line 127 of file SoDetailList.h.
void SoDetailList::set | ( | int | i, |
SoDetail * | detail | ||
) |
Sets an element of a list, deleting the old entry first.
|
virtual |
Removes all details after one with given index, inclusive.
Removed detail instances are deleted.
Reimplemented from SbPList.