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>
48 return UTmakeUnique<UT_OptionEntry>();
51 {
return inclusive ?
sizeof(*this) : 0; }
54 unsigned hash()
const;
67 UT_OPTION_STORE_INVALID=-1,
82 return UT_OPTION_STORE_INT;
95 return UT_OPTION_STORE_REAL;
100 return UT_OPTION_STORE_STRING;
104 return UT_OPTION_STORE_DICT;
107 return UT_OPTION_STORE_BOOL;
111 return UT_OPTION_STORE_INVALID;
114 return UT_OPTION_STORE_INVALID;
160 {
return optionStorage(getType()); }
162 {
return optionSize(getType()); }
165 bool importOption(
bool &
value)
const;
188 int64 getOptionI()
const;
189 bool getOptionB()
const;
254 static UT_OptionType getOptionTypeFromString(
const char *optiontypestr);
255 static const char *getStringFromOptionType(
UT_OptionType optiontype);
262 template<
class T, UT_OptionType ID>
280 return UTmakeUnique<UT_OptionEntryImpl>(
myValue);
285 int64 mem = inclusive ?
sizeof(*this) : 0;
316 int64 mem = inclusive ?
sizeof(*this) : 0;
332 int64 mem = inclusive ?
sizeof(*this) : 0;
369 int64 mem = inclusive ?
sizeof(*this) : 0;
406 int64 mem = inclusive ?
sizeof(*this) : 0;
429 int64 mem = inclusive ?
sizeof(*this) : 0;
444 int64 mem = inclusive ?
sizeof(*this) : 0;
UT_OptionEntryImpl< UT_StringHolder, UT_OPTION_STRING > Base
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)
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
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
GLint GLint GLsizei GLsizei GLsizei GLint GLenum format
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.
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
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
GLubyte GLubyte GLubyte GLubyte w
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
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)
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)
GLsizei const GLfloat * value
UT_UniquePtr< UT_OptionEntry > UT_OptionEntryPtr