Arnold AtEnum type.
More...
|
typedef const char ** | AtEnum |
| String-based enumerated data type. More...
|
|
|
AI_API AI_PURE int | AiEnumGetValue (AtEnum enum_type, const char *string) |
| Return the corresponding integer value (or index) of an enum string. More...
|
|
AI_API AI_PURE const char * | AiEnumGetString (AtEnum enum_type, int index) |
| Get the corresponding string value of an integer in an enum. More...
|
|
Arnold AtEnum type.
◆ AtEnum
String-based enumerated data type.
AtNode parameters of type AI_TYPE_ENUM
are stored as AtEnum. The AtEnum data type is just an array of strings that ends with a NULL string (not an empty string, but a NULL pointer).
Note that, in order to keep backwards compatibility, any value strings beginning with a digit will be interpreted as a number.
◆ AiEnumGetValue()
AI_API AI_PURE int AiEnumGetValue |
( |
AtEnum |
enum_type, |
|
|
const char * |
string |
|
) |
| |
Return the corresponding integer value (or index) of an enum string.
- Parameters
-
enum_type | the enumerated type |
string | the text-string of the enumerated type whose corresponding value is being queried |
- Returns
- index corresponding to string, or -1 if
enum_type
is NULL or the string is not one of the allowed strings in the enum
◆ AiEnumGetString()
AI_API AI_PURE const char * AiEnumGetString |
( |
AtEnum |
enum_type, |
|
|
int |
index |
|
) |
| |
Get the corresponding string value of an integer in an enum.
- Parameters
-
enum_type | the enumerated type |
index | the integer value of the enumerated type whose corresponding text-string is being queried |
- Returns
- text-string corresponding to index, or NULL if
enum_type
is NULL or the index is not one of the allowed integers in the enum