#include <Inventor/fields/SoField.h>
Inheritance diagram for SoField::
Public Methods | |
virtual | ~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=FALSE, SbBool append=FALSE) |
SbBool | appendConnection (SoEngineOutput *master, SbBool notnotify=FALSE) |
void | disconnect (SoEngineOutput *engineoutput) |
SbBool | isConnectedFromEngine (void) const |
SbBool | getConnectedEngine (SoEngineOutput *&master) const |
SbBool | connectFrom (SoField *master, SbBool notnotify=FALSE, SbBool append=FALSE) |
SbBool | appendConnection (SoField *master, SbBool notnotify=FALSE) |
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 |
SbBool | connectFrom (SoVRMLInterpOutput *master, SbBool notnotify=FALSE, SbBool append=FALSE) |
SbBool | appendConnection (SoVRMLInterpOutput *master, SbBool notnotify=FALSE) |
void | disconnect (SoVRMLInterpOutput *interpoutput) |
SbBool | isConnectedFromVRMLInterp (void) const |
SbBool | getConnectedVRMLInterp (SoVRMLInterpOutput *&master) 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 | evaluate (void) const |
void | setFieldType (int type) |
int | getFieldType (void) const |
SbBool | getDirty (void) const |
void | setDirty (SbBool dirty) |
Static Public Methods | |
void | initClass (void) |
void | initClasses (void) |
SoType | getClassTypeId (void) |
Protected Methods | |
SoField (void) | |
void | valueChanged (SbBool resetdefault=TRUE) |
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 |
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.)
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.
|
Destructor. Disconnects ourself from any connected field, engine or VRML interpolator, before we disconnect all auditors on the field. |
|
This is the base constructor for field classes. It takes care of doing the common parts of data initialization in fields. |
|
Internal method called upon initialization of the library (from SoDB::init()) to set up the type system. Reimplemented in SoSField, SoMField, SoSFBool, SoMFBool, SoSFColor, SoMFColor, SoSFFloat, SoMFFloat, SoSFInt32, SoMFInt32, SoSFMatrix, SoMFMatrix, SoSFName, SoMFName, SoSFPlane, SoMFPlane, SoSFRotation, SoMFRotation, SoSFShort, SoMFShort, SoSFString, SoMFString, SoSFTime, SoMFTime, SoSFUInt32, SoMFUInt32, SoSFUShort, SoMFUShort, SoSFVec2f, SoSFVec3f, SoSFVec4f, SoMFVec2f, SoMFVec3f, SoMFVec4f, SoSFImage, SoSFEnum, SoMFEnum, SoSFBitMask, SoMFBitMask, SoSFNode, SoMFNode, SoSFTrigger, SoSFEngine, SoSFPath, SoMFEngine, and SoMFPath. |
|
Initialize all the field classes. |
|
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.
|
|
Returns the ignore flag.
|
|
Set whether or not this field should be marked as containing a default value.
|
|
Check 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.
|
|
Returns the type identification instance which uniquely identifies the Coin field class the object belongs to.
|
|
Returns a unique type identifier for this field class.
|
|
Check if this instance is of a derived type or is the same type as the one given with the type parameter. |
|
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 If the connection is first disabled and then enabled again, the field will automatically be synchronized with any master field, engine or interpolator.
|
|
Return the current status of the connection enabled flag.
|
|
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 the field output connected from is of 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
If this field had any master-relationships beforehand, these are all broken up if append is Call with notnotify if you want to avoid the initial notification of connected auditors (a.k.a. slaves).
|
|
Connect ourself as slave to another object, while still keeping the other connections currently in place.
|
|
Disconnect this field as a slave from master. |
|
Returns
|
|
Returns
|
|
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 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
If this field had any connections to master fields beforehand, these are all broken up if append is Call with notnotify if you want to avoid the initial notification of connected auditors (a.k.a. slaves).
|
|
Connect ourself as slave to another object, while still keeping the other connections currently in place.
|
|
Disconnect this field as a slave from master. |
|
Returns
|
|
Returns
|
|
Returns number of fields this field is a slave of.
|
|
Appends all the fields which are auditing this field in slavelist, and returns the number of fields which are our slaves. |
|
Returns 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.
|
|
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 the field output connected from is of 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
If this field had any master-relationships beforehand, these are all broken up if append is Call with notnotify if you want to avoid the initial notification of connected auditors (a.k.a. slaves).
|
|
Connect ourself as slave to another object, while still keeping the other connections currently in place.
|
|
Disconnect this field as a slave from master. |
|
Returns
|
|
Returns
|
|
Disconnect all connections from this field as a slave to master fields, engine outputs or VRML interpolator outputs. |
|
Returns
|
|
Let the field know to which container it belongs.
|
|
Returns the SoFieldContainer object "owning" this field.
|
|
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.
|
|
Returns the field's value as an ASCII string in the export data format for Inventor files.
|
|
Returns |
|
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.
Reimplemented in SoSFTrigger. |
|
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. |
|
Notify auditors that this field has changed. Reimplemented in SoSFTrigger, SoSFPath, and SoMFPath. |
|
This method sets whether notification will be propagated on changing the value of the field. The old value of the setting is returned.
|
|
This method returns whether notification of changes to the field value are propagated to the auditors.
|
|
Add an auditor to the list. All auditors will be notified whenever this field changes its value(s). |
|
Remove an auditor from the list. |
|
Checks for equality. Returns |
|
Returns |
|
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. Overload in subclasses if you want do something special on connections/deconnections. |
|
Returns This method is used internally in Coin during notification and evaluation processes, and should normally not be of interest to the application programmer. |
|
Check for equal type and value(s). |
|
Copy value(s) from f into this field. |
|
This method is internally called after 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). Overloading this method is then necessary to update the reference pointers, as they could have been duplicated during the copy operation. Reimplemented in SoSFNode, SoMFNode, SoSFEngine, SoSFPath, SoMFEngine, and SoMFPath. |
|
Returns 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 SoSFNode, SoMFNode, SoSFEngine, SoSFPath, SoMFEngine, and SoMFPath. |
|
If fromfield contains a connection to another field, make this field also use the same connection. |
|
Reads and sets the value of this field from the given SoInput instance. Returns This field has the name given as the second argument.
|
|
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).
|
|
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. |
|
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. |
|
Set type of this field. The possible values for type is: 0 for ordinary fields, 1 for VRML2 eventIn fields, 2 for VRML2 eventOut fields, 3 for some other type of eventIn field, 4 for internal fields, 5 for VRML2 exposedField fields. Note: this method is only used for VRML2 support, and is therefore not "active" yet. |
|
Return the type of this field.
|
|
Do we need re-evaluation? |
|
Mark field for re-evaluation, but do not trigger it. |
|
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 The method will also notify any auditors that the field's value has changed. |
|
If we're connected to a field/engine/interpolator, copy the value from the master source. |
|
Read field value(s). |
|
Write field value(s). |
|
Read the fieldcontainer and master field id of a field-to-field connection. |
|
Write out information about this field's connection. |
|
Can be used to check if a field is being destructed. |