SOFIELDLIST(3iv)

πŸ’– SoFieldList β€” the manual page, but make it cute πŸ’–

okay bestie, gather round, because we're doing SoFieldList(3IV) and honestly? it's giving ✨organized✨. this little cutie maintains a list of pointers to fields. that's it. that's the whole vibe. no cap.


🌸 INHERITS FROM 🌸

SbPList > SoFieldList

so yeah, she's a SbPList girlie at heart, but with a glow-up πŸ’…


✨ SYNOPSIS ✨

first things first, you gotta bring her in:

#include <Inventor/SoLists.h>

πŸŽ€ Methods from class SoFieldList

                     SoFieldList()
                     SoFieldList(int size)
                     SoFieldList(const SoFieldList &l)
                     ~SoFieldList()
 void                append(SoField *ptr)
 void                insert(SoField *ptr, int addBefore)
 SoField *           operator [](int i) const
 void                set(int i, SoField *field)

πŸ¦‹ Methods from class SbPList

 int                 find(const void *ptr) const
 void                remove(int which)
 int                 getLength() const
 void                truncate(int start)
 void                copy(const SbPList &pl)
 SbPList &           operator =(const SbPList &pl)
 int                 operator ==(const SbPList &pl) const
 int                 operator !=(const SbPList &pl) const

πŸ’œ DESCRIPTION πŸ’œ

so, like, this subclass of SbPList holds lists of pointers to instances of classes derived from SoField. that's the tea πŸ“. she's a list, she holds pointers, the pointers point at SoField-derived stuff. iconic behavior, honestly.


πŸ”₯ METHODS πŸ”₯

SoFieldList()

Constructor. the classic no-args entrance. main character energy from the jump πŸ‘‘


SoFieldList(int size)

Constructor that pre-allocates storage for size pointers. so if you already know how many besties are coming to the party, tell her up front and she'll save the seats πŸͺ‘βœ¨


SoFieldList(const SoFieldList &l)

Constructor that copies the contents of another list. clone her. twin. she's not copying you, she's copying you πŸ’…


~SoFieldList()

Destructor. she's leaving, she said what she said, bye πŸ‘‹πŸ˜­


void append(SoField *ptr)

Adds a pointer to the end of the list. just line up at the back, babe, there's room 🫢


void insert(SoField *ptr, int addBefore)

Inserts given pointer in list before pointer with given index. so not at the end β€” she's cutting the line, but legally πŸ’€ and yeah, it goes before the one at index addBefore.


SoField * operator [](int i) const

Accesses an element of a list. the classic [i] moment. reach in, grab your girl, no notes πŸŽ€


void set(int i, SoField *field)

Sets an element of a list. swap her out at index i, put field in her place. glow-up in progress πŸ’–


🌈 SEE ALSO 🌈

  • SoField

and that's the whole page, bestie!! 🌟 shoutout to the source/version line and date at the bottom β€” it's SoFieldList(3IV)() energy, the little signature that says yeah, this was me, i wrote this πŸ’… stay hydrated, keep your pointers valid, mwah πŸ˜˜πŸ’–