HDK
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
SOP_AttribCastParms.proto.h
Go to the documentation of this file.
1 /* Automagically Generated by generate_proto.py
2  * Do not Edit
3  */
4 #pragma once
5 
6 #include <SOP/SOP_API.h>
7 #include <SOP/SOP_NodeVerb.h>
8 #include <SOP/SOP_GraphProxy.h>
9 
10 #include <OP/OP_Utils.h>
11 #include <PRM/PRM_Parm.h>
12 #include <UT/UT_IStream.h>
13 #include <UT/UT_NTStreamUtil.h>
14 #include <UT/UT_Ramp.h>
15 #include <UT/UT_SharedPtr.h>
16 #include <UT/UT_StringHolder.h>
17 #include <UT/UT_StringStream.h>
18 #include <UT/UT_VectorTypes.h>
19 #include <UT/UT_EnvControl.h>
20 #include <SYS/SYS_Types.h>
21 
22 class DEP_MicroNode;
23 
25 {
26 public:
27  static int version() { return 1; }
28  struct Casts
29  {
33 
34 
36  {
37  _class = "point"_UTsh;
38  attribs = ""_UTsh;
39  precision = "fpreal32"_UTsh;
40 
41  }
42 
43  bool operator==(const Casts &src) const
44  {
45  if (_class != src._class) return false;
46  if (attribs != src.attribs) return false;
47  if (precision != src.precision) return false;
48 
49  return true;
50  }
51  bool operator!=(const Casts &src) const
52  {
53  return !operator==(src);
54  }
55 
56  };
57 
59  {
61 
62  buf.strcat("[ ");
63  for (int i = 0; i < list.entries(); i++)
64  {
65  if (i)
66  buf.strcat(", ");
67  buf.strcat("( ");
68  buf.append("");
69  { UT_String tmp; tmp = UT_StringWrap(list(i)._class).makeQuotedString('"'); buf.strcat(tmp); }
70  buf.append(", ");
71  { UT_String tmp; tmp = UT_StringWrap(list(i).attribs).makeQuotedString('"'); buf.strcat(tmp); }
72  buf.append(", ");
73  { UT_String tmp; tmp = UT_StringWrap(list(i).precision).makeQuotedString('"'); buf.strcat(tmp); }
74 
75  buf.strcat(" )");
76  }
77  buf.strcat(" ]");
78 
80  return result;
81  }
82 
84  {
85  myPreferredPrecision = "unchanged"_UTsh;
86 
87  }
88 
89  explicit SOP_AttribCastParms(const SOP_AttribCastParms &) = default;
91  SOP_AttribCastParms(SOP_AttribCastParms &&) noexcept = default;
92  SOP_AttribCastParms &operator=(SOP_AttribCastParms &&) noexcept = default;
93 
94  ~SOP_AttribCastParms() override {}
95 
96  bool operator==(const SOP_AttribCastParms &src) const
97  {
98  if (myCasts != src.myCasts) return false;
99  if (myPreferredPrecision != src.myPreferredPrecision) return false;
100 
101  return true;
102  }
103  bool operator!=(const SOP_AttribCastParms &src) const
104  {
105  return !operator==(src);
106  }
107 
108 
109 
110  void buildFromOp(const OP_GraphProxy *graph, exint nodeidx, fpreal time, DEP_MicroNode *depnode)
111  {
112  if (true)
113  {
114  int64 length = 0;
115  graph->evalOpParm(length, nodeidx, "numcasts", time, 0);
116  if (length < 0) length = 0;
117  myCasts.setSize(length);
118  for (exint i = 0; i < length; i++)
119  {
120  int parmidx[1];
121  int offsets[1];
122  parmidx[0] = i+1;
123  offsets[0] = 1;
124  auto && _curentry = myCasts(i);
125  (void) _curentry;
126  _curentry._class = "point"_UTsh;
127  if (true)
128  graph->evalOpParmInst(_curentry._class, nodeidx, "class#", parmidx, offsets, time, 0, 2-1);
129  _curentry.attribs = ""_UTsh;
130  if (true)
131  graph->evalOpParmInst(_curentry.attribs, nodeidx, "attribs#", parmidx, offsets, time, 0, 2-1);
132  _curentry.precision = "fpreal32"_UTsh;
133  if (true)
134  graph->evalOpParmInst(_curentry.precision, nodeidx, "precision#", parmidx, offsets, time, 0, 2-1);
135 
136  }
137  }
138  else
139  myCasts.clear();
140  myPreferredPrecision = "unchanged"_UTsh;
141  if (true)
142  graph->evalOpParm(myPreferredPrecision, nodeidx, "preferredprecision", time, 0);
143 
144  }
145 
146 
147  void loadFromOpSubclass(const LoadParms &loadparms) override
148  {
149  buildFromOp(loadparms.graph(), loadparms.nodeIdx(), loadparms.context().getTime(), loadparms.depnode());
150  }
151 
152 
153  void copyFrom(const OP_NodeParms *src) override
154  {
155  *this = *((const SOP_AttribCastParms *)src);
156  }
157 
158  template <typename T>
159  void
160  doGetParmValue(TempIndex idx, TempIndex instance, T &value) const
161  {
162  if (idx.size() < 1)
163  return;
164  UT_ASSERT(idx.size() == instance.size()+1);
165  if (idx.size() != instance.size()+1)
166  return;
167  switch (idx[0])
168  {
169  case 0:
170  if (idx.size() == 1)
171  coerceValue(value, myCasts.entries());
172  else if (instance[0] < myCasts.entries())
173  {
174  auto && _data = myCasts(instance[0]);
175  switch (idx[1])
176  {
177  case 0:
178  coerceValue(value, _data._class);
179  break;
180  case 1:
181  coerceValue(value, _data.attribs);
182  break;
183  case 2:
184  coerceValue(value, _data.precision);
185  break;
186 
187  }
188  }
189  break;
190  case 1:
191  coerceValue(value, myPreferredPrecision);
192  break;
193 
194  }
195  }
196 
197  bool isParmColorRamp(exint idx) const override
198  {
199  switch (idx)
200  {
201 
202  }
203  return false;
204  }
205 
206  void getNestParmValue(TempIndex idx, TempIndex instance, exint &value) const override
207  { doGetParmValue(idx, instance, value); }
208  void getNestParmValue(TempIndex idx, TempIndex instance, fpreal &value) const override
209  { doGetParmValue(idx, instance, value); }
210  void getNestParmValue(TempIndex idx, TempIndex instance, UT_Vector2D &value) const override
211  { doGetParmValue(idx, instance, value); }
212  void getNestParmValue(TempIndex idx, TempIndex instance, UT_Vector3D &value) const override
213  { doGetParmValue(idx, instance, value); }
214  void getNestParmValue(TempIndex idx, TempIndex instance, UT_Vector4D &value) const override
215  { doGetParmValue(idx, instance, value); }
216  void getNestParmValue(TempIndex idx, TempIndex instance, UT_Matrix2D &value) const override
217  { doGetParmValue(idx, instance, value); }
218  void getNestParmValue(TempIndex idx, TempIndex instance, UT_Matrix3D &value) const override
219  { doGetParmValue(idx, instance, value); }
220  void getNestParmValue(TempIndex idx, TempIndex instance, UT_Matrix4D &value) const override
221  { doGetParmValue(idx, instance, value); }
222  void getNestParmValue(TempIndex idx, TempIndex instance, UT_StringHolder &value) const override
223  { doGetParmValue(idx, instance, value); }
224  void getNestParmValue(TempIndex idx, TempIndex instance, UT_SharedPtr<UT_Ramp> &value) const override
225  { doGetParmValue(idx, instance, value); }
226  void getNestParmValue(TempIndex idx, TempIndex instance, PRM_DataItemHandle &value) const override
227  { doGetParmValue(idx, instance, value); }
228 
229  template <typename T>
230  void
231  doSetParmValue(TempIndex idx, TempIndex instance, const T &value)
232  {
233  if (idx.size() < 1)
234  return;
235  UT_ASSERT(idx.size() == instance.size()+1);
236  if (idx.size() != instance.size()+1)
237  return;
238  switch (idx[0])
239  {
240  case 0:
241  if (idx.size() == 1)
242  {
243  exint newsize;
244  coerceValue(newsize, value);
245  if (newsize < 0) newsize = 0;
246  myCasts.setSize(newsize);
247  }
248  else
249  {
250  if (instance[0] < 0)
251  return;
252  myCasts.setSizeIfNeeded(instance[0]+1);
253  auto && _data = myCasts(instance[0]);
254  switch (idx[1])
255  {
256  case 0:
257  coerceValue(_data._class, value);
258  break;
259  case 1:
260  coerceValue(_data.attribs, value);
261  break;
262  case 2:
263  coerceValue(_data.precision, value);
264  break;
265 
266  }
267  }
268  break;
269  case 1:
270  coerceValue(myPreferredPrecision, ( ( value ) ));
271  break;
272 
273  }
274  }
275 
276  void setNestParmValue(TempIndex idx, TempIndex instance, const exint &value) override
277  { doSetParmValue(idx, instance, value); }
278  void setNestParmValue(TempIndex idx, TempIndex instance, const fpreal &value) override
279  { doSetParmValue(idx, instance, value); }
280  void setNestParmValue(TempIndex idx, TempIndex instance, const UT_Vector2D &value) override
281  { doSetParmValue(idx, instance, value); }
282  void setNestParmValue(TempIndex idx, TempIndex instance, const UT_Vector3D &value) override
283  { doSetParmValue(idx, instance, value); }
284  void setNestParmValue(TempIndex idx, TempIndex instance, const UT_Vector4D &value) override
285  { doSetParmValue(idx, instance, value); }
286  void setNestParmValue(TempIndex idx, TempIndex instance, const UT_Matrix2D &value) override
287  { doSetParmValue(idx, instance, value); }
288  void setNestParmValue(TempIndex idx, TempIndex instance, const UT_Matrix3D &value) override
289  { doSetParmValue(idx, instance, value); }
290  void setNestParmValue(TempIndex idx, TempIndex instance, const UT_Matrix4D &value) override
291  { doSetParmValue(idx, instance, value); }
292  void setNestParmValue(TempIndex idx, TempIndex instance, const UT_StringHolder &value) override
293  { doSetParmValue(idx, instance, value); }
294  void setNestParmValue(TempIndex idx, TempIndex instance, const UT_SharedPtr<UT_Ramp> &value) override
295  { doSetParmValue(idx, instance, value); }
296  void setNestParmValue(TempIndex idx, TempIndex instance, const PRM_DataItemHandle &value) override
297  { doSetParmValue(idx, instance, value); }
298 
299  exint getNestNumParms(TempIndex idx) const override
300  {
301  if (idx.size() == 0)
302  return 2;
303  switch (idx[0])
304  {
305  case 0:
306  return 3;
307 
308  }
309  // Invalid
310  return 0;
311  }
312 
313  const char *getNestParmName(TempIndex fieldnum) const override
314  {
315  if (fieldnum.size() < 1)
316  return 0;
317  switch (fieldnum[0])
318  {
319  case 0:
320  if (fieldnum.size() == 1)
321  return "numcasts";
322  switch (fieldnum[1])
323  {
324  case 0:
325  return "class#";
326  case 1:
327  return "attribs#";
328  case 2:
329  return "precision#";
330 
331  }
332  return 0;
333  case 1:
334  return "preferredprecision";
335 
336  }
337  return 0;
338  }
339 
340  ParmType getNestParmType(TempIndex fieldnum) const override
341  {
342  if (fieldnum.size() < 1)
343  return PARM_UNSUPPORTED;
344  switch (fieldnum[0])
345  {
346  case 0:
347  if (fieldnum.size() == 1)
348  return PARM_MULTIPARM;
349  switch (fieldnum[1])
350  {
351  case 0:
352  return PARM_STRING;
353  case 1:
354  return PARM_STRING;
355  case 2:
356  return PARM_STRING;
357 
358  }
359  return PARM_UNSUPPORTED;
360  case 1:
361  return PARM_STRING;
362 
363  }
364  return PARM_UNSUPPORTED;
365  }
366 
367  // Boiler plate to load individual types.
368  static void loadData(UT_IStream &is, int64 &v)
369  { is.bread(&v, 1); }
370  static void loadData(UT_IStream &is, bool &v)
371  { int64 iv; is.bread(&iv, 1); v = iv; }
372  static void loadData(UT_IStream &is, fpreal64 &v)
373  { is.bread<fpreal64>(&v, 1); }
374  static void loadData(UT_IStream &is, UT_Vector2D &v)
375  { is.bread<fpreal64>(&v.x(), 1); is.bread<fpreal64>(&v.y(), 1); }
376  static void loadData(UT_IStream &is, UT_Vector3D &v)
377  { is.bread<fpreal64>(&v.x(), 1); is.bread<fpreal64>(&v.y(), 1);
378  is.bread<fpreal64>(&v.z(), 1); }
379  static void loadData(UT_IStream &is, UT_Vector4D &v)
380  { is.bread<fpreal64>(&v.x(), 1); is.bread<fpreal64>(&v.y(), 1);
381  is.bread<fpreal64>(&v.z(), 1); is.bread<fpreal64>(&v.w(), 1); }
382  static void loadData(UT_IStream &is, UT_Matrix2D &v)
383  { for (int r = 0; r < 2; r++) for (int c = 0; c < 2; c++) is.bread<fpreal64>(&v(r, c), 1); }
384  static void loadData(UT_IStream &is, UT_Matrix3D &v)
385  { for (int r = 0; r < 3; r++) for (int c = 0; c < 3; c++) is.bread<fpreal64>(&v(r, c), 1); }
386  static void loadData(UT_IStream &is, UT_Matrix4D &v)
387  { for (int r = 0; r < 4; r++) for (int c = 0; c < 4; c++) is.bread<fpreal64>(&v(r, c), 1); }
388  static void loadData(UT_IStream &is, UT_Vector2I &v)
389  { is.bread<int64>(&v.x(), 1); is.bread<int64>(&v.y(), 1); }
390  static void loadData(UT_IStream &is, UT_Vector3I &v)
391  { is.bread<int64>(&v.x(), 1); is.bread<int64>(&v.y(), 1);
392  is.bread<int64>(&v.z(), 1); }
393  static void loadData(UT_IStream &is, UT_Vector4I &v)
394  { is.bread<int64>(&v.x(), 1); is.bread<int64>(&v.y(), 1);
395  is.bread<int64>(&v.z(), 1); is.bread<int64>(&v.w(), 1); }
397  { is.bread(v); }
399  { UT_StringHolder rampdata;
400  loadData(is, rampdata);
401  if (rampdata.isstring())
402  {
403  v.reset(new UT_Ramp());
404  UT_IStream istr((const char *) rampdata, rampdata.length(), UT_ISTREAM_ASCII);
405  v->load(istr);
406  }
407  else v.reset();
408  }
411  loadData(is, data);
412  if (data.isstring())
413  {
414  // Find the data type.
415  const char *colon = UT_StringWrap(data).findChar(':');
416  if (colon)
417  {
418  int typelen = colon - data.buffer();
420  type.strncpy(data.buffer(), typelen);
421  UT_IStream istr(((const char *) data) + typelen + 1, data.length() - (typelen + 1), UT_ISTREAM_BINARY);
422 
423  v = PRM_DataFactory::parseBinary(type.buffer(), istr);
424  }
425  }
426  else v.reset();
427  }
428 
429  static void saveData(std::ostream &os, int64 v)
430  { UTwrite(os, &v); }
431  static void saveData(std::ostream &os, bool v)
432  { int64 iv = v; UTwrite(os, &iv); }
433  static void saveData(std::ostream &os, fpreal64 v)
434  { UTwrite<fpreal64>(os, &v); }
435  static void saveData(std::ostream &os, UT_Vector2D v)
436  { UTwrite<fpreal64>(os, &v.x()); UTwrite<fpreal64>(os, &v.y()); }
437  static void saveData(std::ostream &os, UT_Vector3D v)
438  { UTwrite<fpreal64>(os, &v.x()); UTwrite<fpreal64>(os, &v.y());
439  UTwrite<fpreal64>(os, &v.z()); }
440  static void saveData(std::ostream &os, UT_Vector4D v)
441  { UTwrite<fpreal64>(os, &v.x()); UTwrite<fpreal64>(os, &v.y());
442  UTwrite<fpreal64>(os, &v.z()); UTwrite<fpreal64>(os, &v.w()); }
443  static void saveData(std::ostream &os, UT_Matrix2D v)
445  static void saveData(std::ostream &os, UT_Matrix3D v)
447  static void saveData(std::ostream &os, UT_Matrix4D v)
449  static void saveData(std::ostream &os, UT_StringHolder s)
450  { UT_StringWrap(s).saveBinary(os); }
451  static void saveData(std::ostream &os, UT_SharedPtr<UT_Ramp> s)
453  UT_OStringStream ostr;
454  if (s) s->save(ostr);
455  result = ostr.str();
456  saveData(os, result);
457  }
458  static void saveData(std::ostream &os, PRM_DataItemHandle s)
460  UT_OStringStream ostr;
461  if (s)
462  {
463  ostr << s->getDataTypeToken();
464  ostr << ":";
465  s->saveBinary(ostr);
466  }
467  result = ostr.str();
468  saveData(os, result);
469  }
470 
471 
472  void save(std::ostream &os) const
473  {
474  int32 v = version();
475  UTwrite(os, &v);
476  {
477  int64 length = myCasts.entries();
478  UTwrite(os, &length);
479  for (exint i = 0; i < length; i++)
480  {
481  auto && _curentry = myCasts(i);
482  (void) _curentry;
483  saveData(os, _curentry._class);
484  saveData(os, _curentry.attribs);
485  saveData(os, _curentry.precision);
486 
487  }
488  }
489  saveData(os, myPreferredPrecision);
490 
491  }
492 
493  bool load(UT_IStream &is)
494  {
495  int32 v;
496  is.bread(&v, 1);
497  if (version() != v)
498  {
499  // Fail incompatible versions
500  return false;
501  }
502  {
503  int64 length;
504  is.read(&length, 1);
505  myCasts.setSize(length);
506  for (exint i = 0; i < length; i++)
507  {
508  auto && _curentry = myCasts(i);
509  (void) _curentry;
510  loadData(is, _curentry._class);
511  loadData(is, _curentry.attribs);
512  loadData(is, _curentry.precision);
513 
514  }
515  }
516  loadData(is, myPreferredPrecision);
517 
518  return true;
519  }
520 
521  const UT_Array<Casts> &getCasts() const { return myCasts; }
522 void setCasts(const UT_Array<Casts> &val) { myCasts = val; }
523  exint opCasts(const SOP_NodeVerb::CookParms &cookparms) const
524  {
525  SOP_Node *thissop = cookparms.getNode();
526  if (!thissop) return getCasts().entries();
527  exint result;
528  OP_Utils::evalOpParm(result, thissop, "numcasts", cookparms.getCookTime(), 0);
529  return result;
530  }
531  UT_StringHolder opCasts__class(const SOP_NodeVerb::CookParms &cookparms, int _idx) const
532  { return opinstCasts__class(cookparms, &_idx); }
533  UT_StringHolder opinstCasts__class(const SOP_NodeVerb::CookParms &cookparms, const int *_idx) const
534  {
535  SOP_Node *thissop = cookparms.getNode();
536  if (!thissop) return (myCasts(_idx[0])._class);
537  int _parmidx[2-1];
538  _parmidx[1-1] = _idx[1-1] + 1;
539 
541  OP_Utils::evalOpParmInst(result, thissop, "class#", _parmidx, cookparms.getCookTime(), 0, 2-1);
542  return (result);
543  }
544  UT_StringHolder opCasts_attribs(const SOP_NodeVerb::CookParms &cookparms, int _idx) const
545  { return opinstCasts_attribs(cookparms, &_idx); }
546  UT_StringHolder opinstCasts_attribs(const SOP_NodeVerb::CookParms &cookparms, const int *_idx) const
547  {
548  SOP_Node *thissop = cookparms.getNode();
549  if (!thissop) return (myCasts(_idx[0]).attribs);
550  int _parmidx[2-1];
551  _parmidx[1-1] = _idx[1-1] + 1;
552 
554  OP_Utils::evalOpParmInst(result, thissop, "attribs#", _parmidx, cookparms.getCookTime(), 0, 2-1);
555  return (result);
556  }
558  { return opinstCasts_precision(cookparms, &_idx); }
559  UT_StringHolder opinstCasts_precision(const SOP_NodeVerb::CookParms &cookparms, const int *_idx) const
560  {
561  SOP_Node *thissop = cookparms.getNode();
562  if (!thissop) return (myCasts(_idx[0]).precision);
563  int _parmidx[2-1];
564  _parmidx[1-1] = _idx[1-1] + 1;
565 
567  OP_Utils::evalOpParmInst(result, thissop, "precision#", _parmidx, cookparms.getCookTime(), 0, 2-1);
568  return (result);
569  }
570 
571  const UT_StringHolder & getPreferredPrecision() const { return myPreferredPrecision; }
572  void setPreferredPrecision(const UT_StringHolder & val) { myPreferredPrecision = val; }
574  {
575  SOP_Node *thissop = cookparms.getNode();
576  if (!thissop) return getPreferredPrecision();
578  OP_Utils::evalOpParm(result, thissop, "preferredprecision", cookparms.getCookTime(), 0);
579  return result;
580  }
581 
582 private:
583  UT_Array<Casts> myCasts;
584  UT_StringHolder myPreferredPrecision;
585 
586 };
static void loadData(UT_IStream &is, UT_Vector4D &v)
GLenum GLuint GLenum GLsizei const GLchar * buf
Definition: glcorearb.h:2540
void buildFromOp(const OP_GraphProxy *graph, exint nodeidx, fpreal time, DEP_MicroNode *depnode)
static void loadData(UT_IStream &is, UT_SharedPtr< UT_Ramp > &v)
static void saveData(std::ostream &os, fpreal64 v)
int int32
Definition: SYS_Types.h:39
SOP_Node * getNode() const
Definition: SOP_NodeVerb.h:347
UT_StringHolder createString(const UT_Array< Casts > &list) const
UT_StringHolder opinstCasts__class(const SOP_NodeVerb::CookParms &cookparms, const int *_idx) const
bool isParmColorRamp(exint idx) const override
void setCasts(const UT_Array< Casts > &val)
void
Definition: png.h:1083
void getNestParmValue(TempIndex idx, TempIndex instance, UT_Matrix2D &value) const override
void setNestParmValue(TempIndex idx, TempIndex instance, const UT_Vector4D &value) override
exint bread(int32 *buffer, exint asize=1)
GLboolean * data
Definition: glcorearb.h:131
GT_API const UT_StringHolder time
constexpr SYS_FORCE_INLINE T & y() noexcept
Definition: UT_Vector4.h:493
bool operator==(const SOP_AttribCastParms &src) const
const GLdouble * v
Definition: glcorearb.h:837
fpreal getTime() const
Definition: OP_Context.h:62
static void saveData(std::ostream &os, UT_Vector4D v)
UT_StringHolder opPreferredPrecision(const SOP_NodeVerb::CookParms &cookparms) const
void setNestParmValue(TempIndex idx, TempIndex instance, const UT_Matrix4D &value) override
static void loadData(UT_IStream &is, UT_Matrix4D &v)
void doSetParmValue(TempIndex idx, TempIndex instance, const T &value)
UT_String makeQuotedString(char delimiter='\'', bool escape_nonprinting=false) const
const OP_Context & context() const
Definition: OP_NodeParms.h:97
constexpr SYS_FORCE_INLINE T & z() noexcept
Definition: UT_Vector3.h:667
int64 exint
Definition: SYS_Types.h:125
UT_StringHolder opCasts_precision(const SOP_NodeVerb::CookParms &cookparms, int _idx) const
SYS_FORCE_INLINE const char * buffer() const
GLdouble s
Definition: glad.h:3009
GLuint GLsizei GLsizei * length
Definition: glcorearb.h:795
bool operator!=(const Casts &src) const
An output stream object that owns its own string buffer storage.
static void saveData(std::ostream &os, UT_Matrix4D v)
static void saveData(std::ostream &os, int64 v)
**But if you need a result
Definition: thread.h:613
void setPreferredPrecision(const UT_StringHolder &val)
void setNestParmValue(TempIndex idx, TempIndex instance, const UT_Vector3D &value) override
void getNestParmValue(TempIndex idx, TempIndex instance, PRM_DataItemHandle &value) const override
void getNestParmValue(TempIndex idx, TempIndex instance, fpreal &value) const override
exint nodeIdx() const
Definition: OP_NodeParms.h:95
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 getNestParmValue(TempIndex idx, TempIndex instance, UT_SharedPtr< UT_Ramp > &value) const override
void doGetParmValue(TempIndex idx, TempIndex instance, T &value) const
static void loadData(UT_IStream &is, PRM_DataItemHandle &v)
static void loadData(UT_IStream &is, int64 &v)
static void saveData(std::ostream &os, bool v)
constexpr SYS_FORCE_INLINE T & x() noexcept
Definition: UT_Vector4.h:491
const char * getNestParmName(TempIndex fieldnum) const override
GLuint GLsizei const GLuint const GLintptr * offsets
Definition: glcorearb.h:2621
UT_StringHolder opCasts_attribs(const SOP_NodeVerb::CookParms &cookparms, int _idx) const
static void loadData(UT_IStream &is, UT_Vector3I &v)
double fpreal64
Definition: SYS_Types.h:201
constexpr SYS_FORCE_INLINE T & x() noexcept
Definition: UT_Vector2.h:423
bool operator==(const BaseDimensions< T > &a, const BaseDimensions< Y > &b)
Definition: Dimensions.h:137
static void saveData(std::ostream &os, UT_Matrix2D v)
void setNestParmValue(TempIndex idx, TempIndex instance, const UT_Matrix2D &value) override
bool operator!=(const SOP_AttribCastParms &src) const
void getNestParmValue(TempIndex idx, TempIndex instance, UT_Vector3D &value) const override
void save(std::ostream &os) const
void getNestParmValue(TempIndex idx, TempIndex instance, UT_Vector2D &value) const override
exint length() const
SYS_FORCE_INLINE const char * buffer() const
std::shared_ptr< T > UT_SharedPtr
Wrapper around std::shared_ptr.
Definition: UT_SharedPtr.h:36
constexpr SYS_FORCE_INLINE T & z() noexcept
Definition: UT_Vector4.h:495
exint read(bool *array, exint sz=1)
Definition: UT_IStream.h:276
static void loadData(UT_IStream &is, UT_Matrix3D &v)
const OP_GraphProxy * graph() const
Definition: OP_NodeParms.h:94
exint opCasts(const SOP_NodeVerb::CookParms &cookparms) const
static void loadData(UT_IStream &is, UT_Matrix2D &v)
void setNestParmValue(TempIndex idx, TempIndex instance, const UT_SharedPtr< UT_Ramp > &value) override
static void saveData(std::ostream &os, UT_Matrix3D v)
virtual void evalOpParmInst(int64 &v, NodeIdx node, const char *parmname, const int *inst, const int *offsets, fpreal time, DEP_MicroNode *depnode, int nestlevel=1) const =0
long long int64
Definition: SYS_Types.h:116
static void loadData(UT_IStream &is, bool &v)
void getNestParmValue(TempIndex idx, TempIndex instance, UT_StringHolder &value) const override
virtual void evalOpParm(int64 &v, NodeIdx node, const char *parmname, fpreal time, DEP_MicroNode *depnode) const =0
void setNestParmValue(TempIndex idx, TempIndex instance, const fpreal &value) override
void setNestParmValue(TempIndex idx, TempIndex instance, const UT_Matrix3D &value) override
SYS_FORCE_INLINE void strcat(const char *src)
void saveBinary(std::ostream &os) const
Save string to binary stream.
Definition: UT_String.h:296
UT_StringHolder opCasts__class(const SOP_NodeVerb::CookParms &cookparms, int _idx) const
static void loadData(UT_IStream &is, UT_Vector2I &v)
UT_StringHolder opinstCasts_precision(const SOP_NodeVerb::CookParms &cookparms, const int *_idx) const
GT_API const UT_StringHolder version
ParmType getNestParmType(TempIndex fieldnum) const override
GLenum GLint GLint * precision
Definition: glcorearb.h:1925
exint entries() const
Alias of size(). size() is preferred.
Definition: UT_Array.h:648
static void loadData(UT_IStream &is, UT_Vector2D &v)
void getNestParmValue(TempIndex idx, TempIndex instance, UT_Matrix3D &value) const override
exint getNestNumParms(TempIndex idx) const override
static void loadData(UT_IStream &is, UT_Vector3D &v)
void setNestParmValue(TempIndex idx, TempIndex instance, const UT_StringHolder &value) override
void coerceValue(T &result, const S &src) const
Definition: OP_NodeParms.h:301
void setNestParmValue(TempIndex idx, TempIndex instance, const exint &value) override
static void saveData(std::ostream &os, UT_SharedPtr< UT_Ramp > s)
UT_StringHolder opinstCasts_attribs(const SOP_NodeVerb::CookParms &cookparms, const int *_idx) const
static void saveData(std::ostream &os, UT_Vector3D v)
fpreal64 fpreal
Definition: SYS_Types.h:277
DEP_MicroNode * depnode() const
Definition: OP_NodeParms.h:99
Utility class for containing a color ramp.
Definition: UT_Ramp.h:88
constexpr SYS_FORCE_INLINE T & w() noexcept
Definition: UT_Vector4.h:497
SYS_FORCE_INLINE void append(char character)
GLuint GLfloat * val
Definition: glcorearb.h:1608
const UT_StringHolder & getPreferredPrecision() const
static void loadData(UT_IStream &is, UT_StringHolder &v)
#define SOP_API
Definition: SOP_API.h:10
static void saveData(std::ostream &os, UT_StringHolder s)
void loadFromOpSubclass(const LoadParms &loadparms) override
fpreal getCookTime() const
Definition: SOP_NodeVerb.h:361
void getNestParmValue(TempIndex idx, TempIndex instance, exint &value) const override
const char * findChar(int c) const
Definition: UT_String.h:1385
#define UT_ASSERT(ZZ)
Definition: UT_Assert.h:156
Definition: core.h:1131
GLboolean r
Definition: glcorearb.h:1222
constexpr SYS_FORCE_INLINE T & y() noexcept
Definition: UT_Vector3.h:665
const UT_Array< Casts > & getCasts() const
type
Definition: core.h:1059
void getNestParmValue(TempIndex idx, TempIndex instance, UT_Vector4D &value) const override
void setNestParmValue(TempIndex idx, TempIndex instance, const UT_Vector2D &value) override
UT_SharedPtr< const PRM_DataItem > PRM_DataItemHandle
Definition: PRM_Parm.h:89
static void loadData(UT_IStream &is, fpreal64 &v)
void copyFrom(const OP_NodeParms *src) override
static void saveData(std::ostream &os, UT_Vector2D v)
constexpr SYS_FORCE_INLINE T & y() noexcept
Definition: UT_Vector2.h:425
SYS_FORCE_INLINE bool isstring() const
void setNestParmValue(TempIndex idx, TempIndex instance, const PRM_DataItemHandle &value) override
OP_NodeParms & operator=(const OP_NodeParms &)=default
SYS_FORCE_INLINE void strncpy(const char *src, exint maxlen)
static void saveData(std::ostream &os, PRM_DataItemHandle s)
static void loadData(UT_IStream &is, UT_Vector4I &v)
GLenum src
Definition: glcorearb.h:1793
constexpr SYS_FORCE_INLINE T & x() noexcept
Definition: UT_Vector3.h:663
void getNestParmValue(TempIndex idx, TempIndex instance, UT_Matrix4D &value) const override
bool operator==(const Casts &src) const