SODETAILLIST(3iv)

πŸ’– SoDetailList β€” the whole vibe πŸ’–

okay so bestie, this is SoDetailList(3IV), a page from the 3IV manual, and it's literally all about keeping a little list of detail instances. yes it's niche. yes it's iconic. let's get into it 🫢


✨ NAME ✨

SoDetailList β€” maintains a list of instances of details πŸ’…


🌸 INHERITS FROM 🌸

SbPList > SoDetailList

so yeah, SoDetailList is a subclass of SbPList, meaning it inherited all the SbPList energy and then added its own ✨


πŸŽ€ SYNOPSIS πŸŽ€

#include <Inventor/SoLists.h>

Methods from class SoDetailList:

                     SoDetailList()
                     SoDetailList(int size)
                     SoDetailList(const SoDetailList &l)
                     ~SoDetailList()
 void                append(SoDetail *detail)
 void                insert(SoDetail *detail, int addBefore)
 void                truncate(int start)
 void                copy(const SoDetailList &l)
 SoDetailList &      operator =(const SoDetailList &l)
 SoDetail *          operator [](int i) const
 void                set(int i, SoDetail *detail)

Methods from class SbPList:

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

πŸ¦‹ DESCRIPTION πŸ¦‹

okay so picture this: SbPList is the blueprint, right? and SoDetailList is the glow-up subclass that holds lists of instances of classes derived from SoDetail. that's it. that's the whole thing. it's giving "specialized list, but make it details" 😌


πŸ’œ METHODS πŸ’œ

  • SoDetailList() β€” constructor, bestie. makes a new one, freshly empty, main character energy 🌈
  • SoDetailList(int size) β€” a constructor that pre-allocates storage for size pointers. yes, planning ahead. we love a girl who pre-allocates πŸŽ€
  • SoDetailList(const SoDetailList &l) β€” constructor that copies the contents of another list. twin-making, no cap πŸ’…
  • ~SoDetailList() β€” destructor. it's over, she's gone, cleanup time πŸ’€
  • void append(SoDetail *detail) β€” adds a detail to the end of the list. back of the line, sweetie, but make it cute ✨
  • void insert(SoDetail *detail, int addBefore) β€” inserts the given detail in the list before the detail with the given index. cutting the line, but politely 🫢
  • void truncate(int start) β€” removes all details after the one with the given index, inclusive. and heads up: removed detail instances are deleted. like, actually deleted. gone. so don't go holding onto pointers to them after this, okay? 😭
  • void copy(const SoDetailList &l) β€” copies a list, and it makes a copy of each detail instance in the list. not sharing, copying. periodt.
  • SoDetailList & operator =(const SoDetailList &l) β€” the assignment operator. same deal as copy: copies a list, making a copy of each detail instance in the list. slay πŸ’–
  • SoDetail * operator [](int i) const β€” accesses an element of a list. classic bracket moment, iykyk πŸ‘‘
  • void set(int i, SoDetail *detail) β€” sets an element of a list, deleting the old entry first. out with the old, in with the new, no drama (well, a little drama, the old one literally gets deleted) πŸ“

πŸ‘‘ SEE ALSO πŸ‘‘

  • SoDetail

k that's the whole page, bestie!! it came from the SoDetailList(3IV)() manual, version 3IV, dated () β€” yeah the date slot is lowkey empty, we don't talk about it πŸ™ˆ β€” mwah, go build something iconic πŸ’–βœ¨πŸŽ€