12 #ifndef _UT_OPTIONENTRY_H_
13 #define _UT_OPTIONENTRY_H_
34 UT_SMALLOBJECT_CLEANPAGES_DEFAULT,
35 UT_SMALLOBJECT_PAGESIZE_DEFAULT,
36 UT_SMALLOBJECT_THREADSAFE_ON>
51 return UTmakeUnique<UT_OptionEntry>();
54 {
return inclusive ?
sizeof(*this) : 0; }
57 unsigned hash()
const;
70 UT_OPTION_STORE_INVALID=-1,
85 return UT_OPTION_STORE_INT;
98 return UT_OPTION_STORE_REAL;
103 return UT_OPTION_STORE_STRING;
107 return UT_OPTION_STORE_DICT;
110 return UT_OPTION_STORE_BOOL;
114 return UT_OPTION_STORE_INVALID;
117 return UT_OPTION_STORE_INVALID;
163 {
return optionStorage(getType()); }
165 {
return optionSize(getType()); }
168 bool importOption(
bool &
value)
const;
191 int64 getOptionI()
const;
192 bool getOptionB()
const;
257 static UT_OptionType getOptionTypeFromString(
const char *optiontypestr);
258 static const char *getStringFromOptionType(
UT_OptionType optiontype);
265 template<
class T, UT_OptionType ID>
283 return UTmakeUnique<UT_OptionEntryImpl>(
myValue);
288 int64 mem = inclusive ?
sizeof(*this) : 0;
319 int64 mem = inclusive ?
sizeof(*this) : 0;
335 int64 mem = inclusive ?
sizeof(*this) : 0;
372 int64 mem = inclusive ?
sizeof(*this) : 0;
409 int64 mem = inclusive ?
sizeof(*this) : 0;
432 int64 mem = inclusive ?
sizeof(*this) : 0;
447 int64 mem = inclusive ?
sizeof(*this) : 0;
464 return UTmakeUnique<UT_OptionStringRaw>(
myValue);
UT_OptionEntryImpl< UT_StringHolder, UT_OPTION_STRING > Base
UT_OptionEntryPtr clone() const override
void fetchValue(UT_Fpreal64Array &value) const
static exint optionSize(UT_OptionType t)
Returns the tuple size, or 0 if the option is variadic (i.e. INTARRAY)
GLenum GLuint GLsizei bufsize
UT_OptionEntryImpl< UT_Matrix2D, UT_OPTION_MATRIX2 > UT_OptionMatrix2
UT_JSONValueMap stores a map/dictionary of UT_JSONValue objects.
void fetchValue(UT_Int64Array &value) const
int64 getMemoryUsage(bool inclusive) const
UT_OptionFpreal64Array(const UT_Array< fpreal32 > &value)
UT_OptionInt64Array(const UT_Int64Array &value)
UT_OptionFpreal64Array(const UT_Array< fpreal64 > &value)
UT_OptionType getType() const override
UT_OptionEntryImpl< UT_Int64Array, UT_OPTION_INTARRAY > Base
GLsizei const GLfloat * value
void setSizeNoInit(exint newsize)
UT_OptionEntryImpl< UT_Matrix4D, UT_OPTION_MATRIX4 > UT_OptionMatrix4
int64 getMemoryUsage(bool inclusive=false) const
void fetchValue(UT_Fpreal32Array &value) const
UT_OptionEntryImpl< UT_OptionsHolder, UT_OPTION_DICT > Base
UT_OptionFpreal64Array(const UT_Fpreal64Array &value)
~UT_OptionEntryImpl() override
int64 getMemoryUsage(bool inclusive) const override
Class which writes ASCII or binary JSON streams.
**But if you need a result
static UT_OptionTypeStorage optionStorage(UT_OptionType t)
Return the underlying storage type for the option.
void fetchValue(UT_IntArray &value) const
void setSize(exint newsize)
virtual UT_OptionEntryPtr clone() const
UT_OptionEntryImpl< UT_Vector4D, UT_OPTION_VECTOR4 > UT_OptionVector4
int64 getMemoryUsage(bool inclusive) const override
IMATH_HOSTDEVICE constexpr int cmp(T a, T b) IMATH_NOEXCEPT
std::unique_ptr< T, Deleter > UT_UniquePtr
A smart pointer for unique ownership of dynamically allocated objects.
UT_OptionType getType() const override
const T & getValue() const
int64 getMemoryUsage(bool inclusive) const
UT_OptionEntryImpl< int64, UT_OPTION_INT > UT_OptionInt
virtual UT_OptionType getType() const
GLint GLint GLsizei GLint GLenum format
UT_OptionEntryImpl< UT_Array< UT_OptionsHolder >, UT_OPTION_DICTARRAY > Base
UT_OptionEntryImpl< bool, UT_OPTION_BOOL > UT_OptionBool
UT_OptionTypeStorage optionStorage() const
UT_API size_t format(char *buffer, size_t bufsize, const UT_OptionEntry &o)
UT_OptionEntryImpl(const T &value)
UT_OptionEntryImpl< UT_Fpreal64Array, UT_OPTION_FPREALARRAY > Base
UT_OptionEntryPtr clone() const override
exint entries() const
Alias of size(). size() is preferred.
UT_OptionEntryImpl< UT_Vector3D, UT_OPTION_UVW > UT_OptionUVW
int64 getMemoryUsage(bool inclusive) const override
int64 getMemoryUsage(bool inclusive) const override
int64 getMemoryUsage(bool inclusive) const override
UT_OptionEntryImpl< UT_Vector2D, UT_OPTION_VECTOR2 > UT_OptionVector2
int64 getMemoryUsage(bool inclusive) const override
UT_OptionEntryImpl< UT_Vector2D, UT_OPTION_UV > UT_OptionUV
UT_OptionInt64Array(const UT_Array< int64 > &value)
UT_OptionEntryImpl< UT_StringArray, UT_OPTION_STRINGARRAY > Base
UT_OptionStringArray(const UT_Array< UT_StringHolder > &value)
UT_OptionEntryImpl< fpreal64, UT_OPTION_FPREAL > UT_OptionFpreal
LeafData & operator=(const LeafData &)=delete
UT_OptionEntryImpl< UT_QuaternionD, UT_OPTION_QUATERNION > UT_OptionQuaternion
virtual int64 getMemoryUsage(bool inclusive) const
UT_OptionEntryImpl< UT_Vector3D, UT_OPTION_VECTOR3 > UT_OptionVector3
UT_OptionEntryImpl< UT_Matrix3D, UT_OPTION_MATRIX3 > UT_OptionMatrix3
Class to store JSON objects as C++ objects.
UT_OptionInt64Array(const UT_Array< int32 > &value)
virtual ~UT_OptionEntry()
int64 getMemoryUsage(bool inclusive) const override
UT_OptionDict(const UT_OptionsHolder &value)
GLubyte GLubyte GLubyte GLubyte w
UT_OptionStringArray(const UT_StringArray &value)
UT_OptionFormat
String formatting options for getOptionString.
UT_OptionDictArray(const UT_Array< UT_OptionsHolder > &value)
UT_OptionString(const UT_StringHolder &value)
UT_OptionStringRaw(const UT_StringHolder &value)
UT_UniquePtr< UT_OptionEntry > UT_OptionEntryPtr