31 myInputDimensionAttribute =
"inputdimension"_UTsh;
32 myTargetDimensionAttribute =
"targetdimension"_UTsh;
33 mySerialAttribute =
"value"_UTsh;
34 myInputPointAttributes =
"value"_UTsh;
35 myTargetPointAttributes =
"value"_UTsh;
48 if (myInputDimensionAttribute != src.myInputDimensionAttribute)
return false;
49 if (myTargetDimensionAttribute != src.myTargetDimensionAttribute)
return false;
50 if (mySerialAttribute != src.mySerialAttribute)
return false;
51 if (myInputPointAttributes != src.myInputPointAttributes)
return false;
52 if (myTargetPointAttributes != src.myTargetPointAttributes)
return false;
65 myInputDimensionAttribute =
"inputdimension"_UTsh;
67 graph->
evalOpParm(myInputDimensionAttribute, nodeidx,
"inputdimensionattribute", time, 0);
68 myTargetDimensionAttribute =
"targetdimension"_UTsh;
70 graph->
evalOpParm(myTargetDimensionAttribute, nodeidx,
"targetdimensionattribute", time, 0);
71 mySerialAttribute =
"value"_UTsh;
73 graph->
evalOpParm(mySerialAttribute, nodeidx,
"serialattribute", time, 0);
74 myInputPointAttributes =
"value"_UTsh;
76 graph->
evalOpParm(myInputPointAttributes, nodeidx,
"inputpointattributes", time, 0);
77 myTargetPointAttributes =
"value"_UTsh;
79 graph->
evalOpParm(myTargetPointAttributes, nodeidx,
"targetpointattributes", time, 0);
102 if (idx.
size() != instance.
size()+1)
135 { doGetParmValue(idx, instance, value); }
137 { doGetParmValue(idx, instance, value); }
139 { doGetParmValue(idx, instance, value); }
141 { doGetParmValue(idx, instance, value); }
143 { doGetParmValue(idx, instance, value); }
145 { doGetParmValue(idx, instance, value); }
147 { doGetParmValue(idx, instance, value); }
149 { doGetParmValue(idx, instance, value); }
151 { doGetParmValue(idx, instance, value); }
153 { doGetParmValue(idx, instance, value); }
155 { doGetParmValue(idx, instance, value); }
157 template <
typename T>
164 if (idx.
size() != instance.
size()+1)
169 coerceValue(myInputDimensionAttribute, ( ( value ) ));
172 coerceValue(myTargetDimensionAttribute, ( ( value ) ));
178 coerceValue(myInputPointAttributes, ( ( value ) ));
181 coerceValue(myTargetPointAttributes, ( ( value ) ));
188 { doSetParmValue(idx, instance, value); }
190 { doSetParmValue(idx, instance, value); }
192 { doSetParmValue(idx, instance, value); }
194 { doSetParmValue(idx, instance, value); }
196 { doSetParmValue(idx, instance, value); }
198 { doSetParmValue(idx, instance, value); }
200 { doSetParmValue(idx, instance, value); }
202 { doSetParmValue(idx, instance, value); }
204 { doSetParmValue(idx, instance, value); }
206 { doSetParmValue(idx, instance, value); }
208 { doSetParmValue(idx, instance, value); }
224 if (fieldnum.
size() < 1)
229 return "inputdimensionattribute";
231 return "targetdimensionattribute";
233 return "serialattribute";
235 return "inputpointattributes";
237 return "targetpointattributes";
245 if (fieldnum.
size() < 1)
246 return PARM_UNSUPPORTED;
297 loadData(is, rampdata);
315 int typelen = colon - data.
buffer();
329 {
int64 iv =
v; UTwrite(os, &iv); }
331 { UTwrite<fpreal64>(os, &
v); }
333 { UTwrite<fpreal64>(os, &v.
x()); UTwrite<fpreal64>(os, &v.
y()); }
335 { UTwrite<fpreal64>(os, &v.
x()); UTwrite<fpreal64>(os, &v.
y());
336 UTwrite<fpreal64>(os, &v.
z()); }
338 { UTwrite<fpreal64>(os, &v.
x()); UTwrite<fpreal64>(os, &v.
y());
339 UTwrite<fpreal64>(os, &v.
z()); UTwrite<fpreal64>(os, &v.
w()); }
351 if (s) s->save(ostr);
353 saveData(os, result);
360 ostr << s->getDataTypeToken();
365 saveData(os, result);
369 void save(std::ostream &os)
const
373 saveData(os, myInputDimensionAttribute);
374 saveData(os, myTargetDimensionAttribute);
375 saveData(os, mySerialAttribute);
376 saveData(os, myInputPointAttributes);
377 saveData(os, myTargetPointAttributes);
390 loadData(is, myInputDimensionAttribute);
391 loadData(is, myTargetDimensionAttribute);
392 loadData(is, mySerialAttribute);
393 loadData(is, myInputPointAttributes);
394 loadData(is, myTargetPointAttributes);
404 if (!thissop)
return getInputDimensionAttribute();
406 OP_Utils::evalOpParm(result, thissop,
"inputdimensionattribute", cookparms.
getCookTime(), 0);
414 if (!thissop)
return getTargetDimensionAttribute();
416 OP_Utils::evalOpParm(result, thissop,
"targetdimensionattribute", cookparms.
getCookTime(), 0);
424 if (!thissop)
return getSerialAttribute();
426 OP_Utils::evalOpParm(result, thissop,
"serialattribute", cookparms.
getCookTime(), 0);
434 if (!thissop)
return getInputPointAttributes();
436 OP_Utils::evalOpParm(result, thissop,
"inputpointattributes", cookparms.
getCookTime(), 0);
444 if (!thissop)
return getTargetPointAttributes();
446 OP_Utils::evalOpParm(result, thissop,
"targetpointattributes", cookparms.
getCookTime(), 0);
void getNestParmValue(TempIndex idx, TempIndex instance, UT_SharedPtr< UT_Ramp > &value) const override
void setTargetPointAttributes(const UT_StringHolder &val)
void buildFromOp(const OP_GraphProxy *graph, exint nodeidx, fpreal time, DEP_MicroNode *depnode)
UT_StringHolder opTargetDimensionAttribute(const SOP_NodeVerb::CookParms &cookparms) const
void setNestParmValue(TempIndex idx, TempIndex instance, const UT_Vector4D &value) override
SOP_Node * getNode() const
void getNestParmValue(TempIndex idx, TempIndex instance, UT_Matrix2D &value) const override
static void loadData(UT_IStream &is, UT_Vector4I &v)
void getNestParmValue(TempIndex idx, TempIndex instance, UT_StringHolder &value) const override
exint getNestNumParms(TempIndex idx) const override
void save(std::ostream &os) const
static void loadData(UT_IStream &is, UT_SharedPtr< UT_Ramp > &v)
exint bread(int32 *buffer, exint asize=1)
void setNestParmValue(TempIndex idx, TempIndex instance, const UT_Vector2D &value) override
bool load(UT_IStream &is)
GT_API const UT_StringHolder time
constexpr SYS_FORCE_INLINE T & y() noexcept
const UT_StringHolder & getInputPointAttributes() const
void setNestParmValue(TempIndex idx, TempIndex instance, const PRM_DataItemHandle &value) override
const OP_Context & context() const
SOP_MLExampleSerializePointParms()
constexpr SYS_FORCE_INLINE T & z() noexcept
static void saveData(std::ostream &os, UT_Matrix2D v)
SYS_FORCE_INLINE const char * buffer() const
static void saveData(std::ostream &os, int64 v)
void setInputPointAttributes(const UT_StringHolder &val)
static void saveData(std::ostream &os, fpreal64 v)
void setNestParmValue(TempIndex idx, TempIndex instance, const UT_Matrix2D &value) override
static void loadData(UT_IStream &is, UT_Vector4D &v)
An output stream object that owns its own string buffer storage.
static void saveData(std::ostream &os, UT_Vector4D v)
const UT_StringHolder & getInputDimensionAttribute() const
static void loadData(UT_IStream &is, bool &v)
**But if you need a result
static void loadData(UT_IStream &is, UT_Vector2D &v)
void doGetParmValue(TempIndex idx, TempIndex instance, T &value) const
static void loadData(UT_IStream &is, fpreal64 &v)
UT_StringHolder opSerialAttribute(const SOP_NodeVerb::CookParms &cookparms) const
static PRM_DataItemHandle parseBinary(const char *type, UT_IStream &is)
const UT_WorkBuffer & str()
Returns a read-only reference to the underlying UT_WorkBuffer.
constexpr SYS_FORCE_INLINE T & x() noexcept
void doSetParmValue(TempIndex idx, TempIndex instance, const T &value)
static void saveData(std::ostream &os, PRM_DataItemHandle s)
constexpr SYS_FORCE_INLINE T & x() noexcept
static void loadData(UT_IStream &is, UT_Matrix4D &v)
void setNestParmValue(TempIndex idx, TempIndex instance, const UT_SharedPtr< UT_Ramp > &value) override
bool operator==(const BaseDimensions< T > &a, const BaseDimensions< Y > &b)
UT_StringHolder opInputDimensionAttribute(const SOP_NodeVerb::CookParms &cookparms) const
static void loadData(UT_IStream &is, UT_StringHolder &v)
static void saveData(std::ostream &os, UT_Vector2D v)
const UT_StringHolder & getSerialAttribute() const
ParmType getNestParmType(TempIndex fieldnum) const override
void getNestParmValue(TempIndex idx, TempIndex instance, UT_Matrix3D &value) const override
static void saveData(std::ostream &os, bool v)
void setInputDimensionAttribute(const UT_StringHolder &val)
static void saveData(std::ostream &os, UT_StringHolder s)
static void saveData(std::ostream &os, UT_Vector3D v)
static void saveData(std::ostream &os, UT_SharedPtr< UT_Ramp > s)
SYS_FORCE_INLINE const char * buffer() const
std::shared_ptr< T > UT_SharedPtr
Wrapper around std::shared_ptr.
void setNestParmValue(TempIndex idx, TempIndex instance, const UT_StringHolder &value) override
constexpr SYS_FORCE_INLINE T & z() noexcept
static void loadData(UT_IStream &is, UT_Vector2I &v)
void setTargetDimensionAttribute(const UT_StringHolder &val)
const OP_GraphProxy * graph() const
static void loadData(UT_IStream &is, PRM_DataItemHandle &v)
static void saveData(std::ostream &os, UT_Matrix4D v)
bool operator!=(const SOP_MLExampleSerializePointParms &src) const
static void saveData(std::ostream &os, UT_Matrix3D v)
void loadFromOpSubclass(const LoadParms &loadparms) override
const UT_StringHolder & getTargetDimensionAttribute() const
const UT_StringHolder & getTargetPointAttributes() const
static void loadData(UT_IStream &is, int64 &v)
UT_StringHolder opTargetPointAttributes(const SOP_NodeVerb::CookParms &cookparms) const
virtual void evalOpParm(int64 &v, NodeIdx node, const char *parmname, fpreal time, DEP_MicroNode *depnode) const =0
bool operator==(const SOP_MLExampleSerializePointParms &src) const
static void loadData(UT_IStream &is, UT_Vector3D &v)
void copyFrom(const OP_NodeParms *src) override
UT_StringHolder opInputPointAttributes(const SOP_NodeVerb::CookParms &cookparms) const
void setNestParmValue(TempIndex idx, TempIndex instance, const exint &value) override
void saveBinary(std::ostream &os) const
Save string to binary stream.
void setNestParmValue(TempIndex idx, TempIndex instance, const UT_Matrix3D &value) override
void getNestParmValue(TempIndex idx, TempIndex instance, PRM_DataItemHandle &value) const override
GT_API const UT_StringHolder version
const char * getNestParmName(TempIndex fieldnum) const override
void setSerialAttribute(const UT_StringHolder &val)
void setNestParmValue(TempIndex idx, TempIndex instance, const fpreal &value) override
void coerceValue(T &result, const S &src) const
DEP_MicroNode * depnode() const
Utility class for containing a color ramp.
void getNestParmValue(TempIndex idx, TempIndex instance, exint &value) const override
constexpr SYS_FORCE_INLINE T & w() noexcept
void getNestParmValue(TempIndex idx, TempIndex instance, UT_Vector4D &value) const override
void getNestParmValue(TempIndex idx, TempIndex instance, fpreal &value) const override
void getNestParmValue(TempIndex idx, TempIndex instance, UT_Matrix4D &value) const override
void setNestParmValue(TempIndex idx, TempIndex instance, const UT_Vector3D &value) override
static void loadData(UT_IStream &is, UT_Vector3I &v)
fpreal getCookTime() const
const char * findChar(int c) const
static void loadData(UT_IStream &is, UT_Matrix2D &v)
void getNestParmValue(TempIndex idx, TempIndex instance, UT_Vector3D &value) const override
void getNestParmValue(TempIndex idx, TempIndex instance, UT_Vector2D &value) const override
constexpr SYS_FORCE_INLINE T & y() noexcept
void setNestParmValue(TempIndex idx, TempIndex instance, const UT_Matrix4D &value) override
bool isParmColorRamp(exint idx) const override
UT_SharedPtr< const PRM_DataItem > PRM_DataItemHandle
static void loadData(UT_IStream &is, UT_Matrix3D &v)
constexpr SYS_FORCE_INLINE T & y() noexcept
SYS_FORCE_INLINE bool isstring() const
OP_NodeParms & operator=(const OP_NodeParms &)=default
SYS_FORCE_INLINE void strncpy(const char *src, exint maxlen)
constexpr SYS_FORCE_INLINE T & x() noexcept