30 myEnableObjects =
""_UTsh;
31 myEnableAttribClass = 0;
32 myEnableAttrib =
""_UTsh;
33 myEnableData =
""_UTsh;
35 myEnableAttribMode = 0;
36 myEnableField =
""_UTsh;
37 myEnableFieldMode = 0;
38 myEnableFieldTest = 0;
51 if (myEnableSolvers != src.myEnableSolvers)
return false;
52 if (myEnableObjects != src.myEnableObjects)
return false;
53 if (myEnableAttribClass != src.myEnableAttribClass)
return false;
54 if (myEnableAttrib != src.myEnableAttrib)
return false;
55 if (myEnableData != src.myEnableData)
return false;
56 if (myEnableDataMode != src.myEnableDataMode)
return false;
57 if (myEnableAttribMode != src.myEnableAttribMode)
return false;
58 if (myEnableField != src.myEnableField)
return false;
59 if (myEnableFieldMode != src.myEnableFieldMode)
return false;
60 if (myEnableFieldTest != src.myEnableFieldTest)
return false;
81 {
return !strcmp(recordtype,
"Params"); }
86 if (recordtypenum == 0)
return "Params";
91 if (isMyRecord(recordtype))
return 1;
96 if (isMyRecord(recordtype))
102 int fieldnum)
const override
104 if (!isMyRecord(recordtype))
112 return "enableobjects";
114 return "enableattribclass";
116 return "enableattrib";
120 return "enabledatamode";
122 return "enableattribmode";
124 return "enablefield";
126 return "enablefieldmode";
128 return "enablefieldtest";
134 int fieldnum)
const override
136 if (!isMyRecord(recordtype))
168 const char *fieldname,
171 if (!isMyRecord(recordtype))
177 if (!strcmp(fieldname,
"enable"))
179 result = UTmakeUnique<UT_OptionInt>(myParms.myEnableSolvers);
182 if (!strcmp(fieldname,
"enableobjects"))
184 result = UTmakeUnique<UT_OptionString>(myParms.myEnableObjects);
187 if (!strcmp(fieldname,
"enableattribclass"))
189 result = UTmakeUnique<UT_OptionInt>(myParms.myEnableAttribClass);
192 if (!strcmp(fieldname,
"enableattrib"))
194 result = UTmakeUnique<UT_OptionString>(myParms.myEnableAttrib);
197 if (!strcmp(fieldname,
"enabledata"))
199 result = UTmakeUnique<UT_OptionString>(myParms.myEnableData);
202 if (!strcmp(fieldname,
"enabledatamode"))
204 result = UTmakeUnique<UT_OptionInt>(myParms.myEnableDataMode);
207 if (!strcmp(fieldname,
"enableattribmode"))
209 result = UTmakeUnique<UT_OptionInt>(myParms.myEnableAttribMode);
212 if (!strcmp(fieldname,
"enablefield"))
214 result = UTmakeUnique<UT_OptionString>(myParms.myEnableField);
217 if (!strcmp(fieldname,
"enablefieldmode"))
219 result = UTmakeUnique<UT_OptionInt>(myParms.myEnableFieldMode);
222 if (!strcmp(fieldname,
"enablefieldtest"))
224 result = UTmakeUnique<UT_OptionInt>(myParms.myEnableFieldTest);
236 {
return new Query(owner, *
this); }
274 loadData(is, rampdata);
292 int typelen = colon - data.
buffer();
306 {
int64 iv =
v; UTwrite(os, &iv); }
308 { UTwrite<fpreal64>(os, &
v); }
310 { UTwrite<fpreal64>(os, &v.
x()); UTwrite<fpreal64>(os, &v.
y()); }
312 { UTwrite<fpreal64>(os, &v.
x()); UTwrite<fpreal64>(os, &v.
y());
313 UTwrite<fpreal64>(os, &v.
z()); }
315 { UTwrite<fpreal64>(os, &v.
x()); UTwrite<fpreal64>(os, &v.
y());
316 UTwrite<fpreal64>(os, &v.
z()); UTwrite<fpreal64>(os, &v.
w()); }
328 if (s) s->save(ostr);
330 saveData(os, result);
337 ostr << s->getDataTypeToken();
342 saveData(os, result);
346 void save(std::ostream &os)
const
350 saveData(os, myEnableSolvers);
351 saveData(os, myEnableObjects);
352 saveData(os, myEnableAttribClass);
353 saveData(os, myEnableAttrib);
354 saveData(os, myEnableData);
355 saveData(os, myEnableDataMode);
356 saveData(os, myEnableAttribMode);
357 saveData(os, myEnableField);
358 saveData(os, myEnableFieldMode);
359 saveData(os, myEnableFieldTest);
372 loadData(is, myEnableSolvers);
373 loadData(is, myEnableObjects);
374 loadData(is, myEnableAttribClass);
375 loadData(is, myEnableAttrib);
376 loadData(is, myEnableData);
377 loadData(is, myEnableDataMode);
378 loadData(is, myEnableAttribMode);
379 loadData(is, myEnableField);
380 loadData(is, myEnableFieldMode);
381 loadData(is, myEnableFieldTest);
408 int64 myEnableSolvers;
410 int64 myEnableAttribClass;
413 int64 myEnableDataMode;
414 int64 myEnableAttribMode;
416 int64 myEnableFieldMode;
417 int64 myEnableFieldTest;
void setEnableAttrib(const UT_StringHolder &val)
static void saveData(std::ostream &os, UT_Matrix4D v)
static void saveData(std::ostream &os, UT_Matrix3D v)
const SIM_SolverEnableParms & myParms
const UT_StringHolder & getEnableField() const
static void saveData(std::ostream &os, UT_Vector3D v)
exint bread(int32 *buffer, exint asize=1)
constexpr SYS_FORCE_INLINE T & y() noexcept
bool operator!=(const SIM_SolverEnableParms &src) const
Query(const SIM_Data *owner, const SIM_SolverEnableParms &parms)
int64 getEnableFieldTest() const
const UT_StringHolder & getEnableData() const
SIM_Query * createQueryObject(const SIM_Data *owner) const
static void loadData(UT_IStream &is, UT_Matrix3D &v)
static void saveData(std::ostream &os, UT_Matrix2D v)
int64 getEnableDataMode() const
constexpr SYS_FORCE_INLINE T & z() noexcept
SYS_FORCE_INLINE const char * buffer() const
static void saveData(std::ostream &os, fpreal64 v)
An output stream object that owns its own string buffer storage.
void setEnableAttribMode(int64 val)
**But if you need a result
static PRM_DataItemHandle parseBinary(const char *type, UT_IStream &is)
static void loadData(UT_IStream &is, UT_Matrix4D &v)
const UT_WorkBuffer & str()
Returns a read-only reference to the underlying UT_WorkBuffer.
const UT_StringHolder & getEnableObjects() const
bool load(UT_IStream &is)
constexpr SYS_FORCE_INLINE T & x() noexcept
static void saveData(std::ostream &os, bool v)
constexpr SYS_FORCE_INLINE T & x() noexcept
bool operator==(const BaseDimensions< T > &a, const BaseDimensions< Y > &b)
const char * getRecordTypeNameSubclass(int recordtypenum) const override
static void loadData(UT_IStream &is, fpreal64 &v)
static void loadData(UT_IStream &is, UT_StringHolder &v)
SYS_FORCE_INLINE const char * buffer() const
std::shared_ptr< T > UT_SharedPtr
Wrapper around std::shared_ptr.
constexpr SYS_FORCE_INLINE T & z() noexcept
static void loadData(UT_IStream &is, UT_Vector4I &v)
static void saveData(std::ostream &os, PRM_DataItemHandle s)
bool isMyRecord(const char *recordtype) const
static void loadData(UT_IStream &is, UT_Vector4D &v)
static void saveData(std::ostream &os, UT_Vector4D v)
static void loadData(UT_IStream &is, UT_Vector3I &v)
static void loadData(UT_IStream &is, UT_Vector3D &v)
static void loadData(UT_IStream &is, int64 &v)
void save(std::ostream &os) const
static void loadData(UT_IStream &is, UT_Vector2D &v)
static void saveData(std::ostream &os, int64 v)
bool operator==(const SIM_SolverEnableParms &src) const
void setEnableDataMode(int64 val)
void setEnableField(const UT_StringHolder &val)
const UT_StringHolder & getEnableAttrib() const
static void loadData(UT_IStream &is, bool &v)
void saveBinary(std::ostream &os) const
Save string to binary stream.
int getNumFieldsSubclass(const char *recordtype) const override
static void saveData(std::ostream &os, UT_Vector2D v)
GT_API const UT_StringHolder version
static void saveData(std::ostream &os, UT_SharedPtr< UT_Ramp > s)
int getNumRecordTypesSubclass() const override
void setEnableFieldMode(int64 val)
UT_OptionType getFieldTypeSubclass(const char *recordtype, int fieldnum) const override
LeafData & operator=(const LeafData &)=delete
int64 getEnableFieldMode() const
Utility class for containing a color ramp.
static void loadData(UT_IStream &is, PRM_DataItemHandle &v)
constexpr SYS_FORCE_INLINE T & w() noexcept
static void saveData(std::ostream &os, UT_StringHolder s)
void setEnableData(const UT_StringHolder &val)
static void loadData(UT_IStream &is, UT_Vector2I &v)
void setEnableAttribClass(int64 val)
bool getFieldRawSubclass(const char *recordtype, int recordnum, const char *fieldname, UT_OptionEntryPtr &result) const override
const char * findChar(int c) const
int64 getEnableAttribMode() const
const char * getFieldNameSubclass(const char *recordtype, int fieldnum) const override
void setEnableObjects(const UT_StringHolder &val)
void setEnableFieldTest(int64 val)
constexpr SYS_FORCE_INLINE T & y() noexcept
static void loadData(UT_IStream &is, UT_Matrix2D &v)
int getNumRecordsSubclass(const char *recordtype) const override
int64 getEnableSolvers() const
UT_SharedPtr< const PRM_DataItem > PRM_DataItemHandle
constexpr SYS_FORCE_INLINE T & y() noexcept
UT_UniquePtr< UT_OptionEntry > UT_OptionEntryPtr
static void loadData(UT_IStream &is, UT_SharedPtr< UT_Ramp > &v)
SYS_FORCE_INLINE bool isstring() const
void setEnableSolvers(int64 val)
SYS_FORCE_INLINE void strncpy(const char *src, exint maxlen)
int64 getEnableAttribClass() const
constexpr SYS_FORCE_INLINE T & x() noexcept