SoFieldContainer.3sim

Langue: en

Version: 164379 (fedora - 05/07/09)

Section: 3 (Bibliothèques de fonctions)

Sommaire

NAME

SoFieldContainer - 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.

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=0)

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 *in)

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=0)

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

void setUserData (void *userdata) const

void * getUserData (void) const

Static Public Member Functions


static void initClass (void)

static SoType getClassTypeId (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)

Protected Member Functions


SoFieldContainer (void)

~SoFieldContainer ()

virtual SbBool readInstance (SoInput *in, unsigned short flags)

Protected Attributes


SbBool isBuiltIn

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.

SoFieldContainer provides methods for reading, writing, comparing for equality, doing copy operations, etc on fields.

See also:

SoField

Constructor & Destructor Documentation

SoFieldContainer::SoFieldContainer (void) [protected]

Constructor.

SoFieldContainer::~SoFieldContainer () [protected]

Destructor.

Member Function Documentation

void SoFieldContainer::initClass (void) [static]

Sets up initialization for data common to all instances of this class, like submitting necessary information to the Coin type system.

Reimplemented from SoBase.

Reimplemented in SoCenterballDragger, SoDirectionalLightDragger, SoDragPointDragger, SoDragger, SoHandleBoxDragger, SoJackDragger, SoPointLightDragger, SoRotateCylindricalDragger, SoRotateDiscDragger, SoRotateSphericalDragger, SoScale1Dragger, SoScale2Dragger, SoScale2UniformDragger, SoScaleUniformDragger, SoSpotLightDragger, SoTabBoxDragger, SoTabPlaneDragger, SoTrackballDragger, SoTransformBoxDragger, SoTransformerDragger, SoTranslate1Dragger, SoTranslate2Dragger, SoBoolOperation, SoCalculator, SoComposeMatrix, SoComposeRotation, SoComposeRotationFromTo, SoComposeVec2f, SoComposeVec3f, SoComposeVec4f, SoComputeBoundingBox, SoConcatenate, SoCounter, SoDecomposeMatrix, SoDecomposeRotation, SoDecomposeVec2f, SoDecomposeVec3f, SoDecomposeVec4f, SoElapsedTime, SoEngine, SoFieldConverter, SoGate, SoInterpolate, SoInterpolateFloat, SoInterpolateRotation, SoInterpolateVec2f, SoInterpolateVec3f, SoInterpolateVec4f, SoOnOff, SoOneShot, SoSelectOne, SoTimeCounter, SoTransformVec3f, SoTriggerAny, SoNodeEngine, SoCenterballManip, SoClipPlaneManip, SoDirectionalLightManip, SoHandleBoxManip, SoJackManip, SoPointLightManip, SoSpotLightManip, SoTabBoxManip, SoTrackballManip, SoTransformBoxManip, SoTransformManip, SoTransformerManip, SoAppearanceKit, SoBaseKit, SoCameraKit, SoInteractionKit, SoLightKit, SoNodeKitListPart, SoSceneKit, SoSeparatorKit, SoShapeKit, SoWrapperKit, SoAnnotation, SoAntiSquish, SoArray, SoAsciiText, SoBaseColor, SoBlinker, SoBumpMapCoordinate, SoBumpMapTransform, SoBumpMap, SoCallback, SoCamera, SoClipPlane, SoColorIndex, SoComplexity, SoCone, SoCoordinate3, SoCoordinate4, SoCube, SoCylinder, SoDirectionalLight, SoDrawStyle, SoEnvironment, SoEventCallback, SoExtSelection, SoFaceSet, SoFile, SoFont, SoFontStyle, SoGroup, SoImage, SoIndexedFaceSet, SoIndexedLineSet, SoIndexedNurbsCurve, SoIndexedNurbsSurface, SoIndexedShape, SoIndexedTriangleStripSet, SoInfo, SoLOD, SoLabel, SoLevelOfDetail, SoLight, SoLightModel, SoLineSet, SoLinearProfile, SoListener, SoLocateHighlight, SoMarkerSet, SoMaterial, SoMaterialBinding, SoMatrixTransform, SoMultipleCopy, SoNode, SoNonIndexedShape, SoNormal, SoNormalBinding, SoNurbsCurve, SoNurbsProfile, SoNurbsSurface, SoOrthographicCamera, SoPackedColor, SoPathSwitch, SoPendulum, SoPerspectiveCamera, SoPickStyle, SoPointLight, SoPointSet, SoPolygonOffset, SoProfile, SoProfileCoordinate2, SoProfileCoordinate3, SoQuadMesh, SoResetTransform, SoRotation, SoRotationXYZ, SoRotor, SoScale, SoSceneTexture2, SoSelection, SoSeparator, SoShape, SoShapeHints, SoShuttle, SoSphere, SoSpotLight, SoSurroundScale, SoSwitch, SoText2, SoText3, SoTexture2, SoTexture2Transform, SoTexture3, SoTexture3Transform, SoTextureCombine, SoTextureCoordinate2, SoTextureCoordinate3, SoTextureCoordinateBinding, SoTextureCoordinateCube, SoTextureCoordinateCylinder, SoTextureCoordinateDefault, SoTextureCoordinateEnvironment, SoTextureCoordinateFunction, SoTextureCoordinatePlane, SoTextureCoordinateSphere, SoTextureCubeMap, SoTextureScalePolicy, SoTextureUnit, SoTransform, SoTransformSeparator, SoTransformation, SoTranslation, SoTransparencyType, SoTriangleStripSet, SoUnits, SoVertexProperty, SoShaderProgram, SoShaderObject, SoVertexShader, SoFragmentShader, SoFrustumCamera, SoGeometryShader, SoVertexShape, SoWWWAnchor, SoWWWInline, 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, SoVRMLLOD, SoVRMLLight, SoVRMLMaterial, SoVRMLMovieTexture, SoVRMLNavigationInfo, SoVRMLNormal, SoVRMLNormalInterpolator, SoVRMLOrientationInterpolator, SoVRMLParent, SoVRMLPixelTexture, SoVRMLPlaneSensor, SoVRMLPointLight, SoVRMLPointSet, SoVRMLPositionInterpolator, SoVRMLProximitySensor, SoVRMLScalarInterpolator, SoVRMLScript, SoVRMLSensor, SoVRMLShape, SoVRMLSound, SoVRMLSphere, SoVRMLSphereSensor, SoVRMLSpotLight, SoVRMLSwitch, SoVRMLText, SoVRMLTexture, SoVRMLTextureCoordinate, SoVRMLTextureTransform, SoVRMLTimeSensor, SoVRMLTouchSensor, SoVRMLTransform, SoVRMLVertexLine, SoVRMLVertexPoint, SoVRMLVertexShape, SoVRMLViewpoint, SoVRMLVisibilitySensor, SoVRMLWorldInfo, SoShadowGroup, SoShadowStyle, SoShadowCulling, SoGeoOrigin, SoGeoSeparator, SoGeoLocation, and SoGeoCoordinate.

References SoType::badType(), SoType::createType(), and SoBase::getClassTypeId().

Referenced by SoDB::init().

SoType SoFieldContainer::getClassTypeId (void) [static]

This static method returns the SoType object associated with objects of this class.

Reimplemented from SoBase.

Reimplemented in SoCenterballDragger, SoDirectionalLightDragger, SoDragPointDragger, SoDragger, SoHandleBoxDragger, SoJackDragger, SoPointLightDragger, SoRotateCylindricalDragger, SoRotateDiscDragger, SoRotateSphericalDragger, SoScale1Dragger, SoScale2Dragger, SoScale2UniformDragger, SoScaleUniformDragger, SoSpotLightDragger, SoTabBoxDragger, SoTabPlaneDragger, SoTrackballDragger, SoTransformBoxDragger, SoTransformerDragger, SoTranslate1Dragger, SoTranslate2Dragger, SoBoolOperation, SoCalculator, SoComposeMatrix, SoComposeRotation, SoComposeRotationFromTo, SoComposeVec2f, SoComposeVec3f, SoComposeVec4f, SoComputeBoundingBox, SoConcatenate, SoCounter, SoDecomposeMatrix, SoDecomposeRotation, SoDecomposeVec2f, SoDecomposeVec3f, SoDecomposeVec4f, SoElapsedTime, SoEngine, SoFieldConverter, SoGate, SoInterpolate, SoInterpolateFloat, SoInterpolateRotation, SoInterpolateVec2f, SoInterpolateVec3f, SoInterpolateVec4f, SoOnOff, SoOneShot, SoSelectOne, SoTimeCounter, SoTransformVec3f, SoTriggerAny, SoNodeEngine, SoCenterballManip, SoClipPlaneManip, SoDirectionalLightManip, SoHandleBoxManip, SoJackManip, SoPointLightManip, SoSpotLightManip, SoTabBoxManip, SoTrackballManip, SoTransformBoxManip, SoTransformManip, SoTransformerManip, SoAppearanceKit, SoBaseKit, SoCameraKit, SoInteractionKit, SoLightKit, SoNodeKitListPart, SoSceneKit, SoSeparatorKit, SoShapeKit, SoWrapperKit, SoAnnotation, SoAntiSquish, SoArray, SoAsciiText, SoBaseColor, SoBlinker, SoBumpMapCoordinate, SoBumpMapTransform, SoBumpMap, SoCallback, SoCamera, SoClipPlane, SoColorIndex, SoComplexity, SoCone, SoCoordinate3, SoCoordinate4, SoCube, SoCylinder, SoDirectionalLight, SoDrawStyle, SoEnvironment, SoEventCallback, SoExtSelection, SoFaceSet, SoFile, SoFont, SoFontStyle, SoGroup, SoImage, SoIndexedFaceSet, SoIndexedLineSet, SoIndexedNurbsCurve, SoIndexedNurbsSurface, SoIndexedShape, SoIndexedTriangleStripSet, SoInfo, SoLOD, SoLabel, SoLevelOfDetail, SoLight, SoLightModel, SoLineSet, SoLinearProfile, SoListener, SoLocateHighlight, SoMarkerSet, SoMaterial, SoMaterialBinding, SoMatrixTransform, SoMultipleCopy, SoNode, SoNonIndexedShape, SoNormal, SoNormalBinding, SoNurbsCurve, SoNurbsProfile, SoNurbsSurface, SoOrthographicCamera, SoPackedColor, SoPathSwitch, SoPendulum, SoPerspectiveCamera, SoPickStyle, SoPointLight, SoPointSet, SoPolygonOffset, SoProfile, SoProfileCoordinate2, SoProfileCoordinate3, SoQuadMesh, SoResetTransform, SoRotation, SoRotationXYZ, SoRotor, SoScale, SoSceneTexture2, SoSelection, SoSeparator, SoShape, SoShapeHints, SoShuttle, SoSphere, SoSpotLight, SoSurroundScale, SoSwitch, SoText2, SoText3, SoTexture2, SoTexture2Transform, SoTexture3, SoTexture3Transform, SoTextureCombine, SoTextureCoordinate2, SoTextureCoordinate3, SoTextureCoordinateBinding, SoTextureCoordinateCube, SoTextureCoordinateCylinder, SoTextureCoordinateDefault, SoTextureCoordinateEnvironment, SoTextureCoordinateFunction, SoTextureCoordinatePlane, SoTextureCoordinateSphere, SoTextureCubeMap, SoTextureScalePolicy, SoTextureUnit, SoTransform, SoTransformSeparator, SoTransformation, SoTranslation, SoTransparencyType, SoTriangleStripSet, SoUnits, SoVertexProperty, SoShaderProgram, SoShaderObject, SoVertexShader, SoFragmentShader, SoFrustumCamera, SoGeometryShader, SoVertexShape, SoWWWAnchor, SoWWWInline, 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, SoVRMLLOD, SoVRMLLight, SoVRMLMaterial, SoVRMLMovieTexture, SoVRMLNavigationInfo, SoVRMLNormal, SoVRMLNormalInterpolator, SoVRMLOrientationInterpolator, SoVRMLParent, SoVRMLPixelTexture, SoVRMLPlaneSensor, SoVRMLPointLight, SoVRMLPointSet, SoVRMLPositionInterpolator, SoVRMLProximitySensor, SoVRMLScalarInterpolator, SoVRMLScript, SoVRMLSensor, SoVRMLShape, SoVRMLSound, SoVRMLSphere, SoVRMLSphereSensor, SoVRMLSpotLight, SoVRMLSwitch, SoVRMLText, SoVRMLTexture, SoVRMLTextureCoordinate, SoVRMLTextureTransform, SoVRMLTimeSensor, SoVRMLTouchSensor, SoVRMLTransform, SoVRMLVertexLine, SoVRMLVertexPoint, SoVRMLVertexShape, SoVRMLViewpoint, SoVRMLVisibilitySensor, SoVRMLWorldInfo, SoShadowGroup, SoShadowStyle, SoShadowCulling, SoGeoOrigin, SoGeoSeparator, SoGeoLocation, and SoGeoCoordinate.

Referenced by SoNode::initClass(), SoEngine::initClass(), and SoField::readConnection().

void SoFieldContainer::setToDefaults (void)

This method sets all fields which we are parenting to their respective default values.

References SoType::createInstance(), getFieldData(), getFields(), SoBase::getTypeId(), SoFieldData::overlay(), SoBase::ref(), and SoBase::unref().

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.

References SoType::createInstance(), getFieldData(), SoBase::getTypeId(), SoFieldData::isSame(), SoBase::ref(), and SoBase::unref().

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

This method returns TRUE if the values of the fields of this and container are equal.

References getFieldData(), and SoFieldData::isSame().

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

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.

References getFieldData(), SoFieldData::overlay(), and SoDebugError::postInfo().

Referenced by copyContents().

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()

Reimplemented in SoBaseKit.

Referenced by SoListener::audioRender(), SoCamera::audioRender(), SoShape::beginSolidShape(), SoEnvironment::callback(), SoComplexity::callback(), SoNodeKitListPart::containerSet(), SoVRMLSwitch::doAction(), SoVertexProperty::doAction(), SoUnits::doAction(), SoTextureUnit::doAction(), SoTextureCubeMap::doAction(), SoTextureCombine::doAction(), SoTexture3::doAction(), SoTexture2::doAction(), SoSwitch::doAction(), SoShapeHints::doAction(), SoSceneTexture2::doAction(), SoPolygonOffset::doAction(), SoPickStyle::doAction(), SoNormalBinding::doAction(), SoNormal::doAction(), SoMultipleCopy::doAction(), SoMaterialBinding::doAction(), SoMaterial::doAction(), SoGeoOrigin::doAction(), SoGeoLocation::doAction(), SoFontStyle::doAction(), SoFont::doAction(), SoDrawStyle::doAction(), SoComplexity::doAction(), SoCamera::doAction(), SoBumpMapCoordinate::doAction(), SoArray::doAction(), SoVRMLPixelTexture::doAction(), SoVRMLNormal::doAction(), SoVRMLImageTexture::doAction(), SoVRMLVertexShape::generateAndReadLockNormalCache(), SoVertexShape::generateAndReadLockNormalCache(), SoImage::generatePrimitives(), SoVRMLExtrusion::generatePrimitives(), SoSeparator::getBoundingBox(), SoLevelOfDetail::getBoundingBox(), SoArray::getBoundingBox(), SoVRMLGroup::getBoundingBox(), SoUnits::getMatrix(), SoWWWInline::GLRender(), SoTextureScalePolicy::GLRender(), SoTextureCubeMap::GLRender(), SoTexture3::GLRender(), SoTexture2::GLRender(), SoText2::GLRender(), SoShadowStyle::GLRender(), SoShadowCulling::GLRender(), SoSceneTexture2::GLRender(), SoNurbsCurve::GLRender(), SoMarkerSet::GLRender(), SoIndexedNurbsCurve::GLRender(), SoEnvironment::GLRender(), SoComplexity::GLRender(), SoColorIndex::GLRender(), SoCamera::GLRender(), SoBumpMapCoordinate::GLRender(), SoBumpMap::GLRender(), SoVRMLPointSet::GLRender(), SoVRMLPixelTexture::GLRender(), SoVRMLInline::GLRender(), SoVRMLIndexedLineSet::GLRender(), SoVRMLImageTexture::GLRender(), SoVRMLFog::GLRender(), SoCamera::handleEvent(), SoNurbsSurface::rayPick(), SoNurbsCurve::rayPick(), SoIndexedNurbsSurface::rayPick(), SoIndexedNurbsCurve::rayPick(), SoMultipleCopy::search(), SoArray::search(), SoVRMLGeometry::setupShapeHints(), and SoShape::shouldGLRender().

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()

Referenced by SoIndexedShape::areTexCoordsIndexed(), SoVRMLSound::audioRender(), SoListener::audioRender(), SoCamera::audioRender(), SoText3::computeBBox(), SoVRMLSwitch::doAction(), SoUnits::doAction(), SoTextureCoordinate3::doAction(), SoTextureCoordinate2::doAction(), SoTextureCombine::doAction(), SoTexture2::doAction(), SoSwitch::doAction(), SoShapeHints::doAction(), SoLevelOfDetail::doAction(), SoGeoCoordinate::doAction(), SoCamera::doAction(), SoVRMLProximitySensor::doAction(), SoVRMLImageTexture::doAction(), SoIndexedTriangleStripSet::generateDefaultNormals(), SoIndexedFaceSet::generateDefaultNormals(), SoCylinder::generatePrimitives(), SoCube::generatePrimitives(), SoCone::generatePrimitives(), SoArray::getBoundingBox(), SoShape::getComplexityValue(), SoUnits::getMatrix(), SoShape::getScreenSize(), SoNurbsProfile::getVertices(), SoVRMLSphere::GLRender(), SoTextureCubeMap::GLRender(), SoTextureCoordinateSphere::GLRender(), SoTextureCoordinatePlane::GLRender(), SoTextureCoordinateEnvironment::GLRender(), SoTextureCoordinateCylinder::GLRender(), SoTextureCoordinateCube::GLRender(), SoTextureCoordinate3::GLRender(), SoTextureCoordinate2::GLRender(), SoTexture3Transform::GLRender(), SoTexture3::GLRender(), SoTexture2Transform::GLRender(), SoTexture2::GLRender(), SoText3::GLRender(), SoText2::GLRender(), SoShadowStyle::GLRender(), SoSceneTexture2::GLRender(), SoMarkerSet::GLRender(), SoLineSet::GLRender(), SoIndexedLineSet::GLRender(), SoImage::GLRender(), SoGeometryShader::GLRender(), SoCylinder::GLRender(), SoCube::GLRender(), SoCone::GLRender(), SoCamera::GLRender(), SoVRMLPixelTexture::GLRender(), SoVRMLIndexedLineSet::GLRender(), SoVRMLImageTexture::GLRender(), SoVRMLFog::GLRender(), SoVRMLExtrusion::GLRender(), SoVRMLElevationGrid::GLRender(), SoVRMLCone::GLRender(), SoVRMLBox::GLRender(), SoVRMLBackground::GLRender(), SoVRMLAppearance::GLRender(), SoExtSelection::GLRenderBelowPath(), SoVRMLDragSensor::handleEvent(), SoCylinder::rayPick(), SoCube::rayPick(), SoCone::rayPick(), SoTabPlaneDragger::reallyAdjustScaleTabSize(), SoDragger::setCameraInfo(), SoShape::shouldGLRender(), SoSurroundScale::updateMySurroundParams(), SoShaderObject::updateParameters(), SoLOD::whichToTraverse(), and SoVRMLLOD::whichToTraverse().

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.

References SoFieldList::append(), SoFieldData::getField(), getFieldData(), SoField::getFieldType(), and SoFieldData::getNumFields().

Referenced by setToDefaults(), and SoEngine::shouldCopy().

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

Returns VRML eventIn and eventOut fields in addition to the 'ordinary' fields.

See also:

getFields()

References SoFieldList::append(), SoFieldData::getField(), getFieldData(), and SoFieldData::getNumFields().

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.

References SoFieldData::getField(), getFieldData(), SoFieldData::getFieldName(), and SoFieldData::getNumFields().

Referenced by SoField::copyConnection(), SoBaseKit::createFieldList(), SoTransformManip::fieldSensorCB(), getEventIn(), getEventOut(), SoField::readConnection(), SoTransformManip::valueChangedCB(), and SoDragger::workFieldsIntoTransform().

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.

References getField(), and SoField::getFieldType().

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.

References getField(), and SoField::getFieldType().

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.

References getFieldData(), SoFieldData::getFieldName(), and SoFieldData::getIndex().

Referenced by SoField::connectFrom(), SoField::copyConnection(), SoVRMLScript::notify(), and SoDebug::writeField().

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()

Referenced by SoTabPlaneDragger::GLRender(), and SoBaseKit::readInstance().

SbBool SoFieldContainer::isNotifyEnabled (void) const

This method returns whether notification of changes to the field values in the container is propagated to its auditors.

See also:

enableNotify()

Referenced by SoNodeEngine::notify(), and SoEngine::notify().

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()

References getFieldData(), SoDebugError::postInfo(), SoFieldData::read(), and SoInput::setBuffer().

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()

References SoOutput::getBuffer(), getFieldData(), SoOutput::setBuffer(), SoOutput::setStage(), and SoFieldData::write().

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

Notifies all auditors for this instance when changes are made.

Reimplemented from SoBase.

Reimplemented in SoEngine, SoNodeEngine, SoAsciiText, SoBlinker, SoBumpMap, SoImage, SoLOD, SoLevelOfDetail, SoMaterial, SoNode, SoPackedColor, SoSceneTexture2, SoSeparator, SoShape, SoSwitch, SoText3, SoTexture2, SoTexture3, SoTextureCubeMap, SoVertexProperty, SoVertexShape, SoVRMLAppearance, SoVRMLBillboard, SoVRMLCollision, SoVRMLElevationGrid, SoVRMLExtrusion, SoVRMLGeometry, SoVRMLGroup, SoVRMLIndexedLine, SoVRMLIndexedShape, SoVRMLLOD, SoVRMLParent, SoVRMLPixelTexture, SoVRMLProximitySensor, SoVRMLScript, SoVRMLShape, SoVRMLSwitch, SoVRMLText, SoVRMLTimeSensor, SoVRMLTouchSensor, SoVRMLTransform, SoVRMLVertexLine, SoVRMLVertexPoint, SoVRMLVertexShape, and SoShadowGroup.

References SoNotList::append(), SoNotRec::getBase(), SoNotList::getLastRec(), SoNotRec::getType(), SoBase::notify(), and SoDebugError::postInfo().

Referenced by SoNode::notify(), and SoField::notify().

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.

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

This method is used during the first write pass of a write action to count the number of references to this object in the scene graph.

Reimplemented from SoBase.

Reimplemented in SoBaseKit.

References SoBase::addWriteReference(), getFieldData(), and SoFieldData::write().

Referenced by SoField::countWriteRefs(), SoSwitch::write(), SoNode::write(), SoGroup::write(), and SoVRMLParent::write().

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

Writes all the fields contained in this instance to the output stream within out.

This method is solely called from the write methods of fields.

Either from SoField if the write is done because of a field-to-field connection, or from one of the fields which may actually write SoFieldContainer instances, i.e. SoSFNode, SoMFNode, SoSFEngine, SoMFEngine, SoSFPath and SoMFPath.

This method, in addition to the ordinary write() method of SoNode, needs to be present since 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.

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

References getFieldData(), and SoFieldData::write().

Referenced by SoField::writeConnection(), and SoEngine::writeInstance().

SbBool SoFieldContainer::getIsBuiltIn (void) const

Returns TRUE if this object is instantiated from one of the native Coin classes, FALSE if the object's class is outside the standard Coin library.

References isBuiltIn.

Referenced by SoFieldData::write().

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

Returns a pointer to the class-wide field data storage object for this instance. If no fields are present, returns NULL.

Reimplemented in SoCenterballDragger, SoDirectionalLightDragger, SoDragPointDragger, SoDragger, SoHandleBoxDragger, SoJackDragger, SoPointLightDragger, SoRotateCylindricalDragger, SoRotateDiscDragger, SoRotateSphericalDragger, SoScale1Dragger, SoScale2Dragger, SoScale2UniformDragger, SoScaleUniformDragger, SoSpotLightDragger, SoTabBoxDragger, SoTabPlaneDragger, SoTrackballDragger, SoTransformBoxDragger, SoTransformerDragger, SoTranslate1Dragger, SoTranslate2Dragger, SoBoolOperation, SoCalculator, SoComposeMatrix, SoComposeRotation, SoComposeRotationFromTo, SoComposeVec2f, SoComposeVec3f, SoComposeVec4f, SoComputeBoundingBox, SoConcatenate, SoCounter, SoDecomposeMatrix, SoDecomposeRotation, SoDecomposeVec2f, SoDecomposeVec3f, SoDecomposeVec4f, SoElapsedTime, SoFieldConverter, SoGate, SoInterpolate, SoInterpolateFloat, SoInterpolateRotation, SoInterpolateVec2f, SoInterpolateVec3f, SoInterpolateVec4f, SoOnOff, SoOneShot, SoSelectOne, SoTimeCounter, SoTransformVec3f, SoTriggerAny, SoCenterballManip, SoClipPlaneManip, SoDirectionalLightManip, SoHandleBoxManip, SoJackManip, SoPointLightManip, SoSpotLightManip, SoTabBoxManip, SoTrackballManip, SoTransformBoxManip, SoTransformManip, SoTransformerManip, SoAppearanceKit, SoBaseKit, SoCameraKit, SoInteractionKit, SoLightKit, SoNodeKitListPart, SoSceneKit, SoSeparatorKit, SoShapeKit, SoWrapperKit, SoAnnotation, SoAntiSquish, SoArray, SoAsciiText, SoBaseColor, SoBlinker, SoBumpMapCoordinate, SoBumpMapTransform, SoBumpMap, SoCallback, SoCamera, SoClipPlane, SoColorIndex, SoComplexity, SoCone, SoCoordinate3, SoCoordinate4, SoCube, SoCylinder, SoDirectionalLight, SoDrawStyle, SoEnvironment, SoEventCallback, SoExtSelection, SoFaceSet, SoFile, SoFont, SoFontStyle, SoGroup, SoImage, SoIndexedFaceSet, SoIndexedLineSet, SoIndexedNurbsCurve, SoIndexedNurbsSurface, SoIndexedShape, SoIndexedTriangleStripSet, SoInfo, SoLOD, SoLabel, SoLevelOfDetail, SoLight, SoLightModel, SoLineSet, SoLinearProfile, SoListener, SoLocateHighlight, SoMarkerSet, SoMaterial, SoMaterialBinding, SoMatrixTransform, SoMultipleCopy, SoNonIndexedShape, SoNormal, SoNormalBinding, SoNurbsCurve, SoNurbsProfile, SoNurbsSurface, SoOrthographicCamera, SoPackedColor, SoPathSwitch, SoPendulum, SoPerspectiveCamera, SoPickStyle, SoPointLight, SoPointSet, SoPolygonOffset, SoProfile, SoProfileCoordinate2, SoProfileCoordinate3, SoQuadMesh, SoResetTransform, SoRotation, SoRotationXYZ, SoRotor, SoScale, SoSceneTexture2, SoSelection, SoSeparator, SoShape, SoShapeHints, SoShuttle, SoSphere, SoSpotLight, SoSurroundScale, SoSwitch, SoText2, SoText3, SoTexture2, SoTexture2Transform, SoTexture3, SoTexture3Transform, SoTextureCombine, SoTextureCoordinate2, SoTextureCoordinate3, SoTextureCoordinateBinding, SoTextureCoordinateCube, SoTextureCoordinateCylinder, SoTextureCoordinateDefault, SoTextureCoordinateEnvironment, SoTextureCoordinateFunction, SoTextureCoordinatePlane, SoTextureCoordinateSphere, SoTextureCubeMap, SoTextureScalePolicy, SoTextureUnit, SoTransform, SoTransformSeparator, SoTransformation, SoTranslation, SoTransparencyType, SoTriangleStripSet, SoUnits, SoVertexProperty, SoShaderProgram, SoShaderObject, SoVertexShader, SoFragmentShader, SoFrustumCamera, SoGeometryShader, SoVertexShape, SoWWWAnchor, SoWWWInline, 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, SoVRMLLOD, SoVRMLLight, 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, SoShadowGroup, SoShadowStyle, SoShadowCulling, SoGeoOrigin, SoGeoSeparator, SoGeoLocation, and SoGeoCoordinate.

Referenced by addWriteReference(), SoVRMLScript::copyContents(), copyFieldValues(), fieldsAreEqual(), get(), getAllFields(), getField(), getFieldName(), getFields(), hasDefaultValues(), SoFieldData::isSame(), SoFieldData::overlay(), readInstance(), set(), SoBaseKit::set(), setToDefaults(), SoVRMLParent::updateChildList(), SoNode::write(), and writeInstance().

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

Makes a deep copy of all data of from into this instance, except external scenegraph references if copyconnections is FALSE.

This is the protected method that should be overridden by extension node / engine / dragger / whatever subclasses which needs to account for internal data that are not handled automatically.

For copying nodes from application code, you should not invoke this function directly, but rather call the SoNode::copy() function:

   SoNode * mynewnode = templatenode->copy();
 

The same also goes for engines.

Make sure that when you override the copyContents() method in your extension class that you also make it call upwards to it's parent superclass in the inheritance hierarchy, as copyContents() in for instance SoNode and SoFieldContainer does important work. It should go 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 SoRotateCylindricalDragger, SoRotateSphericalDragger, SoClipPlaneManip, SoDirectionalLightManip, SoPointLightManip, SoSpotLightManip, SoTransformManip, SoBaseKit, SoInteractionKit, SoNodeKitListPart, SoCallback, SoFile, SoGroup, SoNode, SoWWWInline, SoVRMLAppearance, SoVRMLGeometry, SoVRMLLOD, SoVRMLParent, SoVRMLScript, SoVRMLShape, and SoVRMLSwitch.

References copyFieldValues(), donotify, SoBase::getName(), and SoBase::setName().

Referenced by SoNode::copyContents(), and findCopy().

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

Return copy of this instance.

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

Reimplemented in SoEngine, and SoNode.

Referenced by SoField::copyConnection().

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.

Initialize 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().

Referenced by SoNode::copy(), and SoEngine::copy().

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

Add a pair of pointers to an original fieldcontainer and a copy of it to an internal pointer dictionary used during scene graph copy operations.

References SoBase::ref().

Referenced by SoNode::addToCopyDict(), SoBaseKit::addToCopyDict(), SoEngine::copy(), and findCopy().

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

Returns the copy of orig, if any. If no copy exists, we return a NULL pointer.

Referenced by SoNode::addToCopyDict(), SoBaseKit::addToCopyDict(), SoEngine::copy(), SoNode::copyThroughConnection(), SoEngine::copyThroughConnection(), findCopy(), SoSFPath::referencesCopy(), SoSFNode::referencesCopy(), SoSFEngine::referencesCopy(), SoMFPath::referencesCopy(), SoMFNode::referencesCopy(), SoMFEngine::referencesCopy(), and SoField::referencesCopy().

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 the 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. Note that if you call copyContents() on the copy outside of this method, this will go undetected and the guts of orig will be copied multiple times into its copy.

If copyContents() is called directly (instead of using copy()), it's assumed that 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()

References addCopy(), checkCopy(), copyContents(), SoType::createInstance(), SoBase::getTypeId(), and SoBase::isOfType().

Referenced by SoNode::copy(), SoEngine::copy(), SoWWWInline::copyContents(), SoGroup::copyContents(), SoFile::copyContents(), SoNode::copyThroughConnection(), SoEngine::copyThroughConnection(), SoSFPath::fixCopy(), SoSFNode::fixCopy(), SoSFEngine::fixCopy(), SoMFPath::fixCopy(), SoMFNode::fixCopy(), and SoMFEngine::fixCopy().

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.

Clean up the dictionary hash.

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

Referenced by SoNode::copy(), and SoEngine::copy().

void SoFieldContainer::setUserData (void * userdata) const

Set a generic user data pointer for this field container.

This function can be used by the application programmer to, for instance, store a pointer to an application specific data structure that is in some way related to the field container. getUserData() can later be used to retrieve the pointer.

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.

See also:

setUserData()

Since:

Coin 2.0

SbBool SoFieldContainer::readInstance (SoInput * in, unsigned short flags) [protected, virtual]

This method is mainly intended for internal use during file import operations.

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. The import process should be robust and handle corrupted input streams by returning FALSE.

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

Implements SoBase.

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

References getFieldData(), and SoFieldData::read().

Referenced by SoNode::readInstance(), and SoEngine::readInstance().

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.

Referenced by getIsBuiltIn(), and SoShape::shouldGLRender().

Author

Generated automatically by Doxygen for Coin from the source code.