Open Inventor Reference
SoBaseList Class Reference

Subclasses of the SbPList class which hold lists of pointers of a specific type. More...

#include <Inventor/SoLists.h>

Inheritance diagram for SoBaseList:
SbPList SoEngineList SoNodeList SoPathList SoChildList

List of all members.

Public Member Functions

 SoBaseList ()
 Constructor.
 SoBaseList (int size)
 Constructor that pre-allocates storage for size pointers.
 SoBaseList (const SoBaseList &l)
 Constructor that copies the contents of another list.
 ~SoBaseList ()
 Destructor.
void append (SoBase *ptr)
 Adds a pointer to the end of the list.
void insert (SoBase *ptr, int addBefore)
 Inserts given pointer in list before pointer with given index.
void remove (int which)
 Removes pointer with given index.
void truncate (int start)
 Removes all pointers after one with given index, inclusive.
void copy (const SoBaseList &l)
 Copies a list, keeping all reference counts correct.
SoBaseListoperator= (const SoBaseList &l)
 Copies a list, keeping all reference counts correct.
SoBaseoperator[] (int i) const
 Access an element of a list.
void set (int i, SoBase *ptr)
 Sets an element of a list.
void addReferences (SbBool flag)
 Indicates whether to call ref() and unref() for bases in the list when adding/removing them.

Detailed Description

Each contains: A default constructor A constructor taking an initial number of items in the list An "append" function that adds a pointer to the end of the list The index ([]) operator that returns the nth pointer in the list 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.

See Also
SoBase, SoNodeList, SoPathList

Definition at line 117 of file SoLists.h.


Constructor & Destructor Documentation

SoBaseList::SoBaseList ( )
SoBaseList::SoBaseList ( int  size)
SoBaseList::SoBaseList ( const SoBaseList l)
SoBaseList::~SoBaseList ( ) [inline]

Definition at line 126 of file SoLists.h.

References SbPList::truncate().


Member Function Documentation

void SoBaseList::addReferences ( SbBool  flag) [inline]

The default value is TRUE.

Definition at line 155 of file SoLists.h.

void SoBaseList::append ( SoBase ptr)
void SoBaseList::copy ( const SoBaseList l)
void SoBaseList::insert ( SoBase ptr,
int  addBefore 
)
SoBaseList& SoBaseList::operator= ( const SoBaseList l) [inline]

Definition at line 143 of file SoLists.h.

References SbPList::copy().

SoBase* SoBaseList::operator[] ( int  i) const [inline]

Reimplemented from SbPList.

Reimplemented in SoNodeList, SoPathList, and SoEngineList.

Definition at line 147 of file SoLists.h.

void SoBaseList::remove ( int  which)

Reimplemented from SbPList.

Reimplemented in SoChildList.

void SoBaseList::set ( int  i,
SoBase ptr 
)
void SoBaseList::truncate ( int  start)

Reimplemented from SbPList.

Reimplemented in SoChildList.


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