SoField - Online Linux Manual PageSection : 3
Updated : Mon Jan 25 2021
Source : Version 2.5.0
Note : Coin

NAMESoField − The SoField class is the top-level abstract base class for fields​.

SYNOPSIS
#include <Inventor/fields/SoField​.h> Inherited by SoMField, and SoSField​.

Public Typesenum FieldType { NORMAL_FIELD = 0, EVENTIN_FIELD, EVENTOUT_FIELD, EXPOSED_FIELD }

Public Member Functionsvirtual ~SoField ()
void setIgnored (SbBool ignore)
SbBool isIgnored (void) const
void setDefault (SbBool def)
SbBool isDefault (void) const
virtual SoType getTypeId (void) const =0
SbBool isOfType (const SoType type) const
void enableConnection (SbBool flag)
SbBool isConnectionEnabled (void) const
SbBool connectFrom (SoEngineOutput *master, SbBool notnotify=0, SbBool append=0)
SbBool appendConnection (SoEngineOutput *master, SbBool notnotify=0)
void disconnect (SoEngineOutput *engineoutput)
SbBool isConnectedFromEngine (void) const
SbBool getConnectedEngine (SoEngineOutput *&master) const
SbBool connectFrom (SoField *master, SbBool notnotify=0, SbBool append=0)
SbBool appendConnection (SoField *master, SbBool notnotify=0)
void disconnect (SoField *field)
SbBool isConnectedFromField (void) const
SbBool getConnectedField (SoField *&master) const
int getNumConnections (void) const
int getForwardConnections (SoFieldList &slavelist) const
int getConnections (SoFieldList &masterlist) const
void disconnect (void)
SbBool isConnected (void) const
void setContainer (SoFieldContainer *cont)
SoFieldContainer * getContainer (void) const
SbBool set (const char *valuestring)
void get (SbString &valuestring)
SbBool shouldWrite (void) const
virtual void touch (void)
virtual void startNotify (void)
virtual void notify (SoNotList *nlist)
SbBool enableNotify (SbBool on)
SbBool isNotifyEnabled (void) const
void addAuditor (void *f, SoNotRec::Type type)
void removeAuditor (void *f, SoNotRec::Type type)
int operator== (const SoField &f) const
int operator!= (const SoField &f) const
virtual void connectionStatusChanged (int numconnections)
SbBool isReadOnly (void) const
virtual SbBool isSame (const SoField &f) const =0
virtual void copyFrom (const SoField &f)=0
virtual void fixCopy (SbBool copyconnections)
virtual SbBool referencesCopy (void) const
void copyConnection (const SoField *fromfield)
virtual SbBool read (SoInput *in, const SbName &name)
virtual void write (SoOutput *out, const SbName &name) const
virtual void countWriteRefs (SoOutput *out) const
void setFieldType (int type)
int getFieldType (void) const
SbBool getDirty (void) const
void setDirty (SbBool dirty)
void evaluate (void) const

Static Public Member Functionsstatic void initClass (void)
static void initClasses (void)
static SoType getClassTypeId (void)

Protected Member FunctionsSoField (void)
void valueChanged (SbBool resetdefault=1)
virtual void evaluateConnection (void) const
virtual SbBool readValue (SoInput *in)=0
virtual void writeValue (SoOutput *out) const =0
virtual SbBool readConnection (SoInput *in)
virtual void writeConnection (SoOutput *out) const
SbBool isDestructing (void) const

Detailed DescriptionThe SoField class is the top-level abstract base class for fields​. Fields is the mechanism used throughout Coin for encapsulating basic data types to detect changes made to them, and to provide conversion, import and export facilities​. Almost all public properties in nodes are stored in fields, and so are the inputs and outputs of engines​. So fields can be viewed as the major mechanism for scenegraph nodes and engines to expose their public API​. Forcing data modification to go through a public function interface while hiding the data members makes it possible to automatically detect and react upon changes in the data structures set up by the application programmer​. E​.g​. the default behavior when changing the value of a field in a scenegraph node is that there'll automatically be a chain of notifications -- from the field to the owner node, from that node to it's parent node, etc all the way through to the top-most root node, where the need for a rendering update will be signalled to the application​. (This notification mechanism is the underlying feature that makes the Coin library classify as a so-called data-driven scenegraph API​. The practical consequences of this is that rendering and many other processing actions is default scheduled to only happen when something has changed in the retained data structures, making the Coin library under normal circumstances much less CPU intensive than so-called 'application-driven' scenegraph API, like for instance SGI IRIS Performer, which are continuously re-rendering even when nothing has changed in the data structures or with the camera viewport​.) Storing data members as fields also provides other conveniences for the application programmer: • Fields can be connected to other fields​. This makes it for instance possible to have 'self-updating' scenes, ie you can set up scenes where entities automatically react to changes in other entities​. This also provides a necessary mechanism for having 'auto-animating' scenes, as it is possible to connect any field to the global field named realTime, providing a wall-clock timer​. • When connecting fields to each other, Coin has built-in mechanisms for automatically converting between different field types​. • Fields provide persistance for scenegraph import (and export) operations​. This includes animating entities, so animations can be stored within ordinary Inventor format files​. • Fields provides features for introspection: they have a type-system, just like for nodes and actions, they are named, and it is also possible to find out which node, engine or other entity owns a field​. • Fields can hold multiple values​. Multi-value fields comes with a much higher level interface abstraction than standard C/C++ arrays​. Note: there are some field classes which has been obsoleted from the Open Inventor API​. They are: SoSFLong, SoSFULong, SoMFLong and SoMFULong​. You should use these classes instead (respectively): SoSFInt32, SoSFUInt32, SoMFInt32 and SoMFUInt32​. For extending the Coin library with your own classes, we strongly recommend that you make yourself acquainted with the excellent «The Inventor Toolmaker» book (ISBN 0-201-62493-1), which describes the tasks involved in detail​. This book was written by the original SGI Inventor designers and explains many of the underlying design ideas, aswell as having lots of hands-on examples on how to extend the Coin toolkit in ways that are true to the fundamental design ideas​. («The Inventor Toolmaker» is also available at SGI's online library, at no cost​. See Download The Inventor Toolmaker​.) Reading the sourcecode of the built-in classes in Coin should also provide very helpful​.
See also SoFieldContainer, SoFieldData

Constructor & Destructor Documentation

SoField::~SoField () [virtual]Destructor​. Disconnects ourself from any connected field or engine before we disconnect all auditors on the field​. References disconnect(), and SoDebugError::postInfo()​.

SoField::SoField (void) [protected]This is the base constructor for field classes​. It takes care of doing the common parts of data initialization in fields​.

Member Function Documentation

void SoField::initClass (void) [static]Internal method called upon initialization of the library (from SoDB::init()) to set up the type system​. References SoType::badType(), SoType::createType(), and initClasses()​. Referenced by SoDB::init()​.

void SoField::initClasses (void) [static]Initialize all the field classes​. References SoType::createType()​. Referenced by initClass()​.

void SoField::setIgnored (SbBool ignore)Sets the flag which indicates whether or not the field should be ignored during certain operations​. The effect of this flag depends on what type of field it is used on, and the type of the node which includes the field​. This flag is represented in Inventor files by a ~ behind the field name​. The flag is in other words persistent​. See also isIgnored() References valueChanged()​. Referenced by SoFieldData::overlay(), and read()​.

SbBool SoField::isIgnored (void) constReturns the ignore flag​. See also setIgnored() Referenced by SoListener::audioRender(), SoCamera::audioRender(), SoComplexity::callback(), SoBaseColor::doAction(), SoClipPlane::doAction(), SoComplexity::doAction(), SoDrawStyle::doAction(), SoFont::doAction(), SoFontStyle::doAction(), SoLightModel::doAction(), SoMaterial::doAction(), SoMaterialBinding::doAction(), SoMatrixTransform::doAction(), SoNormal::doAction(), SoNormalBinding::doAction(), SoPackedColor::doAction(), SoPickStyle::doAction(), SoResetTransform::doAction(), SoRotation::doAction(), SoShapeHints::doAction(), SoSwitch::doAction(), SoTextureCoordinateBinding::doAction(), SoTransparencyType::doAction(), SoUnits::doAction(), SoVRMLColor::doAction(), SoVRMLMaterial::doAction(), SoVRMLSwitch::doAction(), SoResetTransform::getBoundingBox(), SoMatrixTransform::getMatrix(), SoResetTransform::getMatrix(), SoUnits::getMatrix(), SoComplexity::getPrimitiveCount(), SoClipPlane::GLRender(), SoColorIndex::GLRender(), SoComplexity::GLRender(), SoResetTransform::GLRender(), SoTextureScalePolicy::GLRender(), SoFieldData::overlay(), shouldWrite(), and write()​.

void SoField::setDefault (SbBool def)Set whether or not this field should be marked as containing a default value​. See also isDefault() References SbString::getString(), and SoDebugError::postInfo()​. Referenced by connectFrom(), SoBaseKit::countMyFields(), SoBumpMap::notify(), SoImage::notify(), SoTexture2::notify(), SoTexture3::notify(), SoTextureCubeMap::notify(), notify(), SoFieldData::overlay(), read(), SoFieldData::readFieldDescriptions(), SoInteractionKit::setAnyPartAsDefault(), setContainer(), SoInteractionKit::setDefaultOnNonWritingFields(), SoCenterballDragger::setDefaultOnNonWritingFields(), SoDirectionalLightDragger::setDefaultOnNonWritingFields(), SoDragger::setDefaultOnNonWritingFields(), SoDragPointDragger::setDefaultOnNonWritingFields(), SoHandleBoxDragger::setDefaultOnNonWritingFields(), SoJackDragger::setDefaultOnNonWritingFields(), SoPointLightDragger::setDefaultOnNonWritingFields(), SoSpotLightDragger::setDefaultOnNonWritingFields(), SoTabBoxDragger::setDefaultOnNonWritingFields(), SoTabPlaneDragger::setDefaultOnNonWritingFields(), SoTrackballDragger::setDefaultOnNonWritingFields(), SoTransformBoxDragger::setDefaultOnNonWritingFields(), SoTransformerDragger::setDefaultOnNonWritingFields(), SoBaseKit::setDefaultOnNonWritingFields(), SoSeparatorKit::setDefaultOnNonWritingFields(), SoShapeKit::setDefaultOnNonWritingFields(), SoBumpMapCoordinate::SoBumpMapCoordinate(), SoCenterballDragger::SoCenterballDragger(), SoDirectionalLightDragger::SoDirectionalLightDragger(), SoGeoCoordinate::SoGeoCoordinate(), SoGeoLocation::SoGeoLocation(), SoGeoOrigin::SoGeoOrigin(), SoGeoSeparator::SoGeoSeparator(), SoNodeKitListPart::SoNodeKitListPart(), SoShaderObject::SoShaderObject(), SoShaderProgram::SoShaderProgram(), SoSpotLightDragger::SoSpotLightDragger(), SoTextureCombine::SoTextureCombine(), SoTextureCubeMap::SoTextureCubeMap(), SoTransformBoxDragger::SoTransformBoxDragger(), SoTransformerDragger::SoTransformerDragger(), SoVertexProperty::SoVertexProperty(), SoVRMLExtrusion::SoVRMLExtrusion(), SoVRMLNavigationInfo::SoVRMLNavigationInfo(), valueChanged(), SoVRMLGroup::write(), SoVRMLShape::write(), SoVRMLTimeSensor::write(), SoElapsedTime::writeInstance(), and SoTimeCounter::writeInstance()​.

SbBool SoField::isDefault (void) constCheck if the field contains its default value​. Fields which has their default value intact will normally not be included in the output when writing scene graphs out to a file, for instance​. See also setDefault() Referenced by SoBaseKit::countMyFields(), SoShapeHints::doAction(), SoTexture2::doAction(), SoTexture3::doAction(), SoBaseKit::forceChildDrivenWriteRefs(), SoFieldData::overlay(), SoBumpMap::readInstance(), SoImage::readInstance(), SoTexture2::readInstance(), SoTexture3::readInstance(), SoTextureCubeMap::readInstance(), SoInteractionKit::setAnyPartAsDefault(), SoBaseKit::setDefaultOnNonWritingFields(), shouldWrite(), write(), SoVRMLTimeSensor::write(), SoElapsedTime::writeInstance(), and SoTimeCounter::writeInstance()​.

SoType SoField::getTypeId (void) const [pure virtual]Returns the type identification instance which uniquely identifies the Coin field class the object belongs to​. See also getClassTypeId(), SoType Implemented in SoSFVec4us, SoSFVec4ui32, SoSFVec4ub, SoSFVec4s, SoSFVec4i32, SoSFVec4f, SoSFVec4d, SoSFVec4b, SoSFVec3s, SoSFVec3i32, SoSFVec3f, SoSFVec3d, SoSFVec3b, SoSFVec2s, SoSFVec2i32, SoSFVec2f, SoSFVec2d, SoSFVec2b, SoSFUShort, SoSFUInt32, SoSFTrigger, SoSFTime, SoSFString, SoSFShort, SoSFRotation, SoSFPlane, SoSFPath, SoSFNode, SoSFName, SoSFMatrix, SoSFInt32, SoSFImage3, SoSFImage, SoSFFloat, SoSFEnum, SoSFEngine, SoSFDouble, SoSFColorRGBA, SoSFColor, SoSFBox3s, SoSFBox3i32, SoSFBox3f, SoSFBox3d, SoSFBox2s, SoSFBox2i32, SoSFBox2f, SoSFBox2d, SoSFBool, SoSFBitMask, SoMFVec4us, SoMFVec4ui32, SoMFVec4ub, SoMFVec4s, SoMFVec4i32, SoMFVec4f, SoMFVec4d, SoMFVec4b, SoMFVec3s, SoMFVec3i32, SoMFVec3f, SoMFVec3d, SoMFVec3b, SoMFVec2s, SoMFVec2i32, SoMFVec2f, SoMFVec2d, SoMFVec2b, SoMFUShort, SoMFUInt32, SoMFTime, SoMFString, SoMFShort, SoMFRotation, SoMFPlane, SoMFPath, SoMFNode, SoMFName, SoMFMatrix, SoMFInt32, SoMFFloat, SoMFEnum, SoMFEngine, SoMFDouble, SoMFColorRGBA, SoMFColor, SoMFBool, and SoMFBitMask​. Referenced by connectFrom(), SoVRMLScript::copyContents(), SoDB::createGlobalField(), SoDB::createRoute(), SoFieldData::getIndex(), isOfType(), SoVRMLAppearance::notify(), SoVRMLGeometry::notify(), SoVRMLShape::notify(), notify(), readConnection(), SoSceneManager::render(), startNotify(), SoVRMLParent::updateChildList(), SoVRMLScript::write(), and SoFieldData::writeFieldDescriptions()​.

SoType SoField::getClassTypeId (void) [static]Returns a unique type identifier for this field class​. See also getTypeId(), SoType Referenced by SoFieldData::readFieldDescriptions()​.

SbBool SoField::isOfType (const SoType type) constCheck if this instance is of a derived type or is the same type as the one given with the type parameter​. References getTypeId(), and SoType::isDerivedFrom()​. Referenced by SoTransformManip::fieldSensorCB(), and SoTransformManip::valueChangedCB()​.

void SoField::enableConnection (SbBool flag)This sets a flag value which indicates whether or not the set up connection should be considered active​. For as long as the 'enable connection' flag is FALSE, no value propagation will be done from any connected source field, engine or interpolator into this field​. If the connection is first disabled and then enabled again, the field will automatically be synchronized with any master field, engine or interpolator​. See also isConnectionEnabled() References setDirty()​. Referenced by SoBlinker::notify()​.

SbBool SoField::isConnectionEnabled (void) constReturn the current status of the connection enabled flag​. See also enableConnection() Referenced by connectFrom(), SoBlinker::notify(), notify(), and SoSpotLightDragger::setDefaultOnNonWritingFields()​.

SbBool SoField::connectFrom (SoEngineOutput * master, SbBool notnotify = 0, SbBool append = 0)Connects this field as a slave to master​. This means that the value of this field will be automatically updated when master is changed (as long as the connection also is enabled)​. If this field had any master-relationships beforehand, these are all broken up if append is FALSE​. Call with notnotify if you want to avoid the initial notification of connected auditors (a​.k​.a​. slaves)​. Function will return TRUE unless: • If the field output connected from is of a different type from the engine output field-type connected to, a field converter is inserted​. For some combinations of fields no such conversion is possible, and we'll return FALSE​. • If this field is already connected to the master, we will return FALSE​. See also enableConnection(), isConnectionEnabled(), isConnectedFromField() getConnectedField(), appendConnection(SoEngineOutput *) References SoEngineOutput::addConnection(), SoType::badType(), connectFrom(), disconnect(), SoEngineOutput::getConnectionType(), SoEngineOutput::getFieldContainer(), SoFieldConverter::getInput(), SoFieldConverter::getOutput(), getTypeId(), isConnectionEnabled(), SoDebugError::postWarning(), SoBase::ref(), setDefault(), setDirty(), startNotify(), and SoBase::unref()​. Referenced by appendConnection(), connectFrom(), copyConnection(), SoDB::createRoute(), readConnection(), SoBlinker::SoBlinker(), SoElapsedTime::SoElapsedTime(), SoOneShot::SoOneShot(), SoPendulum::SoPendulum(), SoShuttle::SoShuttle(), SoTimeCounter::SoTimeCounter(), SoVRMLTimeSensor::SoVRMLTimeSensor(), SoVRMLTimeSensor::write(), SoElapsedTime::writeInstance(), and SoTimeCounter::writeInstance()​.

SbBool SoField::appendConnection (SoEngineOutput * master, SbBool notnotify = 0)Connect ourself as slave to another object, while still keeping the other connections currently in place​. See also connectFrom() References connectFrom()​.

void SoField::disconnect (SoEngineOutput * master)Disconnect this field as a slave from master​. References SoType::badType(), evaluate(), getContainer(), SoEngineOutput::getForwardConnections(), SoFieldConverter::getInput(), SoFieldConverter::getOutput(), SoBase::getTypeId(), SoType::isDerivedFrom(), SoEngineOutput::isEnabled(), SoDebugError::postInfo(), SoEngineOutput::removeConnection(), and SoBase::unref()​. Referenced by disconnect(), SoDB::removeRoute(), SoVRMLTimeSensor::write(), SoElapsedTime::writeInstance(), and SoTimeCounter::writeInstance()​.

SbBool SoField::isConnectedFromEngine (void) constReturns TRUE if we're connected from an engine​. See also isConnected(), isConnectedFromField() connectFrom(SoEngineOutput *) Referenced by disconnect(), evaluateConnection(), and isConnected()​.

SbBool SoField::getConnectedEngine (SoEngineOutput *& master) constReturns TRUE if we are connected as a slave to at least one engine​. master will be set to the source of the last engine connection made​. See also isConnectedFromEngine(), connectFrom(SoEngineOutput *) appendConnection(SoEngineOutput *)

SbBool SoField::connectFrom (SoField * master, SbBool notnotify = 0, SbBool append = 0)Connects this field as a slave to master​. This means that the value of this field will be automatically updated when master is changed (as long as the connection also is enabled)​. If this field had any connections to master fields beforehand, these are all broken up if append is FALSE​. Call with notnotify if you want to avoid the initial notification of connected auditors (a​.k​.a​. slaves)​. Function will return TRUE unless: • If the field connected from has a different type from the field connected to, a field converter is inserted​. For some combinations of fields no such conversion is possible, and we'll return FALSE​. • If this field is already connected to the master, we will return FALSE​. See also enableConnection(), isConnectionEnabled(), isConnectedFromField() getConnectedField(), appendConnection(SoField *) References addAuditor(), SoEngineOutput::addConnection(), SoType::badType(), connectFrom(), disconnect(), getContainer(), SoFieldContainer::getFieldName(), SoFieldConverter::getInput(), SoBase::getName(), SoFieldConverter::getOutput(), SbName::getString(), getTypeId(), SoBase::getTypeId(), isConnectionEnabled(), SoType::isDerivedFrom(), SoBase::isOfType(), SoDebugError::postWarning(), SoBase::ref(), setDefault(), setDirty(), and startNotify()​.

SbBool SoField::appendConnection (SoField * master, SbBool notnotify = 0)Connect ourself as slave to another object, while still keeping the other connections currently in place​. See also connectFrom() References connectFrom()​.

void SoField::disconnect (SoField * master)Disconnect this field as a slave from master​. References SoType::badType(), disconnect(), evaluate(), getContainer(), SoFieldConverter::getInput(), SoFieldConverter::getOutput(), SoBase::getTypeId(), SoType::isDerivedFrom(), SoBase::isOfType(), SoDebugError::post(), SoDebugError::postInfo(), removeAuditor(), SoEngineOutput::removeConnection(), and SoBase::unref()​.

SbBool SoField::isConnectedFromField (void) constReturns TRUE if we're a slave of at least one field​. See also isConnected(), isConnectedFromEngine() connectFrom(SoField *) Referenced by disconnect(), evaluateConnection(), and isConnected()​.

SbBool SoField::getConnectedField (SoField *& master) constReturns TRUE if we are connected as a slave to at least one other field​. master will be set to the source field in the last field connection made​. See also isConnectedFromField(), connectFrom(SoField *), appendConnection(SoField *) Referenced by SoVRMLTimeSensor::write(), SoElapsedTime::writeInstance(), and SoTimeCounter::writeInstance()​.

int SoField::getNumConnections (void) constReturns number of fields this field is a slave of​. See also getConnections()

int SoField::getForwardConnections (SoFieldList & slavelist) constAppends all the fields which are auditing this field in slavelist, and returns the number of fields which are our slaves​. References SoFieldList::append()​. Referenced by SoDB::createRoute()​.

int SoField::getConnections (SoFieldList & masterlist) constReturns number of masters this field is connected to, and places pointers to all of them into masterlist​. Note that we replace the contents of masterlist, i​.e​. we're not appending new data​. See also getNumConnections() References SbPList::getLength()​.

void SoField::disconnect (void)Disconnect all connections from this field as a slave to master fields or engine outputs​. References isConnected(), isConnectedFromEngine(), and isConnectedFromField()​. Referenced by connectFrom(), copyConnection(), and ~SoField()​.

SbBool SoField::isConnected (void) constReturns TRUE if we're connected from another field, engine or interpolator​. See also isConnectedFromField(), isConnectedFromEngine() connectFrom() References isConnectedFromEngine(), and isConnectedFromField()​. Referenced by copyConnection(), countWriteRefs(), disconnect(), and shouldWrite()​.

void SoField::setContainer (SoFieldContainer * cont)Let the field know to which container it belongs​. See also getContainer(), SoFieldContainer References setDefault()​. Referenced by SoVRMLScript::copyContents(), SoFieldData::readFieldDescriptions(), and SoSFTrigger::startNotify()​.

SoFieldContainer * SoField::getContainer (void) constReturns the SoFieldContainer object 'owning' this field​. See also SoFieldContainer, setContainer() Referenced by SoEngineOutput::addConnection(), connectFrom(), copyConnection(), countWriteRefs(), disconnect(), SoEngineOutput::getForwardConnections(), notify(), read(), SoFieldData::readFieldDescriptions(), SoEngineOutput::removeConnection(), shouldWrite(), SoSFTrigger::startNotify(), and SoDebug::writeField()​.

SbBool SoField::set (const char * valuestring)Set the field's value through the given valuestring​. The format of the string must adhere to the ASCII format used in Coin data format files​. Only the value should be specified - not the name of the field​. FALSE is returned if the field value is invalid for the field type and can't be parsed in any sensible way​. See also get() References readValue(), SoInput::setBuffer(), and valueChanged()​.

void SoField::get (SbString & valuestring)Returns the field's value as an ASCII string in the export data format for Inventor files​. See also set() References countWriteRefs(), SoOutput::getBuffer(), SoOutput::setBuffer(), SoOutput::setStage(), SoOutput::write(), and writeValue()​.

SbBool SoField::shouldWrite (void) constReturns TRUE if it is necessary to write the field when dumping a scene graph​. This needs to be done if the field is not default (it has been changed from its default value), if it's ignored, or if it's connected from another field or engine​. References getContainer(), SbString::getString(), isConnected(), isDefault(), isIgnored(), SoBase::isOfType(), and SoDebugError::postInfo()​. Referenced by SoBaseKit::countMyFields(), write(), SoFieldData::write(), and SoVRMLScript::write()​.

void SoField::touch (void) [virtual]Notify the field as well as the field's owner / container that it has been changed​. Touching a field which is part of any component (engine or node) in a scene graph will lead to a forced redraw​. This is useful if you have been doing several updates to the field wrapped in a pair of enableNotify() calls to notify the field's auditors that its value has changed​. See also setValue(), enableNotify() Reimplemented in SoSFTrigger​. References startNotify()​.

void SoField::startNotify (void) [virtual]Trigger a notification sequence​. At the end of a notification sequence, all 'immediate' sensors (i​.e​. sensors set up with a zero priority) are triggered​. Reimplemented in SoSFTrigger​. References SoDB::endNotify(), getTypeId(), notify(), SoDebugError::postInfo(), and SoDB::startNotify()​. Referenced by connectFrom(), read(), SoSFTrigger::startNotify(), touch(), SoSFTrigger::touch(), and valueChanged()​.

void SoField::notify (SoNotList * nlist) [virtual]Notify auditors that this field has changed​. Reimplemented in SoSFTrigger, SoSFPath, and SoMFPath​. References SoNotList::append(), SoBase::assertAlive(), SoNotRec::getBase(), getContainer(), SoNotList::getFirstRec(), SoDB::getGlobalField(), SoNotList::getLastRec(), SoNotRec::getType(), getTypeId(), isConnectionEnabled(), isNotifyEnabled(), SoFieldContainer::notify(), SoDebugError::postInfo(), setDefault(), setDirty(), and SoNotList::setLastType()​. Referenced by SoMFPath::notify(), SoSFPath::notify(), SoSFTrigger::notify(), startNotify(), and SoEngineOutput::touchSlaves()​.

SbBool SoField::enableNotify (SbBool on)This method sets whether notification will be propagated on changing the value of the field​. The old value of the setting is returned​. See also isNotifyEnabled() Referenced by evaluateConnection(), SoMFEngine::fixCopy(), SoMFNode::fixCopy(), SoMFPath::fixCopy(), SoVRMLTimeSensor::inputChanged(), SoFieldData::overlay(), SoEngineOutput::prepareToWrite(), read(), SoVRMLLOD::readInstance(), SoVRMLParent::readInstance(), SoVRMLSwitch::readInstance(), SoNodeKitListPart::SoNodeKitListPart(), and SoVRMLTimeSensor::SoVRMLTimeSensor()​.

SbBool SoField::isNotifyEnabled (void) constThis method returns whether notification of changes to the field value are propagated to the auditors​. See also enableNotify() Referenced by SoVRMLTimeSensor::inputChanged(), notify(), SoFieldData::overlay(), and SoEngineOutput::prepareToWrite()​.

void SoField::addAuditor (void * f, SoNotRec::Type type)Add an auditor to the list​. All auditors will be notified whenever this field changes its value(s)​. References connectionStatusChanged()​. Referenced by SoFieldSensor::attach(), and connectFrom()​.

void SoField::removeAuditor (void * f, SoNotRec::Type type)Remove an auditor from the list​. References connectionStatusChanged(), and SoDebugError::postInfo()​. Referenced by SoFieldSensor::detach(), and disconnect()​.

int SoField::operator== (const SoField & f) constChecks for equality​. Returns 0 if the fields are of different type or the field's value(s) are not equal​. References isSame()​. Referenced by SoSFImage::operator!=(), and SoSFImage3::operator!=()​.

int SoField::operator!= (const SoField & f) constReturns TRUE if the fields are of different type or has different value​. References isSame()​.

void SoField::connectionStatusChanged (int numconnections) [virtual]Called whenever another slave attaches or detaches itself to us​. numconnections is the difference in number of connections made (i​.e​. if stuff is disconnected, numconnections will be a negative number)​. The default method is empty​. Override in subclasses if you want do something special on connections/deconnections​. Referenced by addAuditor(), and removeAuditor()​.

SbBool SoField::isReadOnly (void) constReturns TRUE if this field should not be written into at the moment the method is called​. This method is used internally in Coin during notification and evaluation processes, and should normally not be of interest to the application programmer​.

SbBool SoField::isSame (const SoField & f) const [pure virtual]Check for equal type and value(s)​. Implemented in SoSFVec4us, SoSFVec4ui32, SoSFVec4ub, SoSFVec4s, SoSFVec4i32, SoSFVec4f, SoSFVec4d, SoSFVec4b, SoSFVec3s, SoSFVec3i32, SoSFVec3f, SoSFVec3d, SoSFVec3b, SoSFVec2s, SoSFVec2i32, SoSFVec2f, SoSFVec2d, SoSFVec2b, SoSFUShort, SoSFUInt32, SoSFTrigger, SoSFTime, SoSFString, SoSFShort, SoSFRotation, SoSFPlane, SoSFPath, SoSFNode, SoSFName, SoSFMatrix, SoSFInt32, SoSFImage3, SoSFImage, SoSFFloat, SoSFEnum, SoSFEngine, SoSFDouble, SoSFColorRGBA, SoSFColor, SoSFBox3s, SoSFBox3i32, SoSFBox3f, SoSFBox3d, SoSFBox2s, SoSFBox2i32, SoSFBox2f, SoSFBox2d, SoSFBool, SoSFBitMask, SoMFVec4us, SoMFVec4ui32, SoMFVec4ub, SoMFVec4s, SoMFVec4i32, SoMFVec4f, SoMFVec4d, SoMFVec4b, SoMFVec3s, SoMFVec3i32, SoMFVec3f, SoMFVec3d, SoMFVec3b, SoMFVec2s, SoMFVec2i32, SoMFVec2f, SoMFVec2d, SoMFVec2b, SoMFUShort, SoMFUInt32, SoMFTime, SoMFString, SoMFShort, SoMFRotation, SoMFPlane, SoMFPath, SoMFNode, SoMFName, SoMFMatrix, SoMFInt32, SoMFFloat, SoMFEnum, SoMFEngine, SoMFDouble, SoMFColorRGBA, SoMFColor, SoMFBool, and SoMFBitMask​. Referenced by operator!=(), and operator==()​.

void SoField::copyFrom (const SoField & f) [pure virtual]Copy value(s) from f into this field​. f must be of the same type as this field​. Implemented in SoSFVec4us, SoSFVec4ui32, SoSFVec4ub, SoSFVec4s, SoSFVec4i32, SoSFVec4f, SoSFVec4d, SoSFVec4b, SoSFVec3s, SoSFVec3i32, SoSFVec3f, SoSFVec3d, SoSFVec3b, SoSFVec2s, SoSFVec2i32, SoSFVec2f, SoSFVec2d, SoSFVec2b, SoSFUShort, SoSFUInt32, SoSFTrigger, SoSFTime, SoSFString, SoSFShort, SoSFRotation, SoSFPlane, SoSFPath, SoSFNode, SoSFName, SoSFMatrix, SoSFInt32, SoSFImage3, SoSFImage, SoSFFloat, SoSFEnum, SoSFEngine, SoSFDouble, SoSFColorRGBA, SoSFColor, SoSFBox3s, SoSFBox3i32, SoSFBox3f, SoSFBox3d, SoSFBox2s, SoSFBox2i32, SoSFBox2f, SoSFBox2d, SoSFBool, SoSFBitMask, SoMFVec4us, SoMFVec4ui32, SoMFVec4ub, SoMFVec4s, SoMFVec4i32, SoMFVec4f, SoMFVec4d, SoMFVec4b, SoMFVec3s, SoMFVec3i32, SoMFVec3f, SoMFVec3d, SoMFVec3b, SoMFVec2s, SoMFVec2i32, SoMFVec2f, SoMFVec2d, SoMFVec2b, SoMFUShort, SoMFUInt32, SoMFTime, SoMFString, SoMFShort, SoMFRotation, SoMFPlane, SoMFPath, SoMFNode, SoMFName, SoMFMatrix, SoMFInt32, SoMFFloat, SoMFEnum, SoMFEngine, SoMFDouble, SoMFColorRGBA, SoMFColor, SoMFBool, and SoMFBitMask​. Referenced by evaluateConnection(), and SoFieldData::overlay()​.

void SoField::fixCopy (SbBool copyconnections) [virtual]This method is internally called after SoField::copyFrom() during scene graph copies, and should do the operations necessary for fixing up the field instance after it has gotten a new value​. The default method in the SoField superclass does nothing​. The application programmer should normally not need to consider this method, unless he constructs a complex field type which contains new references to container instances (i​.e​. nodes or engines)​. Overriding this method is then necessary to update the reference pointers, as they could have been duplicated during the copy operation​. Reimplemented in SoSFPath, SoSFNode, SoSFEngine, SoMFPath, SoMFNode, and SoMFEngine​. Referenced by SoFieldData::overlay()​.

SbBool SoField::referencesCopy (void) const [virtual]Returns TRUE if this field has references to any containers in the scene graph which are also duplicated during the copy operation​. Note that this method only is valid to call during copy operations​. See also the note about the relevance of the fixCopy() method for application programmers, as it is applicable on this method aswell​. Reimplemented in SoSFPath, SoSFNode, SoSFEngine, SoMFPath, SoMFNode, and SoMFEngine​. References SoFieldContainer::checkCopy(), SoEngineOutput::getContainer(), SbPList::getLength(), SoEngineOutput::getNodeContainer(), SoEngineOutput::isNodeEngineOutput(), and SoBase::isOfType()​. Referenced by SoMFEngine::referencesCopy(), SoMFNode::referencesCopy(), SoMFPath::referencesCopy(), SoSFEngine::referencesCopy(), SoSFNode::referencesCopy(), and SoSFPath::referencesCopy()​.

void SoField::copyConnection (const SoField * fromfield)If fromfield contains a connection to another field, make this field also use the same connection​. References connectFrom(), SoEngine::copyThroughConnection(), SoFieldContainer::copyThroughConnection(), SoNode::copyThroughConnection(), disconnect(), SoEngineOutput::getContainer(), getContainer(), SoFieldContainer::getField(), SoFieldContainer::getFieldName(), getFieldType(), SoEngineOutput::getNodeContainer(), SoEngine::getOutput(), SoNodeEngine::getOutput(), SoEngine::getOutputName(), SoNodeEngine::getOutputName(), isConnected(), and SoEngineOutput::isNodeEngineOutput()​. Referenced by SoFieldData::overlay()​.

SbBool SoField::read (SoInput * in, const SbName & name) [virtual]Reads and sets the value of this field from the given SoInput instance​. Returns FALSE if the field value can not be parsed from the input​. The second argument is the field's context-specific name, which is typically its unique identifier in its field container​. See also set(), write() References SoInput::checkISReference(), enableNotify(), getContainer(), SoType::getName(), SbName::getString(), SbString::getString(), SoBase::getTypeId(), SoInput::isBinary(), SoReadError::post(), SoDebugError::postWarning(), SoInput::putBack(), SoInput::read(), readConnection(), readValue(), setDefault(), setDirty(), setIgnored(), SbString::sprintf(), startNotify(), and valueChanged()​. Referenced by SoFieldData::read(), and SoFieldData::readFieldDescriptions()​.

void SoField::write (SoOutput * out, const SbName & name) const [virtual]Write the value of the field to the given SoOutput instance (which can be either a memory buffer or a file, in ASCII or in binary format)​. See also get(), read(), SoOutput References countWriteRefs(), getFieldType(), SoOutput::getStage(), SoOutput::indent(), SoOutput::isBinary(), isDefault(), isIgnored(), SoBase::isOfType(), shouldWrite(), SoOutput::write(), writeConnection(), and writeValue()​. Referenced by SoBaseKit::countMyFields(), SoFieldData::write(), SoVRMLScript::write(), and SoDebug::writeField()​.

void SoField::countWriteRefs (SoOutput * out) const [virtual]This method is called during the first pass of write operations, to count the number of write references to this field and to 'forward' the reference counting operation to the field containers we're connected to​. References SoFieldContainer::addWriteReference(), getContainer(), SoEngineOutput::getFieldContainer(), and isConnected()​. Referenced by get(), SoMField::get1(), and write()​.

void SoField::setFieldType (int type)Set type of this field​. The possible values for type is: 0 for ordinary fields, 1 for eventIn fields, 2 for eventOut fields, 3 for internal fields, 4 for VRML2 exposedField fields​. There are also enum values in SoField​.h​. Referenced by SoVRMLScript::copyContents(), SoFieldData::overlay(), and SoFieldData::readFieldDescriptions()​.

int SoField::getFieldType (void) constReturn the type of this field​. See also setFieldType() Referenced by copyConnection(), SoVRMLScript::copyContents(), SoDB::createRoute(), SoFieldContainer::getEventIn(), SoFieldContainer::getEventOut(), SoFieldContainer::getFields(), SoFieldData::overlay(), write(), and SoVRMLScript::write()​.

SbBool SoField::getDirty (void) constDo we need re-evaluation?

void SoField::setDirty (SbBool dirty)Mark field for re-evaluation (upon next read operation), but do not trigger a notification​. Referenced by connectFrom(), enableConnection(), SoBlinker::notify(), notify(), read(), SoEngineOutput::touchSlaves(), and valueChanged()​.

void SoField::evaluate (void) const [inline]Re-evaluates the value of this field any time a getValue() call is made and the field is marked dirty​. This is done in this way to gain the advantages of having lazy evaluation​. Referenced by SoFieldSensor::attach(), disconnect(), SoMField::getNum(), SoSFImage::getValue(), and SoFieldSensor::trigger()​.

void SoField::valueChanged (SbBool resetdefault = 1) [protected]This method is always called whenever the field's value has been changed by direct invocation of setValue() or some such​. You should never call this method from anywhere in the code where the field value is being set through an evaluation of its connections​. If resetdefault is TRUE, the flag marking whether or not the field has its default value will be set to FALSE​. The method will also notify any auditors that the field's value has changed​. References setDefault(), setDirty(), and startNotify()​. Referenced by SoMField::deleteValues(), SoSFImage::finishEditing(), SoSFImage3::finishEditing(), SoMFEngine::fixCopy(), SoMFNode::fixCopy(), SoMFPath::fixCopy(), SoMField::insertSpace(), read(), set(), SoMField::set1(), SoSFColor::setHSVValue(), SoSFColorRGBA::setHSVValue(), SoMFColor::setHSVValues(), SoMFColorRGBA::setHSVValues(), setIgnored(), SoSFImage::setValue(), SoSFColor::setValue(), SoSFImage3::setValue(), SoSFColorRGBA::setValue(), SoMFName::setValues(), SoMFString::setValues(), SoMFVec3d::setValues(), SoMFRotation::setValues(), SoMFColor::setValues(), SoMFVec2f::setValues(), SoMFVec3f::setValues(), SoMFVec4f::setValues(), SoMFVec2d::setValues(), SoMFVec4d::setValues(), SoMFColorRGBA::setValues(), SoMFVec2i32::setValues(), SoMFVec3i32::setValues(), SoMFVec4i32::setValues(), SoMFVec2b::setValues(), SoMFVec3b::setValues(), SoMFVec4b::setValues(), SoMFVec2s::setValues(), SoMFVec3s::setValues(), SoMFVec4s::setValues(), SoMFVec4ui32::setValues(), SoMFVec4ub::setValues(), and SoMFVec4us::setValues()​.

void SoField::evaluateConnection (void) const [protected], [virtual]If we're connected to a field/engine/interpolator, copy the value from the master source​. References copyFrom(), enableNotify(), SoEngine::evaluateWrapper(), SoNodeEngine::evaluateWrapper(), SoEngineOutput::getContainer(), SoEngineOutput::getNodeContainer(), isConnectedFromEngine(), isConnectedFromField(), isDestructing(), and SoEngineOutput::isNodeEngineOutput()​.

SbBool SoField::readValue (SoInput * in) [protected], [pure virtual]Read field value(s)​. Referenced by read(), and set()​.

void SoField::writeValue (SoOutput * out) const [protected], [pure virtual]Write field value(s)​. Referenced by get(), and write()​.

SbBool SoField::readConnection (SoInput * in) [protected], [virtual]Read the master field of a field-to-field connection (and its field container)​. If input parsing is successful, this field will be connected as a slave to the master field​. Note that this slave field will not be marked as 'dirty' upon connection, i​.e​. it will retain its value until the first update of the master field is made after the connection was set up​. This to be in conformance with how the Inventor Mentor specifies how field connections should be imported (see page 270)​. References connectFrom(), SoFieldContainer::getField(), SoType::getName(), SbName::getString(), getTypeId(), SoBase::getTypeId(), SoInput::isBinary(), SoBase::isOfType(), SoReadError::post(), SoInput::read(), and SoBase::read()​. Referenced by read()​.

void SoField::writeConnection (SoOutput * out) const [protected], [virtual]Write out information about this field's connection​. References SoWriteAction::continueToApply(), SbName::getString(), SoOutput::indent(), SoOutput::isBinary(), SoBase::isOfType(), SoOutput::write(), and SoFieldContainer::writeInstance()​. Referenced by write()​.

SbBool SoField::isDestructing (void) const [protected]Can be used to check if a field is being destructed​. Referenced by evaluateConnection()​.

AuthorGenerated automatically by Doxygen for Coin from the source code​.
0
Johanes Gumabo
Data Size   :   187,887 byte
man-SoField.3coin2Build   :   2024-12-05, 20:55   :  
Visitor Screen   :   x
Visitor Counter ( page / site )   :   2 / 193,701
Visitor ID   :     :  
Visitor IP   :   52.15.70.0   :  
Visitor Provider   :   AMAZON-02   :  
Provider Position ( lat x lon )   :   39.962500 x -83.006100   :   x
Provider Accuracy Radius ( km )   :   1000   :  
Provider City   :   Columbus   :  
Provider Province   :   Ohio ,   :   ,
Provider Country   :   United States   :  
Provider Continent   :   North America   :  
Visitor Recorder   :   Version   :  
Visitor Recorder   :   Library   :  
Online Linux Manual Page   :   Version   :   Online Linux Manual Page - Fedora.40 - march=x86-64 - mtune=generic - 24.12.05
Online Linux Manual Page   :   Library   :   lib_c - 24.10.03 - march=x86-64 - mtune=generic - Fedora.40
Online Linux Manual Page   :   Library   :   lib_m - 24.10.03 - march=x86-64 - mtune=generic - Fedora.40
Data Base   :   Version   :   Online Linux Manual Page Database - 24.04.13 - march=x86-64 - mtune=generic - fedora-38
Data Base   :   Library   :   lib_c - 23.02.07 - march=x86-64 - mtune=generic - fedora.36

Very long time ago, I have the best tutor, Wenzel Svojanovsky . If someone knows the email address of Wenzel Svojanovsky , please send an email to johanes_gumabo@yahoo.co.id .
If error, please print screen and send to johanes_gumabo@yahoo.co.id
Under development. Support me via PayPal.