HDK
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
SOP_AttribCast.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  {
34 
35 
37  {
38  _class = "point"_UTsh;
39  attribs = ""_UTsh;
40  precision = "unchanged"_UTsh;
41  typeinfo = "unchanged"_UTsh;
42 
43  }
44 
45  bool operator==(const Casts &src) const
46  {
47  if (_class != src._class) return false;
48  if (attribs != src.attribs) return false;
49  if (precision != src.precision) return false;
50  if (typeinfo != src.typeinfo) return false;
51 
52  return true;
53  }
54  bool operator!=(const Casts &src) const
55  {
56  return !operator==(src);
57  }
58 
59  };
60 
62  {
64 
65  buf.strcat("[ ");
66  for (int i = 0; i < list.entries(); i++)
67  {
68  if (i)
69  buf.strcat(", ");
70  buf.strcat("( ");
71  buf.append("");
72  { UT_String tmp; tmp = UT_StringWrap(list(i)._class).makeQuotedString('"'); buf.strcat(tmp); }
73  buf.append(", ");
74  { UT_String tmp; tmp = UT_StringWrap(list(i).attribs).makeQuotedString('"'); buf.strcat(tmp); }
75  buf.append(", ");
76  { UT_String tmp; tmp = UT_StringWrap(list(i).precision).makeQuotedString('"'); buf.strcat(tmp); }
77  buf.append(", ");
78  { UT_String tmp; tmp = UT_StringWrap(list(i).typeinfo).makeQuotedString('"'); buf.strcat(tmp); }
79 
80  buf.strcat(" )");
81  }
82  buf.strcat(" ]");
83 
85  return result;
86  }
87 
89  {
90  myPreferredPrecision = "unchanged"_UTsh;
91  myCasts.setSize(1);
92 
93  }
94 
95  explicit SOP_AttribCastParms(const SOP_AttribCastParms &) = default;
97  SOP_AttribCastParms(SOP_AttribCastParms &&) noexcept = default;
98  SOP_AttribCastParms &operator=(SOP_AttribCastParms &&) noexcept = default;
99 
100  ~SOP_AttribCastParms() override {}
101 
102  bool operator==(const SOP_AttribCastParms &src) const
103  {
104  if (myPreferredPrecision != src.myPreferredPrecision) return false;
105  if (myCasts != src.myCasts) return false;
106 
107 
108  if (baseGetSignature() != src.baseGetSignature()) return false;
109 
110  return true;
111  }
112  bool operator!=(const SOP_AttribCastParms &src) const
113  {
114  return !operator==(src);
115  }
116 
117 
118 
119  void buildFromOp(const OP_GraphProxy *graph, exint nodeidx, fpreal time, DEP_MicroNode *depnode)
120  {
121  myPreferredPrecision = "unchanged"_UTsh;
122  if (true)
123  graph->evalOpParm(myPreferredPrecision, nodeidx, "preferredprecision", time, graph->isDirect()?nullptr:depnode);
124  if (true)
125  {
126  int64 length = 0;
127  graph->evalOpParm(length, nodeidx, "numcasts", time, graph->isDirect()?nullptr:depnode);
128  if (length < 0) length = 0;
129  myCasts.setSize(length);
130  for (exint i = 0; i < length; i++)
131  {
132  int parmidx[1];
133  int offsets[1];
134  parmidx[0] = i+1;
135  offsets[0] = 1;
136  auto && _curentry = myCasts(i);
137  (void) _curentry;
138  _curentry._class = "point"_UTsh;
139  if (true)
140  graph->evalOpParmInst(_curentry._class, nodeidx, "class#", parmidx, offsets, time, graph->isDirect()?nullptr:depnode, 2-1);
141  _curentry.attribs = ""_UTsh;
142  if (true)
143  graph->evalOpParmInst(_curentry.attribs, nodeidx, "attribs#", parmidx, offsets, time, graph->isDirect()?nullptr:depnode, 2-1);
144  _curentry.precision = "unchanged"_UTsh;
145  if (true)
146  graph->evalOpParmInst(_curentry.precision, nodeidx, "precision#", parmidx, offsets, time, graph->isDirect()?nullptr:depnode, 2-1);
147  _curentry.typeinfo = "unchanged"_UTsh;
148  if (true)
149  graph->evalOpParmInst(_curentry.typeinfo, nodeidx, "typeinfo#", parmidx, offsets, time, graph->isDirect()?nullptr:depnode, 2-1);
150 
151  }
152  }
153  else
154  myCasts.clear();
155 
156  }
157 
158 
159  void loadFromOpSubclass(const LoadParms &loadparms) override
160  {
161  buildFromOp(loadparms.graph(), loadparms.nodeIdx(), loadparms.context().getTime(), loadparms.depnode());
162  }
163 
164 
165  void copyFrom(const OP_NodeParms *src) override
166  {
167  *this = *((const SOP_AttribCastParms *)src);
168  }
169 
170  template <typename T>
171  void
172  doGetParmValue(TempIndex idx, TempIndex instance, T &value) const
173  {
174  if (idx.size() < 1)
175  return;
176  UT_ASSERT(idx.size() == instance.size()+1);
177  if (idx.size() != instance.size()+1)
178  return;
179  switch (idx[0])
180  {
181  case 0:
182  coerceValue(value, myPreferredPrecision);
183  break;
184  case 1:
185  if (idx.size() == 1)
186  coerceValue(value, myCasts.entries());
187  else if (instance[0] < myCasts.entries())
188  {
189  auto && _data = myCasts(instance[0]);
190  switch (idx[1])
191  {
192  case 0:
193  coerceValue(value, _data._class);
194  break;
195  case 1:
196  coerceValue(value, _data.attribs);
197  break;
198  case 2:
199  coerceValue(value, _data.precision);
200  break;
201  case 3:
202  coerceValue(value, _data.typeinfo);
203  break;
204 
205  }
206  }
207  break;
208 
209  }
210  }
211 
212  bool isParmColorRamp(exint idx) const override
213  {
214  switch (idx)
215  {
216 
217  }
218  return false;
219  }
220 
221  void getNestParmValue(TempIndex idx, TempIndex instance, exint &value) const override
222  { doGetParmValue(idx, instance, value); }
223  void getNestParmValue(TempIndex idx, TempIndex instance, fpreal &value) const override
224  { doGetParmValue(idx, instance, value); }
225  void getNestParmValue(TempIndex idx, TempIndex instance, UT_Vector2D &value) const override
226  { doGetParmValue(idx, instance, value); }
227  void getNestParmValue(TempIndex idx, TempIndex instance, UT_Vector3D &value) const override
228  { doGetParmValue(idx, instance, value); }
229  void getNestParmValue(TempIndex idx, TempIndex instance, UT_Vector4D &value) const override
230  { doGetParmValue(idx, instance, value); }
231  void getNestParmValue(TempIndex idx, TempIndex instance, UT_Matrix2D &value) const override
232  { doGetParmValue(idx, instance, value); }
233  void getNestParmValue(TempIndex idx, TempIndex instance, UT_Matrix3D &value) const override
234  { doGetParmValue(idx, instance, value); }
235  void getNestParmValue(TempIndex idx, TempIndex instance, UT_Matrix4D &value) const override
236  { doGetParmValue(idx, instance, value); }
237  void getNestParmValue(TempIndex idx, TempIndex instance, UT_StringHolder &value) const override
238  { doGetParmValue(idx, instance, value); }
239  void getNestParmValue(TempIndex idx, TempIndex instance, UT_SharedPtr<UT_Ramp> &value) const override
240  { doGetParmValue(idx, instance, value); }
241  void getNestParmValue(TempIndex idx, TempIndex instance, PRM_DataItemHandle &value) const override
242  { doGetParmValue(idx, instance, value); }
243 
244  template <typename T>
245  void
246  doSetParmValue(TempIndex idx, TempIndex instance, const T &value)
247  {
248  if (idx.size() < 1)
249  return;
250  UT_ASSERT(idx.size() == instance.size()+1);
251  if (idx.size() != instance.size()+1)
252  return;
253  switch (idx[0])
254  {
255  case 0:
256  coerceValue(myPreferredPrecision, ( ( value ) ));
257  break;
258  case 1:
259  if (idx.size() == 1)
260  {
261  exint newsize;
262  coerceValue(newsize, value);
263  if (newsize < 0) newsize = 0;
264  myCasts.setSize(newsize);
265  }
266  else
267  {
268  if (instance[0] < 0)
269  return;
270  myCasts.setSizeIfNeeded(instance[0]+1);
271  auto && _data = myCasts(instance[0]);
272  switch (idx[1])
273  {
274  case 0:
275  coerceValue(_data._class, value);
276  break;
277  case 1:
278  coerceValue(_data.attribs, value);
279  break;
280  case 2:
281  coerceValue(_data.precision, value);
282  break;
283  case 3:
284  coerceValue(_data.typeinfo, value);
285  break;
286 
287  }
288  }
289  break;
290 
291  }
292  }
293 
294  void setNestParmValue(TempIndex idx, TempIndex instance, const exint &value) override
295  { doSetParmValue(idx, instance, value); }
296  void setNestParmValue(TempIndex idx, TempIndex instance, const fpreal &value) override
297  { doSetParmValue(idx, instance, value); }
298  void setNestParmValue(TempIndex idx, TempIndex instance, const UT_Vector2D &value) override
299  { doSetParmValue(idx, instance, value); }
300  void setNestParmValue(TempIndex idx, TempIndex instance, const UT_Vector3D &value) override
301  { doSetParmValue(idx, instance, value); }
302  void setNestParmValue(TempIndex idx, TempIndex instance, const UT_Vector4D &value) override
303  { doSetParmValue(idx, instance, value); }
304  void setNestParmValue(TempIndex idx, TempIndex instance, const UT_Matrix2D &value) override
305  { doSetParmValue(idx, instance, value); }
306  void setNestParmValue(TempIndex idx, TempIndex instance, const UT_Matrix3D &value) override
307  { doSetParmValue(idx, instance, value); }
308  void setNestParmValue(TempIndex idx, TempIndex instance, const UT_Matrix4D &value) override
309  { doSetParmValue(idx, instance, value); }
310  void setNestParmValue(TempIndex idx, TempIndex instance, const UT_StringHolder &value) override
311  { doSetParmValue(idx, instance, value); }
312  void setNestParmValue(TempIndex idx, TempIndex instance, const UT_SharedPtr<UT_Ramp> &value) override
313  { doSetParmValue(idx, instance, value); }
314  void setNestParmValue(TempIndex idx, TempIndex instance, const PRM_DataItemHandle &value) override
315  { doSetParmValue(idx, instance, value); }
316 
317  exint getNestNumParms(TempIndex idx) const override
318  {
319  if (idx.size() == 0)
320  return 2;
321  switch (idx[0])
322  {
323  case 1:
324  return 4;
325 
326  }
327  // Invalid
328  return 0;
329  }
330 
331  const char *getNestParmName(TempIndex fieldnum) const override
332  {
333  if (fieldnum.size() < 1)
334  return 0;
335  switch (fieldnum[0])
336  {
337  case 0:
338  return "preferredprecision";
339  case 1:
340  if (fieldnum.size() == 1)
341  return "numcasts";
342  switch (fieldnum[1])
343  {
344  case 0:
345  return "class#";
346  case 1:
347  return "attribs#";
348  case 2:
349  return "precision#";
350  case 3:
351  return "typeinfo#";
352 
353  }
354  return 0;
355 
356  }
357  return 0;
358  }
359 
360  ParmType getNestParmType(TempIndex fieldnum) const override
361  {
362  if (fieldnum.size() < 1)
363  return PARM_UNSUPPORTED;
364  switch (fieldnum[0])
365  {
366  case 0:
367  return PARM_STRING;
368  case 1:
369  if (fieldnum.size() == 1)
370  return PARM_MULTIPARM;
371  switch (fieldnum[1])
372  {
373  case 0:
374  return PARM_STRING;
375  case 1:
376  return PARM_STRING;
377  case 2:
378  return PARM_STRING;
379  case 3:
380  return PARM_STRING;
381 
382  }
383  return PARM_UNSUPPORTED;
384 
385  }
386  return PARM_UNSUPPORTED;
387  }
388 
389  // Boiler plate to load individual types.
390  static void loadData(UT_IStream &is, int64 &v)
391  { is.bread(&v, 1); }
392  static void loadData(UT_IStream &is, bool &v)
393  { int64 iv; is.bread(&iv, 1); v = iv; }
394  static void loadData(UT_IStream &is, fpreal64 &v)
395  { is.bread<fpreal64>(&v, 1); }
396  static void loadData(UT_IStream &is, UT_Vector2D &v)
397  { is.bread<fpreal64>(&v.x(), 1); is.bread<fpreal64>(&v.y(), 1); }
398  static void loadData(UT_IStream &is, UT_Vector3D &v)
399  { is.bread<fpreal64>(&v.x(), 1); is.bread<fpreal64>(&v.y(), 1);
400  is.bread<fpreal64>(&v.z(), 1); }
401  static void loadData(UT_IStream &is, UT_Vector4D &v)
402  { is.bread<fpreal64>(&v.x(), 1); is.bread<fpreal64>(&v.y(), 1);
403  is.bread<fpreal64>(&v.z(), 1); is.bread<fpreal64>(&v.w(), 1); }
404  static void loadData(UT_IStream &is, UT_Matrix2D &v)
405  { for (int r = 0; r < 2; r++) for (int c = 0; c < 2; c++) is.bread<fpreal64>(&v(r, c), 1); }
406  static void loadData(UT_IStream &is, UT_Matrix3D &v)
407  { for (int r = 0; r < 3; r++) for (int c = 0; c < 3; c++) is.bread<fpreal64>(&v(r, c), 1); }
408  static void loadData(UT_IStream &is, UT_Matrix4D &v)
409  { for (int r = 0; r < 4; r++) for (int c = 0; c < 4; c++) is.bread<fpreal64>(&v(r, c), 1); }
410  static void loadData(UT_IStream &is, UT_Vector2I &v)
411  { is.bread<int64>(&v.x(), 1); is.bread<int64>(&v.y(), 1); }
412  static void loadData(UT_IStream &is, UT_Vector3I &v)
413  { is.bread<int64>(&v.x(), 1); is.bread<int64>(&v.y(), 1);
414  is.bread<int64>(&v.z(), 1); }
415  static void loadData(UT_IStream &is, UT_Vector4I &v)
416  { is.bread<int64>(&v.x(), 1); is.bread<int64>(&v.y(), 1);
417  is.bread<int64>(&v.z(), 1); is.bread<int64>(&v.w(), 1); }
419  { is.bread(v); }
421  { UT_StringHolder rampdata;
422  loadData(is, rampdata);
423  if (rampdata.isstring())
424  {
425  v.reset(new UT_Ramp());
426  UT_IStream istr((const char *) rampdata, rampdata.length(), UT_ISTREAM_ASCII);
427  v->load(istr);
428  }
429  else v.reset();
430  }
433  loadData(is, data);
434  if (data.isstring())
435  {
436  // Find the data type.
437  const char *colon = UT_StringWrap(data).findChar(':');
438  if (colon)
439  {
440  int typelen = colon - data.buffer();
442  type.strncpy(data.buffer(), typelen);
443  UT_IStream istr(((const char *) data) + typelen + 1, data.length() - (typelen + 1), UT_ISTREAM_BINARY);
444 
445  v = PRM_DataFactory::parseBinary(type.buffer(), istr);
446  }
447  }
448  else v.reset();
449  }
450 
451  static void saveData(std::ostream &os, int64 v)
452  { UTwrite(os, &v); }
453  static void saveData(std::ostream &os, bool v)
454  { int64 iv = v; UTwrite(os, &iv); }
455  static void saveData(std::ostream &os, fpreal64 v)
456  { UTwrite<fpreal64>(os, &v); }
457  static void saveData(std::ostream &os, UT_Vector2D v)
458  { UTwrite<fpreal64>(os, &v.x()); UTwrite<fpreal64>(os, &v.y()); }
459  static void saveData(std::ostream &os, UT_Vector3D v)
460  { UTwrite<fpreal64>(os, &v.x()); UTwrite<fpreal64>(os, &v.y());
461  UTwrite<fpreal64>(os, &v.z()); }
462  static void saveData(std::ostream &os, UT_Vector4D v)
463  { UTwrite<fpreal64>(os, &v.x()); UTwrite<fpreal64>(os, &v.y());
464  UTwrite<fpreal64>(os, &v.z()); UTwrite<fpreal64>(os, &v.w()); }
465  static void saveData(std::ostream &os, UT_Matrix2D v)
467  static void saveData(std::ostream &os, UT_Matrix3D v)
469  static void saveData(std::ostream &os, UT_Matrix4D v)
471  static void saveData(std::ostream &os, UT_StringHolder s)
472  { UT_StringWrap(s).saveBinary(os); }
473  static void saveData(std::ostream &os, UT_SharedPtr<UT_Ramp> s)
475  UT_OStringStream ostr;
476  if (s) s->save(ostr);
477  result = ostr.str();
478  saveData(os, result);
479  }
480  static void saveData(std::ostream &os, PRM_DataItemHandle s)
482  UT_OStringStream ostr;
483  if (s)
484  {
485  ostr << s->getDataTypeToken();
486  ostr << ":";
487  s->saveBinary(ostr);
488  }
489  result = ostr.str();
490  saveData(os, result);
491  }
492 
493 
494  void save(std::ostream &os) const
495  {
496  int32 v = version();
497  UTwrite(os, &v);
498  saveData(os, myPreferredPrecision);
499  {
500  int64 length = myCasts.entries();
501  UTwrite(os, &length);
502  for (exint i = 0; i < length; i++)
503  {
504  auto && _curentry = myCasts(i);
505  (void) _curentry;
506  saveData(os, _curentry._class);
507  saveData(os, _curentry.attribs);
508  saveData(os, _curentry.precision);
509  saveData(os, _curentry.typeinfo);
510 
511  }
512  }
513 
514  }
515 
516  bool load(UT_IStream &is)
517  {
518  int32 v;
519  is.bread(&v, 1);
520  if (version() != v)
521  {
522  // Fail incompatible versions
523  return false;
524  }
525  loadData(is, myPreferredPrecision);
526  {
527  int64 length;
528  is.read(&length, 1);
529  myCasts.setSize(length);
530  for (exint i = 0; i < length; i++)
531  {
532  auto && _curentry = myCasts(i);
533  (void) _curentry;
534  loadData(is, _curentry._class);
535  loadData(is, _curentry.attribs);
536  loadData(is, _curentry.precision);
537  loadData(is, _curentry.typeinfo);
538 
539  }
540  }
541 
542  return true;
543  }
544 
545  const UT_StringHolder & getPreferredPrecision() const { return myPreferredPrecision; }
546  void setPreferredPrecision(const UT_StringHolder & val) { myPreferredPrecision = val; }
548  {
549  SOP_Node *thissop = cookparms.getNode();
550  if (!thissop) return getPreferredPrecision();
552  OP_Utils::evalOpParm(result, thissop, "preferredprecision", cookparms.getCookTime(), 0);
553  return result;
554  }
555  const UT_Array<Casts> &getCasts() const { return myCasts; }
556 void setCasts(const UT_Array<Casts> &val) { myCasts = val; }
557  exint opCasts(const SOP_NodeVerb::CookParms &cookparms) const
558  {
559  SOP_Node *thissop = cookparms.getNode();
560  if (!thissop) return getCasts().entries();
561  exint result;
562  OP_Utils::evalOpParm(result, thissop, "numcasts", cookparms.getCookTime(), 0);
563  return result;
564  }
565  UT_StringHolder opCasts__class(const SOP_NodeVerb::CookParms &cookparms, int _idx) const
566  { return opinstCasts__class(cookparms, &_idx); }
567  UT_StringHolder opinstCasts__class(const SOP_NodeVerb::CookParms &cookparms, const int *_idx) const
568  {
569  SOP_Node *thissop = cookparms.getNode();
570  if (!thissop) return (myCasts(_idx[0])._class);
571  int _parmidx[2-1];
572  _parmidx[1-1] = _idx[1-1] + 1;
573 
575  OP_Utils::evalOpParmInst(result, thissop, "class#", _parmidx, cookparms.getCookTime(), 0, 2-1);
576  return (result);
577  }
578  UT_StringHolder opCasts_attribs(const SOP_NodeVerb::CookParms &cookparms, int _idx) const
579  { return opinstCasts_attribs(cookparms, &_idx); }
580  UT_StringHolder opinstCasts_attribs(const SOP_NodeVerb::CookParms &cookparms, const int *_idx) const
581  {
582  SOP_Node *thissop = cookparms.getNode();
583  if (!thissop) return (myCasts(_idx[0]).attribs);
584  int _parmidx[2-1];
585  _parmidx[1-1] = _idx[1-1] + 1;
586 
588  OP_Utils::evalOpParmInst(result, thissop, "attribs#", _parmidx, cookparms.getCookTime(), 0, 2-1);
589  return (result);
590  }
592  { return opinstCasts_precision(cookparms, &_idx); }
593  UT_StringHolder opinstCasts_precision(const SOP_NodeVerb::CookParms &cookparms, const int *_idx) const
594  {
595  SOP_Node *thissop = cookparms.getNode();
596  if (!thissop) return (myCasts(_idx[0]).precision);
597  int _parmidx[2-1];
598  _parmidx[1-1] = _idx[1-1] + 1;
599 
601  OP_Utils::evalOpParmInst(result, thissop, "precision#", _parmidx, cookparms.getCookTime(), 0, 2-1);
602  return (result);
603  }
604  UT_StringHolder opCasts_typeinfo(const SOP_NodeVerb::CookParms &cookparms, int _idx) const
605  { return opinstCasts_typeinfo(cookparms, &_idx); }
606  UT_StringHolder opinstCasts_typeinfo(const SOP_NodeVerb::CookParms &cookparms, const int *_idx) const
607  {
608  SOP_Node *thissop = cookparms.getNode();
609  if (!thissop) return (myCasts(_idx[0]).typeinfo);
610  int _parmidx[2-1];
611  _parmidx[1-1] = _idx[1-1] + 1;
612 
614  OP_Utils::evalOpParmInst(result, thissop, "typeinfo#", _parmidx, cookparms.getCookTime(), 0, 2-1);
615  return (result);
616  }
617 
618 
619 private:
620  UT_StringHolder myPreferredPrecision;
621  UT_Array<Casts> myCasts;
622 
623 };
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:403
bool load(UT_IStream &is)
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
GLboolean * data
Definition: glcorearb.h:131
GT_API const UT_StringHolder time
constexpr SYS_FORCE_INLINE T & y() noexcept
Definition: UT_Vector4.h:495
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:105
constexpr SYS_FORCE_INLINE T & z() noexcept
Definition: UT_Vector3.h:669
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
UT_StringHolder opinstCasts_typeinfo(const SOP_NodeVerb::CookParms &cookparms, const int *_idx) 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:103
static PRM_DataItemHandle parseBinary(const char *type, UT_IStream &is)
const UT_WorkBuffer & str()
Returns a read-only reference to the underlying UT_WorkBuffer.
UT_StringHolder opCasts_typeinfo(const SOP_NodeVerb::CookParms &cookparms, int _idx) const
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:493
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:426
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:497
exint read(bool *array, exint sz=1)
Definition: UT_IStream.h:271
static void loadData(UT_IStream &is, UT_Matrix3D &v)
const OP_GraphProxy * graph() const
Definition: OP_NodeParms.h:102
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:306
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:669
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:318
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:283
DEP_MicroNode * depnode() const
Definition: OP_NodeParms.h:107
Utility class for containing a color ramp.
Definition: UT_Ramp.h:96
constexpr SYS_FORCE_INLINE T & w() noexcept
Definition: UT_Vector4.h:499
SYS_FORCE_INLINE void append(char character)
GLuint GLfloat * val
Definition: glcorearb.h:1608
virtual UT_StringHolder baseGetSignature() const
Definition: OP_NodeParms.h:302
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:432
void getNestParmValue(TempIndex idx, TempIndex instance, exint &value) const override
const char * findChar(int c) const
Definition: UT_String.h:1421
#define UT_ASSERT(ZZ)
Definition: UT_Assert.h:165
GLboolean r
Definition: glcorearb.h:1222
exint bread(uint8 *buffer, exint asize=1)
constexpr SYS_FORCE_INLINE T & y() noexcept
Definition: UT_Vector3.h:667
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:428
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:665
void getNestParmValue(TempIndex idx, TempIndex instance, UT_Matrix4D &value) const override
bool operator==(const Casts &src) const