SoBaseList(3)

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

πŸ’– NAME πŸ’–

SoBaseList β€” bestie, it's a container for pointers to SoBase derived objects. That's the whole job. She holds your pointers and she's very polite about it. πŸ’…


🌸 SYNOPSIS 🌸

#include <Inventor/lists/SoBaseList.h>

She inherits SbPList.

And she's inherited by SoEngineList, SoNodeList, and SoPathList β€” so yeah, she's got a whole little family. πŸ‘‘

✨ 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 πŸ¦‹

Okay so the tea β˜•: the SoBaseList class is a container for pointers to SoBase derived objects. Same as always. She said it twice, she means it. πŸ’–

But here's what makes her special β€” the extra ✨ capability ✨ that SoBaseList has over her parent class, SbPList, is that she automatically handles referencing and dereferencing of items as they are added or removed from the lists. Not me having to remember. Not you having to remember. Her. She does it. Iconic behaviour, no cap. 🌟


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

SoBaseList::SoBaseList (void )

Default constructor. Nothing fancy, just vibes. ✨

SoBaseList::SoBaseList (const int size)

Constructor with a hint about the maximum number of pointers in the list. Like a little heads-up so she can prep. 🫢

See also: SbPList::SbPList(const int)

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. So if l wasn't doing the referencing thing, neither is she. Copy the vibe exactly. πŸ’…

See also: SbPList::SbPList(const SbPList &)

SoBaseList::~SoBaseList ()

Destructor. She dereferences items before freeing resources β€” she cleans up after herself, unlike some people. πŸ˜ŒπŸ’–


πŸ”₯ 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). Adding to the group chat, basically. πŸ’Œ

See also: SbPList::append()

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). Not at the end β€” at exactly that spot. Main character placement energy. πŸ‘‘

See also: SbPList::insert()

void SoBaseList::remove (const int index)

Removes item at index from the list, dereferencing the object (unless addReferences() has been set to FALSE). She's out. Gone. Bye. πŸ™ˆ

See also: SbPList::remove()

void SoBaseList::removeItem (SoBase * item)

Removes item from the list, dereferencing the object (unless addReferences() has been set to FALSE). Same energy, but you point at the item directly instead of counting. 🎯

See also: SbPList::removeItem()

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).

Yeah she's cutting them off. All of them. Everything from length to the end. 🫒

See also: SbPList::truncate()

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. So it's a full reset then restock. Out with the old, in with the (same) old. πŸŒ€

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

Shallow copy of the SoBase pointers from l into this one, returning a pointer to ourself. Yes she returns herself. She said "and I'd do it again." πŸ’–

See also: copy()

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.

So like, she'll make room. But the new spots are empty (NULL), don't get it twisted. πŸ•³οΈ

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.

Not the same as operator[] bestie, read carefully!! This one will NOT grow for you. 🚨

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 if you don't say anything, she's handling refs for you. 🫢

SbBool SoBaseList::isReferencing (void ) const

Return whether the SoBase instances are automatically referenced and dereferenced when they are added and removed from the list.

This function is an extension for Coin, and it is not available in the original SGI Open Inventor v2.1 API. Coin-only, bestie, iykyk. πŸ’…
See also: addReferences()
Since: Coin 2.0

πŸ’œ Author πŸ’œ

Generated automatically by Doxygen for Coin from the source code. (Doxygen wrote it, I just did her makeup. ✨)


And that's the whole page, fr fr β€” she's from the Coin library, Version 3.1.3, and the header up top says SoBaseList(3) from the Library Functions Manual, so you know exactly where to find her. Mwah. πŸ’‹πŸŽ€πŸ¦‹

πŸ“¦ where this page comes from