.TH "SbPList" 3 "Sat Oct 12 2013" "Version 4.0.0a" "Coin" \" -*- nroff -*- .ad l .nh .SH NAME SbPList \- .PP The \fBSbPList\fP class is a container class for void pointers\&. .SH SYNOPSIS .br .PP .PP \fC#include \fP .PP Inherited by \fBSbIntList\fP, \fBSbStringList\fP, \fBSbVec3fList\fP, \fBSoActionMethodList\fP, \fBSoAuditorList\fP\fC [private]\fP, \fBSoBaseList\fP, \fBSoDetailList\fP, \fBSoEngineOutputList\fP, \fBSoFieldList\fP, \fBSoPickedPointList\fP, and \fBSoTypeList\fP\&. .SS "Public Member Functions" .in +1c .ti -1c .RI "\fBSbPList\fP (const int sizehint=DEFAULTSIZE)" .br .ti -1c .RI "\fBSbPList\fP (const \fBSbPList\fP &l)" .br .ti -1c .RI "\fB~SbPList\fP ()" .br .ti -1c .RI "void \fBcopy\fP (const \fBSbPList\fP &l)" .br .ti -1c .RI "\fBSbPList\fP & \fBoperator=\fP (const \fBSbPList\fP &l)" .br .ti -1c .RI "void \fBfit\fP (void)" .br .ti -1c .RI "void \fBappend\fP (void *item)" .br .ti -1c .RI "int \fBfind\fP (void *item) const " .br .ti -1c .RI "void \fBinsert\fP (void *item, const int insertbefore)" .br .ti -1c .RI "void \fBremoveItem\fP (void *item)" .br .ti -1c .RI "void \fBremove\fP (const int index)" .br .ti -1c .RI "void \fBremoveFast\fP (const int index)" .br .ti -1c .RI "int \fBgetLength\fP (void) const " .br .ti -1c .RI "void \fBtruncate\fP (const int length, const int \fBfit\fP=0)" .br .ti -1c .RI "void ** \fBgetArrayPtr\fP (const int start=0) const " .br .ti -1c .RI "void *& \fBoperator[]\fP (const int index) const " .br .ti -1c .RI "int \fBoperator==\fP (const \fBSbPList\fP &l) const " .br .ti -1c .RI "int \fBoperator!=\fP (const \fBSbPList\fP &l) const " .br .ti -1c .RI "void * \fBget\fP (const int index) const " .br .ti -1c .RI "void \fBset\fP (const int index, void *item)" .br .in -1c .SS "Protected Member Functions" .in +1c .ti -1c .RI "void \fBexpand\fP (const int size)" .br .ti -1c .RI "int \fBgetArraySize\fP (void) const " .br .in -1c .SH "Detailed Description" .PP The \fBSbPList\fP class is a container class for void pointers\&. .SH "Constructor & Destructor Documentation" .PP .SS "SbPList::SbPList (const intsizehint = \fCDEFAULTSIZE\fP)" This constructor initializes the internal allocated size for the list to \fIsizehint\fP\&. Note that the list will still initially contain zero items\&. .PP Default constructor\&. .SS "SbPList::SbPList (const \fBSbPList\fP &l)" Copy constructor\&. .SS "SbPList::~SbPList ()" Destructor\&. .SH "Member Function Documentation" .PP .SS "void SbPList::copy (const \fBSbPList\fP &l)" Make this list a copy of \fIl\fP\&. .SS "\fBSbPList\fP & SbPList::operator= (const \fBSbPList\fP &l)" Assignment operator .SS "void SbPList::fit (void)" Fit the allocated array exactly around the length of the list, descarding memory spent on unused pre-allocated array cells\&. .PP You should normally not need or want to call this method, and it is only available for the sake of having the option to optimize memory usage for the unlikely event that you should throw around huge \fBSbList\fP objects within your application\&. .SS "void SbPList::append (void *item)\fC [inline]\fP" Append \fIitem\fP to the end of the list\&. .PP Automatically allocates more items internally if needed\&. .SS "int SbPList::find (void *item) const" Return index of first occurrence of \fIitem\fP in the list, or -1 if \fIitem\fP is not present\&. .SS "void SbPList::insert (void *item, const intinsertbefore)" Insert \fIitem\fP at index \fIinsertbefore\fP\&. .PP \fIinsertbefore\fP should not be larger than the current number of items in the list\&. .SS "void SbPList::removeItem (void *item)" Removes an \fIitem\fP from the list\&. If there are several items with the same value, removes the \fIitem\fP with the lowest index\&. .SS "void SbPList::remove (const intindex)" Remove the item at \fIindex\fP, moving all subsequent items downwards one place in the list\&. .PP Reimplemented in \fBSoChildList\fP, and \fBSoBaseList\fP\&. .SS "void SbPList::removeFast (const intindex)\fC [inline]\fP" Remove the item at \fIindex\fP, moving the last item into its place and truncating the list\&. .SS "int SbPList::getLength (void) const\fC [inline]\fP" Returns number of items in the list\&. .SS "void SbPList::truncate (const intlength, const intfit = \fC0\fP)\fC [inline]\fP" Shorten the list to contain \fIlength\fP elements, removing items from \fIindex\fP \fIlength\fP and onwards\&. .PP If \fIfit\fP is non-zero, will also shrink the internal size of the allocated array\&. Note that this is much less efficient than not re-fitting the array size\&. .PP Reimplemented in \fBSoPickedPointList\fP, and \fBSoDetailList\fP\&. .SS "void ** SbPList::getArrayPtr (const intstart = \fC0\fP) const\fC [inline]\fP" Returns pointer to a non-modifiable array of the lists elements\&. \fIstart\fP specifies an index into the array\&. .PP The caller is \fInot\fP responsible for freeing up the array, as it is just a pointer into the internal array used by the list\&. .SS "void *& SbPList::operator[] (const intindex) const\fC [inline]\fP" 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 Reimplemented in \fBSoDetailList\fP, \fBSbVec3fList\fP, \fBSoBaseList\fP, \fBSbIntList\fP, \fBSbStringList\fP, \fBSoFieldList\fP, \fBSoPickedPointList\fP, \fBSoEngineOutputList\fP, \fBSoEngineList\fP, \fBSoNodeList\fP, \fBSoPathList\fP, and \fBSoTypeList\fP\&. .SS "int SbPList::operator== (const \fBSbPList\fP &l) const" Equality operator\&. Returns \fCTRUE\fP if this list and \fIl\fP are identical, containing the exact same ordered set of elements\&. .SS "SbBool SbPList::operator!= (const \fBSbPList\fP &l) const\fC [inline]\fP" Inequality operator\&. Returns \fCTRUE\fP if this list and \fIl\fP are not equal\&. .SS "void * SbPList::get (const intindex) const\fC [inline]\fP" Returns element at \fIindex\fP\&. Does \fInot\fP expand array bounds if \fIindex\fP is outside the list\&. .PP Reimplemented in \fBSoFieldList\fP\&. .SS "void SbPList::set (const intindex, void *item)\fC [inline]\fP" Index operator to set element at \fIindex\fP\&. Does \fInot\fP expand array bounds if \fIindex\fP is outside the list\&. .SS "void SbPList::expand (const intsize)\fC [inline]\fP, \fC [protected]\fP" Expand the list to contain \fIsize\fP items\&. The new items added at the end have undefined value\&. .SS "int SbPList::getArraySize (void) const\fC [inline]\fP, \fC [protected]\fP" Return number of items there's allocated space for in the array\&. .PP \fBSee Also:\fP .RS 4 \fBgetLength()\fP .RE .PP .SH "Author" .PP Generated automatically by Doxygen for Coin from the source code\&.