HDK
|
#include <UT_OptionEntry.h>
Public Types | |
enum | UT_OptionTypeStorage { UT_OPTION_STORE_INVALID =-1, UT_OPTION_STORE_BOOL, UT_OPTION_STORE_INT, UT_OPTION_STORE_REAL, UT_OPTION_STORE_STRING, UT_OPTION_STORE_DICT } |
Static Public Member Functions | |
static UT_OptionTypeStorage | optionStorage (UT_OptionType t) |
Return the underlying storage type for the option. More... | |
static exint | optionSize (UT_OptionType t) |
Returns the tuple size, or 0 if the option is variadic (i.e. INTARRAY) More... | |
static UT_OptionEntryPtr | createEntry (const UT_JSONValue &v, bool allow_type=true, bool allow_dict=false) |
static UT_OptionEntryPtr | createEntryFromTypedMap (const UT_JSONValueMap &map, UT_String &error_str) |
static UT_OptionType | getOptionTypeFromString (const char *optiontypestr) |
Convert string to and from UT_OptionType values. More... | |
static const char * | getStringFromOptionType (UT_OptionType optiontype) |
Static Public Member Functions inherited from UT_SmallObject< UT_OptionEntry, UT_SMALLOBJECT_CLEANPAGES_DEFAULT, UT_SMALLOBJECT_PAGESIZE_DEFAULT, UT_SMALLOBJECT_THREADSAFE_ON > | |
static void * | operator new (size_t size) |
Regular new/delete operators. More... | |
static void | operator delete (void *p, size_t size) |
Regular new/delete operators. More... | |
static void * | operator new (size_t, void *p) |
static void | operator delete (void *, void *) |
Definition at line 33 of file UT_OptionEntry.h.
Enumerator | |
---|---|
UT_OPTION_STORE_INVALID | |
UT_OPTION_STORE_BOOL | |
UT_OPTION_STORE_INT | |
UT_OPTION_STORE_REAL | |
UT_OPTION_STORE_STRING | |
UT_OPTION_STORE_DICT |
Definition at line 68 of file UT_OptionEntry.h.
|
inline |
Definition at line 39 of file UT_OptionEntry.h.
|
inlinevirtual |
Definition at line 41 of file UT_OptionEntry.h.
|
delete |
|
inlinevirtual |
Reimplemented in UT_OptionStringRaw, UT_OptionEntryImpl< T, ID >, UT_OptionEntryImpl< UT_Fpreal64Array, UT_OPTION_FPREALARRAY >, UT_OptionEntryImpl< UT_Int64Array, UT_OPTION_INTARRAY >, UT_OptionEntryImpl< UT_OptionsHolder, UT_OPTION_DICT >, UT_OptionEntryImpl< UT_StringArray, UT_OPTION_STRINGARRAY >, UT_OptionEntryImpl< UT_StringHolder, UT_OPTION_STRING >, and UT_OptionEntryImpl< UT_Array< UT_OptionsHolder >, UT_OPTION_DICTARRAY >.
Definition at line 49 of file UT_OptionEntry.h.
|
static |
Create a UT_OptionEntry from a simple JSON value. This is not a dictionary with type information. It is a single value which may be an int, float, string, etc. The UT_OptionEntry type is inferred from the JSON type. If allow_type, then if a value contains "type" and "value" it is parsed as a TypedMap. Otherwise, it will always be a option. If allow_dict, then nested maps will become dictionaries. If both allow_type and allow_dict, things that look like types will be treated as types and then fall back to dictionaries.
|
static |
Create a UT_OptionEntry from a JSON map. This is a dictionary with type information.
|
inlinevirtual |
Reimplemented in UT_OptionDictArray, UT_OptionStringArray, UT_OptionFpreal64Array, UT_OptionInt64Array, UT_OptionDict, UT_OptionString, UT_OptionEntryImpl< T, ID >, UT_OptionEntryImpl< UT_Fpreal64Array, UT_OPTION_FPREALARRAY >, UT_OptionEntryImpl< UT_Int64Array, UT_OPTION_INTARRAY >, UT_OptionEntryImpl< UT_OptionsHolder, UT_OPTION_DICT >, UT_OptionEntryImpl< UT_StringArray, UT_OPTION_STRINGARRAY >, UT_OptionEntryImpl< UT_StringHolder, UT_OPTION_STRING >, and UT_OptionEntryImpl< UT_Array< UT_OptionsHolder >, UT_OPTION_DICTARRAY >.
Definition at line 53 of file UT_OptionEntry.h.
bool UT_OptionEntry::getOptionB | ( | ) | const |
const UT_OptionsHolder& UT_OptionEntry::getOptionDict | ( | ) | const |
const UT_Array<UT_OptionsHolder>& UT_OptionEntry::getOptionDictArray | ( | ) | const |
fpreal64 UT_OptionEntry::getOptionF | ( | ) | const |
const UT_Fpreal64Array& UT_OptionEntry::getOptionFArray | ( | ) | const |
int64 UT_OptionEntry::getOptionI | ( | ) | const |
const UT_Int64Array& UT_OptionEntry::getOptionIArray | ( | ) | const |
const UT_Matrix2D& UT_OptionEntry::getOptionM2 | ( | ) | const |
const UT_Matrix3D& UT_OptionEntry::getOptionM3 | ( | ) | const |
const UT_Matrix4D& UT_OptionEntry::getOptionM4 | ( | ) | const |
const UT_QuaternionD& UT_OptionEntry::getOptionQ | ( | ) | const |
UT_StringHolder UT_OptionEntry::getOptionS | ( | ) | const |
const UT_StringArray& UT_OptionEntry::getOptionSArray | ( | ) | const |
bool UT_OptionEntry::getOptionString | ( | UT_OptionFormat | format, |
UT_WorkBuffer & | result | ||
) | const |
bool UT_OptionEntry::getOptionString | ( | UT_OptionFormat | format, |
UT_String & | result | ||
) | const |
|
static |
Convert string to and from UT_OptionType values.
const UT_Vector2D& UT_OptionEntry::getOptionUV | ( | ) | const |
const UT_Vector3D& UT_OptionEntry::getOptionUVW | ( | ) | const |
const UT_Vector2D& UT_OptionEntry::getOptionV2 | ( | ) | const |
const UT_Vector3D& UT_OptionEntry::getOptionV3 | ( | ) | const |
const UT_Vector4D& UT_OptionEntry::getOptionV4 | ( | ) | const |
|
static |
|
inlinevirtual |
Reimplemented in UT_OptionStringRaw, UT_OptionEntryImpl< T, ID >, UT_OptionEntryImpl< UT_Fpreal64Array, UT_OPTION_FPREALARRAY >, UT_OptionEntryImpl< UT_Int64Array, UT_OPTION_INTARRAY >, UT_OptionEntryImpl< UT_OptionsHolder, UT_OPTION_DICT >, UT_OptionEntryImpl< UT_StringArray, UT_OPTION_STRINGARRAY >, UT_OptionEntryImpl< UT_StringHolder, UT_OPTION_STRING >, and UT_OptionEntryImpl< UT_Array< UT_OptionsHolder >, UT_OPTION_DICTARRAY >.
Definition at line 47 of file UT_OptionEntry.h.
unsigned UT_OptionEntry::hash | ( | ) | const |
Hash a single option entry.
bool UT_OptionEntry::importOption | ( | int64 & | value | ) | const |
bool UT_OptionEntry::importOption | ( | bool & | value | ) | const |
bool UT_OptionEntry::importOption | ( | fpreal64 & | value | ) | const |
bool UT_OptionEntry::importOption | ( | UT_StringHolder & | value | ) | const |
bool UT_OptionEntry::importOption | ( | UT_OptionsHolder & | value | ) | const |
bool UT_OptionEntry::importOption | ( | UT_Vector2D & | value | ) | const |
bool UT_OptionEntry::importOption | ( | UT_Vector3D & | value | ) | const |
bool UT_OptionEntry::importOption | ( | UT_Vector4D & | value | ) | const |
bool UT_OptionEntry::importOption | ( | UT_QuaternionD & | value | ) | const |
bool UT_OptionEntry::importOption | ( | UT_Matrix2D & | value | ) | const |
bool UT_OptionEntry::importOption | ( | UT_Matrix3D & | value | ) | const |
bool UT_OptionEntry::importOption | ( | UT_Matrix4D & | value | ) | const |
bool UT_OptionEntry::importOption | ( | UT_StringArray & | value | ) | const |
bool UT_OptionEntry::importOption | ( | UT_Array< UT_StringHolder > & | value | ) | const |
bool UT_OptionEntry::importOption | ( | UT_Array< UT_OptionsHolder > & | value | ) | const |
unsigned UT_OptionEntry::isEqual | ( | const UT_OptionEntry & | cmp, |
fpreal64 | tolerance = 0.0 |
||
) | const |
Compute equivalence for a given option entry.
|
delete |
|
inlinestatic |
Returns the tuple size, or 0 if the option is variadic (i.e. INTARRAY)
Definition at line 120 of file UT_OptionEntry.h.
|
inline |
Definition at line 164 of file UT_OptionEntry.h.
|
inlinestatic |
Return the underlying storage type for the option.
Definition at line 79 of file UT_OptionEntry.h.
|
inline |
Definition at line 162 of file UT_OptionEntry.h.
bool UT_OptionEntry::saveJSON | ( | UT_JSONWriter & | w, |
bool | compact | ||
) | const |
Save a single option to a JSON stream. This is saved with the schema
void UT_OptionEntry::saveJSON | ( | UT_JSONValue & | v, |
bool | compact | ||
) | const |
As above, except save to a UT_JSONValue instead of requiring the value go directly to a stream.