SOSFSTRING(3iv)
β¨ SoSFString β¨
okay bestie, buckle up, we're talking about SoSFString from the Inventor fam (manual page SoSFString(3IV), iykyk) β it's literally just a field holding a string π
π INHERITS FROM π
SoField > SoSField > SoSFString
so yeah, it's a single-value field (that's the S in there, no cap), sitting pretty at the bottom of that whole inheritance chain π«Ά
β¨ SYNOPSIS β¨
#include <Inventor/fields/SoSFString.h>
Methods from class SoSFString:
setValue(const char *string)
static SoType getClassTypeId()
virtual void getTypeId() const
const SbString & getValue() const
const SbString & operator =(const SbString & newValue)
void setValue(const SbString & newValue)
int operator ==(const SoSFString &f) const
int operator !=(const SoSFString &f) const
Methods from class SoField:
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, this is a field that holds an ASCII string β a lil sequence of characters, that's it, that's the whole vibe π
β οΈ important!! Inventor does not support non-ASCII strings. like, at all. keep it ASCII bestie, don't try it π
when SoSFStrings get written out to a file, they show up as a sequence of ASCII characters wrapped in double quotes β and the quotes are optional if the string has no whitespace in it. any characters (yes, even newlines, we love a chaotic queen) can appear inside those quotes. and if you wanna sneak an actual double quote character into the string? just put a backslash in front of it. easy peasy π
for example:
Testing
"One, Two, Three"
"He said, \"Immel did it!\""
all of those? valid strings. iconic. no notes β¨
π METHODS π
setValue(const char *string)β convenience method to set the field's value when all you've got is a character array. short n sweet π«Άstatic SoType getClassTypeId()virtual void getTypeId() const
returns the type for this class, or for a particular object of this class π
const SbString & getValue() constβ hands you back this field's value. that's it, that's the method πconst SbString & operator =(const SbString & newValue)void setValue(const SbString & newValue)
sets this field to newValue π
int operator ==(const SoSFString &f) constint operator !=(const SoSFString &f) const
returns TRUE if f is of the same type and has the same value as this field π₯
π¦ SEE ALSO π¦
SbString, SoField, SoSField, SoMFString
and that's the whole page bestie!! this one came straight out of the SoSFString(3IV) manual page, SoSFString(3IV)() energy and all π§ go forth and string responsibly, mwah πβ¨
π¦ where this page comes from
- debian bookworm: inventor-doc 2.1.5-10+dfsg-2 Β· LGPL-2.0-or-later
- debian trixie: inventor-doc 2.1.6+ds-2 Β· LGPL-2.0-or-later
- ubuntu jammy: inventor-doc 2.1.5-10-24
- ubuntu noble: inventor-doc 2.1.5-10+dfsg-2.1build2 Β· LGPL-2.0-or-later
- ubuntu questing: inventor-doc 2.1.6+ds-2
- ubuntu resolute: inventor-doc 2.1.6.1+ds-1 Β· LGPL-2.0-or-later
- ubuntu stonking: inventor-doc 2.1.6.1+ds-1 Β· LGPL-2.0-or-later
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash on : a language model's rewrite of the original, under its terms