SoFieldConverter(3)
β¨ SoFieldConverter(3) β¨
okay bestie, welcome to the Library Functions Manual page for SoFieldConverter β she's abstract, she's a base class, she's the blueprint for field converters, and she is iconic. π
πΈ NAME πΈ
SoFieldConverter β the abstract base class for field converters. that's it, that's the whole vibe. π
π¦ SYNOPSIS π¦
#include <Inventor/engines/SoFieldConverter.h>
Inherits SoEngine.
π Public Member Functions π
virtual SoType getTypeId (void) const
virtual const SoFieldData * getFieldData (void) const
virtual const SoEngineOutputData * getOutputData (void) const
virtual SoField * getInput (SoType type)=0
virtual SoEngineOutput * getOutput (SoType type)=0
virtual SoField * getConnectedInput (void)
int getForwardConnections (SoFieldList &l) const
Public Member Functions inherited from SoEngine
void evaluateWrapper (void)
virtual int getOutputs (SoEngineOutputList &l) const
SoEngineOutput * getOutput (const SbName &outputname) const
SbBool getOutputName (const SoEngineOutput *output, SbName &outputname)
const
SbBool isNotifying (void) const
virtual void notify (SoNotList *nl)
SoEngine * copy (void) const
virtual SoFieldContainer * copyThroughConnection (void) const
SbBool shouldCopy (void) const
virtual void writeInstance (SoOutput *out)
Public Member Functions inherited from SoFieldContainer
void setToDefaults (void)
SbBool hasDefaultValues (void) const
SbBool fieldsAreEqual (const SoFieldContainer *container) const
void copyFieldValues (const SoFieldContainer *container, SbBool
copyconnections=FALSE)
SbBool set (const char *const fielddata)
void get (SbString &fielddata)
virtual int getFields (SoFieldList &l) const
virtual int getAllFields (SoFieldList &l) const
virtual SoField * getField (const SbName &name) const
virtual SoField * getEventIn (const SbName &name) const
virtual SoField * getEventOut (const SbName &name) const
SbBool getFieldName (const SoField *const field, SbName &name) const
SbBool enableNotify (const SbBool flag)
SbBool isNotifyEnabled (void) const
SbBool set (const char *fielddata, SoInput *input)
void get (SbString &fielddata, SoOutput *out)
virtual SbBool validateNewFieldValue (SoField *field, void *newval)
virtual void addWriteReference (SoOutput *out, SbBool isfromfield=FALSE)
SbBool getIsBuiltIn (void) const
virtual void copyContents (const SoFieldContainer *from, SbBool
copyconnections)
virtual void getFieldsMemorySize (size_t &managed, size_t &unmanaged)
const
void setUserData (void *userdata) const
void * getUserData (void) const
Public Member Functions inherited from SoBase
void ref (void) const
void unref (void) const
void unrefNoDelete (void) const
int32_t getRefCount (void) const
void touch (void)
SbBool isOfType (SoType type) const
virtual SbName getName (void) const
virtual void setName (const SbName &newname)
virtual void startNotify (void)
void addAuditor (void *const auditor, const SoNotRec::Type type)
void removeAuditor (void *const auditor, const SoNotRec::Type type)
const SoAuditorList & getAuditors (void) const
SbBool shouldWrite (void)
void assertAlive (void) const
π Static Public Member Functions π
static SoType getClassTypeId (void)
static void initClass (void)
static void initClasses (void)
Static Public Member Functions inherited from SoEngine
static void initClass (void)
static void initClasses (void)
static SoType getClassTypeId (void)
static SoEngine * getByName (const SbName &name)
static int getByName (const SbName &name, SoEngineList &el)
Static Public Member Functions inherited from SoFieldContainer
static void initClass (void)
static SoType getClassTypeId (void)
static void cleanupClass (void)
static void initCopyDict (void)
static void addCopy (const SoFieldContainer *orig, const
SoFieldContainer *copy)
static SoFieldContainer * checkCopy (const SoFieldContainer *orig)
static SoFieldContainer * findCopy (const SoFieldContainer *orig, const
SbBool copyconnections)
static void copyDone (void)
Static Public Member Functions inherited from SoBase
static void initClass (void)
static SoType getClassTypeId (void)
static void addName (SoBase *const base, const char *const name)
static void removeName (SoBase *const base, const char *const name)
static void incrementCurrentWriteCounter (void)
static void decrementCurrentWriteCounter (void)
static SoBase * getNamedBase (const SbName &name, SoType type)
static int getNamedBases (const SbName &name, SoBaseList &baselist,
SoType type)
static SbBool read (SoInput *input, SoBase *&base, SoType expectedtype)
static void setInstancePrefix (const SbString &c)
static void setTraceRefs (SbBool trace)
static SbBool getTraceRefs (void)
static SbBool connectRoute (SoInput *input, const SbName &fromnodename,
const SbName &fromfieldname, const SbName &tonodename, const SbName
&tofieldname)
static SbBool readRoute (SoInput *input)
π Protected Member Functions π
SoFieldConverter (void)
virtual ~SoFieldConverter (void)
Protected Member Functions inherited from SoEngine
SoEngine (void)
virtual ~SoEngine (void)
virtual void evaluate (void)=0
virtual SbBool readInstance (SoInput *in, unsigned short flags)
virtual void inputChanged (SoField *which)
void writeOutputTypes (SoOutput *out)
Protected Member Functions inherited from SoFieldContainer
SoFieldContainer (void)
virtual ~SoFieldContainer ()
Protected Member Functions inherited from SoBase
SoBase (void)
virtual ~SoBase ()
SbBool hasMultipleWriteRefs (void) const
SbBool writeHeader (SoOutput *out, SbBool isgroup, SbBool isengine)
const
void writeFooter (SoOutput *out) const
virtual const char * getFileFormatName (void) const
β Static Protected Member Functions β
static const SoFieldData ** getInputDataPtr (void)
static const SoEngineOutputData ** getOutputDataPtr (void)
Static Protected Member Functions inherited from SoEngine
static const SoFieldData ** getInputDataPtr (void)
static const SoEngineOutputData ** getOutputDataPtr (void)
Static Protected Member Functions inherited from SoBase
static uint32_t getCurrentWriteCounter (void)
static void staticDataLock (void)
static void staticDataUnlock (void)
π«Ά Additional Inherited Members π«Ά
Protected Types inherited from SoBase
enum BaseFlags { IS_ENGINE = 0x01, IS_GROUP = 0x02 }
Protected Attributes inherited from SoFieldContainer
SbBool isBuiltIn
π Detailed Description π
SoFieldConverter is the abstract base class for field converters. like, the blueprint-est blueprint. π
so here's the tea: when you try to connect fields of different types, the Coin library goes looking for a field converter class it can slot in between them, acting like a little filter that converts values from the master field into values that match the type of the slave field. matchmaker energy fr fr. π
if a value type conversion is even possible (think an SoSFFloat field and an SoSFInt32 field β where you could legit just do a simple typecast to convert one value to the other), then an SoFieldConverter-derived object gets inserted. slay. β¨
this class is the abstract base superclass that all such field converters need to inherit from. no skipping that step bestie, that's the rule.
Coin ships with one built-in field converter class which handles all the possible field-to-field conversions we know about. which means: application programmers should seldom need to care about this class at all β it's probably only gonna matter if you're expanding the Coin library with your own field type classes. and heads up, doing that is considered advanced use of the library. π
See also SoDB::addConverter()
π Constructor & Destructor Documentation π
SoFieldConverter::SoFieldConverter (void ) [protected]
Default constructor. does exactly what it says on the tin. β¨
SoFieldConverter::~SoFieldConverter (void ) [protected], [virtual]
Default destructor. she leaves as gracefully as she arrived. π¦
π₯ Member Function Documentation π₯
SoType SoFieldConverter::getTypeId (void ) const [virtual]
Returns the type identification of an object derived from a class inheriting SoBase. this is what's used for run-time type checking and "downward" casting. iykyk. π
Usage example:
void foo(SoNode * node)
{
if (node->getTypeId() == SoFile::getClassTypeId()) {
SoFile * filenode = (SoFile *)node; // safe downward cast, knows the type
}
}
for all you application programmers out there wanting to extend the library with new nodes, engines, nodekits, draggers or whatever else: this method needs to be overridden in all subclasses. typically that happens as part of setting up the full type system for extension classes, which is usually done with the pre-defined macros available through, for instance, Inventor/nodes/SoSubNode.h (SO_NODE_INIT_CLASS and SO_NODE_CONSTRUCTOR for node classes), Inventor/engines/SoSubEngine.h (for engine classes) and so on.
want more on writing Coin extensions? go read the class documentation of the toplevel superclasses for the various class groups. π
Implements SoBase.
const SoFieldData * SoFieldConverter::getFieldData (void ) const [virtual]
Returns a pointer to the class-wide field data storage object for this instance. if there are no fields present, it returns NULL. no fields, no problem. π
Reimplemented from SoFieldContainer.
const SoEngineOutputData * SoFieldConverter::getOutputData (void ) const [virtual]
This API member is considered internal to the library, as it is not likely to be of interest to the application programmer. lowkey not your business bestie, but it's here. π
Implements SoEngine.
virtual SoField * SoFieldConverter::getInput (SoType type) [pure virtual]
Returns the input field for the converter engine. must be overridden in non-abstract converter engine classes. no override, no function. periodt. π₯
virtual SoEngineOutput * SoFieldConverter::getOutput (SoType type) [pure virtual]
Returns the output for the converter engine. must be overridden in non-abstract converter engine classes. same energy, different direction. β¨
SoField * SoFieldConverter::getConnectedInput (void ) [virtual]
This method is obsoleted in Coin. it should probably have been private in OIV. we don't talk about her. π
int SoFieldConverter::getForwardConnections (SoFieldList & l) const
Returns the fields which are connected as slaves of the engine output. gathering the whole squad. π«Ά
π§ Author π§
Generated automatically by Doxygen for Coin from the source code. the robots did this one, not me. π€
and that's a wrap, bestie!! this was Coin, Version 3.1.3, serving you SoFieldConverter(3) realness. go forth and convert those fields. mwah. πβ¨ππ¦
π¦ where this page comes from
- fedora 43: Coin3-devel 3.1.3-40.fc43 Β· GPL-2.0-only
- fedora 43: Coin3-devel 3.1.3-40.fc43 Β· GPL-2.0-only
- fedora 44: Coin3-devel 3.1.3-42.fc44 Β· GPL-2.0-only
- fedora 44: Coin3-devel 3.1.3-42.fc44 Β· GPL-2.0-only
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash on : a language model's rewrite of the original, under its terms