Maintains a list of pointers to instances of the SoBase classes. More...
#include <Inventor/lists/SoBaseList.h>
Classes | |
class | SoNotificationInfo |
Public Member Functions | |
SoBaseList () | |
SoBaseList (int size) | |
SoBaseList (const SoBaseList &l) | |
virtual | ~SoBaseList () |
void | append (SoBase *ptr) |
void | insert (SoBase *ptr, int addBefore) |
virtual void | remove (int which) |
virtual void | truncate (int start) |
void | copy (const SoBaseList &l) |
SoBaseList & | operator= (const SoBaseList &l) |
SoBase * | operator[] (int i) const |
void | set (int i, SoBase *ptr) |
void | addReferences (SbBool flag) |
void | touch (int index=-1) |
void | addAuditor (void *auditor, SoNotRec::Type type) |
void | removeAuditor (void *auditor, SoNotRec::Type type) |
const SoAuditorList * | getAuditors () const |
int | getChangedIndex () const |
SoListSensor::ChangeType | getChangedType () const |
void | setNotificationInfo (const int changedIndex, const SoListSensor::ChangeType changedType) |
Maintains a list of pointers to instances of the SoBase classes.
This subclass of SbPList holds lists of pointers to instances of classes derived from SoBase (an abstract class). A flag indicates whether adding an instance pointer to the list should add a reference to the instance. If this flag is TRUE, then adding and removing pointers from the list updates reference counts in the corresponding instances.
SoBase, SoNodeList, SoPathList
SoBaseList::SoBaseList | ( | ) |
Constructor.
SoBaseList::SoBaseList | ( | int | size | ) |
Constructor that pre-allocates storage for size pointers.
SoBaseList::SoBaseList | ( | const SoBaseList & | l | ) |
Constructor that copies the contents of another list.
virtual SoBaseList::~SoBaseList | ( | ) | [virtual] |
Destructor.
void SoBaseList::addAuditor | ( | void * | auditor, | |
SoNotRec::Type | type | |||
) |
Add an auditor to the list.
void SoBaseList::addReferences | ( | SbBool | flag | ) |
Indicates whether to call ref() and unref() for bases in the list when adding/removing them.
The default value is TRUE.
void SoBaseList::append | ( | SoBase * | ptr | ) |
Adds a pointer to the end of the list.
void SoBaseList::copy | ( | const SoBaseList & | l | ) |
Copies a list, keeping all reference counts correct.
Reimplemented from SbPList.
const SoAuditorList* SoBaseList::getAuditors | ( | ) | const [inline] |
Get current auditor list.
int SoBaseList::getChangedIndex | ( | ) | const [inline] |
Get last changed index element of the list.
SoListSensor::ChangeType SoBaseList::getChangedType | ( | ) | const [inline] |
Get last changed type of the list.
void SoBaseList::insert | ( | SoBase * | ptr, | |
int | addBefore | |||
) |
Inserts given pointer in list before pointer with given index.
SoBaseList& SoBaseList::operator= | ( | const SoBaseList & | l | ) | [inline] |
Copies a list, keeping all reference counts correct.
Reimplemented from SbPList.
Reimplemented in SoEngineList, SoNodeList, SoPathList, and SoVRMLInterpList.
SoBase* SoBaseList::operator[] | ( | int | i | ) | const [inline] |
Returns pointer with given index. If requested index does not exists, list is grown to return a valid pointer.
Reimplemented from SbPList.
Reimplemented in SoEngineList, SoNodeList, SoPathList, and SoVRMLInterpList.
virtual void SoBaseList::remove | ( | int | which | ) | [virtual] |
Removes pointer with given index.
Reimplemented from SbPList.
void SoBaseList::removeAuditor | ( | void * | auditor, | |
SoNotRec::Type | type | |||
) |
Remove an auditor to the list.
void SoBaseList::set | ( | int | i, | |
SoBase * | ptr | |||
) |
Sets an element of a list.
void SoBaseList::setNotificationInfo | ( | const int | changedIndex, | |
const SoListSensor::ChangeType | changedType | |||
) | [inline] |
setup notification info for auditor mechanism.
void SoBaseList::touch | ( | int | index = -1 |
) |
Forces each attached SoListSensor to be notified.
Attached sensor will be notified using the passed index as the trigger index. If index is greater than the number of elements in the list, index is set to the last element. If the list is empty, index is set to -1.
virtual void SoBaseList::truncate | ( | int | start | ) | [virtual] |
Removes all pointers after one with given index, inclusive.
Reimplemented from SbPList.