Open Inventor Reference
|
Multiple-value field containing any number of enumerated type values. More...
#include <Inventor/fields/SoMFEnum.h>
Public Member Functions | |
void | setValue (const SbName &name) |
Sets this field to contain one and only one value, which is the mnemonic name as a string. | |
void | set1Value (int index, const SbName &name) |
Sets the index'th value to be the integer corresponding to the mnemonic name in the given string. | |
void | setEnums (int num, int *vals, SbName *names) |
Sets up value/name correspondances. | |
Static Public Member Functions | |
static void | initClass () |
Protected Member Functions | |
virtual SbBool | findEnumValue (const SbName &name, int &val) |
Looks up enum name, returns value. Returns FALSE if not found. | |
virtual SbBool | findEnumName (int val, const SbName *&name) const |
Looks up enum value, returns ptr to name. Returns FALSE if not found. | |
Protected Attributes | |
SbBool | legalValuesSet |
TRUE if setEnums called. | |
int | numEnums |
Number of enumeration values. | |
int * | enumValues |
Enumeration values. | |
SbName * | enumNames |
Mnemonic names of values. |
A multiple-value field that contains any number of enumerated type values, stored as ints. Nodes that use this field class define mnemonic names for values. These names should be used when setting or testing the values of the field, even though the values are treated as integers in the methods.
SoMFEnums are written to file as a set of mnemonic enumerated type names. These names differ among uses of this field in various node classes. See the reference pages for specific nodes for the names.
When more than one value is present, all of the values are enclosed in square brackets and separated by commas.
Definition at line 93 of file SoMFEnum.h.
Reimplemented in SoMFBitMask.
static void SoMFEnum::initClass | ( | ) | [static] |
Reimplemented from SoMField.
Reimplemented in SoMFBitMask.
void SoMFEnum::set1Value | ( | int | index, |
const SbName & | name | ||
) |
void SoMFEnum::setEnums | ( | int | num, |
int * | vals, | ||
SbName * | names | ||
) |
void SoMFEnum::setValue | ( | const SbName & | name | ) |
SbName* SoMFEnum::enumNames [protected] |
Definition at line 119 of file SoMFEnum.h.
int* SoMFEnum::enumValues [protected] |
Definition at line 118 of file SoMFEnum.h.
SbBool SoMFEnum::legalValuesSet [protected] |
Definition at line 116 of file SoMFEnum.h.
int SoMFEnum::numEnums [protected] |
Definition at line 117 of file SoMFEnum.h.