SoFieldContainer Class Reference

Abstract base class for objects that contain fields. More...

#include <Inventor/fields/SoFieldContainer.h>

Inheritance diagram for SoFieldContainer:
SoBase SoRefCounter SoTypedObject SoAnalysisResult SoDataMeasure SoDataMeasureAttributes SoDialogSpreadSheet SoEngine SoImageDataAdapter SoLDMDataTransform SoLDMResourceParameters SoMorphoLut2D SoMorphoLut3D SoNode SoRegistrationResult SoSegmentChain SoVolumeReader SoVolumeWriter

List of all members.

Public Member Functions

void setToDefaults ()
SbBool hasDefaultValues () const
SbBool fieldsAreEqual (const SoFieldContainer *fc) const
void copyFieldValues (const SoFieldContainer *fc, SbBool copyConnections=FALSE)
SoNONUNICODE SbBool set (const char *fieldDataString)
SbBool set (const SbString &fieldDataString)
void get (SbString &fieldDataString)
virtual int getFields (SoFieldList &list) const
virtual int getAllFields (SoFieldList &list) const
virtual SoFieldgetField (const SbName &fieldName) const
virtual SoFieldgetEventIn (const SbName &fieldName) const
virtual SoFieldgetEventOut (const SbName &fieldName) const
SbBool getFieldName (const SoField *field, SbName &fieldName) const
SbBool enableNotify (SbBool flag)
SbBool isNotifyEnabled () const
virtual void setUserData (void *data)
void * getUserData (void) const

Static Public Member Functions

static SoType getClassTypeId ()


class SoFieldContainerExt

Detailed Description

Abstract base class for objects that contain fields.

SoFieldContainer is the base class for engines and nodes. It contains methods for finding out what fields an object has, controlling notification, and for dealing with all of the fields of an object at once.

The fields of an engine are its inputs. Note that even though an engine's output corresponds to a specific type of field, an engine output is not a field.


SoSField, SoMField, SoNode, SoDB

Member Function Documentation

void SoFieldContainer::copyFieldValues ( const SoFieldContainer fc,
SbBool  copyConnections = FALSE 

Copies the contents of fc's fields into this object's fields.

fc must be the same type as this object. If copyConnections is TRUE, then if any of fc's fields are connected then this object's fields will also be connected to the same source.

SbBool SoFieldContainer::enableNotify ( SbBool  flag  )  [inline]

Notification at this Field Container is enabled (if flag == TRUE) or disabled (if flag == FALSE).

The returned Boolean value indicates whether notification was enabled immediately prior to applying this method.

SbBool SoFieldContainer::fieldsAreEqual ( const SoFieldContainer fc  )  const

Returns TRUE if this object's fields are exactly equal to fc's fields.

If fc is not exactly same type as this object, FALSE is returned.

void SoFieldContainer::get ( SbString fieldDataString  )  [inline]

Returns the values of the fields of this object in the Open Inventor ASCII file format in the given string.

Fields whose isDefault() bit is set will not be part of the string. You can use the SoField::get() method to get a field's value as a string even if has its default value.

virtual int SoFieldContainer::getAllFields ( SoFieldList list  )  const [virtual]

Returns a list of fields, including the eventIn's and eventOut's.

static SoType SoFieldContainer::getClassTypeId (  )  [static]

Returns the type of this class.

Reimplemented from SoBase.

Reimplemented in SoImageVizEngine, SoAnalysisResult, SoImageAnalysisResult, SoLabelAnalysisResult, SoSegmentChain, SoFileDataAdapter, SoImageDataAdapter, SoMemoryDataAdapter, SoProxyDataAdapter, SoVolumeReaderAdapter, SoVRImageDataReader, SoMorphoLut2D, SoMorphoLut3D, SoDataMeasure, SoDataMeasureAttributes, SoDataMeasureCustom, SoDataMeasurePredefined, SoRegistrationResult, SoCenterballDragger, SoDirectionalLightDragger, SoDragger, SoDragPointDragger, SoEllipsoidDragger, SoHandleBoxDragger, SoJackDragger, SoPointLightDragger, SoRotateCylindricalDragger, SoRotateDiscDragger, SoRotateSphericalDragger, SoScale1Dragger, SoScale2Dragger, SoScale2UniformDragger, SoScaleUniformDragger, SoSpotLightDragger, SoTabBoxDragger, SoTabPlaneDragger, SoTrackballDragger, SoTransformBoxDragger, SoTransformerDragger, SoTranslate1Dragger, SoTranslate2Dragger, SoEllipseScreenDrawer, SoLassoScreenDrawer, SoPolygonScreenDrawer, SoPolyLineScreenDrawer, SoRectangleScreenDrawer, SoScreenDrawer, SoBoolOperation, SoCalculator, SoComposeVec2f, SoComposeVec2i32, SoComposeVec2s, SoComposeVec3f, SoComposeVec4f, SoDecomposeVec2f, SoDecomposeVec2i32, SoDecomposeVec2s, SoDecomposeVec3f, SoDecomposeVec4f, SoComposeRotation, SoComposeRotationFromTo, SoDecomposeRotation, SoComposeMatrix, SoDecomposeMatrix, SoComputeBoundingBox, SoConcatenate, SoCounter, SoElapsedTime, SoEngine, SoGate, SoInterpolate, SoInterpolateFloat, SoInterpolateRotation, SoInterpolateVec2f, SoInterpolateVec3f, SoInterpolateVec4f, SoOneShot, SoOnOff, SoSelectOne, SoTimeCounter, SoTrackFollower, SoTransformVec3f, SoTriggerAny, SoGeoCoordinate, SoGeoElevationGrid, SoGeoLocation, SoGeoLOD, SoGeoOrigin, SoGeoRender, PoBaseView, PoSceneView, PoView, SoCenterballManip, SoClipPlaneManip, SoDirectionalLightManip, SoHandleBoxManip, SoJackManip, SoPointLightManip, SoSpotLightManip, SoTabBoxManip, SoTrackballManip, SoTransformBoxManip, SoTransformerManip, SoTransformManip, SoAppearanceKit, SoBaseKit, SoCameraKit, SoInteractionKit, SoLightKit, SoNodeKitListPart, SoSceneKit, SoSeparatorKit, SoShapeKit, SoWrapperKit, SoAlgebraicCone, SoAlgebraicCylinder, SoAlgebraicShape, SoAlgebraicSphere, SoAlphaPolicy, SoAnnotation, SoAnnoText3, SoAnnoText3Property, SoAntiSquish, SoArray, SoAsciiText, SoBackground, SoBaseColor, SoBaseExtrusion, SoBBox, SoBevelProperty, SoBillboard, SoBlinker, SoBufferedShape, SoCallback, SoCamera, SoCircularExtrusion, SoClipPlane, SoColorIndex, SoColorMap, SoColorMask, SoComplexity, SoComputeShader, SoComputeShaderScheduler, SoCone, SoCoordinate3, SoCoordinate4, SoCSGShape, SoCube, SoCylinder, SoDepthBuffer, SoDepthOffset, SoDirectionalLight, SoDrawStyle, SoEdgeFlag, SoEnvironment, SoEventCallback, SoExtrusion, SoExtSelection, SoExtTexture2, SoFaceSet, SoFile, SoFont, SoFontStyle, SoFragmentShader, SoFullSceneAntialiasing, SoGeometryShader, SoGeoProjection, SoGLCallback, SoGradientBackground, SoGroup, SoImage, SoImageBackground, SoIndexedFaceSet, SoIndexedLineSet, SoIndexedMarkerSet, SoIndexedNurbsCurve, SoIndexedNurbsSurface, SoIndexedPointSet, SoIndexedQuadMesh, SoIndexedShape, SoIndexedTexture2, SoIndexedTriangleFanSet, SoIndexedTriangleSet, SoIndexedTriangleStripSet, SoInfo, SoInstanceParameter, SoInteractiveComplexity, SoInteractiveSwitch, SoLabel, SoLevelOfDetail, SoLevelOfSimplification, SoLight, SoLightModel, SoLinearProfile, SoLineSet, SoLocateHighlight, SoLOD, SoMarker, SoMarkerSet, SoMaterial, SoMaterialBinding, SoMatrixTransform, SoMultiPathSwitch, SoMultipleCopy, SoMultipleInstance, SoMultipleInstanceBase, SoMultiSwitch, SoNode, SoNonIndexedShape, SoNormal, SoNormalBinding, SoNurbsBoundary, SoNurbsCurve, SoNurbsGroup, SoNurbsProfile, SoNurbsProperty, SoNurbsSurface, SoOrthographicCamera, SoPackedColor, SoPathSwitch, SoPattern, SoPendulum, SoPerspectiveCamera, SoPickStyle, SoPointLight, SoPointSet, SoPolygonOffset, SoProfile, SoProfileCoordinate2, SoProfileCoordinate3, SoProjection, SoQuadMesh, SoRenderToTarget, SoRenderToTextureProperty, SoResetTransform, SoRotation, SoRotationXYZ, SoRotor, SoScale, SoSelection, SoSeparator, SoShaderObject, SoShaderParameter, SoUniformShaderParameter, SoShaderParameter1f, SoShaderParameter1i, SoShaderParameter2f, SoShaderParameter2i, SoShaderParameter3f, SoShaderParameter3i, SoShaderParameter4f, SoShaderParameter4i, SoShaderParameterArray1f, SoShaderParameterArray1i, SoShaderParameterArray2f, SoShaderParameterArray2i, SoShaderParameterArray3f, SoShaderParameterArray3i, SoShaderParameterArray4f, SoShaderParameterArray4i, SoShaderParameterMatrix, SoShaderParameterMatrix3, SoShaderParameterMatrixArray, SoShaderStateMatrixParameter, SoShaderParameterStruct, SoVertexShaderParameter, SoVertexShaderParameter1f, SoVertexShaderParameter1s, SoVertexShaderParameter2f, SoVertexShaderParameter2s, SoVertexShaderParameter3f, SoVertexShaderParameter3s, SoVertexShaderParameter4f, SoVertexShaderParameter4i, SoVertexShaderParameter4s, SoVertexShaderParameter4b, SoVertexShaderParameter4ui, SoVertexShaderParameter4us, SoVertexShaderParameter4ub, SoVertexShaderParameterMatrix, SoVertexShaderParameterBufferObject, SoShaderParameterBufferObject, SoShaderParameterImage, SoShaderProgram, SoShadowGroup, SoShadowStyle, SoShape, SoShapeHints, SoShuttle, SoSphere, SoSpotLight, SoStereoCamera, SoSurroundScale, SoSwitch, SoTessellationControlShader, SoTessellationEvaluationShader, SoText2, SoText3, SoTextProperty, SoTexture, SoTexture2, SoTexture2Transform, SoTexture3, SoTexture3Transform, SoTextureCombiner, SoTextureCoordinate2, SoTextureCoordinate3, SoTextureCoordinateBinding, SoTextureCoordinateDefault, SoTextureCoordinateEnvironment, SoTextureCoordinateFunction, SoTextureCoordinateNormalMap, SoTextureCoordinateObject, SoTextureCoordinatePlane, SoTextureCoordinateReflectionMap, SoTextureCubeMap, SoTextureMatrix, SoTextureUnit, SoTransform, SoTransformation, SoTransformProjection, SoTransformSeparator, SoTranslation, SoTriangleSet, SoTriangleStripSet, SoUnits, SoVertexAttribFeedback, SoVertexFlag, SoVertexProperty, SoVertexShader, SoVertexShape, SoViewport, SoViewportClipping, SoWWWAnchor, SoWWWInline, SoViewingCube, SoROIManip, SoDataCompositor, SoDataRange, SoDataSet, SoDataSetId, SoGeometryPriority, SoHardwareQuery, SoLDMDataTransform, SoLDMResourceParameters, SoLdmShape, SoMultiDataSeparator, SoROI, SoTransferFunction, SoLDMReader, SoVolumeReader, SoVRLdmFileBorderReader, SoVRLdmFileReader, SoVolumeWriter, SoVRLdmFileWriter, DicomInfo, Gnomon, Magnifier, ObliqueSliceBorder, OrthoSliceBorder, PlaneBoxIntersection, PlaneGeometryIntersection, Ruler, SceneView, SliceOrientationMarkers, SliceScaleBar, TextBox, ViewManager, Po3DdataMaster, PoBaseStreamLine, PoCellEdges, PoCellFacets, PoCellIndices, PoCellShape, PoMesh, PoMesh2D, PoMesh2DVec, PoMesh3D, PoMesh3DVec, PoMesh3DVecCrossSection, PoMesh3DVecGridCrossSection, PoMeshContouring, PoMeshCrossContour, PoMeshCrossSection, PoMeshFilled, PoMeshLevelSurf, PoMeshLimit, PoMeshLines, PoMeshProbePoint, PoMeshSides, PoMeshSkeleton, PoMeshSkin, PoStreamLine, PoStreamLineMotion, PoStreamParticleMotion, PoStreamPointMotion, PoStreamSphereMotion, PoStreamSurface, PoStreamTadpoleMotion, PoAngularAxis, PoArrow, PoArrow3, PoAutoCubeAxis, PoAutoValueLegend, PoAxis, PoBar, PoBase, PoBaseAxis, PoBiErrorPointField, PoCartesianAxis, PoChart, PoCircle, PoCircle3, PoCircle3CenterRadius, PoCircle3ThreePoints, PoCircleArc, PoCircleArc3, PoCircleArc3CtrPtAngle, PoCircleArc3CtrTwoPts, PoCircleArc3ThreePts, PoCircleArcCtrPtAngle, PoCircleArcCtrRadTwoAngle, PoCircleArcCtrTwoPts, PoCircleArcThreePts, PoCircleCenterRadius, PoCircleThreePoints, PoConicBar, PoCoordinateSystemAxis, PoCurve, PoCurve3, PoCurveFilling, PoCurveLine, PoCylindricalBar, PoErrorCurve, PoErrorPointField, PoGenAxis, PoGeneralizedBar, PoGeneralizedScatter, PoGraphMaster, PoGroup2Axis, PoGroup3Axis3, PoGroup4Axis, PoGroup6Axis3, PoHighLowClose, PoHistogram, PoItemLegend, PoLabel, PoLabelField, PoLegend, PoLinearAxis, PoLinearBar, PoLinearValueLegend, PoLogAxis, PoMultipleHistogram, PoNonLinearValueLegend1, PoNonLinearValueLegend2, PoNonLinearValueLegend3, PoParallelogram, PoParallelogram3, PoPieChart, PoPieChart2D, PoPieChart3D, PoPieChartRep, PoPointsFieldBars, PoPolarAxis, PoPolarLinAxis, PoPolarLogAxis, PoProfileBar, PoRectangle, PoRibbon, PoScatter, PoSingleHistogram, PoTimeAxis, PoTube, PoValuedMarkerField, PoValueLegend, PoBevelEdge, PoCartesianGrid2D, PoCartesianGrid3D, PoCellFilter, PoCircularProfile, PoCoordinateListFilter, PoDataMapping, PoDateFormatMapping, PoDomain, PoEllipticProfile, PoHexahedronMesh3D, PoIndexedMesh2D, PoIndexedMesh3D, PoIndexListFilter, PoIntervalCellFilter, PoIrregularMesh1D, PoIsovaluesList, PoLabelHints, PoLinearDataMapping, PoMesh1DFilter, PoMesh1DHints, PoMeshProperty, PoMiscTextAttr, PoNode, PoNonLinearDataMapping, PoNonLinearDataMapping2, PoNumericDisplayFormat, PoParalCartesianGrid2D, PoParalCartesianGrid3D, PoPeriodFilter, PoPeriodIndexFilter, PoPolarGrid2D, PoProfile, PoProfileCoordinate2, PoQuadrangleMesh2D, PoRegularCartesianGrid2D, PoRegularCartesianGrid3D, PoRegularMesh1D, PoSquareProfile, PoTetrahedronMesh3D, PoTriangleMesh2D, MoActionNode, MoCellFilter, MoColorMapping, MoCombineColorMapping, MoCustomColorMapping, MoDataBinding, MoDrawStyle, MoLegend, MoLevelColorMapping, MoLinearColorMapping, MoMaterial, MoMesh, MoMeshAnnotatedIsoline, MoMeshBaseRepresentation, MoMeshCellShape, MoMeshClipLine, MoMeshClipPoint, MoMeshCylinderSlice, MoMeshElevatedPlaneSlice, MoMeshFenceSlice, MoMeshGridPlaneSlice, MoMeshInterpolatedLogicalSlice, MoMeshIsoline, MoMeshIsosurface, MoMeshLine, MoMeshLineRepresentation, MoMeshLogicalSlice, MoMeshOutline, MoMeshPlaneSlice, MoMeshPointProbe, MoMeshRepresentation, MoMeshSkin, MoMeshSlab, MoMeshSphereSlice, MoMeshStreamline, MoMeshSurface, MoMeshSurfaceRepresentation, MoMeshVector, MoPredefinedColorMapping, MoScalarSet, MoScalarSetI, MoScalarSetIj, MoScalarSetIjk, MoStringSet, MoTessellator, MoVec3SetI, MoVec3SetIj, MoVec3SetIjk, SoRemoteVizClient, SoOrthoSliceDragger, SoFenceSlice, SoHeightFieldGeometry, SoHeightFieldProperty, SoHeightFieldPropertyMask, SoHeightFieldRender, SoObliqueSlice, SoOffscreenVolumeRender, SoOrthoSlice, SoSlice, SoUniformGridClipping, SoUniformGridProjectionClipping, SoVolumeBufferedShape, SoVolumeClippingGroup, SoVolumeData, SoVolumeDataDrawStyle, SoVolumeFaceSet, SoVolumeGroup, SoVolumeIndexedFaceSet, SoVolumeIndexedTriangleStripSet, SoVolumeIsosurface, SoVolumeMask, SoVolumeMaskGroup, SoVolumeRender, SoVolumeRenderingPhysicalQuality, SoVolumeRenderingQuality, SoVolumeShader, SoVolumeShape, SoVolumeSkin, SoVolumeTransform, SoVolumeTriangleStripSet, SoVRAmFileReader, SoVRAvsFileReader, SoVRDicomFileReader, SoVRGenericFileReader, SoVRMemoryReader, SoVRMrcFileReader, SoVRRasterStackReader, SoVRSegyFileReader, SoVRTiffFileReader, SoVRVolFileReader, SoVRVoxFileReader, SoVRXtFileReader, SoVRMemoryWriter, and SoDialogSpreadSheet.

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

Returns a the eventIn with the given name.

If no such eventIn exists, NULL is returned.

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

Returns the eventOut with the given name.

If no such eventOut exists, NULL is returned.

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

Returns a the field of this object whose name is fieldName.

Returns NULL if there is no field with the given name.

SbBool SoFieldContainer::getFieldName ( const SoField field,
SbName fieldName 
) const

Returns the name of the given field in the fieldName argument.

Returns FALSE if field is not a member of this object.

virtual int SoFieldContainer::getFields ( SoFieldList list  )  const [virtual]

Appends references to all of this object's fields to resultList, and returns the number of fields appended.

The types of the fields can be determined using SoField::isOfType() and SoField::getTypeId(). The names of the fields can be determined by passing the field reference to the getFieldName() method (see below).

void* SoFieldContainer::getUserData ( void   )  const [inline]

Gets user application data.

SbBool SoFieldContainer::hasDefaultValues (  )  const

Returns TRUE if all of the object's fields have their default values.

This will return TRUE even if a field's isDefault() method returns FALSE - for example, if a field's default value is 0.0 and you setValue(0.0) that field, the default flag will be set to FALSE (because it would be too slow to compare the field against its default value every time setValue is called). However, hasDefaultValues() would return TRUE in this case.

SbBool SoFieldContainer::isNotifyEnabled (  )  const [inline]

Notification is the process of telling interested objects that this object has changed.

Notification is needed to make engines and sensors function, is used to keep SoPaths up to date when the scene graph's topology changes, and is also used to invalidate rendering or bounding box caches.

Notification is normally enabled, but can be disabled on a node by node (or engine by engine) basis. If you are making extensive changes to a large part of the scene graph then disabling notification can increase performance, at the expense of increased responsibility for making sure that any interested engines, sensors or paths are kept up to date.

For example, if you will be making a lot of changes to a small part of your scene graph and you know that there are no engines or sensors attached to nodes in that part of the scene graph, you might disable notification on the nodes you are changing, modify them, re-enable notification, and then touch() one of the nodes to cause a redraw.

However, you should profile your application and make sure that notification is taking a significant amount of time before going to the trouble of manually controlling notification.

SbBool SoFieldContainer::set ( const SbString fieldDataString  )  [inline]

Sets one or more fields in this object to the values specified in the given string, which should be a string in the Open Inventor file format.

TRUE is returned if the string was valid Open Inventor file format.

For example, you could set the fields of an SoCube by doing:

   SoCube* cube = new SoCube();
   cube->set( "width 1.0 height 2.0 depth 3.2" );

Reimplemented in SoBaseKit.

SoNONUNICODE SbBool SoFieldContainer::set ( const char *  fieldDataString  )  [inline]

Sets one or more fields in this object to the values specified in the given string, which should be a string in the Open Inventor file format. TRUE is returned if the string was valid Open Inventor file format.For example, you could set the fields of an SoCube by doing:

   SoCube* cube = new SoCube();
   cube->set( "width 1.0 height 2.0 depth 3.2" );

Non Unicode List:
This function should not be used in a Unicode application.
void SoFieldContainer::setToDefaults (  ) 

Sets all fields in this object to their default values.

virtual void SoFieldContainer::setUserData ( void *  data  )  [inline, virtual]

Sets application data.

This method stores a single value of type void*, which is not used for any purpose by Open Inventor, but can be retrieved by the application. Applications can use this value to store, for example, physical properties, inventory tracking numbers, etc. with a node. Default is 0 (null pointer).

Friends And Related Function Documentation

friend class SoFieldContainerExt [friend]

The documentation for this class was generated from the following file:

Open Inventor Toolkit reference manual, generated on 15 Mar 2023
Copyright © Thermo Fisher Scientific All rights reserved.