.TH "SoBaseList" 3 "Tue Dec 26 2023 17:59:22" "Version 4.0.2" "Coin" \" -*- nroff -*- .ad l .nh .SH NAME SoBaseList \- The \fBSoBaseList\fP class is a container for pointers to \fBSoBase\fP derived objects\&. .SH SYNOPSIS .br .PP .PP \fC#include \fP .PP Inherits \fBSbPList\fP\&. .PP Inherited by \fBSoEngineList\fP, \fBSoNodeList\fP, and \fBSoPathList\fP\&. .SS "Public Member Functions" .in +1c .ti -1c .RI "\fBSoBaseList\fP (\fBvoid\fP)" .br .ti -1c .RI "\fBSoBaseList\fP (\fBconst\fP int size)" .br .ti -1c .RI "\fBSoBaseList\fP (\fBconst\fP \fBSoBaseList\fP &\fBl\fP)" .br .ti -1c .RI "\fB~SoBaseList\fP ()" .br .ti -1c .RI "\fBvoid\fP \fBappend\fP (\fBSoBase\fP *ptr)" .br .ti -1c .RI "\fBvoid\fP \fBinsert\fP (\fBSoBase\fP *ptr, \fBconst\fP int \fBaddbefore\fP)" .br .ti -1c .RI "\fBvoid\fP \fBremove\fP (\fBconst\fP int index)" .br .ti -1c .RI "\fBvoid\fP \fBremoveItem\fP (\fBSoBase\fP *\fBitem\fP)" .br .ti -1c .RI "\fBvoid\fP \fBtruncate\fP (\fBconst\fP int length)" .br .ti -1c .RI "\fBvoid\fP \fBcopy\fP (\fBconst\fP \fBSoBaseList\fP &\fBl\fP)" .br .ti -1c .RI "\fBSoBaseList\fP & \fBoperator=\fP (\fBconst\fP \fBSoBaseList\fP &\fBl\fP)" .br .ti -1c .RI "\fBSoBase\fP * \fBoperator[]\fP (\fBconst\fP int \fBi\fP) \fBconst\fP" .br .ti -1c .RI "\fBvoid\fP \fBset\fP (\fBconst\fP int \fBi\fP, \fBSoBase\fP *\fBconst\fP ptr)" .br .ti -1c .RI "\fBvoid\fP \fBaddReferences\fP (\fBconst\fP SbBool \fBflag\fP)" .br .ti -1c .RI "SbBool \fBisReferencing\fP (\fBvoid\fP) \fBconst\fP" .br .in -1c Public Member Functions inherited from \fBSbPList\fP .in +1c .ti -1c .RI "\fBSbPList\fP (\fBconst\fP int \fBsizehint\fP=DEFAULTSIZE)" .br .ti -1c .RI "\fBSbPList\fP (\fBconst\fP \fBSbPList\fP &\fBl\fP)" .br .ti -1c .RI "\fB~SbPList\fP ()" .br .ti -1c .RI "\fBvoid\fP \fBcopy\fP (\fBconst\fP \fBSbPList\fP &\fBl\fP)" .br .ti -1c .RI "\fBSbPList\fP & \fBoperator=\fP (\fBconst\fP \fBSbPList\fP &\fBl\fP)" .br .ti -1c .RI "\fBvoid\fP \fBfit\fP (\fBvoid\fP)" .br .ti -1c .RI "\fBvoid\fP \fBappend\fP (\fBvoid\fP *\fBitem\fP)" .br .ti -1c .RI "int \fBfind\fP (\fBconst\fP \fBvoid\fP *\fBitem\fP) \fBconst\fP" .br .ti -1c .RI "\fBvoid\fP \fBinsert\fP (\fBvoid\fP *\fBitem\fP, \fBconst\fP int \fBinsertbefore\fP)" .br .ti -1c .RI "\fBvoid\fP \fBremoveItem\fP (\fBvoid\fP *\fBitem\fP)" .br .ti -1c .RI "\fBvoid\fP \fBremove\fP (\fBconst\fP int index)" .br .ti -1c .RI "\fBvoid\fP \fBremoveFast\fP (\fBconst\fP int index)" .br .ti -1c .RI "int \fBgetLength\fP (\fBvoid\fP) \fBconst\fP" .br .ti -1c .RI "\fBvoid\fP \fBtruncate\fP (\fBconst\fP int length, \fBconst\fP int \fBfit\fP=0)" .br .ti -1c .RI "\fBvoid\fP ** \fBgetArrayPtr\fP (\fBconst\fP int start=0) \fBconst\fP" .br .ti -1c .RI "\fBvoid\fP *& \fBoperator[]\fP (\fBconst\fP int index) \fBconst\fP" .br .ti -1c .RI "int \fBoperator==\fP (\fBconst\fP \fBSbPList\fP &\fBl\fP) \fBconst\fP" .br .ti -1c .RI "int \fBoperator!=\fP (\fBconst\fP \fBSbPList\fP &\fBl\fP) \fBconst\fP" .br .ti -1c .RI "\fBvoid\fP * \fBget\fP (\fBconst\fP int index) \fBconst\fP" .br .ti -1c .RI "\fBvoid\fP \fBset\fP (\fBconst\fP int index, \fBvoid\fP *\fBitem\fP)" .br .in -1c .SS "Additional Inherited Members" Protected Member Functions inherited from \fBSbPList\fP .in +1c .ti -1c .RI "\fBvoid\fP \fBexpand\fP (\fBconst\fP int size)" .br .ti -1c .RI "int \fBgetArraySize\fP (\fBvoid\fP) \fBconst\fP" .br .in -1c .SH "Detailed Description" .PP The \fBSoBaseList\fP class is a container for pointers to \fBSoBase\fP derived objects\&. The additional capability of the \fBSoBaseList\fP class over its parent class, \fBSbPList\fP, is to automatically handle referencing and dereferencing of items as they are added or removed from the lists\&. .SH "Constructor & Destructor Documentation" .PP .SS "SoBaseList::SoBaseList (\fBvoid\fP)" Default constructor\&. .SS "SoBaseList::SoBaseList (\fBconst\fP int size)" Constructor with a hint about the maximum number of pointers in the list\&. .PP \fBSee also\fP .RS 4 \fBSbPList::SbPList(const int)\fP .RE .PP .SS "SoBaseList::SoBaseList (\fBconst\fP \fBSoBaseList\fP & l)" Copy constructor\&. .PP Shallow copy the items of \fIl\fP into this list, adding to the item reference counts if the reference flag of \fIl\fP is \fCTRUE\fP\&. .PP \fBSee also\fP .RS 4 \fBSbPList::SbPList(const SbPList &)\fP .RE .PP .SS "SoBaseList::~SoBaseList ()" Destructor\&. Dereferences items before freeing resources\&. .SH "Member Function Documentation" .PP .SS "\fBvoid\fP SoBaseList::append (\fBSoBase\fP * ptr)" Append \fIptr\fP to list, adding to the reference count of the object (unless \fBaddReferences()\fP has been set to \fCFALSE\fP)\&. .PP Overloaded from parent to support reference counting on the \fBSoBase\fP object\&. .PP \fBSee also\fP .RS 4 \fBSbPList::append()\fP .RE .PP .SS "\fBvoid\fP SoBaseList::insert (\fBSoBase\fP * ptr, \fBconst\fP int addbefore)" Insert \fIptr\fP in the list at position \fIaddbefore\fP, adding to the reference count of the object (unless \fBaddReferences()\fP has been set to \fCFALSE\fP)\&. .PP Overloaded from parent to support reference counting on the \fBSoBase\fP object\&. .PP \fBSee also\fP .RS 4 \fBSbPList::insert()\fP .RE .PP .SS "\fBvoid\fP SoBaseList::remove (\fBconst\fP int index)" Removes item at \fIindex\fP from the list, dereferencing the object (unless \fBaddReferences()\fP has been set to \fCFALSE\fP)\&. .PP Overloaded from parent to support reference counting on the \fBSoBase\fP object\&. .PP \fBSee also\fP .RS 4 \fBSbPList::remove()\fP .RE .PP .SS "\fBvoid\fP SoBaseList::removeItem (\fBSoBase\fP * item)" Removes \fIitem\fP from the list, dereferencing the object (unless \fBaddReferences()\fP has been set to \fCFALSE\fP)\&. .PP Overloaded from parent to support reference counting on the \fBSoBase\fP object\&. .PP \fBSee also\fP .RS 4 \fBSbPList::removeItem()\fP .RE .PP .SS "\fBvoid\fP SoBaseList::truncate (\fBconst\fP int length)" Makes the list contain only the \fIlength\fP first items, removing all items from index \fIlength\fP and onwards to the end of the list\&. Dereferences the objects to be removed (unless \fBaddReferences()\fP has been set to \fCFALSE\fP)\&. .PP Overloaded from parent to support reference counting on the \fBSoBase\fP object\&. .PP \fBSee also\fP .RS 4 \fBSbPList::truncate()\fP .RE .PP .SS "\fBvoid\fP SoBaseList::copy (\fBconst\fP \fBSoBaseList\fP & l)" Shallow copy of the item pointers of \fIl\fP list into this one, first removing all items in this list\&. .SS "\fBSoBaseList\fP & SoBaseList::operator= (\fBconst\fP \fBSoBaseList\fP & l)" Shallow copy of the \fBSoBase\fP pointers from \fIl\fP into this one, returning a pointer to ourself\&. .PP \fBSee also\fP .RS 4 \fBcopy()\fP .RE .PP .SS "\fBSoBase\fP * SoBaseList::operator[] (\fBconst\fP int idx) const" Returns element at \fIindex\fP\&. .PP Will automatically expand the size of the internal array if \fIindex\fP is outside the current bounds of the list\&. The values of any additional pointers are then set to \fCNULL\fP\&. .PP Overloaded from parent to return an \fBSoBase\fP pointer\&. .PP \fBSee also\fP .RS 4 \fBSbPList::operator[]()\fP .RE .PP .SS "\fBvoid\fP SoBaseList::set (\fBconst\fP int i, \fBSoBase\fP *\fBconst\fP ptr)" Index operator to set element at \fIindex\fP\&. Does \fInot\fP expand array bounds if \fIindex\fP is outside the list\&. .PP Overloaded from parent to support reference counting on the \fBSoBase\fP object\&. .PP \fBSee also\fP .RS 4 \fBSbPList::set(const int idx, void * item)\fP .RE .PP .SS "\fBvoid\fP SoBaseList::addReferences (\fBconst\fP SbBool flag)" Decide whether or not the \fBSoBase\fP items should be automatically referenced and dereferenced as they are added and removed from the list\&. .PP Default setting is to do referencing\&. .SS "SbBool SoBaseList::isReferencing (\fBvoid\fP) const" Return whether the \fBSoBase\fP instances are automatically referenced and dereferenced when they are added and removed from the list\&. .PP This function is an extension for Coin, and it is not available in the original SGI Open Inventor \fBv2\&.1\fP API\&. .br .PP \fBSee also\fP .RS 4 \fBaddReferences()\fP .RE .PP \fBSince\fP .RS 4 Coin \fB2\&.0\fP .RE .PP .SH "Author" .PP Generated automatically by Doxygen for Coin from the source code\&.