.TH "SoMFEnum" 3 "Sat Oct 12 2013" "Version 4.0.0a" "Coin" \" -*- nroff -*- .ad l .nh .SH NAME SoMFEnum \- .PP The \fBSoMFEnum\fP class is a container for a set of enumerated values\&. .PP This field is used where nodes, engines or other field containers needs to store values constrained to be from an enumerated set\&. .SH SYNOPSIS .br .PP .PP \fC#include \fP .PP Inherits \fBSoMField\fP\&. .PP Inherited by \fBSoMFBitMask\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 \fBSoMFEnum\fP & \fBoperator=\fP (const \fBSoMFEnum\fP &field)" .br .ti -1c .RI "virtual SbBool \fBisSame\fP (const \fBSoField\fP &field) const " .br .ti -1c .RI "int \fBoperator[]\fP (const int idx) const " .br .ti -1c .RI "const int * \fBgetValues\fP (const int start) const " .br .ti -1c .RI "int \fBfind\fP (int value, SbBool addifnotfound=FALSE)" .br .ti -1c .RI "void \fBsetValues\fP (const int start, const int \fBnum\fP, const int *newvals)" .br .ti -1c .RI "void \fBset1Value\fP (const int idx, int value)" .br .ti -1c .RI "void \fBsetValue\fP (int value)" .br .ti -1c .RI "int \fBoperator=\fP (int val)" .br .ti -1c .RI "SbBool \fBoperator==\fP (const \fBSoMFEnum\fP &field) const " .br .ti -1c .RI "SbBool \fBoperator!=\fP (const \fBSoMFEnum\fP &field) const " .br .ti -1c .RI "int * \fBstartEditing\fP (void)" .br .ti -1c .RI "void \fBfinishEditing\fP (void)" .br .ti -1c .RI "void \fBsetValue\fP (const \fBSbName\fP name)" .br .ti -1c .RI "void \fBset1Value\fP (const int idx, const \fBSbName\fP name)" .br .ti -1c .RI "void \fBsetEnums\fP (const int \fBnum\fP, const int *const values, const \fBSbName\fP *const 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 .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 .SS "Protected Member Functions" .in +1c .ti -1c .RI "virtual void \fBdeleteAllValues\fP (void)" .br .ti -1c .RI "virtual void \fBcopyValue\fP (int to, int from)" .br .ti -1c .RI "virtual int \fBfieldSizeof\fP (void) const " .br .ti -1c .RI "virtual void * \fBvaluesPtr\fP (void)" .br .ti -1c .RI "virtual void \fBsetValuesPtr\fP (void *ptr)" .br .ti -1c .RI "virtual void \fBallocValues\fP (int \fBnum\fP)" .br .ti -1c .RI "virtual SbBool \fBfindEnumValue\fP (const \fBSbName\fP &name, int &value)" .br .ti -1c .RI "virtual SbBool \fBfindEnumName\fP (int value, const \fBSbName\fP *&name) const " .br .in -1c .SS "Protected Attributes" .in +1c .ti -1c .RI "int * \fBvalues\fP" .br .ti -1c .RI "SbBool \fBlegalValuesSet\fP" .br .ti -1c .RI "int \fBnumEnums\fP" .br .ti -1c .RI "int * \fBenumValues\fP" .br .ti -1c .RI "\fBSbName\fP * \fBenumNames\fP" .br .in -1c .SS "Additional Inherited Members" .SH "Detailed Description" .PP The \fBSoMFEnum\fP class is a container for a set of enumerated values\&. .PP This field is used where nodes, engines or other field containers needs to store values constrained to be from an enumerated set\&. A field of this type stores its values to file as the symbolic names, rather than the actual integer values\&. .PP \fBSee Also:\fP .RS 4 \fBSoSFEnum\fP, \fBSoMFBitMask\fP .RE .PP .SH "Member Function Documentation" .PP .SS "\fBSoType\fP SoMFEnum::getClassTypeId (void)\fC [static]\fP" Returns a unique type identifier for this field class\&. .PP \fBSee Also:\fP .RS 4 \fBgetTypeId()\fP, \fBSoType\fP .RE .PP .PP Reimplemented from \fBSoMField\fP\&. .PP Reimplemented in \fBSoMFBitMask\fP\&. .SS "\fBSoType\fP SoMFEnum::getTypeId (void) const\fC [virtual]\fP" Returns the type identification instance which uniquely identifies the Coin field class the object belongs to\&. .PP \fBSee Also:\fP .RS 4 \fBgetClassTypeId()\fP, \fBSoType\fP .RE .PP .PP Implements \fBSoField\fP\&. .PP Reimplemented in \fBSoMFBitMask\fP\&. .SS "void SoMFEnum::copyFrom (const \fBSoField\fP &f)\fC [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 \fBSoMFBitMask\fP\&. .SS "SbBool SoMFEnum::isSame (const \fBSoField\fP &f) const\fC [virtual]\fP" Check for equal type and value(s)\&. .PP Implements \fBSoField\fP\&. .PP Reimplemented in \fBSoMFBitMask\fP\&. .SS "void SoMFEnum::deleteAllValues (void)\fC [protected]\fP, \fC [virtual]\fP" \fIThis API member is considered internal to the library, as it is not likely to be of interest to the application programmer\&.\fP .PP Implements \fBSoMField\fP\&. .SS "void SoMFEnum::copyValue (intto, intfrom)\fC [protected]\fP, \fC [virtual]\fP" This method is used for moving values around internally within a multivalue field\&. It needs to be overridden in each field so it automatically takes care of running copy contructors where necessary\&. .PP Implements \fBSoMField\fP\&. .SS "const int* SoMFEnum::getValues (const intstart) const\fC [inline]\fP" \\ Returns a pointer to the values array\&. \\ .SS "void SoMFEnum::initClass (void)\fC [static]\fP" Internal method called upon initialization of the library (from \fBSoDB::init()\fP) to set up the type system\&. .PP Reimplemented from \fBSoMField\fP\&. .PP Reimplemented in \fBSoMFBitMask\fP\&. .SS "void SoMFEnum::setValue (const \fBSbName\fPname)" Set this field to contain a single value by specifying an enumeration string\&. .SS "void SoMFEnum::set1Value (const intidx, const \fBSbName\fPname)" Set the value at \fIidx\fP to the enumeration value represented by \fIname\fP\&. .SS "void SoMFEnum::setEnums (const intnumarg, const int *constvals, const \fBSbName\fP *constnames)" Makes a set of \fInum\fP enumeration \fInames\fP map to \fIvals\fP\&. .SS "int SoMFEnum::getNumEnums (void) const" Returns the number of enum names the \fBSoSFEnum\fP object understands\&. .PP This function is an extension for Coin, and it is not available in the original SGI Open Inventor v2\&.1 API\&. .PP \fBSince:\fP .RS 4 Coin 2\&.0 .RE .PP .SS "int SoMFEnum::getEnum (const intidx, \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 This function is an extension for Coin, and it is not available in the original SGI Open Inventor v2\&.1 API\&. .PP \fBSince:\fP .RS 4 Coin 2\&.0 .RE .PP .SS "SbBool SoMFEnum::findEnumValue (const \fBSbName\fP &name, int &val)\fC [protected]\fP, \fC [virtual]\fP" Return in \fIval\fP the enumeration value which matches the given enumeration \fIname\fP\&. .PP Returns \fCTRUE\fP if \fIname\fP is a valid enumeration string, otherwise \fCFALSE\fP\&. .SS "SbBool SoMFEnum::findEnumName (intvalue, const \fBSbName\fP *&name) const\fC [protected]\fP, \fC [virtual]\fP" Set the enumeration \fIname\fP which matches the given enumeration value\&. .PP Returns \fCTRUE\fP if \fIvalue\fP is a valid enumeration value, otherwise \fCFALSE\fP\&. .SH "Member Data Documentation" .PP .SS "SbBool SoMFEnum::legalValuesSet\fC [protected]\fP" Is \fCTRUE\fP if a set of enum name-to-value mappings has been set\&. .SS "int SoMFEnum::numEnums\fC [protected]\fP" Number of enumeration mappings\&. .SS "int * SoMFEnum::enumValues\fC [protected]\fP" Array of enumeration values\&. Maps 1-to-1 with the enumNames\&. .SS "\fBSbName\fP * SoMFEnum::enumNames\fC [protected]\fP" Array of enumeration names\&. Maps 1-to-1 with the enumValues\&. .SH "Author" .PP Generated automatically by Doxygen for Coin from the source code\&.