SbPList Class Reference
[Basics]

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

#include <Inventor/SbPList.h>

Inheritance diagram for SbPList:
SbStringList SbTVizTextureList SoBaseList SoDetailList SoDialogWidgetList SoEngineOutputList SoFieldList SoPickedPointList SoSensorList SoTypeList SoVRMLEXTERNPROTOFieldList SoVRMLInterpOutputList SoVRMLPROTOFieldList

List of all members.

Public Member Functions

 SbPList ()
 SbPList (int initSize)
 SbPList (const SbPList &pl)
virtual ~SbPList ()
void append (void *ptr)
int find (const void *ptr) const
void insert (void *ptr, int addBefore)
virtual void remove (int which)
int getLength () const
virtual void truncate (int start)
void copy (const SbPList &pl)
SbPListoperator= (const SbPList &pl)
void *& operator[] (const int index) const
int operator== (const SbPList &pl) const
int operator!= (const SbPList &pl) const
void swap (int index1, int index2)

Detailed Description

List of generic (void *) pointers.

This class manages a dynamic list of generic void * pointers. This class allows random access, insertion, and removal of pointers. Changes in SbPList can be detected by attaching an SoListSensor to this list.

SEE ALSO

SoListSensor


Constructor & Destructor Documentation

SbPList::SbPList (  ) 

Default constructor.

The list is initially empty.

SbPList::SbPList ( int  initSize  ) 

Constructor.

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.

SbPList::SbPList ( const SbPList pl  ) 

Constructor.

It returns a copy of the specified SbPList.

virtual SbPList::~SbPList (  )  [virtual]

Destructor.


Member Function Documentation

void SbPList::append ( void *  ptr  )  [inline]

Adds given pointer to end of list.

void SbPList::copy ( const SbPList pl  ) 

Copies a list.

Reimplemented in SoBaseList, SoDetailList, and SoSensorList.

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

Returns index of given pointer in list, or -1 if not found.

int SbPList::getLength (  )  const [inline]

Returns number of pointers in list.

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

Inserts given pointer in list before pointer with given index.

int SbPList::operator!= ( const SbPList pl  )  const

Inequality operator.

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

Assignment operator: copies list into this list.

Reimplemented in SoDialogWidgetList, SoBaseList, SoDetailList, SoEngineList, SoNodeList, SoPathList, SoSensorList, and SoVRMLInterpList.

int SbPList::operator== ( const SbPList pl  )  const

Equality operator.

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

Returns pointer with given index.

If requested index does not exists, list is grown to return a valid pointer.

Reimplemented in SoDialogWidgetList, SbStringList, SoBaseList, SoDetailList, SoEngineList, SoEngineOutputList, SoFieldList, SoNodeList, SoPathList, SoPickedPointList, SoSensorList, SoTypeList, SoVRMLEXTERNPROTOFieldList, SoVRMLInterpList, SoVRMLInterpOutputList, and SoVRMLPROTOFieldList.

virtual void SbPList::remove ( int  which  )  [virtual]

Removes pointer with given index.

Reimplemented in SoBaseList, and SoSensorList.

void SbPList::swap ( int  index1,
int  index2 
)

Swaps element having index1 with the one having index2.

void SbPList::truncate ( int  start  )  [inline, virtual]

Removes all pointers after one with given index, inclusive.

Reimplemented in SoBaseList, SoDetailList, SoPickedPointList, and SoSensorList.


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

Open Inventor Toolkit reference manual, generated on 10 Dec 2020
Copyright © Thermo Fisher Scientific All rights reserved.
http://www.openinventor.com/