.TH "SoSFEnum" 3 "Tue Jun 23 2026 23:48:38" "Version 4.0.10" "Coin" \" -*- nroff -*- .ad l .nh .SH NAME SoSFEnum \- The \fBSoSFEnum\fP class is a container for an enum value\&. .SH SYNOPSIS .br .PP .PP \fR#include \fP .PP Inherits \fBSoSField\fP\&. .PP Inherited by \fBSoSFBitMask\fP\&. .SS "Public Member Functions" .in +1c .ti -1c .RI "virtual \fBSoType\fP \fBgetTypeId\fP (void) const" .br .ti -1c .RI "virtual void \fBcopyFrom\fP (const \fBSoField\fP &field)" .br .ti -1c .RI "const \fBSoSFEnum\fP & \fBoperator=\fP (const \fBSoSFEnum\fP &field)" .br .ti -1c .RI "virtual SbBool \fBisSame\fP (const \fBSoField\fP &field) const" .br .ti -1c .RI "int \fBgetValue\fP (void) const" .br .ti -1c .RI "void \fBsetValue\fP (int newvalue)" .br .ti -1c .RI "int \fBoperator=\fP (int newvalue)" .br .ti -1c .RI "int \fBoperator==\fP (const \fBSoSFEnum\fP &field) const" .br .ti -1c .RI "int \fBoperator!=\fP (const \fBSoSFEnum\fP &field) const" .br .ti -1c .RI "void \fBsetValue\fP (const \fBSbName\fP name)" .br .ti -1c .RI "void \fBsetEnums\fP (const int num, const int *vals, const \fBSbName\fP *names)" .br .ti -1c .RI "int \fBgetNumEnums\fP (void) const" .br .ti -1c .RI "int \fBgetEnum\fP (const int idx, \fBSbName\fP &name) const" .br .in -1c Public Member Functions inherited from \fBSoSField\fP .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 "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 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 * \fBcreateInstance\fP (void)" .br .ti -1c .RI "static \fBSoType\fP \fBgetClassTypeId\fP (void)" .br .ti -1c .RI "static void \fBinitClass\fP (void)" .br .in -1c Static Public Member Functions inherited from \fBSoSField\fP .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 "virtual SbBool \fBfindEnumValue\fP (const \fBSbName\fP &name, int &val)" .br .ti -1c .RI "virtual SbBool \fBfindEnumName\fP (int value, const \fBSbName\fP *&name) const" .br .in -1c Protected Member Functions inherited from \fBSoSField\fP .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 \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 "Protected Attributes" .in +1c .ti -1c .RI "int \fBvalue\fP" .br .ti -1c .RI "int \fBnumEnums\fP" .br .ti -1c .RI "int * \fBenumValues\fP" .br .ti -1c .RI "\fBSbName\fP * \fBenumNames\fP" .br .ti -1c .RI "SbBool \fBlegalValuesSet\fP" .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 .SH "Detailed Description" .PP The \fBSoSFEnum\fP class is a container for an enum value\&. This field is used where nodes, engines or other field containers needs to store one particular value out of an enumerated set\&. .PP A field of this type stores its value to file as the symbolic name, rather than the actual integer value\&. .PP \fBSoSFEnum\fP instances are initialized on an instance basis, usually in the constructor of the field container with the macros \fBSO_NODE_DEFINE_ENUM_VALUE(enumtype, symbolvalue)\fP and SO_NODE_SET_SF_ENUM_TYPE(enumfield, enumtype) for nodes, or for engines; SO_ENGINE_DEFINE_ENUM_VALUE() and SO_ENGINE_SET_SF_ENUM_TYPE()\&. .PP Example initialization from the constructor of the \fBSoCone\fP class: .PP .nf SO_NODE_DEFINE_ENUM_VALUE(Part, SIDES); SO_NODE_DEFINE_ENUM_VALUE(Part, BOTTOM); SO_NODE_DEFINE_ENUM_VALUE(Part, ALL); SO_NODE_SET_SF_ENUM_TYPE(parts, Part); .fi .PP .PP \fBSee also\fP .RS 4 \fBSoMFEnum\fP, \fBSoSFBitMask\fP .RE .PP .SH "Member Function Documentation" .PP .SS "void * SoSFEnum::createInstance (void )\fR [static]\fP" \fIThis API member is considered internal to the library, as it is not likely to be of interest to the application programmer\&.\fP .br .br Creates a new instance of the class type corresponding to the \fBSoType\fP object\&. .SS "\fBSoType\fP SoSFEnum::getClassTypeId (void )\fR [static]\fP" This static method returns the \fBSoType\fP object associated with objects of this class\&. .SS "\fBSoType\fP SoSFEnum::getTypeId (void ) const\fR [virtual]\fP" Returns the type identification of an object derived from a class inheriting \fBSoField\fP\&. This is used for runtime type checking and "downward" casting\&. .PP Implements \fBSoField\fP\&. .PP Reimplemented in \fBSoSFBitMask\fP\&. .SS "void SoSFEnum::copyFrom (const \fBSoField\fP & f)\fR [virtual]\fP" Copy value(s) from \fIf\fP into this field\&. \fIf\fP must be of the same type as this field\&. .PP Implements \fBSoField\fP\&. .PP Reimplemented in \fBSoSFBitMask\fP\&. .SS "SbBool SoSFEnum::isSame (const \fBSoField\fP & f) const\fR [virtual]\fP" Check for equal type and value(s)\&. .PP Implements \fBSoField\fP\&. .PP Reimplemented in \fBSoSFBitMask\fP\&. .SS "void SoSFEnum::initClass (void )\fR [static]\fP" Internal method called upon initialization of the library (from \fBSoDB::init()\fP) to set up the type system\&. .SS "void SoSFEnum::setValue (const \fBSbName\fP name)" Set the value of this field by specifying an enumeration string value\&. .SS "void SoSFEnum::setEnums (const int num, const int * vals, const \fBSbName\fP * names)" Makes a set of \fInum\fP enumeration \fInames\fP map to integer values, given by \fIvals\fP\&. .SS "int SoSFEnum::getNumEnums (void ) const" Returns the number of enum names the \fBSoSFEnum\fP object understands\&. .PP Note that this API method is not part of the original SGI Inventor 2\&.1 API, and is an extension specific to Coin\&. .PP This function is an extension for Coin, and it is not available in the original SGI Open Inventor v2\&.1 API\&. .br .PP \fBSince\fP .RS 4 Coin 2\&.0 .RE .PP .SS "int SoSFEnum::getEnum (const int idx, \fBSbName\fP & name) const" Returns the value of the Nth enum this \fBSoSFEnum\fP object understands, and mutates \fIname\fP to contain the Nth enum's name\&. .PP Note that this API method is not part of the original SGI Inventor 2\&.1 API, and is an extension specific to Coin\&. .PP This function is an extension for Coin, and it is not available in the original SGI Open Inventor v2\&.1 API\&. .br .PP \fBSince\fP .RS 4 Coin 2\&.0 .RE .PP .SS "SbBool SoSFEnum::findEnumValue (const \fBSbName\fP & name, int & val)\fR [protected]\fP, \fR [virtual]\fP" Return in \fIval\fP the enumeration value which matches the given enumeration \fIname\fP\&. .PP Returns \fRTRUE\fP if \fIname\fP is a valid enumeration string, otherwise \fRFALSE\fP\&. .SS "SbBool SoSFEnum::findEnumName (int valuearg, const \fBSbName\fP *& name) const\fR [protected]\fP, \fR [virtual]\fP" Set the enumeration \fIname\fP which matches the given enumeration value\&. .PP Returns \fRTRUE\fP if \fIvalue\fP is a valid enumeration value, otherwise \fRFALSE\fP\&. .SH "Member Data Documentation" .PP .SS "int SoSFEnum::numEnums\fR [protected]\fP" Number of enumeration mappings\&. .SS "int* SoSFEnum::enumValues\fR [protected]\fP" Array of enumeration values\&. Maps 1-to-1 with the enumNames\&. .SS "\fBSbName\fP* SoSFEnum::enumNames\fR [protected]\fP" Array of enumeration names\&. Maps 1-to-1 with the enumValues\&. .SS "SbBool SoSFEnum::legalValuesSet\fR [protected]\fP" Is \fRTRUE\fP if a set of enum name-to-value mappings has been set\&. .SH "Author" .PP Generated automatically by Doxygen for Coin from the source code\&.