SbPList — list of generic (void *) pointers
Contents
Description
This class manages a dynamic list of generic void* pointers. This class allows random access, insertion,
and removal.
Inherits From
SbPList
Methods
SbPList()SbPList(constSbPList&pl)SbPList(intinitSize)~SbPList()
Constructors and destructor. initSize specifies an initial size for the list, which is useful as an
optimization if you can estimate the length of the list before you construct it. If another SbPList is
given, it returns a copy of that list.
voidappend(void*ptr)
Adds given pointer to end of list.
intfind(constvoid*ptr)const
Returns index of given pointer in list, or -1 if not found.
voidinsert(void*ptr,intaddBefore)
Inserts given pointer in list before pointer with given index.
voidremove(intwhich)
Removes pointer with given index.
intgetLength()const
Returns number of pointers in list.
voidtruncate(intstart)
Removes all pointers after one with given index, inclusive.
voidcopy(constSbPList&pl)
Copy a list.
SbPList&operator=(constSbPList&pl)
Assignment operator; copies list into this list.
void*&operator[](inti)const
Returns pointer with given index.
intoperator==(constSbPList&pl)constintoperator!=(constSbPList&pl)const
Equality and inequality operators.
SbPList(3IV)()
Name
SbPList — list of generic (void *) pointers
Synopsis
#include<Inventor/SbPList.h>
Methods from class SbPList:
SbPList()SbPList(constSbPList&pl)SbPList(intinitSize)~SbPList()voidappend(void*ptr)intfind(constvoid*ptr)constvoidinsert(void*ptr,intaddBefore)voidremove(intwhich)intgetLength()constvoidtruncate(intstart)voidcopy(constSbPList&pl)SbPList&operator=(constSbPList&pl)void*&operator[](inti)constintoperator==(constSbPList&pl)constintoperator!=(constSbPList&pl)const