SoBaseList(3)

πŸ“¦ version 2.5.0, in fedora 43, fedora 44

✨ NAME ✨

okay so bestie, meet SoBaseList πŸ’– β€” this is the SoBaseList(3) page from the Library Functions Manual, and the whole vibe is: it's a container for pointers to SoBase derived objects. that's it, that's the girl. πŸŽ€


🌸 SYNOPSIS 🌸

#include <Inventor/lists/SoBaseList.h>

Inherits SbPList.

Inherited by SoEngineList, SoNodeList, and SoPathList.

🫢 Public Member Functions

SoBaseList (void)
SoBaseList (const int size)
SoBaseList (const SoBaseList &l)
~SoBaseList ()
void append (SoBase *ptr)
void insert (SoBase *ptr, const int addbefore)
void remove (const int index)
void removeItem (SoBase *item)
void truncate (const int length)
void copy (const SoBaseList &l)
SoBaseList & operator= (const SoBaseList &l)
SoBase * operator[] (const int i) const
void set (const int i, SoBase *const ptr)
void addReferences (const SbBool flag)
SbBool isReferencing (void) const

πŸ¦‹ Public Member Functions inherited from SbPList

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)

🌈 Additional Inherited Members

Protected Member Functions inherited from SbPList:

void expand (const int size)
int getArraySize (void) const

πŸ’… Detailed Description πŸ’…

The SoBaseList class is a container for pointers to SoBase derived objects. periodt. 🫑

so like, the extra thing this class does that its parent class SbPList does not do? it automatically handles referencing and dereferencing of items as they get added to or removed from the lists. she's responsible. she's got main character energy. πŸ‘‘


πŸŽ€ Constructor & Destructor Documentation πŸŽ€

SoBaseList::SoBaseList (void )

Default constructor. the standard girl. ✨

  • References SbPList::SbPList().
  • Referenced by copy(), operator=(), SoBaseList(), SoEngineList::SoEngineList(), SoEngineList::SoEngineList(), SoNodeList::SoNodeList(), SoNodeList::SoNodeList(), SoPathList::SoPathList(), SoPathList::SoPathList(), and SoPathList::SoPathList().

SoBaseList::SoBaseList (const int size)

Constructor with a hint about the maximum number of pointers in the list. she likes a heads-up. πŸ’β€β™€οΈ

See also

  • SbPList::SbPList(const int)
  • References SbPList::SbPList().

SoBaseList::SoBaseList (const SoBaseList & l)

Copy constructor. πŸ“‹

Shallow copy the items of l into this list, adding to the item reference counts if the reference flag of l is TRUE.

See also

  • SbPList::SbPList(const SbPList &)
  • References SbPList::getLength(), SbPList::SbPList(), and SoBaseList().

SoBaseList::~SoBaseList ()

Destructor. Dereferences items before freeing resources. she cleans up after herself, unlike some people πŸ˜­πŸ’€

  • References truncate().

πŸ”₯ Member Function Documentation πŸ”₯

void SoBaseList::append (SoBase * ptr)

Append ptr to list, adding to the reference count of the object (unless addReferences() has been set to FALSE). come thruuuu πŸŽ‰

See also

  • SbPList::append()
  • References SbPList::append(), and SoBase::ref().
  • Referenced by SoEngineList::append(), SoNodeList::append(), SoPathList::append(), copy(), and SoBase::getNamedBases().

void SoBaseList::insert (SoBase * ptr, const int addbefore)

Insert ptr in the list at position addbefore, adding to the reference count of the object (unless addReferences() has been set to FALSE). she's not like a regular insert, she's a cool insert πŸ’…

See also

  • SbPList::insert()
  • References SbPList::insert(), and SoBase::ref().

void SoBaseList::remove (const int index)

Removes item at index from the list, dereferencing the object (unless addReferences() has been set to FALSE). bye bestie πŸ‘‹

See also

  • SbPList::remove()
  • References SbPList::getLength(), and SbPList::remove().
  • Referenced by removeItem(), and SoPathList::uniquify().

void SoBaseList::removeItem (SoBase * item)

Removes item from the list, dereferencing the object (unless addReferences() has been set to FALSE). same energy, different argument πŸ“

See also

  • SbPList::removeItem()
  • References SbPList::find(), and remove().

void SoBaseList::truncate (const int length)

Makes the list contain only the length first items, removing all items from index length and onwards to the end of the list. Dereferences the objects to be removed (unless addReferences() has been set to FALSE). βœ‚οΈ not her being ruthless but make it safe

See also

  • SbPList::truncate()
  • References SbPList::getLength(), and SbPList::truncate().
  • Referenced by SoAction::apply(), copy(), and ~SoBaseList().

void SoBaseList::copy (const SoBaseList & l)

Shallow copy of the item pointers of l list into this one, first removing all items in this list. out with the old, in with the (shallow-copied) new πŸ¦‹

  • References append(), SbPList::getLength(), SoBaseList(), and truncate().
  • Referenced by SoChildList::copy(), SoInteractionKit::isPathSurrogateInMySubgraph(), operator=(), SoEngineList::operator=(), SoNodeList::operator=(), and SoPathList::operator=().

SoBaseList & SoBaseList::operator= (const SoBaseList & l)

Shallow copy of the SoBase pointers from l into this one, returning a pointer to ourself. she's generous, she gives back 🫢

See also

  • copy()
  • References copy(), and SoBaseList().

SoBase * SoBaseList::operator[] (const int idx) const

Returns element at idx. πŸ”

Will automatically expand the size of the internal array if idx is outside the current bounds of the list. The values of any additional pointers are then set to NULL. growth mindset fr fr ✨

  • References SbPList::operator[]().
  • Referenced by SoEngineList::operator[](), SoNodeList::operator[](), and SoPathList::operator[]().

void SoBaseList::set (const int i, SoBase *const ptr)

Index operator to set element at i. Does not expand array bounds if i is outside the list. no growth mindset here, stay in your lane 🚫

  • References SoBase::ref(), and SbPList::set().
  • Referenced by SoBaseKit::readInstance(), and SoChildList::set().

void SoBaseList::addReferences (const SbBool flag)

Decide whether or not the SoBase items should be automatically referenced and dereferenced as they are added and removed from the list.

Default setting is to do referencing. so the default is the ✨responsible✨ option, but you can toggle it πŸ’–

  • References SbPList::getLength(), SoBase::ref(), and SoBase::unref().

SbBool SoBaseList::isReferencing (void ) const

Return whether the SoBase instances are automatically referenced and dereferenced when they are added and removed from the list. the vibe check function πŸ‘€

This function is an extension for Coin, and it is not available in the original SGI Open Inventor v2.1 API. so if you're kicking it old school, she's not there, no cap.

See also

  • addReferences()

Since

Coin 2.0


πŸ‘‘ Author πŸ‘‘

Generated automatically by Doxygen for Coin from the source code. she was literally born this way, not me writing her by hand πŸ™ˆ


and that's a wrap bestie!! this whole page came straight out of Coin, Version 2.5.0, and it's the SoBaseList(3) manual page we've been gagging over this entire time. slay, stay referenced, and don't forget to dereference on your way out πŸ’–βœ¨πŸŽ€

πŸ“¦ where this page comes from