man SoBaseList () - maintains a list of pointers to instances of the SoBase classes

NAME

SoBaseList - maintains a list of pointers to instances of the SoBase classes

INHERITS FROM

SbPList > SoBaseList

SYNOPSIS

#include <Inventor/SoLists.h> Methods from class SoBaseList: c } c } SoBaseList()

c } c } SoBaseList(int size)

c } c } SoBaseList(const SoBaseList &l)

c } c } ~SoBaseList()

c } c } append(SoBase *ptr)

c } c } insert(SoBase *ptr, int addBefore)

c } c } remove(int which)

c } c } truncate(int start)

c } c } copy(const SoBaseList &l)

c } c } operator =(const SoBaseList &l)

c } c } operator [](int i) const

c } c } set(int i, SoBase *ptr)

c } c } addReferences(SbBool flag) Methods from class SbPList: c } c } find(const void *ptr) const

c } c } getLength() const

c } c } operator ==(const SbPList &pl) const

c } c } operator !=(const SbPList &pl) const

DESCRIPTION

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.

METHODS

c } c } SoBaseList()

Constructor. c } c } SoBaseList(int size)

Constructor that pre-allocates storage for size pointers. c } c } SoBaseList(const SoBaseList &l)

Constructor that copies the contents of another list. c } c } ~SoBaseList()

Destructor. c } c } append(SoBase *ptr)

Adds a pointer to the end of the list. c } c } insert(SoBase *ptr, int addBefore)

Inserts given pointer in list before pointer with given index. c } c } remove(int which)

Removes pointer with given index. c } c } truncate(int start)

Removes all pointers after one with given index, inclusive. c } c } copy(const SoBaseList &l)

Copies a list, keeping all reference counts correct. c } c } operator =(const SoBaseList &l)

Copies a list, keeping all reference counts correct. c } c } operator [](int i) const

Accesses an element of a list. c } c } set(int i, SoBase *ptr)

Sets an element of a list. c } c } addReferences(SbBool flag)

Indicates whether to call ref() and unref() for bases in the list when adding/removing them. The default value is TRUE.

SEE ALSO

SoBase, SoNodeList, SoPathList