SoFieldContainer(3)

๐Ÿ“ฆ version 3.1.3, in fedora 43, fedora 44

๐ŸŽ€ SoFieldContainer ๐Ÿ’…

okay so bestie, this is SoFieldContainer(3) from the Library Functions Manual, and it's a big one, so buckle up ๐Ÿซถ


๐ŸŒธ NAME ๐ŸŒธ

SoFieldContainer โ€” the base class for every single class that contains fields. no cap. it's the blueprint.


โœจ SYNOPSIS โœจ

#include <Inventor/fields/SoFieldContainer.h>

Inherits SoBase.

Inherited by SoEngine, and SoNode.

๐Ÿฆ‹ Public Member Functions

  • 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 void notify (SoNotList *l)
  • virtual SbBool validateNewFieldValue (SoField *field, void *newval)
  • virtual void addWriteReference (SoOutput *out, SbBool isfromfield=FALSE)
  • virtual void writeInstance (SoOutput *out)
  • SbBool getIsBuiltIn (void) const
  • virtual const SoFieldData * getFieldData (void) const
  • virtual void copyContents (const SoFieldContainer *from, SbBool copyconnections)
  • virtual SoFieldContainer * copyThroughConnection (void) const
  • 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)
  • virtual SoType getTypeId (void) const =0
  • 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 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

  • SoFieldContainer (void)
  • virtual ~SoFieldContainer ()
  • virtual SbBool readInstance (SoInput *in, unsigned short flags)

๐ŸŒธ Protected Member Functions inherited from SoBase

  • SoBase (void)
  • virtual ~SoBase ()
  • virtual void destroy (void)
  • SbBool hasMultipleWriteRefs (void) const
  • SbBool writeHeader (SoOutput *out, SbBool isgroup, SbBool isengine) const
  • void writeFooter (SoOutput *out) const
  • virtual const char * getFileFormatName (void) const

๐Ÿ‘‘ Protected Attributes

  • SbBool isBuiltIn

๐Ÿ“ Additional Inherited Members

Protected Types inherited from SoBase:

  • enum BaseFlags { IS_ENGINE = 0x01, IS_GROUP = 0x02 }

Static Protected Member Functions inherited from SoBase:

  • static uint32_t getCurrentWriteCounter (void)
  • static void staticDataLock (void)
  • static void staticDataUnlock (void)

๐Ÿ’– Detailed Description ๐Ÿ’–

The SoFieldContainer class is a base class for all classes that contain fields.

The classes containing fields in Coin are the node and engine classes, so they are all subclasses of SoFieldContainer. literally the whole family tree, bestie ๐ŸŒณ

SoFieldContainer provides methods for reading, writing, comparing for equality, doing copy operations, etc on fields. it's giving "field management CEO" fr fr ๐Ÿ’…

See also

SoField


๐Ÿ› ๏ธ Constructor & Destructor Documentation ๐Ÿ› ๏ธ

SoFieldContainer::SoFieldContainer (void ) [protected]

Constructor. the origin story โœจ

SoFieldContainer::~SoFieldContainer () [protected], [virtual]

Destructor. the goodbye era ๐Ÿ˜ญ


๐Ÿ“– Member Function Documentation ๐Ÿ“–

void SoFieldContainer::setToDefaults (void )

This method sets all fields which we are parenting to their respective default values. factory reset but make it cute ๐Ÿ’…

SbBool SoFieldContainer::hasDefaultValues (void ) const

This method checks to see if the fields of this container have their default values, and returns TRUE if that is the case. vibe check on the defaults, basically ๐Ÿซถ

SbBool SoFieldContainer::fieldsAreEqual (const SoFieldContainer * container) const

This method returns TRUE if the values of the fields of this and container are equal. twin check ๐Ÿ‘ฏ

void SoFieldContainer::copyFieldValues (const SoFieldContainer * container, SbBool copyconnections = FALSE)

This API member is considered internal to the library, as it is not likely to be of interest to the application programmer. ๐Ÿ‘€

This method copies the field values from container into this. The fields are assumed to be of the same type. The copyconnections flag decides whether the field connections are to be copied aswell.

SbBool SoFieldContainer::set (const char *const fielddata)

This method parses the values of one or more fields from the fielddata string.

The fields must be in the same format as the Open Inventor file format. TRUE is returned upon success, and FALSE otherwise.

See also

get()

void SoFieldContainer::get (SbString & fielddata)

This methods stores the field data in the given fielddata string. The format of the returned string follows the Open Inventor file format.

See also

set()

int SoFieldContainer::getFields (SoFieldList & fields) const [virtual]

This method adds the fields in this container to the l argument, and returns the number of fields added. ๐Ÿงฎ

The virtual nature of this function means that it can be overridden to e.g. hide private fields. sneaky but valid โœจ

int SoFieldContainer::getAllFields (SoFieldList & fields) const [virtual]

Returns VRML eventIn and eventOut fields in addition to the "ordinary" fields. the full deluxe combo meal ๐Ÿ“

See also

getFields()

SoField * SoFieldContainer::getField (const SbName & name) const [virtual]

This method returns a pointer to the field with name, or NULL if no such field exists. finder of fields ๐Ÿ”

SoField * SoFieldContainer::getEventIn (const SbName & name) const [virtual]

This method returns a pointer to the eventIn with name name, or NULL if no such eventIn exists. the inbox of your node ๐Ÿ“ฅ

SoField * SoFieldContainer::getEventOut (const SbName & name) const [virtual]

This method returns a pointer to the eventOut with name name, or NULL if no such eventOut exists. the outbox, iconic ๐Ÿ’Œ

SbBool SoFieldContainer::getFieldName (const SoField *const field, SbName & name) const

Finds the name of the given field and returns the value in the name argument.

TRUE is returned if the field is contained within this instance, and FALSE otherwise. name reveal, main character energy ๐Ÿ‘‘

SbBool SoFieldContainer::enableNotify (const SbBool enable)

This method sets whether notification will be propagated on changing the values of the contained fields. The old value of the flag is returned.

Notification is default on. Turning off automatic notification can be useful for optimizing performance. During series of updates you may want to avoid the propagation of notifications upon every field value change if you make a lot of them. This is how you should handle those cases:

SbBool autonotify = node->enableNotify(FALSE);
// ...
// Make modifications to fields of "node" here.
// ...
node->enableNotify(autonotify);
node->touch();

See also

isNotifyEnabled()

SbBool SoFieldContainer::isNotifyEnabled (void ) const

This method returns whether notification of changes to the field values in the container is propagated to its auditors. are the notifs flowing or nah ๐Ÿ“ข

See also

enableNotify()

SbBool SoFieldContainer::set (const char * fielddata, SoInput * in)

This method parses the values of one or more fields from the fielddata string.

The fields must be in the same format as the Open Inventor file format. TRUE is returned upon success, and FALSE otherwise.

We use the reference dictionary provided by in. ๐Ÿ—‚๏ธ

See also

get()

void SoFieldContainer::get (SbString & fielddata, SoOutput * out)

Put names and values of fields from this instance in the fielddata string. Fields will be separated in the returned string by end-of-line characters.

We use the reference dictionary provided by out. ๐Ÿ—‚๏ธ

See also

set()

void SoFieldContainer::notify (SoNotList * l) [virtual]

Notifies all auditors for this instance when changes are made. ๐Ÿ“ฃ

Reimplemented from SoBase.

Reimplemented in SoAsciiText, SoBlinker, SoBumpMap, SoEngine, SoImage, SoIndexedLineSet, SoIndexedMarkerSet, SoIndexedPointSet, SoLevelOfDetail, SoLOD, SoMaterial, SoNode, SoNodeEngine, SoPackedColor, SoProfilerStats, SoSceneTexture2, SoSceneTextureCubeMap, SoSeparator, SoShadowGroup, SoShape, SoSwitch, SoText3, SoTexture2, SoTexture3, SoTextureCubeMap, SoVertexAttribute, SoVertexProperty, SoVertexShape, SoVRMLAppearance, SoVRMLBillboard, SoVRMLCollision, SoVRMLElevationGrid, SoVRMLExtrusion, SoVRMLGeometry, SoVRMLGroup, SoVRMLIndexedLine, SoVRMLIndexedLineSet, SoVRMLIndexedShape, SoVRMLLOD, SoVRMLParent, SoVRMLPixelTexture, SoVRMLProximitySensor, SoVRMLScript, SoVRMLShape, SoVRMLSwitch, SoVRMLText, SoVRMLTimeSensor, SoVRMLTouchSensor, SoVRMLTransform, SoVRMLVertexLine, SoVRMLVertexPoint, and SoVRMLVertexShape. that is a LOT of reimplementations, slay โœจ

SbBool SoFieldContainer::validateNewFieldValue (SoField * field, void * newval) [virtual]

This API member is considered internal to the library, as it is not likely to be of interest to the application programmer. ๐Ÿ‘€

I can't make head or tails of this method, it seems to return TRUE no matter what the arguments are. ๐Ÿ’€ genuinely the most mysterious function in the building, ngl


and that's where part 1 stops, bestie โ€” part 2 is right there ๐Ÿ‘€

๐Ÿซถ addWriteReference() ๐Ÿซถ

void SoFieldContainer::addWriteReference (SoOutput * out, SbBool isfromfield = FALSE) [virtual]

okay so this one is a little behind-the-scenes girlie ๐Ÿ’… โ€” it gets called during the first write pass of a write action, and its whole job is counting how many references point at this object in the scene graph. Just tallying. Very demure, very mindful.

  • Reimplemented from SoBase.
  • Reimplemented in SoBaseKit.

โœ๏ธ writeInstance() โœ๏ธ

void SoFieldContainer::writeInstance (SoOutput * out) [virtual]

Writes all the fields chillin' inside this instance out to the output stream in out. ๐Ÿ’–

Real talk: this method is solely called from the write methods of fields. So it comes from:

  • SoField โ€” when the write is happening because of a field-to-field connection, or
  • one of the fields that can actually write SoFieldContainer instances, i.e. SoSFNode, SoMFNode, SoSFEngine, SoMFEngine, SoSFPath and SoMFPath.

The reason this method has to exist on top of the ordinary write() method of SoNode? Because the fields don't have a write action instance in their writeValue() method, and writeInstance() will create a new SoWriteAction and call continueToApply() on it. Periodt.

Reimplemented in SoElapsedTime, SoEngine, SoNode, SoNodeEngine, and SoTimeCounter.


๐Ÿ  getIsBuiltIn() ๐Ÿ 

SbBool SoFieldContainer::getIsBuiltIn (void ) const

Returns TRUE if this object is instantiated from one of the native Coin classes, and FALSE if the object's class is outside the standard Coin library. So likeโ€ฆ are you from here or are you visiting? ๐ŸŒธ


๐Ÿ“š getFieldData() ๐Ÿ“š

const SoFieldData * SoFieldContainer::getFieldData (void ) const [virtual]

Hands you back a pointer to the class-wide field data storage object for this instance. If there are no fields present, you get NULL. No fields, no data, no problem. ๐Ÿฆ‹

Reimplemented in โ€” and bestie, sit down for this one, it's a list โ€” SoAnnotation, SoAntiSquish, SoAppearanceKit, SoArray, SoAsciiText, SoBaseColor, SoBaseKit, SoBlinker, SoBoolOperation, SoBumpMap, SoBumpMapCoordinate, SoBumpMapTransform, SoCacheHint, SoCalculator, SoCallback, SoCamera, SoCameraKit, SoCenterballDragger, SoCenterballManip, SoClipPlane, SoClipPlaneManip, SoColorIndex, SoComplexity, SoComposeMatrix, SoComposeRotation, SoComposeRotationFromTo, SoComposeVec2f, SoComposeVec3f, SoComposeVec4f, SoComputeBoundingBox, SoConcatenate, SoCone, SoCoordinate3, SoCoordinate4, SoCounter, SoCube, SoCylinder, SoDecomposeMatrix, SoDecomposeRotation, SoDecomposeVec2f, SoDecomposeVec3f, SoDecomposeVec4f, SoDepthBuffer, SoDirectionalLight, SoDirectionalLightDragger, SoDirectionalLightManip, SoDragger, SoDragPointDragger, SoDrawStyle, SoElapsedTime, SoEnvironment, SoEventCallback, SoExtSelection, SoFaceSet, SoFieldConverter, SoFile, SoFont, SoFontStyle, SoForeignFileKit, SoFragmentShader, SoFrustumCamera, SoGate, SoGeoCoordinate, SoGeoLocation, SoGeometryShader, SoGeoOrigin, SoGeoSeparator, SoGroup, SoHandleBoxDragger, SoHandleBoxManip, SoHeightMapToNormalMap, SoImage, SoIndexedFaceSet, SoIndexedLineSet, SoIndexedMarkerSet, SoIndexedNurbsCurve, SoIndexedNurbsSurface, SoIndexedPointSet, SoIndexedShape, SoIndexedTriangleStripSet, SoInfo, SoInteractionKit, SoInterpolate, SoInterpolateFloat, SoInterpolateRotation, SoInterpolateVec2f, SoInterpolateVec3f, SoInterpolateVec4f, SoJackDragger, SoJackManip, SoLabel, SoLevelOfDetail, SoLight, SoLightKit, SoLightModel, SoLinearProfile, SoLineSet, SoListener, SoLocateHighlight, SoLOD, SoMarkerSet, SoMaterial, SoMaterialBinding, SoMatrixTransform, SoMultipleCopy, SoNodeKitListPart, SoNonIndexedShape, SoNormal, SoNormalBinding, SoNurbsCurve, SoNurbsProfile, SoNurbsSurface, SoOneShot, SoOnOff, SoOrthographicCamera, SoPackedColor, SoPathSwitch, SoPendulum, SoPerspectiveCamera, SoPickStyle, SoPointLight, SoPointLightDragger, SoPointLightManip, SoPointSet, SoPolygonOffset, SoProfile, SoProfileCoordinate2, SoProfileCoordinate3, SoProfilerStats, SoProtoInstance, SoQuadMesh, SoResetTransform, SoRotateCylindricalDragger, SoRotateDiscDragger, SoRotateSphericalDragger, SoRotation, SoRotationXYZ, SoRotor, SoScale1Dragger, SoScale2Dragger, SoScale2UniformDragger, SoScale, SoScaleUniformDragger, SoSceneKit, SoSceneTexture2, SoSceneTextureCubeMap, SoSelection, SoSelectOne, SoSeparator, SoSeparatorKit, SoShaderObject, SoShaderParameter, SoShaderProgram, SoShadowCulling, SoShadowGroup, SoShadowSpotLight, SoShadowStyle, SoShape, SoShapeHints, SoShapeKit, SoShuttle, SoSphere, SoSpotLight, SoSpotLightDragger, SoSpotLightManip, SoSTLFileKit, SoSurroundScale, SoSwitch, SoTabBoxDragger, SoTabBoxManip, SoTabPlaneDragger, SoText2, SoText3, SoTexture2, SoTexture2Convert, SoTexture2Transform, SoTexture3, SoTexture3Transform, SoTextureCombine, SoTextureCoordinate2, SoTextureCoordinate3, SoTextureCoordinateBinding, SoTextureCoordinateCube, SoTextureCoordinateCylinder, SoTextureCoordinateDefault, SoTextureCoordinateEnvironment, SoTextureCoordinateFunction, SoTextureCoordinateNormalMap, SoTextureCoordinateObject, SoTextureCoordinatePlane, SoTextureCoordinateReflectionMap, SoTextureCoordinateSphere, SoTextureCubeMap, SoTextureMatrixTransform, SoTextureScalePolicy, SoTextureUnit, SoTimeCounter, SoTrackballDragger, SoTrackballManip, SoTransform, SoTransformation, SoTransformBoxDragger, SoTransformBoxManip, SoTransformerDragger, SoTransformerManip, SoTransformManip, SoTransformSeparator, SoTransformVec3f, SoTranslate1Dragger, SoTranslate2Dragger, SoTranslation, SoTransparencyType, SoTriangleStripSet, SoTriggerAny, SoUnits, SoVertexAttributeBinding, SoVertexProperty, SoVertexShader, SoVertexShape, SoVRMLAnchor, SoVRMLAppearance, SoVRMLAudioClip, SoVRMLBackground, SoVRMLBillboard, SoVRMLBox, SoVRMLCollision, SoVRMLColor, SoVRMLColorInterpolator, SoVRMLCone, SoVRMLCoordinate, SoVRMLCoordinateInterpolator, SoVRMLCylinder, SoVRMLCylinderSensor, SoVRMLDirectionalLight, SoVRMLDragSensor, SoVRMLElevationGrid, SoVRMLExtrusion, SoVRMLFog, SoVRMLFontStyle, SoVRMLGeometry, SoVRMLGroup, SoVRMLImageTexture, SoVRMLIndexedFaceSet, SoVRMLIndexedLine, SoVRMLIndexedLineSet, SoVRMLIndexedShape, SoVRMLInline, SoVRMLInterpolator, SoVRMLLight, SoVRMLLOD, SoVRMLMaterial, SoVRMLMovieTexture, SoVRMLNavigationInfo, SoVRMLNormal, SoVRMLNormalInterpolator, SoVRMLOrientationInterpolator, SoVRMLParent, SoVRMLPixelTexture, SoVRMLPlaneSensor, SoVRMLPointLight, SoVRMLPointSet, SoVRMLPositionInterpolator, SoVRMLProximitySensor, SoVRMLScalarInterpolator, SoVRMLSensor, SoVRMLShape, SoVRMLSound, SoVRMLSphere, SoVRMLSphereSensor, SoVRMLSpotLight, SoVRMLSwitch, SoVRMLText, SoVRMLTexture, SoVRMLTextureCoordinate, SoVRMLTextureTransform, SoVRMLTimeSensor, SoVRMLTouchSensor, SoVRMLTransform, SoVRMLVertexLine, SoVRMLVertexPoint, SoVRMLVertexShape, SoVRMLViewpoint, SoVRMLVisibilitySensor, SoVRMLWorldInfo, SoWrapperKit, SoWWWAnchor, and SoWWWInline. ๐ŸŽ€ (yes I typed all of them, no I will not be taking questions)


๐Ÿงฌ copyContents() ๐Ÿงฌ

void SoFieldContainer::copyContents (const SoFieldContainer * from, SbBool copyconnections) [virtual]

Makes a deep copy of all the data in from into this instance โ€” except external scenegraph references if copyconnections is FALSE. ๐ŸŒˆ

This is the protected method, so it's the one your extension node / engine / dragger / whatever subclasses should override when they've got internal data that isn't handled automatically. iykyk.

For copying nodes from application code, do not call this function directly bestie, please โ€” call the SoNode::copy() function instead:
SoNode * mynewnode = templatenode->copy();

Same energy goes for engines. ๐Ÿ’…

And listen โ€” when you override copyContents() in your extension class, you gotta make it call upwards to its parent superclass in the inheritance hierarchy, because copyContents() in stuff like SoNode and SoFieldContainer does important work. It should go a little something like this:

void
MyCoinExtensionNode::copyContents(const SoFieldContainer * from,
                                  SbBool copyconnections)
{
  // let parent superclasses do their thing (copy fields, copy
  // instance name, etc etc)
  SoNode::copyContents(from, copyconnections);

  // [..then copy internal data..]
}

Reimplemented in SoBaseKit, SoCallback, SoClipPlaneManip, SoDirectionalLightManip, SoFile, SoGroup, SoInteractionKit, SoNode, SoNodeKitListPart, SoPointLightManip, SoRotateCylindricalDragger, SoRotateSphericalDragger, SoSpotLightManip, SoTransformManip, SoVertexAttribute, SoVRMLAppearance, SoVRMLGeometry, SoVRMLLOD, SoVRMLParent, SoVRMLScript, SoVRMLShape, SoVRMLSwitch, and SoWWWInline.


๐Ÿ‘ฏ copyThroughConnection() ๐Ÿ‘ฏ

SoFieldContainer * SoFieldContainer::copyThroughConnection (void ) const [virtual]

Returns a copy of this instance. โœจ

Note: the default implementation just returns this pointer. SoNode and SoEngine override this method to return the pointer to the actual copy.

Reimplemented in SoEngine, and SoNode.


๐Ÿ—‚๏ธ initCopyDict() ๐Ÿ—‚๏ธ

void SoFieldContainer::initCopyDict (void ) [static]
This API member is considered internal to the library, as it is not likely to be of interest to the application programmer.

Initializes a dictionary hash storing pointers for original fieldcontainer instances and their copies during scene graph copy operations. ๐Ÿซถ

This method is called from the start of SoNode::copy().


โž• addCopy() โž•

void SoFieldContainer::addCopy (const SoFieldContainer * orig, const SoFieldContainer * copy) [static]

Adds a pair of pointers โ€” an original fieldcontainer and a copy of it โ€” to an internal pointer dictionary used during scene graph copy operations. Two besties, permanently linked. ๐ŸŽ€


๐Ÿ” checkCopy() ๐Ÿ”

SoFieldContainer * SoFieldContainer::checkCopy (const SoFieldContainer * orig) [static]

Returns the copy of orig, if any. If no copy exists, we return a NULL pointer. Simple as that. ๐Ÿฆ‹


๐Ÿ•ต๏ธ findCopy() ๐Ÿ•ต๏ธ

SoFieldContainer * SoFieldContainer::findCopy (const SoFieldContainer * orig, const SbBool copyconnections) [static]

Returns a copy of orig.

If no copy has been made earlier when the function is called, a copy is made on-the-fly โ€” which is literally the whole reason we need to pass along the copyconnections flag. ๐Ÿ’…

This method will also run the copyContents() method on the copy, if it hasn't been run already.

Careful bestie: if you call copyContents() on the copy outside of this method, this will go undetected and the guts of orig will get copied multiple times into its copy. ๐Ÿ˜ญ Not the vibe.

If copyContents() is called directly (instead of using copy()), it's assumed the user only wants to copy the field values, and we just return NULL here. This is done to match how it's done in SGI Inventor.

See also

  • checkCopy()

๐Ÿงน copyDone() ๐Ÿงน

void SoFieldContainer::copyDone (void ) [static]
This API member is considered internal to the library, as it is not likely to be of interest to the application programmer.

Cleans up the dictionary hash. โœจ

This method is called from the end of SoNode::copy().


๐Ÿ“ getFieldsMemorySize() ๐Ÿ“

void SoFieldContainer::getFieldsMemorySize (size_t & managed, size_t & unmanaged) const [virtual]

Returns the data array sizes of the SoFieldData-registered multi-fields. ๐ŸŒธ

The managed argument returns the size of the fields that Coin manages the memory for, and the unmanaged argument returns the size of the data in the multi-fields controlled by the application through SoMField::setValuesPointer() โ€” which Coin will not delete. Your memory, your problem, respectfully. ๐Ÿ‘‘

okay so what actually gets counted in those numbers, bestie? ๐Ÿง

Data that's kept in the object memory chunk โ€” the bit that's included when you do sizeof(object) โ€” is NOT in these values. Nope. Only the memory that's managed in additional memory chunks from the object chunk gets returned. That's the whole vibe. ๐Ÿ’…

And extension field types that the plain Coin library doesn't know about? Not accounted for. Which is literally why this function is virtual โ€” so those extension field types can add themselves to the numbers for extension nodes. main character energy, honestly. ๐Ÿ‘‘

This method is used for memory profiling purposes. โœจ

Since : Coin 3.0


๐Ÿซถ void SoFieldContainer::setUserData (void * userdata) const

Set a generic user data pointer for this field container. ๐ŸŽ€

This one is for you, the application programmer โ€” use it to, like, store a pointer to an application specific data structure that's in some way related to the field container. Then getUserData() can later be used to retrieve that pointer back. It's giving safe little pocket for your stuff. ๐Ÿ“

See also : getUserData()

Since : Coin 2.0

๐Ÿ’œ void * SoFieldContainer::getUserData (void ) const

Return the generic user data pointer for this field container โ€” or NULL if no user data has been set. That's it, that's the function. Simple. Iconic. ๐ŸŒธ

See also : setUserData()

Since : Coin 2.0

๐Ÿฆ‹ SbBool SoFieldContainer::readInstance (SoInput * in, unsigned short flags)

[protected], [virtual]

Okay so this one is mainly intended for internal use during file import operations. It's backstage, it's not here to hang out with you. ๐Ÿ™ˆ

It reads a definition of an instance from the input stream in. The input stream state points to the start of a serialized / persistant representation of an instance of this class type.

TRUE or FALSE is returned, depending on if the instantiation and configuration of the new object of this class type went ok or not. And the import process should be robust and handle corrupted input streams by returning FALSE โ€” like, don't crash, bestie, just say no. ๐Ÿ’€

flags is used internally during binary import when reading user extension nodes, group nodes or engines.

Implements SoBase.

Reimplemented in SoBaseKit, SoBumpMap, SoEngine, SoFile, SoGroup, SoImage, SoInteractionKit, SoNode, SoNodeEngine, SoNodeKitListPart, SoNormalBinding, SoProto, SoProtoInstance, SoSeparator, SoShaderObject, SoTexture2, SoTexture3, SoTextureCoordinateBinding, SoTextureCubeMap, SoVertexAttribute, SoVRMLImageTexture, SoVRMLLOD, SoVRMLParent, SoVRMLPixelTexture, SoVRMLSwitch, and SoWWWInline.

that's twenty-six classes all doing their own version of this. a whole friend group fr fr. ๐Ÿซ‚

๐Ÿ’พ Member Data Documentation ๐Ÿ’พ

๐Ÿ”ฅ SbBool SoFieldContainer::isBuiltIn [protected]

Flag for storing whether or not this class instance is a built-in class or not. ๐Ÿ‘‘

By knowing the difference between a class which is native Coin or a user extension, it is possible to automatically store and read extension nodes and engines. So like โ€” knowing who's OG Coin and who's a guest star lets the whole thing autopilot. โœจ


โœ๏ธ Author โœ๏ธ

Generated automatically by Doxygen for Coin from the source code. (not a human, just a lil robot doing its thing, no cap ๐Ÿค–๐Ÿ’–)


and that's a wrap on SoFieldContainer(3), bestie!! ๐ŸŽ‰ you read the whole thing, you're literally so smart, go drink some water. this lil number is from Coin, Version 3.1.3, and it lives at page SoFieldContainer(3) โ€” stan a field container that knows its own memory footprint, fr fr. byeee ๐Ÿ’…๐ŸŒˆ๐ŸŽ€

๐Ÿ“ฆ where this page comes from