36#include <Inventor/fields/SoSField.h>
37#include <Inventor/fields/SoSubField.h>
38#include <Inventor/SbString.h>
43 SO_SFIELD_HEADER(
SoSFEnum,
int,
int);
48 void setValue(
const SbName name);
49 void setEnums(
const int num,
const int * vals,
const SbName * names);
51 int getNumEnums(
void)
const;
52 int getEnum(
const int idx,
SbName & name)
const;
55 virtual SbBool findEnumValue(
const SbName & name,
int & val);
56 virtual SbBool findEnumName(
int value,
const SbName * & name)
const;
68#define PRIVATE_SOENUM_SET_TYPE(_fieldname_, _enumtype_, _fieldstorage_) \
73 const SbName * names; \
74 _fieldstorage_->getEnumData(SO__QUOTE(_enumtype_), num, values, names); \
75 this->_fieldname_.setEnums(num, values, names); \
79#define SO_ENGINE_SET_SF_ENUM_TYPE(_fieldname_, _enumtype_) \
80 PRIVATE_SOENUM_SET_TYPE(_fieldname_, _enumtype_, inputdata)
82#define SO_NODE_SET_SF_ENUM_TYPE(_fieldname_, _enumtype_) \
83 PRIVATE_SOENUM_SET_TYPE(_fieldname_, _enumtype_, fieldData)
The SbName class stores strings by reference.
Definition SbName.h:40
The SoSFEnum class is a container for an enum value.
Definition SoSFEnum.h:40
SbName * enumNames
Definition SoSFEnum.h:60
int numEnums
Definition SoSFEnum.h:58
int * enumValues
Definition SoSFEnum.h:59
SbBool legalValuesSet
Definition SoSFEnum.h:61
The SoSField class is the base class for fields which contains only a single value.
Definition SoSField.h:38
static void initClass(void)
Definition SoSField.cpp:137