Coin  4.0.3
Coin3D core library
Loading...
Searching...
No Matches
SoSField Class Reference

The SoSField class is the base class for fields which contains only a single value. More...

#include <Inventor/fields/SoSField.h>

Inheritance diagram for SoSField:
SoField SoSFBool SoSFBox2d SoSFBox2f SoSFBox2i32 SoSFBox2s SoSFBox3d SoSFBox3f SoSFBox3i32 SoSFBox3s SoSFColor SoSFColorRGBA SoSFDouble SoSFEngine SoSFEnum SoSFFloat SoSFImage SoSFImage3 SoSFInt32 SoSFMatrix SoSFName SoSFNode SoSFPath SoSFPlane SoSFRotation SoSFShort SoSFString SoSFTime SoSFTrigger SoSFUInt32 SoSFUShort SoSFVec2b SoSFVec2d SoSFVec2f SoSFVec2i32 SoSFVec2s SoSFVec3b SoSFVec3d SoSFVec3f SoSFVec3i32 SoSFVec3s SoSFVec4b SoSFVec4d SoSFVec4f SoSFVec4i32 SoSFVec4s SoSFVec4ub SoSFVec4ui32 SoSFVec4us

Public Member Functions

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

Static Public Member Functions

static void atexit_cleanup (void)
 
static SoType getClassTypeId (void)
 
static void initClass (void)
 
- Static Public Member Functions inherited from SoField
static void cleanupClass (void)
 
static SoType getClassTypeId (void)
 
static void initClass (void)
 
static void initClasses (void)
 

Protected Member Functions

 SoSField (void)
 
- Protected Member Functions inherited from SoField
 SoField (void)
 
virtual SoNotRec createNotRec (SoBase *cont)
 
virtual void evaluateConnection (void) const
 
SbBool isDestructing (void) const
 
virtual SbBool readConnection (SoInput *in)
 
virtual SbBool readValue (SoInput *in)=0
 
void valueChanged (SbBool resetdefault=TRUE)
 
virtual void writeConnection (SoOutput *out) const
 
virtual void writeValue (SoOutput *out) const =0
 

Additional Inherited Members

- Public Types inherited from SoField
enum  FieldType { NORMAL_FIELD = 0 , EVENTIN_FIELD , EVENTOUT_FIELD , EXPOSED_FIELD }
 

Detailed Description

The SoSField class is the base class for fields which contains only a single value.

All field types which should always contain only a single member value inherits this class. SoSField is an abstract class.

You use methods setValue() and getValue() to store or fetch the value of single-value fields. Example:

lightnode->on.setValue(TRUE); // The "on" field of SoSpotLight is
// a single value field of type SoSFBool.
...
...
// Change lightswitch.
if (lightnode->on.getValue() == FALSE)
lightnode->on = TRUE; // We can use operator = instead of setValue().
else
lightnode->on = FALSE;
...
The SbList class is a template container class for lists.
Definition SbList.h:70
The SoSpotLight class is a node type for light sources with a cone shaped light volume.
Definition SoSpotLight.h:41

When nodes, engines or other types of field containers are written to file, their single-value fields are written to file in this format:

fieldname value
fieldname value
...
}

..like this, for instance, a SpotLight node from a scene graph which will be default off when read back from file:

on FALSE
}
See also
SoMField

Constructor & Destructor Documentation

◆ ~SoSField()

SoSField::~SoSField ( )
virtual

The SoSField destructor is empty, and is only defined so we could make it virtual.

◆ SoSField()

SoSField::SoSField ( void )
protected

The SoSField constructor is protected, as this is an abstract class.

Member Function Documentation

◆ getClassTypeId()

SoType SoSField::getClassTypeId ( void )
static

Returns a unique type identifier for this field class.

See also
getTypeId(), SoType

◆ initClass()

void SoSField::initClass ( void )
static

Internal method called upon initialization of the library (from SoDB::init()) to set up the type system.


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