SOSFSHORT(3iv)

✨ SoSFShort ✨

okay bestie, welcome to the SoSFShort(3IV) page πŸ’– this is the manual for a field that holds a little short integer, and yes we're gonna go through every single line of it together. grab a snack πŸ“


🌸 NAME 🌸

SoSFShort β€” a field containing a short integer. that's it. that's the whole vibe. πŸŽ€


🧬 INHERITS FROM 🧬

the family tree goes like this, in order, no skips:

SoField > SoSField > SoSFShort

so it's lowkey a descendant of the whole field dynasty πŸ‘‘


πŸ“œ SYNOPSIS πŸ“œ

first thing you gotta do is pull in the header, fr fr:

#include <Inventor/fields/SoSFShort.h>

πŸ’« Methods from class SoSFShort πŸ’«

here's everything it brings to the table on its own:

static SoType       getClassTypeId()
virtual void        getTypeId() const
short               getValue() const
short               operator =(short newValue)
void                setValue(short newValue)
int                 operator ==(const SoSFShort &f) const
int                 operator !=(const SoSFShort &f) const

🫢 Methods from class SoField 🫢

and these are the ones it inherits from its parent, so you get them for free, no cap:

void                setIgnored(SbBool ignore)
SbBool              isIgnored() const
SbBool              isDefault() const
virtual SbBool      isOfType(SoType type) const
SbBool              set(const char *valueString)
void                get(SbString &valueString)
void                touch()
SbBool              connectFrom(SoField *fromField)
SbBool              connectFrom(SoEngineOutput *fromEngine)
void                disconnect()
SbBool              isConnected() const
SbBool              isConnectedFromField() const
SbBool              getConnectedField(SoField *&writingField) const
SbBool              isConnectedFromEngine() const
SbBool              getConnectedEngine(SoEngineOutput *&engineOutput)
                         const
void                enableConnection(SbBool flag)
SbBool              isConnectionEnabled() const
int                 getForwardConnections(SoFieldList &list) const
SoFieldContainer *  getContainer() const

πŸ’… DESCRIPTION πŸ’…

so basically: it's a field containing a short β€” that's a 16-bit integer, bestie. short and sweet, literally. πŸ¦‹

when SoSFShorts get written out to a file, they show up as a single short integer value. and the way that number can be written is giving options: it can be decimal, hexadecimal (which starts with '0x'), or octal (which starts with '0'). so pick your format, she ate either way ✨


πŸ”₯ METHODS πŸ”₯

⭐ static SoType getClassTypeId()

⭐ virtual void getTypeId() const

returns the type for this class, or for a particular object of this class. iykyk 🧚


⭐ short getValue() const

hands you back this field's value. that's the whole job. periodt πŸ’œ


⭐ short operator =(short newValue)

⭐ void setValue(short newValue)

sets this field to newValue. two ways in, same destination, slay πŸŽ€


⭐ int operator ==(const SoSFShort &f) const

⭐ int operator !=(const SoSFShort &f) const

returns TRUE if f is of the same type and has the same value as this field. both boxes gotta be checked, no shortcuts πŸ™ˆ


πŸ‘€ SEE ALSO πŸ‘€

go read these next, they're all in the same friend group:

  • SoField
  • SoSField
  • SoMFShort
  • SoSFUShort
  • SoSFInt32

okay that's the whole page, you made it, I'm so proud of you πŸ₯ΉπŸ’– no details were harmed in the making of this rewrite β€” every flag, value, type and reference is exactly where it was.

and for the cute sign-off: this was the SoSFShort(3IV) manual page, and ngl there's no date stamped on it, so we're just going with the page name and calling it iconic. byeee πŸ‘‘πŸŒˆ