SbPList(3)

๐Ÿ“ฆ version 2.5.0, in fedora 43, fedora 44

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

  • SbIntList
  • SbStringList
  • SbVec3fList
  • SoActionMethodList
  • SoAuditorList [private]
  • SoBaseList
  • SoDetailList
  • SoEngineOutputList
  • SoFieldList
  • SoPickedPointList
  • SoTypeList

(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(), and SoTypeList::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(), and SoPickedPointList::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(), and SoPickedPointList::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(), and SoAuditorList::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(), and SoChildList::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(), and SoTypeList::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(), and SoField::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(), and SoBase::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(), and SoInput::~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(), and SoInput::~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(), and SoVRMLParent::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(), and SoPickedPointList::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(), and SoBase::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(), and SoTypeList::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