.TH "SbStringList" 3 "Fri Sep 6 2024 15:32:06" "Version 4.0.3" "Coin" \" -*- nroff -*- .ad l .nh .SH NAME SbStringList \- The \fBSbStringList\fP class is a container for pointers to \fBSbString\fP objects\&. .SH SYNOPSIS .br .PP .PP \fR#include \fP .PP Inherits \fBSbPList\fP\&. .SS "Public Member Functions" .in +1c .ti -1c .RI "\fBSbStringList\fP (void)" .br .ti -1c .RI "\fBSbStringList\fP (const int sizehint)" .br .ti -1c .RI "void \fBappend\fP (\fBSbString\fP *string)" .br .ti -1c .RI "int \fBfind\fP (\fBSbString\fP *string) const" .br .ti -1c .RI "void \fBinsert\fP (\fBSbString\fP *string, int insertbefore)" .br .ti -1c .RI "\fBSbString\fP *& \fBoperator[]\fP (const int idx) const" .br .ti -1c .RI "const \fBSbString\fP ** \fBgetArrayPtr\fP (void) const" .br .in -1c Public Member Functions inherited from \fBSbPList\fP .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 (const 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 "Additional Inherited Members" Protected Member Functions inherited from \fBSbPList\fP .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 \fBSbStringList\fP class is a container for pointers to \fBSbString\fP objects\&. Note that upon using the equality and inequality operators, the strings themselves are not compared, only the pointer values\&. .br .PP This class does not allocate or deallocate strings\&. It's the callers responsibility to allocate/deallocate the \fBSbString\fP instances\&. .PP \fBSee also\fP .RS 4 \fBSbPList\fP .RE .PP .SH "Constructor & Destructor Documentation" .PP .SS "SbStringList::SbStringList (void )\fR [inline]\fP" Default constructor\&. .SS "SbStringList::SbStringList (const int sizehint)\fR [inline]\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 \fBSee also\fP .RS 4 SPbList::SbList(const int sizehint) .RE .PP .SH "Member Function Documentation" .PP .SS "void SbStringList::append (\fBSbString\fP * string)\fR [inline]\fP" Append \fIitem\fP to the end of the list\&. .PP Automatically allocates more items internally if needed\&. .PP Overloaded from parent to accept an \fBSbString\fP pointer argument\&. .PP \fBSee also\fP .RS 4 \fBSbPList::append()\fP .RE .PP .SS "int SbStringList::find (\fBSbString\fP * string) const\fR [inline]\fP" Return index of first occurrence of \fIitem\fP in the list, or -1 if \fIitem\fP is not present\&. .PP Overloaded from parent to accept an \fBSbString\fP pointer argument\&. .PP \fBSee also\fP .RS 4 \fBSbPList::find()\fP .RE .PP .SS "void SbStringList::insert (\fBSbString\fP * string, int insertbefore)\fR [inline]\fP" Insert \fIitem\fP at index \fIinsertbefore\fP\&. .PP \fIinsertbefore\fP should not be larger than the current number of items in the list\&. .PP Overloaded from parent to accept an \fBSbString\fP pointer argument\&. .PP \fBSee also\fP .RS 4 \fBSbPList::insert()\fP .RE .PP .SS "\fBSbString\fP *& SbStringList::operator[] (const int idx) const\fR [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 \fRNULL\fP\&. .PP Overloaded from parent to return an \fBSbString\fP pointer\&. .PP \fBSee also\fP .RS 4 \fBSbPList::operator[]()\fP .RE .PP .SS "const \fBSbString\fP ** SbStringList::getArrayPtr (void ) const\fR [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\&. .PP Overloaded from parent to return an \fBSbString\fP pointer array\&. .PP \fBSee also\fP .RS 4 \fBSbPList::getArrayPtr()\fP .RE .PP .SH "Author" .PP Generated automatically by Doxygen for Coin from the source code\&.