.TH "SoSField" 3 "Fri Sep 6 2024 15:32:06" "Version 4.0.3" "Coin" \" -*- nroff -*- .ad l .nh .SH NAME SoSField \- The \fBSoSField\fP class is the base class for fields which contains only a single value\&. .SH SYNOPSIS .br .PP .PP \fR#include \fP .PP Inherits \fBSoField\fP\&. .PP Inherited by \fBSoSFBool\fP, \fBSoSFBox2d\fP, \fBSoSFBox2f\fP, \fBSoSFBox2i32\fP, \fBSoSFBox2s\fP, \fBSoSFBox3d\fP, \fBSoSFBox3f\fP, \fBSoSFBox3i32\fP, \fBSoSFBox3s\fP, \fBSoSFColor\fP, \fBSoSFColorRGBA\fP, \fBSoSFDouble\fP, \fBSoSFEngine\fP, \fBSoSFEnum\fP, \fBSoSFFloat\fP, \fBSoSFImage\fP, \fBSoSFImage3\fP, \fBSoSFInt32\fP, \fBSoSFMatrix\fP, \fBSoSFName\fP, \fBSoSFNode\fP, \fBSoSFPath\fP, \fBSoSFPlane\fP, \fBSoSFRotation\fP, \fBSoSFShort\fP, \fBSoSFString\fP, \fBSoSFTime\fP, \fBSoSFTrigger\fP, \fBSoSFUInt32\fP, \fBSoSFUShort\fP, \fBSoSFVec2b\fP, \fBSoSFVec2d\fP, \fBSoSFVec2f\fP, \fBSoSFVec2i32\fP, \fBSoSFVec2s\fP, \fBSoSFVec3b\fP, \fBSoSFVec3d\fP, \fBSoSFVec3f\fP, \fBSoSFVec3i32\fP, \fBSoSFVec3s\fP, \fBSoSFVec4b\fP, \fBSoSFVec4d\fP, \fBSoSFVec4f\fP, \fBSoSFVec4i32\fP, \fBSoSFVec4s\fP, \fBSoSFVec4ub\fP, \fBSoSFVec4ui32\fP, and \fBSoSFVec4us\fP\&. .SS "Public Member Functions" .in +1c .ti -1c .RI "virtual \fB~SoSField\fP ()" .br .in -1c Public Member Functions inherited from \fBSoField\fP .in +1c .ti -1c .RI "virtual \fB~SoField\fP ()" .br .ti -1c .RI "void \fBsetIgnored\fP (SbBool ignore)" .br .ti -1c .RI "SbBool \fBisIgnored\fP (void) const" .br .ti -1c .RI "void \fBsetDefault\fP (SbBool defaultVal)" .br .ti -1c .RI "SbBool \fBisDefault\fP (void) const" .br .ti -1c .RI "virtual \fBSoType\fP \fBgetTypeId\fP (void) const =0" .br .ti -1c .RI "SbBool \fBisOfType\fP (const \fBSoType\fP type) const" .br .ti -1c .RI "void \fBenableConnection\fP (SbBool flag)" .br .ti -1c .RI "SbBool \fBisConnectionEnabled\fP (void) const" .br .ti -1c .RI "SbBool \fBconnectFrom\fP (\fBSoEngineOutput\fP *master, SbBool notnotify=FALSE, SbBool append=FALSE)" .br .ti -1c .RI "SbBool \fBappendConnection\fP (\fBSoEngineOutput\fP *master, SbBool notnotify=FALSE)" .br .ti -1c .RI "void \fBdisconnect\fP (\fBSoEngineOutput\fP *engineoutput)" .br .ti -1c .RI "SbBool \fBisConnectedFromEngine\fP (void) const" .br .ti -1c .RI "SbBool \fBgetConnectedEngine\fP (\fBSoEngineOutput\fP *&master) const" .br .ti -1c .RI "SbBool \fBconnectFrom\fP (\fBSoField\fP *master, SbBool notnotify=FALSE, SbBool append=FALSE)" .br .ti -1c .RI "SbBool \fBappendConnection\fP (\fBSoField\fP *master, SbBool notnotify=FALSE)" .br .ti -1c .RI "void \fBdisconnect\fP (\fBSoField\fP *field)" .br .ti -1c .RI "SbBool \fBisConnectedFromField\fP (void) const" .br .ti -1c .RI "SbBool \fBgetConnectedField\fP (\fBSoField\fP *&master) const" .br .ti -1c .RI "int \fBgetNumConnections\fP (void) const" .br .ti -1c .RI "int \fBgetForwardConnections\fP (\fBSoFieldList\fP &slavelist) const" .br .ti -1c .RI "int \fBgetConnections\fP (\fBSoFieldList\fP &masterlist) const" .br .ti -1c .RI "void \fBdisconnect\fP (void)" .br .ti -1c .RI "SbBool \fBisConnected\fP (void) const" .br .ti -1c .RI "void \fBsetContainer\fP (\fBSoFieldContainer\fP *cont)" .br .ti -1c .RI "\fBSoFieldContainer\fP * \fBgetContainer\fP (void) const" .br .ti -1c .RI "SbBool \fBset\fP (const char *valuestring)" .br .ti -1c .RI "void \fBget\fP (\fBSbString\fP &valuestring)" .br .ti -1c .RI "SbBool \fBshouldWrite\fP (void) const" .br .ti -1c .RI "virtual void \fBtouch\fP (void)" .br .ti -1c .RI "virtual void \fBstartNotify\fP (void)" .br .ti -1c .RI "virtual void \fBnotify\fP (\fBSoNotList\fP *nlist)" .br .ti -1c .RI "SbBool \fBenableNotify\fP (SbBool on)" .br .ti -1c .RI "SbBool \fBisNotifyEnabled\fP (void) const" .br .ti -1c .RI "void \fBaddAuditor\fP (void *f, \fBSoNotRec::Type\fP type)" .br .ti -1c .RI "void \fBremoveAuditor\fP (void *f, \fBSoNotRec::Type\fP type)" .br .ti -1c .RI "int \fBoperator==\fP (const \fBSoField\fP &f) const" .br .ti -1c .RI "int \fBoperator!=\fP (const \fBSoField\fP &f) const" .br .ti -1c .RI "virtual void \fBconnectionStatusChanged\fP (int numconnections)" .br .ti -1c .RI "SbBool \fBisReadOnly\fP (void) const" .br .ti -1c .RI "virtual SbBool \fBisSame\fP (const \fBSoField\fP &f) const =0" .br .ti -1c .RI "virtual void \fBcopyFrom\fP (const \fBSoField\fP &f)=0" .br .ti -1c .RI "virtual void \fBfixCopy\fP (SbBool copyconnections)" .br .ti -1c .RI "virtual SbBool \fBreferencesCopy\fP (void) const" .br .ti -1c .RI "void \fBcopyConnection\fP (const \fBSoField\fP *fromfield)" .br .ti -1c .RI "virtual SbBool \fBread\fP (\fBSoInput\fP *input, const \fBSbName\fP &name)" .br .ti -1c .RI "virtual void \fBwrite\fP (\fBSoOutput\fP *out, const \fBSbName\fP &name) const" .br .ti -1c .RI "virtual void \fBcountWriteRefs\fP (\fBSoOutput\fP *out) const" .br .ti -1c .RI "void \fBsetFieldType\fP (int type)" .br .ti -1c .RI "int \fBgetFieldType\fP (void) const" .br .ti -1c .RI "SbBool \fBgetDirty\fP (void) const" .br .ti -1c .RI "void \fBsetDirty\fP (SbBool dirty)" .br .ti -1c .RI "void \fBevaluate\fP (void) const" .br .in -1c .SS "Static Public Member Functions" .in +1c .ti -1c .RI "static void \fBinitClass\fP (void)" .br .ti -1c .RI "static \fBSoType\fP \fBgetClassTypeId\fP (void)" .br .ti -1c .RI "static void \fBatexit_cleanup\fP (void)" .br .in -1c Static Public Member Functions inherited from \fBSoField\fP .in +1c .ti -1c .RI "static void \fBinitClass\fP (void)" .br .ti -1c .RI "static void \fBinitClasses\fP (void)" .br .ti -1c .RI "static void \fBcleanupClass\fP (void)" .br .ti -1c .RI "static \fBSoType\fP \fBgetClassTypeId\fP (void)" .br .in -1c .SS "Protected Member Functions" .in +1c .ti -1c .RI "\fBSoSField\fP (void)" .br .in -1c Protected Member Functions inherited from \fBSoField\fP .in +1c .ti -1c .RI "\fBSoField\fP (void)" .br .ti -1c .RI "void \fBvalueChanged\fP (SbBool resetdefault=TRUE)" .br .ti -1c .RI "virtual void \fBevaluateConnection\fP (void) const" .br .ti -1c .RI "virtual SbBool \fBreadValue\fP (\fBSoInput\fP *in)=0" .br .ti -1c .RI "virtual void \fBwriteValue\fP (\fBSoOutput\fP *out) const =0" .br .ti -1c .RI "virtual SbBool \fBreadConnection\fP (\fBSoInput\fP *in)" .br .ti -1c .RI "virtual void \fBwriteConnection\fP (\fBSoOutput\fP *out) const" .br .ti -1c .RI "SbBool \fBisDestructing\fP (void) const" .br .ti -1c .RI "virtual \fBSoNotRec\fP \fBcreateNotRec\fP (\fBSoBase\fP *cont)" .br .in -1c .SS "Additional Inherited Members" Public Types inherited from \fBSoField\fP .in +1c .ti -1c .RI "enum \fBFieldType\fP { \fBNORMAL_FIELD\fP = 0, \fBEVENTIN_FIELD\fP, \fBEVENTOUT_FIELD\fP, \fBEXPOSED_FIELD\fP }" .br .in -1c Public Attributes inherited from \fBSoField\fP .SH "Detailed Description" .PP The \fBSoSField\fP 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\&. \fBSoSField\fP is an abstract class\&. .PP You use methods setValue() and getValue() to store or fetch the value of single-value fields\&. Example: .PP .PP .nf SoSpotLight * lightnode = new SoSpotLight; 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; \&.\&.\&. .fi .PP .PP When nodes, engines or other types of field containers are written to file, their single-value fields are written to file in this format: .PP .PP .nf containerclass { fieldname value fieldname value \&.\&.\&. } .fi .PP .PP \&.\&.like this, for instance, a SpotLight node from a scene graph which will be default \fIoff\fP when read back from file: .PP .PP .nf SpotLight { on FALSE } .fi .PP .PP \fBSee also\fP .RS 4 \fBSoMField\fP .RE .PP .SH "Constructor & Destructor Documentation" .PP .SS "SoSField::~SoSField ()\fR [virtual]\fP" The \fBSoSField\fP destructor is empty, and is only defined so we could make it virtual\&. .SS "SoSField::SoSField (void )\fR [protected]\fP" The \fBSoSField\fP constructor is protected, as this is an abstract class\&. .SH "Member Function Documentation" .PP .SS "void SoSField::initClass (void )\fR [static]\fP" Internal method called upon initialization of the library (from \fBSoDB::init()\fP) to set up the type system\&. .SS "\fBSoType\fP SoSField::getClassTypeId (void )\fR [static]\fP" Returns a unique type identifier for this field class\&. .PP \fBSee also\fP .RS 4 \fBgetTypeId()\fP, \fBSoType\fP .RE .PP .SH "Author" .PP Generated automatically by Doxygen for Coin from the source code\&.