SOSFIELD(3iv)

πŸ’– SoSField(3IV) πŸ’–

okay bestie, welcome to the SoSField page β€” this is from the 3IV manual, so like, that's the vibe check right there. sit down, grab a strawberry πŸ“, we're talking about the abstract base class situation.


✨ NAME ✨

SoSField β€” the abstract base class for all single-value fields. like, every single-value field in the whole Inventor universe is a baby of this one. mother energy fr fr πŸ‘‘


🌸 INHERITS FROM 🌸

SoField > SoSField

so the family tree goes SoField at the top, then SoSField under it. SoField is the grandparent vibe, SoSField is the parent, and all the actual SoSF* classes are the kids. generational πŸ’…


✨ SYNOPSIS ✨

#include <Inventor/fields/SoField.h>

okay so here's the methods situation, and no I'm not skipping any of them, there are SO many and I love that for us 🫢

Methods from class SoSField:

static SoType       getClassTypeId()

Methods from class SoField:

void                setIgnored(SbBool ignore)
SbBool              isIgnored() const
SbBool              isDefault() const
virtual SoType      getTypeId() const
virtual SbBool      isOfType(SoType type) const
SbBool              set(const char *valueString)
void                get(SbString &valueString)
int                 operator ==(const SoField &f) const
int                 operator !=(const SoField &f) const
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 πŸ’œ

okay so every single class that's derived from SoSField starts its name with an SoSF prefix, and each one holds exactly one value of a particular type. one. single. value. main character energy only, no ensemble cast πŸŽ€

each of them has setValue() and getValue() methods β€” those are the ones you use to change the value or, like, peek at it. and in addition, some field classes come with extra convenience routines so you can set or retrieve the value in other related formats too (more on that below, keep reading bestie πŸ‘€).

and on top of setValue(), every single-value field also overloads the "=" assignment operator, so you can set the field value from the correct datatype, or from another field instance of the same type. cute, right? 😌

the value of a single-value field gets written to file in a format that depends on the field type β€” so if you want the deets, go read the subclass man pages, because that's where the specifics live. iykyk πŸ“–

oh and also, important: a field that's ignored gets a tilde (~) β€” either in place of the value (if the actual value is the default) or after it (if it's not the default). so like, if you see a ~, that field said "not me, not today" πŸ™ˆ


πŸ’… METHODS πŸ’…

  • static SoType getClassTypeId() β€” returns the type identifier for this field class. that's it, that's the whole job, and she does it flawlessly ✨

πŸ¦‹ SEE ALSO πŸ¦‹

SoField, SoMField

go read those too, they're iconic in their own right, no cap 🫢


and that's a wrap on the SoSField(3IV) page, bestie!! πŸ’– the source, version and date slots on this one are literally empty β€” blank as my weekend plans β€” so we're just signing off with the page identity itself: SoSField(3IV). slay, stay type-safe, and remember: one value per field, periodt. πŸ’…βœ¨πŸŽ€