.TH "SoDetailList" 3 "Fri Sep 6 2024 15:32:06" "Version 4.0.3" "Coin" \" -*- nroff -*- .ad l .nh .SH NAME SoDetailList \- The \fBSoDetailList\fP class is a container for pointers to \fBSoDetail\fP objects\&. .SH SYNOPSIS .br .PP .PP \fR#include \fP .PP Inherits \fBSbPList\fP\&. .SS "Public Member Functions" .in +1c .ti -1c .RI "\fBSoDetailList\fP (void)" .br .ti -1c .RI "\fBSoDetailList\fP (const int sizehint)" .br .ti -1c .RI "\fBSoDetailList\fP (const \fBSoDetailList\fP &l)" .br .ti -1c .RI "\fB~SoDetailList\fP ()" .br .ti -1c .RI "void \fBappend\fP (\fBSoDetail\fP *detail)" .br .ti -1c .RI "void \fBinsert\fP (\fBSoDetail\fP *detail, const int insertbefore)" .br .ti -1c .RI "void \fBtruncate\fP (const int length, const int \fBfit\fP=0)" .br .ti -1c .RI "void \fBcopy\fP (const \fBSoDetailList\fP &l)" .br .ti -1c .RI "\fBSoDetailList\fP & \fBoperator=\fP (const \fBSoDetailList\fP &l)" .br .ti -1c .RI "\fBSoDetail\fP * \fBoperator[]\fP (const int idx) const" .br .ti -1c .RI "void \fBset\fP (const int index, \fBSoDetail\fP *item)" .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 \fBSoDetailList\fP class is a container for pointers to \fBSoDetail\fP objects\&. This list class will delete the details when destructed/truncated, or when a detail in the list is replaced by another detail\&. The caller is responsible for allocating the details passed to the list, but should not deallocate them since this will be handled by the list\&. .PP \fBSee also\fP .RS 4 \fBSbPList\fP .RE .PP .SH "Constructor & Destructor Documentation" .PP .SS "SoDetailList::SoDetailList (void )\fR [inline]\fP" Default constructor\&. .SS "SoDetailList::SoDetailList (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 \fBSbList::SbList(const int sizehint)\fP .RE .PP .SS "SoDetailList::SoDetailList (const \fBSoDetailList\fP & l)" Copy constructor\&. .SS "SoDetailList::~SoDetailList ()" Destructor\&. .SH "Member Function Documentation" .PP .SS "void SoDetailList::append (\fBSoDetail\fP * item)\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 \fBSoDetail\fP pointer argument\&. .PP \fBSee also\fP .RS 4 \fBSbPList::append()\fP .RE .PP .SS "void SoDetailList::insert (\fBSoDetail\fP * item, const 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 \fBSoDetail\fP pointer argument\&. .PP \fBSee also\fP .RS 4 \fBSbPList::insert()\fP .RE .PP .SS "void SoDetailList::truncate (const int length, const int fit = \fR0\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 Overloaded from parent to delete truncated items\&. .PP \fBSee also\fP .RS 4 \fBSbPList::truncate()\fP .RE .PP .SS "void SoDetailList::copy (const \fBSoDetailList\fP & l)" Make this list a copy of \fIl\fP\&. .PP Overloaded from parent to copy items, not just pointers\&. .PP \fBSee also\fP .RS 4 \fBSbPList::copy()\fP .RE .PP .SS "\fBSoDetailList\fP & SoDetailList::operator= (const \fBSoDetailList\fP & l)\fR [inline]\fP" Make this list a copy of \fIl\fP\&. .SS "\fBSoDetail\fP * SoDetailList::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 \fBSoDetail\fP pointer\&. .PP \fBSee also\fP .RS 4 \fBSbPList::operator[]()\fP .RE .PP .SS "void SoDetailList::set (const int idx, \fBSoDetail\fP * detail)" 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 destruct the replaced item\&. .PP \fBSee also\fP .RS 4 \fBSbPList::set()\fP .RE .PP .SH "Author" .PP Generated automatically by Doxygen for Coin from the source code\&.