SbPList(3)
okay bestie, pull up a chair ๐ซถ you're reading SbPList(3), straight outta the Library Functions Manual, and honestly? she's a whole vibe. she holds your void pointers. that's it. that's the job. iconic behavior ๐
๐ธ NAME ๐ธ
SbPList โ the container class for void pointers โจ (yes, the container class, main character energy only ๐)
๐ SYNOPSIS ๐
#include <Inventor/lists/SbPList.h>
๐ฆ Inherited by
SbIntListSbStringListSbVec3fListSoActionMethodListSoAuditorList[private]SoBaseListSoDetailListSoEngineOutputListSoFieldListSoPickedPointListSoTypeList
(the whole friend group showed up, we love a nepo baby dynasty ๐)
โจ Public Member Functions โจ
SbPList (const int sizehint=DEFAULTSIZE)
SbPList (const SbPList &l)
~SbPList ()
void copy (const SbPList &l)
SbPList & operator= (const SbPList &l)
void fit (void)
void append (void *item)
int find (void *item) const
void insert (void *item, const int insertbefore)
void removeItem (void *item)
void remove (const int index)
void removeFast (const int index)
int getLength (void) const
void truncate (const int length, const int fit=0)
void ** getArrayPtr (const int start=0) const
void *& operator[] (const int index) const
int operator== (const SbPList &l) const
int operator!= (const SbPList &l) const
void * get (const int index) const
void set (const int index, void *item)
๐ Protected Member Functions ๐
void expand (const int size)
int getArraySize (void) const
๐ Detailed Description ๐
The SbPList class is a container class for void pointers. no cap, that's literally the entire lore. she stores void * and she does it beautifully ๐ฆ
๐ผ Constructor & Destructor Documentation ๐ผ
SbPList::SbPList (const int sizehint = DEFAULTSIZE)
okay so this constructor sets the internal allocated size of the list to sizehint. but bestie, listen โ the list is still gonna have zero items in it at first. allocating space โ having stuff in there, we're just manifesting room โจ
This is the default constructor.
Referenced by:SbIntList::append(),SbVec3fList::append(),copy(),SbIntList::find(),SbIntList::insert(),SbVec3fList::insert(),SoAuditorList::notify(),operator!=(),operator=(),operator==(),SbIntList::operator[](),SbStringList::operator[](),SbVec3fList::operator[](),SoDetailList::operator[](),SbIntList::SbIntList(),SbIntList::SbIntList(),SbPList(),SbStringList::SbStringList(),SoAuditorList::SoAuditorList(),SoBaseList::SoBaseList(),SoBaseList::SoBaseList(),SoBaseList::SoBaseList(),SoDetailList::SoDetailList(),SoDetailList::SoDetailList(),SoDetailList::SoDetailList(),SoEngineOutputList::SoEngineOutputList(),SoEngineOutputList::SoEngineOutputList(),SoEngineOutputList::SoEngineOutputList(),SoFieldList::SoFieldList(),SoFieldList::SoFieldList(),SoFieldList::SoFieldList(),SoPickedPointList::SoPickedPointList(),SoPickedPointList::SoPickedPointList(),SoPickedPointList::SoPickedPointList(),SoTypeList::SoTypeList(),SoTypeList::SoTypeList(), andSoTypeList::SoTypeList().
SbPList::SbPList (const SbPList & l)
the copy constructor ๐ซถ she makes a lil twin.
References: copy(), and SbPList().
SbPList::~SbPList ()
the destructor. bye queen, you served ๐
๐ฅ Member Function Documentation ๐ฅ
void SbPList::copy (const SbPList & l)
makes this list a copy of l. twin swap, but legal.
References: expand(), and SbPList().
Referenced by:operator=(),SbPList(), andSoPickedPointList::SoPickedPointList().
SbPList & SbPList::operator= (const SbPList & l)
the assignment operator.
References: copy(), and SbPList().
void SbPList::fit (void )
fits the allocated array exactly around the length of the list, discarding all the memory spent on those unused pre-allocated array cells. she's on a budget cleanse ๐ง
ngl bestie, you should normally not need this and you probably don't want it either. it only exists so you have the option to optimize memory usage in the extremely unlikely scenario where you're yeeting huge SbList objects around your app like confetti ๐
Referenced by:truncate(),SoDetailList::truncate(), andSoPickedPointList::truncate().
void SbPList::append (void * item) [inline]
appends item to the end of the list ๐
and she's self-sufficient โ automatically allocates more items internally if needed. no prep required, she just grows ๐ฑ
Referenced by:SoBase::addName(),SoAuditorList::append(),SoBaseList::append(),SoFieldList::append(),SoTypeList::append(),SoOffscreenRenderer::getWriteFiletypeInfo(), andSoAuditorList::notify().
int SbPList::find (void * item) const
returns the index of the first occurrence of item in the list, or -1 if item isn't in there at all. ghosted, essentially ๐ป
Referenced by:SoPath::append(),SoBaseKit::createPathToAnyPart(),SoDB::createRoute(),SbStringList::find(),SoTypeList::find(),SoGroup::findChild(),SoPath::isRelevantNotification(),SoAuditorList::notify(),removeItem(),SoBaseList::removeItem(),SoBase::removeName(),SoBaseKit::setPart(), andSoChildList::traverse().
void SbPList::insert (void * item, const int insertbefore)
inserts item at index insertbefore. sneaky lil drop-in โจ
heads up: insertbefore should not be larger than the current number of items in the list. don't test her.
Referenced by:SbStringList::insert(),SoBaseList::insert(),SoChildList::insert(),SoFieldList::insert(), andSoTypeList::insert().
void SbPList::removeItem (void * item)
removes an item from the list. if there are several items with the same value, she removes the one with the lowest index. first come, first eliminated ๐
References: find(), and remove().
Referenced by:SoField::disconnect(), andSoField::disconnect().
void SbPList::remove (const int index)
removes the item at index, and then everybody after it slides down one place in the list. the whole squad shuffles forward ๐ถโโ๏ธ๐ถโโ๏ธ๐ถโโ๏ธ
Referenced by:SoAuditorList::remove(),SoBaseList::remove(),SoChildList::remove(),SoInput::removeDirectory(),removeItem(), andSoBase::removeName().
void SbPList::removeFast (const int index) [inline]
removes the item at index, but this time she yanks the last item into its place and truncates the list. chaotic? yes. fast? also yes. slay ๐ฅ
int SbPList::getLength (void ) const [inline]
returns the number of items in the list. the headcount, the census, the attendance sheet ๐
Referenced by:SoBaseList::addReferences(),SoNode::addToCopyDict(),SoPath::append(),SoPath::append(),SoAction::apply(),SoBoxHighlightRenderAction::apply(),SoLineHighlightRenderAction::apply(),SoReorganizeAction::apply(),SoReorganizeAction::apply(),SoText3::computeBBox(),SoBaseList::copy(),SoChildList::copy(),SoDetailList::copy(),SoFile::copyChildren(),SoWWWInline::copyChildren(),SoField::copyConnection(),SoFile::copyContents(),SoWWWInline::copyContents(),SbString::findAll(),SbBSPTree::findClosest(),SoInput::findFile(),SoPathList::findPath(),SoFile::getBoundingBox(),SoVRMLInline::getBoundingBox(),SoWWWInline::getBoundingBox(),SoField::getConnections(),SoFieldConverter::getForwardConnections(),SoAuditorList::getLength(),SoBase::getNamedBase(),SoBase::getNamedBases(),SoGroup::getNumChildren(),SoRayPickAction::getPickedPointList(),SoGroup::GLRender(),SoVRMLAppearance::GLRender(),SoVRMLCollision::GLRender(),SoVRMLShape::GLRender(),SoVRMLBillboard::GLRenderBelowPath(),SoVRMLGroup::GLRenderBelowPath(),SoChildList::insert(),SoCallbackList::invokeCallbacks(),SoInteractionKit::isPathSurrogateInMySubgraph(),SoWWWInline::isURLDataHere(),operator[](),SoNodekitCatalog::printCheck(),SoBaseKit::printTable(),SoAction::pushCurPath(),SoBaseKit::rayPick(),SoInteractionKit::readInstance(),SoField::referencesCopy(),SoBaseList::remove(),SoChildList::remove(),SoInput::removeDirectory(),SbImage::searchForFile(),SoInput::searchForFile(),SoChildList::set(),SoDetailList::set(),SoPickedPointList::set(),SoNodeKitListPart::setContainerType(),SoActionMethodList::setUp(),SoShape::shouldGLRender(),SoBaseList::SoBaseList(),SoDetailList::SoDetailList(),SoPickedPoint::SoPickedPoint(),SoPickedPointList::SoPickedPointList(),SoPathList::sort(),SoState::SoState(),SoToVRML2Action::SoToVRML2Action(),SoChildList::traverse(),SoChildList::traverse(),SoChildList::traverse(),SoBaseList::truncate(),SoDetailList::truncate(),SoPickedPointList::truncate(),SoPathList::uniquify(),SoVRMLParent::updateChildList(),SoAction::usePathCode(),SbVec3fList::~SbVec3fList(), andSoInput::~SoInput().
void SbPList::truncate (const int length, const int fit = 0) [inline]
shortens the list so it contains length elements, yeeting items from index length and onwards. โ๏ธ
if fit is non-zero, she'll also shrink the internal size of the allocated array. but beware bestie โ that is much less efficient than not re-fitting the array size. convenience tax, lowkey ๐
References: fit().
Referenced by:SbString::findAll(),SoOffscreenRenderer::getWriteFiletypeInfo(),SoActionMethodList::setUp(),SoBaseList::truncate(),SoDetailList::truncate(),SoPickedPointList::truncate(), andSoInput::~SoInput().
void ** SbPList::getArrayPtr (const int start = 0) const [inline]
returns a pointer to a non-modifiable array of the list's elements. start says which index into the array you're pointing at. look, don't touch ๐ซฃ
and no, the caller is not responsible for freeing that array โ it's just a pointer into the internal array the list is already using. you didn't adopt it, you're just visiting.
Referenced by:SbStringList::getArrayPtr(),SoGroup::getChild(),SoGroup::GLRender(),SoVRMLAppearance::GLRender(),SoVRMLCollision::GLRender(),SoVRMLShape::GLRender(),SoVRMLBillboard::GLRenderBelowPath(),SoVRMLGroup::GLRenderBelowPath(),SoVRMLBillboard::GLRenderInPath(),SoVRMLGroup::GLRenderInPath(),SoPathList::sort(),SoPathList::uniquify(), andSoVRMLParent::updateChildList().
void *& SbPList::operator[] (const int index) const [inline]
returns the element at index ๐ซ
and the way that she will automatically expand the internal array if index is outside the list's current bounds?? the values of any additional pointers get set to NULL in that case. she makes room and leaves it empty, very demure ๐
References: getLength().
Referenced by:SoAuditorList::getObject(),SoBaseList::operator[](),SoFieldList::operator[](),SoPickedPointList::operator[](),SoDetailList::set(),SoFieldList::set(), andSoPickedPointList::set().
int SbPList::operator== (const SbPList & l) const
the equality operator. returns TRUE if this list and l are identical โ like, containing the exact same set of elements identical. soulmates fr fr ๐
References: SbPList().
int SbPList::operator!= (const SbPList & l) const [inline]
the inequality operator. returns TRUE if this list and l are not equal. it's giving irreconcilable differences ๐
References: SbPList().
void * SbPList::get (const int index) const [inline]
returns the element at index. but โ and this is the important part โ she does not expand the array bounds if index is outside the list. no growth, no grace, just vibes ๐ต
Referenced by:SoFieldList::get(),SoVRMLLOD::GLRenderBelowPath(), andSoBase::removeName().
void SbPList::set (const int index, void * item) [inline]
index operator to set the element at index. same deal as get โ she does not expand the array bounds if index is outside the list. boundaries are boundaries ๐
Referenced by:SoAuditorList::set(),SoBaseList::set(), andSoTypeList::set().
void SbPList::expand (const int size) [inline], [protected]
expands the list to contain size items. heads up: the new items added at the end have undefined value. they're not blank, they're mystery ๐ต๏ธโโ๏ธ๐ฎ
Referenced by: copy().
int SbPList::getArraySize (void ) const [inline], [protected]
returns the number of items there's actually allocated space for in the array. capacity, not headcount ๐
See also: getLength()
โ๏ธ Author โ๏ธ
Generated automatically by Doxygen for Coin from the source code. (yes, a robot wrote this, and she still ate ๐ค๐)
and that's the whole page bestie!! ๐ this was SbPList(3) from Coin, Version 2.5.0 โ go forth and store your void pointers responsibly, ily, mwah ๐ซถโจ๐๐
๐ฆ where this page comes from
- fedora 43: Coin2-devel 2.5.0-52.fc43 ยท GPL-2.0-only
- fedora 43: Coin2-devel 2.5.0-52.fc43 ยท GPL-2.0-only
- fedora 44: Coin2-devel 2.5.0-54.fc44 ยท GPL-2.0-only
- fedora 44: Coin2-devel 2.5.0-54.fc44 ยท GPL-2.0-only
- ๐ girlified by deepseek-ai/DeepSeek-V4.1-Flash on : a language model's rewrite of the original, under its terms