Open Inventor Reference
SbPList Class Reference

List of generic (void *) pointers. More...

#include <Inventor/SbPList.h>

Inheritance diagram for SbPList:
SbIntList SbStringList SbVec3fList SoActionMethodList SoAuditorList SoBaseList SoDetailList SoEngineOutputList SoFieldList SoPickedPointList SoTypeList

Public Member Functions

 SbPList ()
 Constructor. More...
 
 SbPList (int initSize)
 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. More...
 
 SbPList (const SbPList &pl)
 Copy constructor. More...
 
 ~SbPList ()
 Destructor. More...
 
void append (void *ptr)
 Adds given pointer to end of list. More...
 
int find (const void *ptr) const
 Returns index of given pointer in list, or -1 if not found. More...
 
void insert (void *ptr, int addBefore)
 Inserts given pointer in list before pointer with given index. More...
 
void remove (int which)
 Removes pointer with given index. More...
 
int getLength () const
 Returns number of pointers in list. More...
 
void truncate (int start)
 Removes all pointers after one with given index, inclusive. More...
 
void copy (const SbPList &pl)
 Copy a list. More...
 
SbPListoperator= (const SbPList &pl)
 Assignment operator; copies list into this list. More...
 
void *& operator[] (int i) const
 Returns pointer with given index. More...
 
bool operator== (const SbPList &pl) const
 Equality and inequality operators. More...
 
bool operator!= (const SbPList &pl) const
 Equality and inequality operators. More...
 
void * get (int i) const
 Internal versions of [] that do not check for bounds: More...
 
void set (int i, void *j)
 

Detailed Description

This class manages a dynamic list of generic void * pointers. This class allows random access, insertion, and removal.

Definition at line 78 of file SbPList.h.

Constructor & Destructor Documentation

◆ SbPList() [1/3]

SbPList::SbPList ( )

◆ SbPList() [2/3]

SbPList::SbPList ( int  initSize)

◆ SbPList() [3/3]

SbPList::SbPList ( const SbPList pl)

◆ ~SbPList()

SbPList::~SbPList ( )

Member Function Documentation

◆ append()

void SbPList::append ( void *  ptr)
inline

◆ copy()

void SbPList::copy ( const SbPList pl)

◆ find()

int SbPList::find ( const void *  ptr) const

Referenced by SoAuditorList::remove().

◆ get()

void* SbPList::get ( int  i) const
inline

Definition at line 135 of file SbPList.h.

Referenced by SoFieldList::get().

◆ getLength()

int SbPList::getLength ( ) const
inline

Definition at line 110 of file SbPList.h.

Referenced by SoLightweightPath::getFullLength(), and SoChildList::traverse().

◆ insert()

void SbPList::insert ( void *  ptr,
int  addBefore 
)

◆ operator!=()

bool SbPList::operator!= ( const SbPList pl) const
inline

Definition at line 130 of file SbPList.h.

References TRUE.

◆ operator=()

SbPList& SbPList::operator= ( const SbPList pl)
inline

Definition at line 120 of file SbPList.h.

◆ operator==()

bool SbPList::operator== ( const SbPList pl) const
inline

Definition at line 127 of file SbPList.h.

References FALSE.

◆ operator[]()

void*& SbPList::operator[] ( int  i) const
inline

Definition at line 123 of file SbPList.h.

◆ remove()

void SbPList::remove ( int  which)

Referenced by SoAuditorList::remove().

◆ set()

void SbPList::set ( int  i,
void *  j 
)
inline

Definition at line 136 of file SbPList.h.

Referenced by SoLightweightPath::setTail().

◆ truncate()


The documentation for this class was generated from the following file: