SOBASELIST(3iv)
π SoBaseList β like, the whole vibe
okay bestie, welcome to the manual page for SoBaseList(3IV) β that's the section-3 page, 3IV being the Open Inventor flavour, iykyk. Sit down, grab a boba, we're doing pointer lists today and honestly? It's giving organized.
β¨ NAME β¨
SoBaseList β she maintains a list of pointers to instances of the SoBase classes. That's it, that's the job, and she does it flawlessly. π
πΈ INHERITS FROM πΈ
SbPList > SoBaseList
so like, SbPList is the parent and SoBaseList is the main character daughter who inherited everything and then some. π
π SYNOPSIS π
#include <Inventor/SoLists.h>
Methods from class SoBaseList:
SoBaseList()
SoBaseList(int size)
SoBaseList(const SoBaseList &l)
~SoBaseList()
void append(SoBase *ptr)
void insert(SoBase *ptr, int addBefore)
void remove(int which)
void truncate(int start)
void copy(const SoBaseList &l)
SoBaseList & operator =(const SoBaseList &l)
SoBase * operator [](int i) const
void set(int i, SoBase *ptr)
void addReferences(SbBool flag)
Methods from class SbPList (the inherited ones, the nepo babies, love them):
int find(const void *ptr) const
int getLength() const
int operator ==(const SbPList &pl) const
int operator !=(const SbPList &pl) const
π¦ DESCRIPTION π¦
okay so here's the tea: this subclass of SbPList holds lists of pointers to instances of classes derived from SoBase β and SoBase is an abstract class, so you're never holding a raw SoBase, you're holding its gorgeous descendants. π
Now the important part, no cap: there's a flag that says whether adding an instance pointer to the list should also add a reference to the instance. If that flag is TRUE, then adding and removing pointers from the list updates reference counts in the corresponding instances. So the list is basically keeping receipts for you β every add and remove gets reflected in the ref counts. π§Ύβ¨
if you're not careful with that flag, you and your reference counts are gonna have a whole situationship. Just saying. π
π METHODS π
SoBaseList()
Constructor. She's born. π
SoBaseList(int size)
Constructor that pre-allocates storage for size pointers. Future-proofing, we love a planner. π
SoBaseList(const SoBaseList &l)
Constructor that copies the contents of another list. Twin behaviour, but make it legal. π―
~SoBaseList()
Destructor. She said bye. π«Ά
void append(SoBase *ptr)β Adds a pointer to the end of the list. Line up, bestie, you're last. πΆβοΈvoid insert(SoBase *ptr, int addBefore)β Inserts the given pointer in the list before the pointer with the given index. Cutting the line, but politely and with permission. πvoid remove(int which)β Removes the pointer with the given index. Gone, blocked, deleted. πvoid truncate(int start)β Removes all pointers after the one with the given index, inclusive. So yeah, the one atstartgets yeeted too. Not a drill. πvoid copy(const SoBaseList &l)β Copies a list, keeping all reference counts correct. The responsible copy. β¨SoBaseList & operator =(const SoBaseList &l)β Copies a list, keeping all reference counts correct. Same energy, assignment-flavoured. πSoBase * operator [](int i) constβ Accesses an element of a list. Yes queen, indexing. π₯void set(int i, SoBase *ptr)β Sets an element of a list. Swap in, swap out. πvoid addReferences(SbBool flag)β Indicates whether to callref()andunref()for bases in the list when adding/removing them. The default value isTRUE. Remember the default, bestie, it matters. β
π SEE ALSO π
SoBaseSoNodeListSoPathList
go read those next, they're all connected, it's a whole cinematic universe. π¬
okay and for the little sign-off: the page footer just says SoBaseList(3IV)() β no version number, no date, absolutely nothing in those lil parentheses. Mysterious. Minimalist. Iconic. β¨ We stan a page that refuses to overshare. ππ¦π
π¦ where this page comes from
- debian bookworm: inventor-doc 2.1.5-10+dfsg-2 Β· LGPL-2.0-or-later
- debian trixie: inventor-doc 2.1.6+ds-2 Β· LGPL-2.0-or-later
- ubuntu jammy: inventor-doc 2.1.5-10-24
- ubuntu noble: inventor-doc 2.1.5-10+dfsg-2.1build2 Β· LGPL-2.0-or-later
- ubuntu questing: inventor-doc 2.1.6+ds-2
- ubuntu resolute: inventor-doc 2.1.6.1+ds-1 Β· LGPL-2.0-or-later
- ubuntu stonking: inventor-doc 2.1.6.1+ds-1 Β· LGPL-2.0-or-later
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash on : a language model's rewrite of the original, under its terms