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);
static void saveData(std::ostream &os, UT_StringHolder s)
void setInputPointAttributes(const UT_StringHolder &val)
static void saveData(std::ostream &os, UT_SharedPtr< UT_Ramp > s)
static void loadData(UT_IStream &is, UT_Vector4D &v)
SOP_Node * getNode() const
void getNestParmValue(TempIndex idx, TempIndex instance, PRM_DataItemHandle &value) const override
void getNestParmValue(TempIndex idx, TempIndex instance, UT_Matrix4D &value) const override
void setNestParmValue(TempIndex idx, TempIndex instance, const UT_Matrix2D &value) override
const UT_StringHolder & getInputDimensionAttribute() const
void getNestParmValue(TempIndex idx, TempIndex instance, UT_SharedPtr< UT_Ramp > &value) const override
static void saveData(std::ostream &os, bool v)
void getNestParmValue(TempIndex idx, TempIndex instance, UT_Matrix3D &value) const override
const UT_StringHolder & getTargetPointAttributes() const
static void loadData(UT_IStream &is, UT_Matrix3D &v)
void setNestParmValue(TempIndex idx, TempIndex instance, const fpreal &value) override
exint bread(int32 *buffer, exint asize=1)
GT_API const UT_StringHolder time
constexpr SYS_FORCE_INLINE T & y() noexcept
void setNestParmValue(TempIndex idx, TempIndex instance, const UT_SharedPtr< UT_Ramp > &value) override
const UT_StringHolder & getTargetDimensionAttribute() const
static void loadData(UT_IStream &is, bool &v)
bool isParmColorRamp(exint idx) const override
static void saveData(std::ostream &os, UT_Vector2D v)
static void saveData(std::ostream &os, UT_Matrix4D v)
const OP_Context & context() const
constexpr SYS_FORCE_INLINE T & z() noexcept
void setSerialAttribute(const UT_StringHolder &val)
SYS_FORCE_INLINE const char * buffer() const
An output stream object that owns its own string buffer storage.
static void saveData(std::ostream &os, fpreal64 v)
**But if you need a result
void getNestParmValue(TempIndex idx, TempIndex instance, UT_Vector3D &value) const override
static PRM_DataItemHandle parseBinary(const char *type, UT_IStream &is)
const UT_WorkBuffer & str()
Returns a read-only reference to the underlying UT_WorkBuffer.
void setNestParmValue(TempIndex idx, TempIndex instance, const UT_Vector4D &value) override
bool operator!=(const SOP_MLExampleDeserializePointParms &src) const
static void loadData(UT_IStream &is, PRM_DataItemHandle &v)
constexpr SYS_FORCE_INLINE T & x() noexcept
void getNestParmValue(TempIndex idx, TempIndex instance, fpreal &value) const override
static void loadData(UT_IStream &is, UT_Matrix2D &v)
bool operator==(const SOP_MLExampleDeserializePointParms &src) const
void setInputDimensionAttribute(const UT_StringHolder &val)
void getNestParmValue(TempIndex idx, TempIndex instance, UT_Vector2D &value) const override
static void loadData(UT_IStream &is, UT_Vector2I &v)
static void saveData(std::ostream &os, UT_Vector4D v)
constexpr SYS_FORCE_INLINE T & x() noexcept
static void loadData(UT_IStream &is, UT_Vector4I &v)
bool operator==(const BaseDimensions< T > &a, const BaseDimensions< Y > &b)
static void loadData(UT_IStream &is, fpreal64 &v)
void doSetParmValue(TempIndex idx, TempIndex instance, const T &value)
void setNestParmValue(TempIndex idx, TempIndex instance, const UT_StringHolder &value) override
void setNestParmValue(TempIndex idx, TempIndex instance, const UT_Matrix4D &value) override
UT_StringHolder opTargetDimensionAttribute(const SOP_NodeVerb::CookParms &cookparms) const
void setNestParmValue(TempIndex idx, TempIndex instance, const UT_Vector2D &value) override
const UT_StringHolder & getSerialAttribute() const
static void loadData(UT_IStream &is, UT_Vector3D &v)
const UT_StringHolder & getInputPointAttributes() const
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
void setNestParmValue(TempIndex idx, TempIndex instance, const exint &value) override
const OP_GraphProxy * graph() const
static void loadData(UT_IStream &is, UT_StringHolder &v)
void getNestParmValue(TempIndex idx, TempIndex instance, UT_StringHolder &value) const override
static void loadData(UT_IStream &is, UT_Vector3I &v)
void setTargetPointAttributes(const UT_StringHolder &val)
void getNestParmValue(TempIndex idx, TempIndex instance, exint &value) const override
static void loadData(UT_IStream &is, UT_Matrix4D &v)
const char * getNestParmName(TempIndex fieldnum) const override
void setTargetDimensionAttribute(const UT_StringHolder &val)
virtual void evalOpParm(int64 &v, NodeIdx node, const char *parmname, fpreal time, DEP_MicroNode *depnode) const =0
static void saveData(std::ostream &os, UT_Matrix2D v)
UT_StringHolder opTargetPointAttributes(const SOP_NodeVerb::CookParms &cookparms) const
static void loadData(UT_IStream &is, int64 &v)
void saveBinary(std::ostream &os) const
Save string to binary stream.
exint getNestNumParms(TempIndex idx) const override
GT_API const UT_StringHolder version
void getNestParmValue(TempIndex idx, TempIndex instance, UT_Matrix2D &value) const override
void doGetParmValue(TempIndex idx, TempIndex instance, T &value) const
void coerceValue(T &result, const S &src) const
static void saveData(std::ostream &os, PRM_DataItemHandle s)
void buildFromOp(const OP_GraphProxy *graph, exint nodeidx, fpreal time, DEP_MicroNode *depnode)
void getNestParmValue(TempIndex idx, TempIndex instance, UT_Vector4D &value) const override
bool load(UT_IStream &is)
static void saveData(std::ostream &os, int64 v)
DEP_MicroNode * depnode() const
Utility class for containing a color ramp.
void copyFrom(const OP_NodeParms *src) override
constexpr SYS_FORCE_INLINE T & w() noexcept
ParmType getNestParmType(TempIndex fieldnum) const override
void setNestParmValue(TempIndex idx, TempIndex instance, const PRM_DataItemHandle &value) override
void setNestParmValue(TempIndex idx, TempIndex instance, const UT_Matrix3D &value) override
fpreal getCookTime() const
void loadFromOpSubclass(const LoadParms &loadparms) override
const char * findChar(int c) const
static void loadData(UT_IStream &is, UT_Vector2D &v)
SOP_MLExampleDeserializePointParms()
static void saveData(std::ostream &os, UT_Matrix3D v)
constexpr SYS_FORCE_INLINE T & y() noexcept
UT_StringHolder opInputPointAttributes(const SOP_NodeVerb::CookParms &cookparms) const
void save(std::ostream &os) const
UT_StringHolder opSerialAttribute(const SOP_NodeVerb::CookParms &cookparms) const
UT_SharedPtr< const PRM_DataItem > PRM_DataItemHandle
void setNestParmValue(TempIndex idx, TempIndex instance, const UT_Vector3D &value) override
constexpr SYS_FORCE_INLINE T & y() noexcept
static void loadData(UT_IStream &is, UT_SharedPtr< UT_Ramp > &v)
SYS_FORCE_INLINE bool isstring() const
OP_NodeParms & operator=(const OP_NodeParms &)=default
SYS_FORCE_INLINE void strncpy(const char *src, exint maxlen)
static void saveData(std::ostream &os, UT_Vector3D v)
UT_StringHolder opInputDimensionAttribute(const SOP_NodeVerb::CookParms &cookparms) const
constexpr SYS_FORCE_INLINE T & x() noexcept