SoInt32Element(3)

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

✨ SoInt32Element β€” hey bestie, it's a manual page πŸ’–

okay so like, this is SoInt32Element(3) from the Library Functions Manual, and no cap, it's literally the blueprint for every element that just... holds a lil 32-bit integer. that's the whole job. iconic, honestly. πŸŽ€


🌸 NAME 🌸

SoInt32Element β€” the base class for elements that simply store a 32-bit integer. yes, that's it. that's the girl. πŸ’…


πŸ¦‹ SYNOPSIS πŸ¦‹

#include <Inventor/elements/SoInt32Element.h>

Inherits SoElement. family tree goes up, periodt. 🌈

πŸ‘‘ Public Member Functions

  • virtual void init (SoState *state) β€” FIXME: write doc. (yeah the docs really said "figure it out" 😭)
  • virtual SbBool matches (const SoElement *element) const β€” the whole cache-validity vibe check, more on this below.
  • virtual SoElement * copyMatchInfo (void) const β€” makes the little info copy that matches() needs to function.
  • virtual void print (FILE *file) const β€” printing element info, mostly for debugging era.
  • virtual void setElt (int32_t value) β€” FIXME: write doc. (again. the mystery. πŸ•΅οΈ)

🫢 Public Member Functions inherited from SoElement

  • const SoType getTypeId (void) const
  • int getStackIndex (void) const
  • virtual void push (SoState *state)
  • virtual void pop (SoState *state, const SoElement *prevTopElement)
  • void setDepth (const int depth)
  • int getDepth (void) const
  • virtual ~SoElement () β€” the goodbye kiss, virtual style. πŸ’‹

⭐ Static Public Member Functions

  • static SoType getClassTypeId (void)
  • static int getClassStackIndex (void)
  • static void initClass (void)
  • static void set (const int index, SoState *const state, SoNode *const node, const int32_t value)
  • static void set (const int index, SoState *const state, const int32_t value)
  • static int32_t get (const int index, SoState *const state) β€” FIXME: write doc. (bestie the doc writers were going through it πŸ’€)

🧚 Static Public Member Functions inherited from SoElement

  • static void initClass (void)
  • static SoType getClassTypeId (void)
  • static int getClassStackIndex (void)
  • static void initElements (void)
  • static int getNumStackIndices (void)
  • static SoType getIdFromStackIndex (const int stackIndex)

πŸŽ€ Protected Attributes

  • int32_t data β€” the moment. the star. the actual integer.

πŸ’œ Protected Attributes inherited from SoElement

  • SoType typeId
  • int stackIndex
  • int depth

🌈 Additional Inherited Members

Protected Member Functions inherited from SoElement

  • SoElement (void)
  • void capture (SoState *const state) const
  • virtual void captureThis (SoState *state) const
  • void setTypeId (const SoType typeId)
  • void setStackIndex (const int index)
  • SoElement * getNextInStack (void) const
  • SoElement * getNextFree (void) const

Static Protected Member Functions inherited from SoElement

  • static SoElement * getElement (SoState *const state, const int stackIndex)
  • static const SoElement * getConstElement (SoState *const state, const int stackIndex)
  • static int createStackIndex (const SoType id)

Static Protected Attributes inherited from SoElement

  • static int classStackIndex
  • static SoTypeList * stackToType

πŸ’… Detailed Description πŸ’…

okay so SoInt32Element is the base class for elements that simply store a 32-bit integer. like, that's the assignment. one integer. no drama, no plot twists. πŸ“

it's the superclass of elements where the new element data replaces the old data, and where the data the element stores is a simple 32-bit integer value. out with the old, in with the new, lowkey.

here's the tea though: this element is like a convenient light-weight version of the SoReplacedElement. the way it differs from SoReplacedElement is that the set() and get() methods are already implemented, since it is known that subclasses will still contain just a single 32-bit integer value. so you get the methods for free. ate and left no crumbs. πŸ”₯

See also 🫢

  • SoReplacedElement
  • SoFloatElement
  • SoAccumulatedElement

πŸ”₯ Member Function Documentation πŸ”₯

void SoInt32Element::init (SoState * state) [virtual]

FIXME: write doc. (ngl the doc is just vibes and a promise 😭)

Reimplemented from SoElement.

References data, and SoElement::init().

SbBool SoInt32Element::matches (const SoElement * element) const [virtual]

this function returns TRUE is the element matches another element (of the same class), with respect to cache validity. yes bestie, "is" β€” that's the original wording and I refuse to change it, it's part of the lore. πŸ’–

if the application programmer's extension element has a matches() function, it should also have a copyMatchInfo() function. they're a package deal, iykyk. πŸ‘‘

Implements SoElement.

References data, SoElement::getTypeId(), and SoElement::SoElement().

SoElement * SoInt32Element::copyMatchInfo (void ) const [virtual]

this function creates a copy of the element that contains enough information to enable the matches() function to work. it's giving "here's the receipts so the vibe check can happen". ✨

Used to help with scenegraph traversal caching operations.

Implements SoElement.

References data, SoElement::getTypeId(), and SoElement::SoElement().

void SoInt32Element::print (FILE * file) const [virtual]

this function is for printing element information, and is used mostly for debugging purposes. your little peek-behind-the-curtain moment. πŸ™ˆ

Reimplemented from SoElement.

References data, and SoElement::getTypeId().

void SoInt32Element::set (const int index, SoState *const state, const int32_t value) [static]

FIXME: write doc. (the trilogy of mysteries continues πŸ’€)


πŸ’– Member Data Documentation πŸ’–

int32_t SoInt32Element::data [protected]

the 32-bit integer value of the element. main character energy, honestly. ⭐

Referenced by copyMatchInfo(), get(), init(), matches(), print(), and setElt(). she's everywhere. she's booked and busy. πŸ‘‘


🌟 Author 🌟

Generated automatically by Doxygen for Coin from the source code. (so like, a robot wrote this. and i gave it a makeover. we love teamwork. 🫢)


and that's the whole page bestie!! this was Coin, Version 2.5.0, dated SoInt32Element(3) β€” mwah, slay, go forth and store those 32-bit integers responsibly πŸ’…βœ¨πŸŽ€

πŸ“¦ where this page comes from