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 <OP/OP_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 
102  if (baseGetSignature() != src.baseGetSignature()) return false;
103 
104  return true;
105  }
106  bool operator!=(const SOP_AttribCastParms &src) const
107  {
108  return !operator==(src);
109  }
110 
111 
112 
113  void buildFromOp(const OP_GraphProxy *graph, exint nodeidx, fpreal time, DEP_MicroNode *depnode)
114  {
115  if (true)
116  {
117  int64 length = 0;
118  graph->evalOpParm(length, nodeidx, "numcasts", time, graph->isDirect()?nullptr:depnode);
119  if (length < 0) length = 0;
120  myCasts.setSize(length);
121  for (exint i = 0; i < length; i++)
122  {
123  int parmidx[1];
124  int offsets[1];
125  parmidx[0] = i+1;
126  offsets[0] = 1;
127  auto && _curentry = myCasts(i);
128  (void) _curentry;
129  _curentry._class = "point"_UTsh;
130  if (true)
131  graph->evalOpParmInst(_curentry._class, nodeidx, "class#", parmidx, offsets, time, graph->isDirect()?nullptr:depnode, 2-1);
132  _curentry.attribs = ""_UTsh;
133  if (true)
134  graph->evalOpParmInst(_curentry.attribs, nodeidx, "attribs#", parmidx, offsets, time, graph->isDirect()?nullptr:depnode, 2-1);
135  _curentry.precision = "fpreal32"_UTsh;
136  if (true)
137  graph->evalOpParmInst(_curentry.precision, nodeidx, "precision#", parmidx, offsets, time, graph->isDirect()?nullptr:depnode, 2-1);
138 
139  }
140  }
141  else
142  myCasts.clear();
143  myPreferredPrecision = "unchanged"_UTsh;
144  if (true)
145  graph->evalOpParm(myPreferredPrecision, nodeidx, "preferredprecision", time, graph->isDirect()?nullptr:depnode);
146 
147  }
148 
149 
150  void loadFromOpSubclass(const LoadParms &loadparms) override
151  {
152  buildFromOp(loadparms.graph(), loadparms.nodeIdx(), loadparms.context().getTime(), loadparms.depnode());
153  }
154 
155 
156  void copyFrom(const OP_NodeParms *src) override
157  {
158  *this = *((const SOP_AttribCastParms *)src);
159  }
160 
161  template <typename T>
162  void
163  doGetParmValue(TempIndex idx, TempIndex instance, T &value) const
164  {
165  if (idx.size() < 1)
166  return;
167  UT_ASSERT(idx.size() == instance.size()+1);
168  if (idx.size() != instance.size()+1)
169  return;
170  switch (idx[0])
171  {
172  case 0:
173  if (idx.size() == 1)
174  coerceValue(value, myCasts.entries());
175  else if (instance[0] < myCasts.entries())
176  {
177  auto && _data = myCasts(instance[0]);
178  switch (idx[1])
179  {
180  case 0:
181  coerceValue(value, _data._class);
182  break;
183  case 1:
184  coerceValue(value, _data.attribs);
185  break;
186  case 2:
187  coerceValue(value, _data.precision);
188  break;
189 
190  }
191  }
192  break;
193  case 1:
194  coerceValue(value, myPreferredPrecision);
195  break;
196 
197  }
198  }
199 
200  bool isParmColorRamp(exint idx) const override
201  {
202  switch (idx)
203  {
204 
205  }
206  return false;
207  }
208 
209  void getNestParmValue(TempIndex idx, TempIndex instance, exint &value) const override
210  { doGetParmValue(idx, instance, value); }
211  void getNestParmValue(TempIndex idx, TempIndex instance, fpreal &value) const override
212  { doGetParmValue(idx, instance, value); }
213  void getNestParmValue(TempIndex idx, TempIndex instance, UT_Vector2D &value) const override
214  { doGetParmValue(idx, instance, value); }
215  void getNestParmValue(TempIndex idx, TempIndex instance, UT_Vector3D &value) const override
216  { doGetParmValue(idx, instance, value); }
217  void getNestParmValue(TempIndex idx, TempIndex instance, UT_Vector4D &value) const override
218  { doGetParmValue(idx, instance, value); }
219  void getNestParmValue(TempIndex idx, TempIndex instance, UT_Matrix2D &value) const override
220  { doGetParmValue(idx, instance, value); }
221  void getNestParmValue(TempIndex idx, TempIndex instance, UT_Matrix3D &value) const override
222  { doGetParmValue(idx, instance, value); }
223  void getNestParmValue(TempIndex idx, TempIndex instance, UT_Matrix4D &value) const override
224  { doGetParmValue(idx, instance, value); }
225  void getNestParmValue(TempIndex idx, TempIndex instance, UT_StringHolder &value) const override
226  { doGetParmValue(idx, instance, value); }
227  void getNestParmValue(TempIndex idx, TempIndex instance, UT_SharedPtr<UT_Ramp> &value) const override
228  { doGetParmValue(idx, instance, value); }
229  void getNestParmValue(TempIndex idx, TempIndex instance, PRM_DataItemHandle &value) const override
230  { doGetParmValue(idx, instance, value); }
231 
232  template <typename T>
233  void
234  doSetParmValue(TempIndex idx, TempIndex instance, const T &value)
235  {
236  if (idx.size() < 1)
237  return;
238  UT_ASSERT(idx.size() == instance.size()+1);
239  if (idx.size() != instance.size()+1)
240  return;
241  switch (idx[0])
242  {
243  case 0:
244  if (idx.size() == 1)
245  {
246  exint newsize;
247  coerceValue(newsize, value);
248  if (newsize < 0) newsize = 0;
249  myCasts.setSize(newsize);
250  }
251  else
252  {
253  if (instance[0] < 0)
254  return;
255  myCasts.setSizeIfNeeded(instance[0]+1);
256  auto && _data = myCasts(instance[0]);
257  switch (idx[1])
258  {
259  case 0:
260  coerceValue(_data._class, value);
261  break;
262  case 1:
263  coerceValue(_data.attribs, value);
264  break;
265  case 2:
266  coerceValue(_data.precision, value);
267  break;
268 
269  }
270  }
271  break;
272  case 1:
273  coerceValue(myPreferredPrecision, ( ( value ) ));
274  break;
275 
276  }
277  }
278 
279  void setNestParmValue(TempIndex idx, TempIndex instance, const exint &value) override
280  { doSetParmValue(idx, instance, value); }
281  void setNestParmValue(TempIndex idx, TempIndex instance, const fpreal &value) override
282  { doSetParmValue(idx, instance, value); }
283  void setNestParmValue(TempIndex idx, TempIndex instance, const UT_Vector2D &value) override
284  { doSetParmValue(idx, instance, value); }
285  void setNestParmValue(TempIndex idx, TempIndex instance, const UT_Vector3D &value) override
286  { doSetParmValue(idx, instance, value); }
287  void setNestParmValue(TempIndex idx, TempIndex instance, const UT_Vector4D &value) override
288  { doSetParmValue(idx, instance, value); }
289  void setNestParmValue(TempIndex idx, TempIndex instance, const UT_Matrix2D &value) override
290  { doSetParmValue(idx, instance, value); }
291  void setNestParmValue(TempIndex idx, TempIndex instance, const UT_Matrix3D &value) override
292  { doSetParmValue(idx, instance, value); }
293  void setNestParmValue(TempIndex idx, TempIndex instance, const UT_Matrix4D &value) override
294  { doSetParmValue(idx, instance, value); }
295  void setNestParmValue(TempIndex idx, TempIndex instance, const UT_StringHolder &value) override
296  { doSetParmValue(idx, instance, value); }
297  void setNestParmValue(TempIndex idx, TempIndex instance, const UT_SharedPtr<UT_Ramp> &value) override
298  { doSetParmValue(idx, instance, value); }
299  void setNestParmValue(TempIndex idx, TempIndex instance, const PRM_DataItemHandle &value) override
300  { doSetParmValue(idx, instance, value); }
301 
302  exint getNestNumParms(TempIndex idx) const override
303  {
304  if (idx.size() == 0)
305  return 2;
306  switch (idx[0])
307  {
308  case 0:
309  return 3;
310 
311  }
312  // Invalid
313  return 0;
314  }
315 
316  const char *getNestParmName(TempIndex fieldnum) const override
317  {
318  if (fieldnum.size() < 1)
319  return 0;
320  switch (fieldnum[0])
321  {
322  case 0:
323  if (fieldnum.size() == 1)
324  return "numcasts";
325  switch (fieldnum[1])
326  {
327  case 0:
328  return "class#";
329  case 1:
330  return "attribs#";
331  case 2:
332  return "precision#";
333 
334  }
335  return 0;
336  case 1:
337  return "preferredprecision";
338 
339  }
340  return 0;
341  }
342 
343  ParmType getNestParmType(TempIndex fieldnum) const override
344  {
345  if (fieldnum.size() < 1)
346  return PARM_UNSUPPORTED;
347  switch (fieldnum[0])
348  {
349  case 0:
350  if (fieldnum.size() == 1)
351  return PARM_MULTIPARM;
352  switch (fieldnum[1])
353  {
354  case 0:
355  return PARM_STRING;
356  case 1:
357  return PARM_STRING;
358  case 2:
359  return PARM_STRING;
360 
361  }
362  return PARM_UNSUPPORTED;
363  case 1:
364  return PARM_STRING;
365 
366  }
367  return PARM_UNSUPPORTED;
368  }
369 
370  // Boiler plate to load individual types.
371  static void loadData(UT_IStream &is, int64 &v)
372  { is.bread(&v, 1); }
373  static void loadData(UT_IStream &is, bool &v)
374  { int64 iv; is.bread(&iv, 1); v = iv; }
375  static void loadData(UT_IStream &is, fpreal64 &v)
376  { is.bread<fpreal64>(&v, 1); }
377  static void loadData(UT_IStream &is, UT_Vector2D &v)
378  { is.bread<fpreal64>(&v.x(), 1); is.bread<fpreal64>(&v.y(), 1); }
379  static void loadData(UT_IStream &is, UT_Vector3D &v)
380  { is.bread<fpreal64>(&v.x(), 1); is.bread<fpreal64>(&v.y(), 1);
381  is.bread<fpreal64>(&v.z(), 1); }
382  static void loadData(UT_IStream &is, UT_Vector4D &v)
383  { is.bread<fpreal64>(&v.x(), 1); is.bread<fpreal64>(&v.y(), 1);
384  is.bread<fpreal64>(&v.z(), 1); is.bread<fpreal64>(&v.w(), 1); }
385  static void loadData(UT_IStream &is, UT_Matrix2D &v)
386  { for (int r = 0; r < 2; r++) for (int c = 0; c < 2; c++) is.bread<fpreal64>(&v(r, c), 1); }
387  static void loadData(UT_IStream &is, UT_Matrix3D &v)
388  { for (int r = 0; r < 3; r++) for (int c = 0; c < 3; c++) is.bread<fpreal64>(&v(r, c), 1); }
389  static void loadData(UT_IStream &is, UT_Matrix4D &v)
390  { for (int r = 0; r < 4; r++) for (int c = 0; c < 4; c++) is.bread<fpreal64>(&v(r, c), 1); }
391  static void loadData(UT_IStream &is, UT_Vector2I &v)
392  { is.bread<int64>(&v.x(), 1); is.bread<int64>(&v.y(), 1); }
393  static void loadData(UT_IStream &is, UT_Vector3I &v)
394  { is.bread<int64>(&v.x(), 1); is.bread<int64>(&v.y(), 1);
395  is.bread<int64>(&v.z(), 1); }
396  static void loadData(UT_IStream &is, UT_Vector4I &v)
397  { is.bread<int64>(&v.x(), 1); is.bread<int64>(&v.y(), 1);
398  is.bread<int64>(&v.z(), 1); is.bread<int64>(&v.w(), 1); }
400  { is.bread(v); }
402  { UT_StringHolder rampdata;
403  loadData(is, rampdata);
404  if (rampdata.isstring())
405  {
406  v.reset(new UT_Ramp());
407  UT_IStream istr((const char *) rampdata, rampdata.length(), UT_ISTREAM_ASCII);
408  v->load(istr);
409  }
410  else v.reset();
411  }
414  loadData(is, data);
415  if (data.isstring())
416  {
417  // Find the data type.
418  const char *colon = UT_StringWrap(data).findChar(':');
419  if (colon)
420  {
421  int typelen = colon - data.buffer();
423  type.strncpy(data.buffer(), typelen);
424  UT_IStream istr(((const char *) data) + typelen + 1, data.length() - (typelen + 1), UT_ISTREAM_BINARY);
425 
426  v = PRM_DataFactory::parseBinary(type.buffer(), istr);
427  }
428  }
429  else v.reset();
430  }
431 
432  static void saveData(std::ostream &os, int64 v)
433  { UTwrite(os, &v); }
434  static void saveData(std::ostream &os, bool v)
435  { int64 iv = v; UTwrite(os, &iv); }
436  static void saveData(std::ostream &os, fpreal64 v)
437  { UTwrite<fpreal64>(os, &v); }
438  static void saveData(std::ostream &os, UT_Vector2D v)
439  { UTwrite<fpreal64>(os, &v.x()); UTwrite<fpreal64>(os, &v.y()); }
440  static void saveData(std::ostream &os, UT_Vector3D v)
441  { UTwrite<fpreal64>(os, &v.x()); UTwrite<fpreal64>(os, &v.y());
442  UTwrite<fpreal64>(os, &v.z()); }
443  static void saveData(std::ostream &os, UT_Vector4D v)
444  { UTwrite<fpreal64>(os, &v.x()); UTwrite<fpreal64>(os, &v.y());
445  UTwrite<fpreal64>(os, &v.z()); UTwrite<fpreal64>(os, &v.w()); }
446  static void saveData(std::ostream &os, UT_Matrix2D v)
448  static void saveData(std::ostream &os, UT_Matrix3D v)
450  static void saveData(std::ostream &os, UT_Matrix4D v)
452  static void saveData(std::ostream &os, UT_StringHolder s)
453  { UT_StringWrap(s).saveBinary(os); }
454  static void saveData(std::ostream &os, UT_SharedPtr<UT_Ramp> s)
456  UT_OStringStream ostr;
457  if (s) s->save(ostr);
458  result = ostr.str();
459  saveData(os, result);
460  }
461  static void saveData(std::ostream &os, PRM_DataItemHandle s)
463  UT_OStringStream ostr;
464  if (s)
465  {
466  ostr << s->getDataTypeToken();
467  ostr << ":";
468  s->saveBinary(ostr);
469  }
470  result = ostr.str();
471  saveData(os, result);
472  }
473 
474 
475  void save(std::ostream &os) const
476  {
477  int32 v = version();
478  UTwrite(os, &v);
479  {
480  int64 length = myCasts.entries();
481  UTwrite(os, &length);
482  for (exint i = 0; i < length; i++)
483  {
484  auto && _curentry = myCasts(i);
485  (void) _curentry;
486  saveData(os, _curentry._class);
487  saveData(os, _curentry.attribs);
488  saveData(os, _curentry.precision);
489 
490  }
491  }
492  saveData(os, myPreferredPrecision);
493 
494  }
495 
496  bool load(UT_IStream &is)
497  {
498  int32 v;
499  is.bread(&v, 1);
500  if (version() != v)
501  {
502  // Fail incompatible versions
503  return false;
504  }
505  {
506  int64 length;
507  is.read(&length, 1);
508  myCasts.setSize(length);
509  for (exint i = 0; i < length; i++)
510  {
511  auto && _curentry = myCasts(i);
512  (void) _curentry;
513  loadData(is, _curentry._class);
514  loadData(is, _curentry.attribs);
515  loadData(is, _curentry.precision);
516 
517  }
518  }
519  loadData(is, myPreferredPrecision);
520 
521  return true;
522  }
523 
524  const UT_Array<Casts> &getCasts() const { return myCasts; }
525 void setCasts(const UT_Array<Casts> &val) { myCasts = val; }
526  exint opCasts(const SOP_NodeVerb::CookParms &cookparms) const
527  {
528  SOP_Node *thissop = cookparms.getNode();
529  if (!thissop) return getCasts().entries();
530  exint result;
531  OP_Utils::evalOpParm(result, thissop, "numcasts", cookparms.getCookTime(), 0);
532  return result;
533  }
534  UT_StringHolder opCasts__class(const SOP_NodeVerb::CookParms &cookparms, int _idx) const
535  { return opinstCasts__class(cookparms, &_idx); }
536  UT_StringHolder opinstCasts__class(const SOP_NodeVerb::CookParms &cookparms, const int *_idx) const
537  {
538  SOP_Node *thissop = cookparms.getNode();
539  if (!thissop) return (myCasts(_idx[0])._class);
540  int _parmidx[2-1];
541  _parmidx[1-1] = _idx[1-1] + 1;
542 
544  OP_Utils::evalOpParmInst(result, thissop, "class#", _parmidx, cookparms.getCookTime(), 0, 2-1);
545  return (result);
546  }
547  UT_StringHolder opCasts_attribs(const SOP_NodeVerb::CookParms &cookparms, int _idx) const
548  { return opinstCasts_attribs(cookparms, &_idx); }
549  UT_StringHolder opinstCasts_attribs(const SOP_NodeVerb::CookParms &cookparms, const int *_idx) const
550  {
551  SOP_Node *thissop = cookparms.getNode();
552  if (!thissop) return (myCasts(_idx[0]).attribs);
553  int _parmidx[2-1];
554  _parmidx[1-1] = _idx[1-1] + 1;
555 
557  OP_Utils::evalOpParmInst(result, thissop, "attribs#", _parmidx, cookparms.getCookTime(), 0, 2-1);
558  return (result);
559  }
561  { return opinstCasts_precision(cookparms, &_idx); }
562  UT_StringHolder opinstCasts_precision(const SOP_NodeVerb::CookParms &cookparms, const int *_idx) const
563  {
564  SOP_Node *thissop = cookparms.getNode();
565  if (!thissop) return (myCasts(_idx[0]).precision);
566  int _parmidx[2-1];
567  _parmidx[1-1] = _idx[1-1] + 1;
568 
570  OP_Utils::evalOpParmInst(result, thissop, "precision#", _parmidx, cookparms.getCookTime(), 0, 2-1);
571  return (result);
572  }
573 
574  const UT_StringHolder & getPreferredPrecision() const { return myPreferredPrecision; }
575  void setPreferredPrecision(const UT_StringHolder & val) { myPreferredPrecision = val; }
577  {
578  SOP_Node *thissop = cookparms.getNode();
579  if (!thissop) return getPreferredPrecision();
581  OP_Utils::evalOpParm(result, thissop, "preferredprecision", cookparms.getCookTime(), 0);
582  return result;
583  }
584 
585 private:
586  UT_Array<Casts> myCasts;
587  UT_StringHolder myPreferredPrecision;
588 
589 };
type
Definition: core.h:556
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:63
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)
GLsizei const GLfloat * value
Definition: glcorearb.h:824
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:622
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
UT_SharedPtr< const PRM_DataItem > PRM_DataItemHandle
Definition: APEX_Include.h:55
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:303
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:655
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:310
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:278
DEP_MicroNode * depnode() const
Definition: OP_NodeParms.h:99
Utility class for containing a color ramp.
Definition: UT_Ramp.h:96
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
virtual UT_StringHolder baseGetSignature() const
Definition: OP_NodeParms.h:294
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:372
void getNestParmValue(TempIndex idx, TempIndex instance, exint &value) const override
const char * findChar(int c) const
Definition: UT_String.h:1401
#define UT_ASSERT(ZZ)
Definition: UT_Assert.h:156
GLboolean r
Definition: glcorearb.h:1222
constexpr SYS_FORCE_INLINE T & y() noexcept
Definition: UT_Vector3.h:665
const UT_Array< Casts > & getCasts() const
virtual bool isDirect() const =0
Direct proxies mirror actual nodes:
void getNestParmValue(TempIndex idx, TempIndex instance, UT_Vector4D &value) const override
void setNestParmValue(TempIndex idx, TempIndex instance, const UT_Vector2D &value) override
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