HDK
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
SOP_SwitchIf.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 namespace SOP_SwitchIfEnums
24 {
25  enum class MergeCondition
26  {
27  ALL = 0,
28  ANY,
29  NONE,
30  MISSING
31  };
32 
34  getToken(MergeCondition enum_value)
35  {
36  using namespace UT::Literal;
37  switch (enum_value) {
38  case MergeCondition::ALL: return "all"_sh;
39  case MergeCondition::ANY: return "any"_sh;
40  case MergeCondition::NONE: return "none"_sh;
41  case MergeCondition::MISSING: return "missing"_sh;
42  default: UT_ASSERT(false); return ""_sh;
43  }
44  }
45 
46  enum class TestInput
47  {
48  FIRST = 0,
49  SECOND,
50  SPARE
51  };
52 
54  getToken(TestInput enum_value)
55  {
56  using namespace UT::Literal;
57  switch (enum_value) {
58  case TestInput::FIRST: return "first"_sh;
59  case TestInput::SECOND: return "second"_sh;
60  case TestInput::SPARE: return "spare"_sh;
61  default: UT_ASSERT(false); return ""_sh;
62  }
63  }
64 
65  enum class Type
66  {
67  EXPR = 0,
68  ATTRIB,
69  COUNT,
70  ATTRIBVAL,
71  HASINPUT
72  };
73 
75  getToken(Type enum_value)
76  {
77  using namespace UT::Literal;
78  switch (enum_value) {
79  case Type::EXPR: return "expr"_sh;
80  case Type::ATTRIB: return "attrib"_sh;
81  case Type::COUNT: return "count"_sh;
82  case Type::ATTRIBVAL: return "attribval"_sh;
83  case Type::HASINPUT: return "hasinput"_sh;
84  default: UT_ASSERT(false); return ""_sh;
85  }
86  }
87 
88  enum class Attribtype
89  {
90  ALL = 0,
91  ANY,
92  NONE,
93  MISSING
94  };
95 
97  getToken(Attribtype enum_value)
98  {
99  using namespace UT::Literal;
100  switch (enum_value) {
101  case Attribtype::ALL: return "all"_sh;
102  case Attribtype::ANY: return "any"_sh;
103  case Attribtype::NONE: return "none"_sh;
104  case Attribtype::MISSING: return "missing"_sh;
105  default: UT_ASSERT(false); return ""_sh;
106  }
107  }
108 
109  enum class Attribowner
110  {
111  ANY = 0,
112  DETAIL,
113  PRIM,
114  POINT,
115  VERTEX,
117  };
118 
120  getToken(Attribowner enum_value)
121  {
122  using namespace UT::Literal;
123  switch (enum_value) {
124  case Attribowner::ANY: return "any"_sh;
125  case Attribowner::DETAIL: return "detail"_sh;
126  case Attribowner::PRIM: return "prim"_sh;
127  case Attribowner::POINT: return "point"_sh;
128  case Attribowner::VERTEX: return "vertex"_sh;
129  case Attribowner::POINTVERTEX: return "pointvertex"_sh;
130  default: UT_ASSERT(false); return ""_sh;
131  }
132  }
133 
134  enum class Attribvaltype
135  {
136  FLT = 0,
137  STR
138  };
139 
141  getToken(Attribvaltype enum_value)
142  {
143  using namespace UT::Literal;
144  switch (enum_value) {
145  case Attribvaltype::FLT: return "flt"_sh;
146  case Attribvaltype::STR: return "str"_sh;
147  default: UT_ASSERT(false); return ""_sh;
148  }
149  }
150 
151  enum class Attribfloatcomp
152  {
153  EQUAL = 0,
154  NEQUAL,
155  GREATER,
156  LESS,
157  GEQUAL,
158  LEQUAL
159  };
160 
163  {
164  using namespace UT::Literal;
165  switch (enum_value) {
166  case Attribfloatcomp::EQUAL: return "equal"_sh;
167  case Attribfloatcomp::NEQUAL: return "nequal"_sh;
168  case Attribfloatcomp::GREATER: return "greater"_sh;
169  case Attribfloatcomp::LESS: return "less"_sh;
170  case Attribfloatcomp::GEQUAL: return "gequal"_sh;
171  case Attribfloatcomp::LEQUAL: return "lequal"_sh;
172  default: UT_ASSERT(false); return ""_sh;
173  }
174  }
175 
176  enum class Attribstringcomp
177  {
178  EQUAL = 0,
179  NEQUAL,
180  MATCH,
181  NOMATCH,
182  CONTAINS
183  };
184 
187  {
188  using namespace UT::Literal;
189  switch (enum_value) {
190  case Attribstringcomp::EQUAL: return "equal"_sh;
191  case Attribstringcomp::NEQUAL: return "nequal"_sh;
192  case Attribstringcomp::MATCH: return "match"_sh;
193  case Attribstringcomp::NOMATCH: return "nomatch"_sh;
194  case Attribstringcomp::CONTAINS: return "contains"_sh;
195  default: UT_ASSERT(false); return ""_sh;
196  }
197  }
198 
199  enum class Counttype
200  {
201  POINTS = 0,
202  PRIMS,
203  VERTICES
204  };
205 
207  getToken(Counttype enum_value)
208  {
209  using namespace UT::Literal;
210  switch (enum_value) {
211  case Counttype::POINTS: return "points"_sh;
212  case Counttype::PRIMS: return "prims"_sh;
213  case Counttype::VERTICES: return "vertices"_sh;
214  default: UT_ASSERT(false); return ""_sh;
215  }
216  }
217 
218  enum class Countcomp
219  {
220  EQUAL = 0,
221  NEQUAL,
222  GREATER,
223  LESS,
224  GEQUAL,
225  LEQUAL
226  };
227 
229  getToken(Countcomp enum_value)
230  {
231  using namespace UT::Literal;
232  switch (enum_value) {
233  case Countcomp::EQUAL: return "equal"_sh;
234  case Countcomp::NEQUAL: return "nequal"_sh;
235  case Countcomp::GREATER: return "greater"_sh;
236  case Countcomp::LESS: return "less"_sh;
237  case Countcomp::GEQUAL: return "gequal"_sh;
238  case Countcomp::LEQUAL: return "lequal"_sh;
239  default: UT_ASSERT(false); return ""_sh;
240  }
241  }
242 
243  enum class Hasinputtype
244  {
245  WIRED = 0,
246  NOTWIRED
247  };
248 
250  getToken(Hasinputtype enum_value)
251  {
252  using namespace UT::Literal;
253  switch (enum_value) {
254  case Hasinputtype::WIRED: return "wired"_sh;
255  case Hasinputtype::NOTWIRED: return "notwired"_sh;
256  default: UT_ASSERT(false); return ""_sh;
257  }
258  }
259 
260 }
261 
262 
264 {
265 public:
266  static int version() { return 1; }
267  struct Tests
268  {
269  bool enable;
285 
286 
288  {
289  enable = true;
290  type = 0;
291  expr = 1;
292  attribtype = 0;
293  attribowner = 3;
294  attributes = ""_UTsh;
295  attribvaltype = 0;
296  attribfloatcomp = 0;
297  attribstringcomp = 0;
298  attribval = 0;
299  attribsval = ""_UTsh;
300  counttype = 0;
301  countgroup = ""_UTsh;
302  countcomp = 0;
303  countval = 0;
304  hasinputtype = 0;
305 
306  }
307 
308  bool operator==(const Tests &src) const
309  {
310  if (enable != src.enable) return false;
311  if (type != src.type) return false;
312  if (expr != src.expr) return false;
313  if (attribtype != src.attribtype) return false;
314  if (attribowner != src.attribowner) return false;
315  if (attributes != src.attributes) return false;
316  if (attribvaltype != src.attribvaltype) return false;
317  if (attribfloatcomp != src.attribfloatcomp) return false;
318  if (attribstringcomp != src.attribstringcomp) return false;
319  if (attribval != src.attribval) return false;
320  if (attribsval != src.attribsval) return false;
321  if (counttype != src.counttype) return false;
322  if (countgroup != src.countgroup) return false;
323  if (countcomp != src.countcomp) return false;
324  if (countval != src.countval) return false;
325  if (hasinputtype != src.hasinputtype) return false;
326 
327  return true;
328  }
329  bool operator!=(const Tests &src) const
330  {
331  return !operator==(src);
332  }
333 
334  };
335 
337  {
339 
340  buf.strcat("[ ");
341  for (int i = 0; i < list.entries(); i++)
342  {
343  if (i)
344  buf.strcat(", ");
345  buf.strcat("( ");
346  buf.append("");
347  buf.appendSprintf("%s", (list(i).enable) ? "true" : "false");
348  buf.append(", ");
349  buf.appendSprintf("%d", (int) list(i).type);
350  buf.append(", ");
351  buf.appendSprintf("%d", (int) list(i).expr);
352  buf.append(", ");
353  buf.appendSprintf("%d", (int) list(i).attribtype);
354  buf.append(", ");
355  buf.appendSprintf("%d", (int) list(i).attribowner);
356  buf.append(", ");
357  { UT_String tmp; tmp = UT_StringWrap(list(i).attributes).makeQuotedString('"'); buf.strcat(tmp); }
358  buf.append(", ");
359  buf.appendSprintf("%d", (int) list(i).attribvaltype);
360  buf.append(", ");
361  buf.appendSprintf("%d", (int) list(i).attribfloatcomp);
362  buf.append(", ");
363  buf.appendSprintf("%d", (int) list(i).attribstringcomp);
364  buf.append(", ");
365  buf.appendSprintf("%f", (list(i).attribval));
366  buf.append(", ");
367  { UT_String tmp; tmp = UT_StringWrap(list(i).attribsval).makeQuotedString('"'); buf.strcat(tmp); }
368  buf.append(", ");
369  buf.appendSprintf("%d", (int) list(i).counttype);
370  buf.append(", ");
371  { UT_String tmp; tmp = UT_StringWrap(list(i).countgroup).makeQuotedString('"'); buf.strcat(tmp); }
372  buf.append(", ");
373  buf.appendSprintf("%d", (int) list(i).countcomp);
374  buf.append(", ");
375  buf.appendSprintf("%d", (int) list(i).countval);
376  buf.append(", ");
377  buf.appendSprintf("%d", (int) list(i).hasinputtype);
378 
379  buf.strcat(" )");
380  }
381  buf.strcat(" ]");
382 
384  return result;
385  }
386 
388  {
389  myMergeCondition = 0;
390  myTestInput = 0;
391  myTests.setSize(1);
392 
393  }
394 
395  explicit SOP_SwitchIfParms(const SOP_SwitchIfParms &) = default;
396  SOP_SwitchIfParms &operator=(const SOP_SwitchIfParms &) = default;
397  SOP_SwitchIfParms(SOP_SwitchIfParms &&) noexcept = default;
398  SOP_SwitchIfParms &operator=(SOP_SwitchIfParms &&) noexcept = default;
399 
400  ~SOP_SwitchIfParms() override {}
401 
402  bool operator==(const SOP_SwitchIfParms &src) const
403  {
404  if (myMergeCondition != src.myMergeCondition) return false;
405  if (myTestInput != src.myTestInput) return false;
406  if (myTests != src.myTests) return false;
407 
408  return true;
409  }
410  bool operator!=(const SOP_SwitchIfParms &src) const
411  {
412  return !operator==(src);
413  }
425 
426 
427 
428  void buildFromOp(const OP_GraphProxy *graph, exint nodeidx, fpreal time, DEP_MicroNode *depnode)
429  {
430  myMergeCondition = 0;
431  if (true)
432  graph->evalOpParm(myMergeCondition, nodeidx, "mergecondition", time, 0);
433  myTestInput = 0;
434  if (true)
435  graph->evalOpParm(myTestInput, nodeidx, "testinput", time, 0);
436  if (true)
437  {
438  int64 length = 0;
439  graph->evalOpParm(length, nodeidx, "tests", time, 0);
440  if (length < 0) length = 0;
441  myTests.setSize(length);
442  for (exint i = 0; i < length; i++)
443  {
444  int parmidx[1];
445  int offsets[1];
446  parmidx[0] = i+1;
447  offsets[0] = 1;
448  auto && _curentry = myTests(i);
449  (void) _curentry;
450  _curentry.enable = true;
451  if (true)
452  graph->evalOpParmInst(_curentry.enable, nodeidx, "enable#", parmidx, offsets, time, 0, 2-1);
453  _curentry.type = 0;
454  if (true && ( (true&&!(((_curentry.enable==0)))) ) )
455  graph->evalOpParmInst(_curentry.type, nodeidx, "type#", parmidx, offsets, time, 0, 2-1);
456  _curentry.expr = 1;
457  if (true && ( (true&&!(((_curentry.type!=0))||((_curentry.enable==0)))) ) )
458  graph->evalOpParmInst(_curentry.expr, nodeidx, "expr#", parmidx, offsets, time, 0, 2-1);
459  _curentry.attribtype = 0;
460  if (true && ( (true&&!(((_curentry.type!=1))||((_curentry.enable==0)))) ) )
461  graph->evalOpParmInst(_curentry.attribtype, nodeidx, "attribtype#", parmidx, offsets, time, 0, 2-1);
462  _curentry.attribowner = 3;
463  if (true && ( (true&&!(((_curentry.type!=1)&&(_curentry.type!=3))||((_curentry.enable==0)))) ) )
464  graph->evalOpParmInst(_curentry.attribowner, nodeidx, "attribowner#", parmidx, offsets, time, 0, 2-1);
465  _curentry.attributes = ""_UTsh;
466  if (true && ( (true&&!(((_curentry.type!=1)&&(_curentry.type!=3))||((_curentry.enable==0)))) ) )
467  graph->evalOpParmInst(_curentry.attributes, nodeidx, "attributes#", parmidx, offsets, time, 0, 2-1);
468  _curentry.attribvaltype = 0;
469  if (true && ( (true&&!(((_curentry.type!=3))||((_curentry.enable==0)))) ) )
470  graph->evalOpParmInst(_curentry.attribvaltype, nodeidx, "attribvaltype#", parmidx, offsets, time, 0, 2-1);
471  _curentry.attribfloatcomp = 0;
472  if (true && ( (true&&!(((_curentry.type!=3))||((_curentry.attribvaltype!=0))||((_curentry.enable==0)))) ) )
473  graph->evalOpParmInst(_curentry.attribfloatcomp, nodeidx, "attribfloatcomp#", parmidx, offsets, time, 0, 2-1);
474  _curentry.attribstringcomp = 0;
475  if (true && ( (true&&!(((_curentry.type!=3))||((_curentry.attribvaltype!=1))||((_curentry.enable==0)))) ) )
476  graph->evalOpParmInst(_curentry.attribstringcomp, nodeidx, "attribstringcomp#", parmidx, offsets, time, 0, 2-1);
477  _curentry.attribval = 0;
478  if (true && ( (true&&!(((_curentry.type!=3))||((_curentry.attribvaltype!=0))||((_curentry.enable==0)))) ) )
479  graph->evalOpParmInst(_curentry.attribval, nodeidx, "attribval#", parmidx, offsets, time, 0, 2-1);
480  _curentry.attribsval = ""_UTsh;
481  if (true && ( (true&&!(((_curentry.type!=3))||((_curentry.attribvaltype!=1))||((_curentry.enable==0)))) ) )
482  graph->evalOpParmInst(_curentry.attribsval, nodeidx, "attribsval#", parmidx, offsets, time, 0, 2-1);
483  _curentry.counttype = 0;
484  if (true && ( (true&&!(((_curentry.type!=2))||((_curentry.enable==0)))) ) )
485  graph->evalOpParmInst(_curentry.counttype, nodeidx, "counttype#", parmidx, offsets, time, 0, 2-1);
486  _curentry.countgroup = ""_UTsh;
487  if (true && ( (true&&!(((_curentry.type!=2))||((_curentry.enable==0)))) ) )
488  graph->evalOpParmInst(_curentry.countgroup, nodeidx, "countgroup#", parmidx, offsets, time, 0, 2-1);
489  _curentry.countcomp = 0;
490  if (true && ( (true&&!(((_curentry.type!=2))||((_curentry.enable==0)))) ) )
491  graph->evalOpParmInst(_curentry.countcomp, nodeidx, "countcomp#", parmidx, offsets, time, 0, 2-1);
492  _curentry.countval = 0;
493  if (true && ( (true&&!(((_curentry.type!=2))||((_curentry.enable==0)))) ) )
494  graph->evalOpParmInst(_curentry.countval, nodeidx, "countval#", parmidx, offsets, time, 0, 2-1);
495  _curentry.hasinputtype = 0;
496  if (true && ( (true&&!(((_curentry.type!=4))||((_curentry.enable==0)))) ) )
497  graph->evalOpParmInst(_curentry.hasinputtype, nodeidx, "hasinputtype#", parmidx, offsets, time, 0, 2-1);
498 
499  }
500  }
501  else
502  myTests.clear();
503 
504  }
505 
506 
507  void loadFromOpSubclass(const LoadParms &loadparms) override
508  {
509  buildFromOp(loadparms.graph(), loadparms.nodeIdx(), loadparms.context().getTime(), loadparms.depnode());
510  }
511 
512 
513  void copyFrom(const OP_NodeParms *src) override
514  {
515  *this = *((const SOP_SwitchIfParms *)src);
516  }
517 
518  template <typename T>
519  void
520  doGetParmValue(TempIndex idx, TempIndex instance, T &value) const
521  {
522  if (idx.size() < 1)
523  return;
524  UT_ASSERT(idx.size() == instance.size()+1);
525  if (idx.size() != instance.size()+1)
526  return;
527  switch (idx[0])
528  {
529  case 0:
530  coerceValue(value, myMergeCondition);
531  break;
532  case 1:
533  coerceValue(value, myTestInput);
534  break;
535  case 2:
536  if (idx.size() == 1)
537  coerceValue(value, myTests.entries());
538  else if (instance[0] < myTests.entries())
539  {
540  auto && _data = myTests(instance[0]);
541  switch (idx[1])
542  {
543  case 0:
544  coerceValue(value, _data.enable);
545  break;
546  case 1:
547  coerceValue(value, _data.type);
548  break;
549  case 2:
550  coerceValue(value, _data.expr);
551  break;
552  case 3:
553  coerceValue(value, _data.attribtype);
554  break;
555  case 4:
556  coerceValue(value, _data.attribowner);
557  break;
558  case 5:
559  coerceValue(value, _data.attributes);
560  break;
561  case 6:
562  coerceValue(value, _data.attribvaltype);
563  break;
564  case 7:
565  coerceValue(value, _data.attribfloatcomp);
566  break;
567  case 8:
568  coerceValue(value, _data.attribstringcomp);
569  break;
570  case 9:
571  coerceValue(value, _data.attribval);
572  break;
573  case 10:
574  coerceValue(value, _data.attribsval);
575  break;
576  case 11:
577  coerceValue(value, _data.counttype);
578  break;
579  case 12:
580  coerceValue(value, _data.countgroup);
581  break;
582  case 13:
583  coerceValue(value, _data.countcomp);
584  break;
585  case 14:
586  coerceValue(value, _data.countval);
587  break;
588  case 15:
589  coerceValue(value, _data.hasinputtype);
590  break;
591 
592  }
593  }
594  break;
595 
596  }
597  }
598 
599  bool isParmColorRamp(exint idx) const override
600  {
601  switch (idx)
602  {
603 
604  }
605  return false;
606  }
607 
608  void getNestParmValue(TempIndex idx, TempIndex instance, exint &value) const override
609  { doGetParmValue(idx, instance, value); }
610  void getNestParmValue(TempIndex idx, TempIndex instance, fpreal &value) const override
611  { doGetParmValue(idx, instance, value); }
612  void getNestParmValue(TempIndex idx, TempIndex instance, UT_Vector2D &value) const override
613  { doGetParmValue(idx, instance, value); }
614  void getNestParmValue(TempIndex idx, TempIndex instance, UT_Vector3D &value) const override
615  { doGetParmValue(idx, instance, value); }
616  void getNestParmValue(TempIndex idx, TempIndex instance, UT_Vector4D &value) const override
617  { doGetParmValue(idx, instance, value); }
618  void getNestParmValue(TempIndex idx, TempIndex instance, UT_Matrix2D &value) const override
619  { doGetParmValue(idx, instance, value); }
620  void getNestParmValue(TempIndex idx, TempIndex instance, UT_Matrix3D &value) const override
621  { doGetParmValue(idx, instance, value); }
622  void getNestParmValue(TempIndex idx, TempIndex instance, UT_Matrix4D &value) const override
623  { doGetParmValue(idx, instance, value); }
624  void getNestParmValue(TempIndex idx, TempIndex instance, UT_StringHolder &value) const override
625  { doGetParmValue(idx, instance, value); }
626  void getNestParmValue(TempIndex idx, TempIndex instance, UT_SharedPtr<UT_Ramp> &value) const override
627  { doGetParmValue(idx, instance, value); }
628  void getNestParmValue(TempIndex idx, TempIndex instance, PRM_DataItemHandle &value) const override
629  { doGetParmValue(idx, instance, value); }
630 
631  template <typename T>
632  void
633  doSetParmValue(TempIndex idx, TempIndex instance, const T &value)
634  {
635  if (idx.size() < 1)
636  return;
637  UT_ASSERT(idx.size() == instance.size()+1);
638  if (idx.size() != instance.size()+1)
639  return;
640  switch (idx[0])
641  {
642  case 0:
643  coerceValue(myMergeCondition, clampMinValue(0, clampMaxValue(3, value ) ));
644  break;
645  case 1:
646  coerceValue(myTestInput, clampMinValue(0, clampMaxValue(2, value ) ));
647  break;
648  case 2:
649  if (idx.size() == 1)
650  {
651  exint newsize;
652  coerceValue(newsize, value);
653  if (newsize < 0) newsize = 0;
654  myTests.setSize(newsize);
655  }
656  else
657  {
658  if (instance[0] < 0)
659  return;
660  myTests.setSizeIfNeeded(instance[0]+1);
661  auto && _data = myTests(instance[0]);
662  switch (idx[1])
663  {
664  case 0:
665  coerceValue(_data.enable, value);
666  break;
667  case 1:
668  coerceValue(_data.type, value);
669  break;
670  case 2:
671  coerceValue(_data.expr, value);
672  break;
673  case 3:
674  coerceValue(_data.attribtype, value);
675  break;
676  case 4:
677  coerceValue(_data.attribowner, value);
678  break;
679  case 5:
680  coerceValue(_data.attributes, value);
681  break;
682  case 6:
683  coerceValue(_data.attribvaltype, value);
684  break;
685  case 7:
686  coerceValue(_data.attribfloatcomp, value);
687  break;
688  case 8:
689  coerceValue(_data.attribstringcomp, value);
690  break;
691  case 9:
692  coerceValue(_data.attribval, value);
693  break;
694  case 10:
695  coerceValue(_data.attribsval, value);
696  break;
697  case 11:
698  coerceValue(_data.counttype, value);
699  break;
700  case 12:
701  coerceValue(_data.countgroup, value);
702  break;
703  case 13:
704  coerceValue(_data.countcomp, value);
705  break;
706  case 14:
707  coerceValue(_data.countval, value);
708  break;
709  case 15:
710  coerceValue(_data.hasinputtype, value);
711  break;
712 
713  }
714  }
715  break;
716 
717  }
718  }
719 
720  void setNestParmValue(TempIndex idx, TempIndex instance, const exint &value) override
721  { doSetParmValue(idx, instance, value); }
722  void setNestParmValue(TempIndex idx, TempIndex instance, const fpreal &value) override
723  { doSetParmValue(idx, instance, value); }
724  void setNestParmValue(TempIndex idx, TempIndex instance, const UT_Vector2D &value) override
725  { doSetParmValue(idx, instance, value); }
726  void setNestParmValue(TempIndex idx, TempIndex instance, const UT_Vector3D &value) override
727  { doSetParmValue(idx, instance, value); }
728  void setNestParmValue(TempIndex idx, TempIndex instance, const UT_Vector4D &value) override
729  { doSetParmValue(idx, instance, value); }
730  void setNestParmValue(TempIndex idx, TempIndex instance, const UT_Matrix2D &value) override
731  { doSetParmValue(idx, instance, value); }
732  void setNestParmValue(TempIndex idx, TempIndex instance, const UT_Matrix3D &value) override
733  { doSetParmValue(idx, instance, value); }
734  void setNestParmValue(TempIndex idx, TempIndex instance, const UT_Matrix4D &value) override
735  { doSetParmValue(idx, instance, value); }
736  void setNestParmValue(TempIndex idx, TempIndex instance, const UT_StringHolder &value) override
737  { doSetParmValue(idx, instance, value); }
738  void setNestParmValue(TempIndex idx, TempIndex instance, const UT_SharedPtr<UT_Ramp> &value) override
739  { doSetParmValue(idx, instance, value); }
740  void setNestParmValue(TempIndex idx, TempIndex instance, const PRM_DataItemHandle &value) override
741  { doSetParmValue(idx, instance, value); }
742 
743  exint getNestNumParms(TempIndex idx) const override
744  {
745  if (idx.size() == 0)
746  return 3;
747  switch (idx[0])
748  {
749  case 2:
750  return 16;
751 
752  }
753  // Invalid
754  return 0;
755  }
756 
757  const char *getNestParmName(TempIndex fieldnum) const override
758  {
759  if (fieldnum.size() < 1)
760  return 0;
761  switch (fieldnum[0])
762  {
763  case 0:
764  return "mergecondition";
765  case 1:
766  return "testinput";
767  case 2:
768  if (fieldnum.size() == 1)
769  return "tests";
770  switch (fieldnum[1])
771  {
772  case 0:
773  return "enable#";
774  case 1:
775  return "type#";
776  case 2:
777  return "expr#";
778  case 3:
779  return "attribtype#";
780  case 4:
781  return "attribowner#";
782  case 5:
783  return "attributes#";
784  case 6:
785  return "attribvaltype#";
786  case 7:
787  return "attribfloatcomp#";
788  case 8:
789  return "attribstringcomp#";
790  case 9:
791  return "attribval#";
792  case 10:
793  return "attribsval#";
794  case 11:
795  return "counttype#";
796  case 12:
797  return "countgroup#";
798  case 13:
799  return "countcomp#";
800  case 14:
801  return "countval#";
802  case 15:
803  return "hasinputtype#";
804 
805  }
806  return 0;
807 
808  }
809  return 0;
810  }
811 
812  ParmType getNestParmType(TempIndex fieldnum) const override
813  {
814  if (fieldnum.size() < 1)
815  return PARM_UNSUPPORTED;
816  switch (fieldnum[0])
817  {
818  case 0:
819  return PARM_INTEGER;
820  case 1:
821  return PARM_INTEGER;
822  case 2:
823  if (fieldnum.size() == 1)
824  return PARM_MULTIPARM;
825  switch (fieldnum[1])
826  {
827  case 0:
828  return PARM_INTEGER;
829  case 1:
830  return PARM_INTEGER;
831  case 2:
832  return PARM_INTEGER;
833  case 3:
834  return PARM_INTEGER;
835  case 4:
836  return PARM_INTEGER;
837  case 5:
838  return PARM_STRING;
839  case 6:
840  return PARM_INTEGER;
841  case 7:
842  return PARM_INTEGER;
843  case 8:
844  return PARM_INTEGER;
845  case 9:
846  return PARM_FLOAT;
847  case 10:
848  return PARM_STRING;
849  case 11:
850  return PARM_INTEGER;
851  case 12:
852  return PARM_STRING;
853  case 13:
854  return PARM_INTEGER;
855  case 14:
856  return PARM_INTEGER;
857  case 15:
858  return PARM_INTEGER;
859 
860  }
861  return PARM_UNSUPPORTED;
862 
863  }
864  return PARM_UNSUPPORTED;
865  }
866 
867  // Boiler plate to load individual types.
868  static void loadData(UT_IStream &is, int64 &v)
869  { is.bread(&v, 1); }
870  static void loadData(UT_IStream &is, bool &v)
871  { int64 iv; is.bread(&iv, 1); v = iv; }
872  static void loadData(UT_IStream &is, fpreal64 &v)
873  { is.bread<fpreal64>(&v, 1); }
874  static void loadData(UT_IStream &is, UT_Vector2D &v)
875  { is.bread<fpreal64>(&v.x(), 1); is.bread<fpreal64>(&v.y(), 1); }
876  static void loadData(UT_IStream &is, UT_Vector3D &v)
877  { is.bread<fpreal64>(&v.x(), 1); is.bread<fpreal64>(&v.y(), 1);
878  is.bread<fpreal64>(&v.z(), 1); }
879  static void loadData(UT_IStream &is, UT_Vector4D &v)
880  { is.bread<fpreal64>(&v.x(), 1); is.bread<fpreal64>(&v.y(), 1);
881  is.bread<fpreal64>(&v.z(), 1); is.bread<fpreal64>(&v.w(), 1); }
882  static void loadData(UT_IStream &is, UT_Matrix2D &v)
883  { for (int r = 0; r < 2; r++) for (int c = 0; c < 2; c++) is.bread<fpreal64>(&v(r, c), 1); }
884  static void loadData(UT_IStream &is, UT_Matrix3D &v)
885  { for (int r = 0; r < 3; r++) for (int c = 0; c < 3; c++) is.bread<fpreal64>(&v(r, c), 1); }
886  static void loadData(UT_IStream &is, UT_Matrix4D &v)
887  { for (int r = 0; r < 4; r++) for (int c = 0; c < 4; c++) is.bread<fpreal64>(&v(r, c), 1); }
888  static void loadData(UT_IStream &is, UT_Vector2I &v)
889  { is.bread<int64>(&v.x(), 1); is.bread<int64>(&v.y(), 1); }
890  static void loadData(UT_IStream &is, UT_Vector3I &v)
891  { is.bread<int64>(&v.x(), 1); is.bread<int64>(&v.y(), 1);
892  is.bread<int64>(&v.z(), 1); }
893  static void loadData(UT_IStream &is, UT_Vector4I &v)
894  { is.bread<int64>(&v.x(), 1); is.bread<int64>(&v.y(), 1);
895  is.bread<int64>(&v.z(), 1); is.bread<int64>(&v.w(), 1); }
897  { is.bread(v); }
899  { UT_StringHolder rampdata;
900  loadData(is, rampdata);
901  if (rampdata.isstring())
902  {
903  v.reset(new UT_Ramp());
904  UT_IStream istr((const char *) rampdata, rampdata.length(), UT_ISTREAM_ASCII);
905  v->load(istr);
906  }
907  else v.reset();
908  }
911  loadData(is, data);
912  if (data.isstring())
913  {
914  // Find the data type.
915  const char *colon = UT_StringWrap(data).findChar(':');
916  if (colon)
917  {
918  int typelen = colon - data.buffer();
920  type.strncpy(data.buffer(), typelen);
921  UT_IStream istr(((const char *) data) + typelen + 1, data.length() - (typelen + 1), UT_ISTREAM_BINARY);
922 
923  v = PRM_DataFactory::parseBinary(type.buffer(), istr);
924  }
925  }
926  else v.reset();
927  }
928 
929  static void saveData(std::ostream &os, int64 v)
930  { UTwrite(os, &v); }
931  static void saveData(std::ostream &os, bool v)
932  { int64 iv = v; UTwrite(os, &iv); }
933  static void saveData(std::ostream &os, fpreal64 v)
934  { UTwrite<fpreal64>(os, &v); }
935  static void saveData(std::ostream &os, UT_Vector2D v)
936  { UTwrite<fpreal64>(os, &v.x()); UTwrite<fpreal64>(os, &v.y()); }
937  static void saveData(std::ostream &os, UT_Vector3D v)
938  { UTwrite<fpreal64>(os, &v.x()); UTwrite<fpreal64>(os, &v.y());
939  UTwrite<fpreal64>(os, &v.z()); }
940  static void saveData(std::ostream &os, UT_Vector4D v)
941  { UTwrite<fpreal64>(os, &v.x()); UTwrite<fpreal64>(os, &v.y());
942  UTwrite<fpreal64>(os, &v.z()); UTwrite<fpreal64>(os, &v.w()); }
943  static void saveData(std::ostream &os, UT_Matrix2D v)
945  static void saveData(std::ostream &os, UT_Matrix3D v)
947  static void saveData(std::ostream &os, UT_Matrix4D v)
949  static void saveData(std::ostream &os, UT_StringHolder s)
950  { UT_StringWrap(s).saveBinary(os); }
951  static void saveData(std::ostream &os, UT_SharedPtr<UT_Ramp> s)
953  UT_OStringStream ostr;
954  if (s) s->save(ostr);
955  result = ostr.str();
956  saveData(os, result);
957  }
958  static void saveData(std::ostream &os, PRM_DataItemHandle s)
960  UT_OStringStream ostr;
961  if (s)
962  {
963  ostr << s->getDataTypeToken();
964  ostr << ":";
965  s->saveBinary(ostr);
966  }
967  result = ostr.str();
968  saveData(os, result);
969  }
970 
971 
972  void save(std::ostream &os) const
973  {
974  int32 v = version();
975  UTwrite(os, &v);
976  saveData(os, myMergeCondition);
977  saveData(os, myTestInput);
978  {
979  int64 length = myTests.entries();
980  UTwrite(os, &length);
981  for (exint i = 0; i < length; i++)
982  {
983  auto && _curentry = myTests(i);
984  (void) _curentry;
985  saveData(os, _curentry.enable);
986  saveData(os, _curentry.type);
987  saveData(os, _curentry.expr);
988  saveData(os, _curentry.attribtype);
989  saveData(os, _curentry.attribowner);
990  saveData(os, _curentry.attributes);
991  saveData(os, _curentry.attribvaltype);
992  saveData(os, _curentry.attribfloatcomp);
993  saveData(os, _curentry.attribstringcomp);
994  saveData(os, _curentry.attribval);
995  saveData(os, _curentry.attribsval);
996  saveData(os, _curentry.counttype);
997  saveData(os, _curentry.countgroup);
998  saveData(os, _curentry.countcomp);
999  saveData(os, _curentry.countval);
1000  saveData(os, _curentry.hasinputtype);
1001 
1002  }
1003  }
1004 
1005  }
1006 
1007  bool load(UT_IStream &is)
1008  {
1009  int32 v;
1010  is.bread(&v, 1);
1011  if (version() != v)
1012  {
1013  // Fail incompatible versions
1014  return false;
1015  }
1016  loadData(is, myMergeCondition);
1017  loadData(is, myTestInput);
1018  {
1019  int64 length;
1020  is.read(&length, 1);
1021  myTests.setSize(length);
1022  for (exint i = 0; i < length; i++)
1023  {
1024  auto && _curentry = myTests(i);
1025  (void) _curentry;
1026  loadData(is, _curentry.enable);
1027  loadData(is, _curentry.type);
1028  loadData(is, _curentry.expr);
1029  loadData(is, _curentry.attribtype);
1030  loadData(is, _curentry.attribowner);
1031  loadData(is, _curentry.attributes);
1032  loadData(is, _curentry.attribvaltype);
1033  loadData(is, _curentry.attribfloatcomp);
1034  loadData(is, _curentry.attribstringcomp);
1035  loadData(is, _curentry.attribval);
1036  loadData(is, _curentry.attribsval);
1037  loadData(is, _curentry.counttype);
1038  loadData(is, _curentry.countgroup);
1039  loadData(is, _curentry.countcomp);
1040  loadData(is, _curentry.countval);
1041  loadData(is, _curentry.hasinputtype);
1042 
1043  }
1044  }
1045 
1046  return true;
1047  }
1048 
1049  MergeCondition getMergeCondition() const { return MergeCondition(myMergeCondition); }
1050  void setMergeCondition(MergeCondition val) { myMergeCondition = int64(val); }
1052  {
1053  SOP_Node *thissop = cookparms.getNode();
1054  if (!thissop) return getMergeCondition();
1055  int64 result;
1056  OP_Utils::evalOpParm(result, thissop, "mergecondition", cookparms.getCookTime(), 0);
1057  return MergeCondition(result);
1058  }
1059  TestInput getTestInput() const { return TestInput(myTestInput); }
1060  void setTestInput(TestInput val) { myTestInput = int64(val); }
1062  {
1063  SOP_Node *thissop = cookparms.getNode();
1064  if (!thissop) return getTestInput();
1065  int64 result;
1066  OP_Utils::evalOpParm(result, thissop, "testinput", cookparms.getCookTime(), 0);
1067  return TestInput(result);
1068  }
1069  const UT_Array<Tests> &getTests() const { return myTests; }
1070 void setTests(const UT_Array<Tests> &val) { myTests = val; }
1071  exint opTests(const SOP_NodeVerb::CookParms &cookparms) const
1072  {
1073  SOP_Node *thissop = cookparms.getNode();
1074  if (!thissop) return getTests().entries();
1075  exint result;
1076  OP_Utils::evalOpParm(result, thissop, "tests", cookparms.getCookTime(), 0);
1077  return result;
1078  }
1079  bool opTests_enable(const SOP_NodeVerb::CookParms &cookparms, int _idx) const
1080  { return opinstTests_enable(cookparms, &_idx); }
1081  bool opinstTests_enable(const SOP_NodeVerb::CookParms &cookparms, const int *_idx) const
1082  {
1083  SOP_Node *thissop = cookparms.getNode();
1084  if (!thissop) return (myTests(_idx[0]).enable);
1085  int _parmidx[2-1];
1086  _parmidx[1-1] = _idx[1-1] + 1;
1087 
1088  bool result;
1089  OP_Utils::evalOpParmInst(result, thissop, "enable#", _parmidx, cookparms.getCookTime(), 0, 2-1);
1090  return (result);
1091  }
1092  int64 opTests_type(const SOP_NodeVerb::CookParms &cookparms, int _idx) const
1093  { return opinstTests_type(cookparms, &_idx); }
1094  int64 opinstTests_type(const SOP_NodeVerb::CookParms &cookparms, const int *_idx) const
1095  {
1096  SOP_Node *thissop = cookparms.getNode();
1097  if (!thissop) return (myTests(_idx[0]).type);
1098  int _parmidx[2-1];
1099  _parmidx[1-1] = _idx[1-1] + 1;
1100 
1101  int64 result;
1102  OP_Utils::evalOpParmInst(result, thissop, "type#", _parmidx, cookparms.getCookTime(), 0, 2-1);
1103  return (result);
1104  }
1105  int64 opTests_expr(const SOP_NodeVerb::CookParms &cookparms, int _idx) const
1106  { return opinstTests_expr(cookparms, &_idx); }
1107  int64 opinstTests_expr(const SOP_NodeVerb::CookParms &cookparms, const int *_idx) const
1108  {
1109  SOP_Node *thissop = cookparms.getNode();
1110  if (!thissop) return (myTests(_idx[0]).expr);
1111  int _parmidx[2-1];
1112  _parmidx[1-1] = _idx[1-1] + 1;
1113 
1114  int64 result;
1115  OP_Utils::evalOpParmInst(result, thissop, "expr#", _parmidx, cookparms.getCookTime(), 0, 2-1);
1116  return (result);
1117  }
1118  int64 opTests_attribtype(const SOP_NodeVerb::CookParms &cookparms, int _idx) const
1119  { return opinstTests_attribtype(cookparms, &_idx); }
1120  int64 opinstTests_attribtype(const SOP_NodeVerb::CookParms &cookparms, const int *_idx) const
1121  {
1122  SOP_Node *thissop = cookparms.getNode();
1123  if (!thissop) return (myTests(_idx[0]).attribtype);
1124  int _parmidx[2-1];
1125  _parmidx[1-1] = _idx[1-1] + 1;
1126 
1127  int64 result;
1128  OP_Utils::evalOpParmInst(result, thissop, "attribtype#", _parmidx, cookparms.getCookTime(), 0, 2-1);
1129  return (result);
1130  }
1131  int64 opTests_attribowner(const SOP_NodeVerb::CookParms &cookparms, int _idx) const
1132  { return opinstTests_attribowner(cookparms, &_idx); }
1133  int64 opinstTests_attribowner(const SOP_NodeVerb::CookParms &cookparms, const int *_idx) const
1134  {
1135  SOP_Node *thissop = cookparms.getNode();
1136  if (!thissop) return (myTests(_idx[0]).attribowner);
1137  int _parmidx[2-1];
1138  _parmidx[1-1] = _idx[1-1] + 1;
1139 
1140  int64 result;
1141  OP_Utils::evalOpParmInst(result, thissop, "attribowner#", _parmidx, cookparms.getCookTime(), 0, 2-1);
1142  return (result);
1143  }
1145  { return opinstTests_attributes(cookparms, &_idx); }
1146  UT_StringHolder opinstTests_attributes(const SOP_NodeVerb::CookParms &cookparms, const int *_idx) const
1147  {
1148  SOP_Node *thissop = cookparms.getNode();
1149  if (!thissop) return (myTests(_idx[0]).attributes);
1150  int _parmidx[2-1];
1151  _parmidx[1-1] = _idx[1-1] + 1;
1152 
1154  OP_Utils::evalOpParmInst(result, thissop, "attributes#", _parmidx, cookparms.getCookTime(), 0, 2-1);
1155  return (result);
1156  }
1157  int64 opTests_attribvaltype(const SOP_NodeVerb::CookParms &cookparms, int _idx) const
1158  { return opinstTests_attribvaltype(cookparms, &_idx); }
1159  int64 opinstTests_attribvaltype(const SOP_NodeVerb::CookParms &cookparms, const int *_idx) const
1160  {
1161  SOP_Node *thissop = cookparms.getNode();
1162  if (!thissop) return (myTests(_idx[0]).attribvaltype);
1163  int _parmidx[2-1];
1164  _parmidx[1-1] = _idx[1-1] + 1;
1165 
1166  int64 result;
1167  OP_Utils::evalOpParmInst(result, thissop, "attribvaltype#", _parmidx, cookparms.getCookTime(), 0, 2-1);
1168  return (result);
1169  }
1170  int64 opTests_attribfloatcomp(const SOP_NodeVerb::CookParms &cookparms, int _idx) const
1171  { return opinstTests_attribfloatcomp(cookparms, &_idx); }
1172  int64 opinstTests_attribfloatcomp(const SOP_NodeVerb::CookParms &cookparms, const int *_idx) const
1173  {
1174  SOP_Node *thissop = cookparms.getNode();
1175  if (!thissop) return (myTests(_idx[0]).attribfloatcomp);
1176  int _parmidx[2-1];
1177  _parmidx[1-1] = _idx[1-1] + 1;
1178 
1179  int64 result;
1180  OP_Utils::evalOpParmInst(result, thissop, "attribfloatcomp#", _parmidx, cookparms.getCookTime(), 0, 2-1);
1181  return (result);
1182  }
1183  int64 opTests_attribstringcomp(const SOP_NodeVerb::CookParms &cookparms, int _idx) const
1184  { return opinstTests_attribstringcomp(cookparms, &_idx); }
1185  int64 opinstTests_attribstringcomp(const SOP_NodeVerb::CookParms &cookparms, const int *_idx) const
1186  {
1187  SOP_Node *thissop = cookparms.getNode();
1188  if (!thissop) return (myTests(_idx[0]).attribstringcomp);
1189  int _parmidx[2-1];
1190  _parmidx[1-1] = _idx[1-1] + 1;
1191 
1192  int64 result;
1193  OP_Utils::evalOpParmInst(result, thissop, "attribstringcomp#", _parmidx, cookparms.getCookTime(), 0, 2-1);
1194  return (result);
1195  }
1196  fpreal64 opTests_attribval(const SOP_NodeVerb::CookParms &cookparms, int _idx) const
1197  { return opinstTests_attribval(cookparms, &_idx); }
1198  fpreal64 opinstTests_attribval(const SOP_NodeVerb::CookParms &cookparms, const int *_idx) const
1199  {
1200  SOP_Node *thissop = cookparms.getNode();
1201  if (!thissop) return (myTests(_idx[0]).attribval);
1202  int _parmidx[2-1];
1203  _parmidx[1-1] = _idx[1-1] + 1;
1204 
1205  fpreal64 result;
1206  OP_Utils::evalOpParmInst(result, thissop, "attribval#", _parmidx, cookparms.getCookTime(), 0, 2-1);
1207  return (result);
1208  }
1210  { return opinstTests_attribsval(cookparms, &_idx); }
1211  UT_StringHolder opinstTests_attribsval(const SOP_NodeVerb::CookParms &cookparms, const int *_idx) const
1212  {
1213  SOP_Node *thissop = cookparms.getNode();
1214  if (!thissop) return (myTests(_idx[0]).attribsval);
1215  int _parmidx[2-1];
1216  _parmidx[1-1] = _idx[1-1] + 1;
1217 
1219  OP_Utils::evalOpParmInst(result, thissop, "attribsval#", _parmidx, cookparms.getCookTime(), 0, 2-1);
1220  return (result);
1221  }
1222  int64 opTests_counttype(const SOP_NodeVerb::CookParms &cookparms, int _idx) const
1223  { return opinstTests_counttype(cookparms, &_idx); }
1224  int64 opinstTests_counttype(const SOP_NodeVerb::CookParms &cookparms, const int *_idx) const
1225  {
1226  SOP_Node *thissop = cookparms.getNode();
1227  if (!thissop) return (myTests(_idx[0]).counttype);
1228  int _parmidx[2-1];
1229  _parmidx[1-1] = _idx[1-1] + 1;
1230 
1231  int64 result;
1232  OP_Utils::evalOpParmInst(result, thissop, "counttype#", _parmidx, cookparms.getCookTime(), 0, 2-1);
1233  return (result);
1234  }
1236  { return opinstTests_countgroup(cookparms, &_idx); }
1237  UT_StringHolder opinstTests_countgroup(const SOP_NodeVerb::CookParms &cookparms, const int *_idx) const
1238  {
1239  SOP_Node *thissop = cookparms.getNode();
1240  if (!thissop) return (myTests(_idx[0]).countgroup);
1241  int _parmidx[2-1];
1242  _parmidx[1-1] = _idx[1-1] + 1;
1243 
1245  OP_Utils::evalOpParmInst(result, thissop, "countgroup#", _parmidx, cookparms.getCookTime(), 0, 2-1);
1246  return (result);
1247  }
1248  int64 opTests_countcomp(const SOP_NodeVerb::CookParms &cookparms, int _idx) const
1249  { return opinstTests_countcomp(cookparms, &_idx); }
1250  int64 opinstTests_countcomp(const SOP_NodeVerb::CookParms &cookparms, const int *_idx) const
1251  {
1252  SOP_Node *thissop = cookparms.getNode();
1253  if (!thissop) return (myTests(_idx[0]).countcomp);
1254  int _parmidx[2-1];
1255  _parmidx[1-1] = _idx[1-1] + 1;
1256 
1257  int64 result;
1258  OP_Utils::evalOpParmInst(result, thissop, "countcomp#", _parmidx, cookparms.getCookTime(), 0, 2-1);
1259  return (result);
1260  }
1261  int64 opTests_countval(const SOP_NodeVerb::CookParms &cookparms, int _idx) const
1262  { return opinstTests_countval(cookparms, &_idx); }
1263  int64 opinstTests_countval(const SOP_NodeVerb::CookParms &cookparms, const int *_idx) const
1264  {
1265  SOP_Node *thissop = cookparms.getNode();
1266  if (!thissop) return (myTests(_idx[0]).countval);
1267  int _parmidx[2-1];
1268  _parmidx[1-1] = _idx[1-1] + 1;
1269 
1270  int64 result;
1271  OP_Utils::evalOpParmInst(result, thissop, "countval#", _parmidx, cookparms.getCookTime(), 0, 2-1);
1272  return (result);
1273  }
1274  int64 opTests_hasinputtype(const SOP_NodeVerb::CookParms &cookparms, int _idx) const
1275  { return opinstTests_hasinputtype(cookparms, &_idx); }
1276  int64 opinstTests_hasinputtype(const SOP_NodeVerb::CookParms &cookparms, const int *_idx) const
1277  {
1278  SOP_Node *thissop = cookparms.getNode();
1279  if (!thissop) return (myTests(_idx[0]).hasinputtype);
1280  int _parmidx[2-1];
1281  _parmidx[1-1] = _idx[1-1] + 1;
1282 
1283  int64 result;
1284  OP_Utils::evalOpParmInst(result, thissop, "hasinputtype#", _parmidx, cookparms.getCookTime(), 0, 2-1);
1285  return (result);
1286  }
1287 
1288 
1289 private:
1290  int64 myMergeCondition;
1291  int64 myTestInput;
1292  UT_Array<Tests> myTests;
1293 
1294 };
void setNestParmValue(TempIndex idx, TempIndex instance, const UT_SharedPtr< UT_Ramp > &value) override
const char * getNestParmName(TempIndex fieldnum) const override
int64 opTests_attribvaltype(const SOP_NodeVerb::CookParms &cookparms, int _idx) const
GLenum GLuint GLenum GLsizei const GLchar * buf
Definition: glcorearb.h:2540
void setNestParmValue(TempIndex idx, TempIndex instance, const exint &value) override
static void loadData(UT_IStream &is, UT_Vector2D &v)
static void loadData(UT_IStream &is, UT_Vector4I &v)
int int32
Definition: SYS_Types.h:39
SOP_Node * getNode() const
Definition: SOP_NodeVerb.h:347
static void loadData(UT_IStream &is, UT_StringHolder &v)
exint getNestNumParms(TempIndex idx) const override
fpreal64 opinstTests_attribval(const SOP_NodeVerb::CookParms &cookparms, const int *_idx) const
static void loadData(UT_IStream &is, UT_SharedPtr< UT_Ramp > &v)
exint opTests(const SOP_NodeVerb::CookParms &cookparms) const
static void saveData(std::ostream &os, PRM_DataItemHandle s)
void
Definition: png.h:1083
UT_StringHolder opTests_attributes(const SOP_NodeVerb::CookParms &cookparms, int _idx) const
exint bread(int32 *buffer, exint asize=1)
static void loadData(UT_IStream &is, bool &v)
GLboolean * data
Definition: glcorearb.h:131
GT_API const UT_StringHolder time
constexpr SYS_FORCE_INLINE T & y() noexcept
Definition: UT_Vector4.h:493
const GLdouble * v
Definition: glcorearb.h:837
fpreal getTime() const
Definition: OP_Context.h:62
UT_StringHolder opinstTests_attributes(const SOP_NodeVerb::CookParms &cookparms, const int *_idx) const
bool operator==(const Tests &src) const
void getNestParmValue(TempIndex idx, TempIndex instance, UT_Vector4D &value) const override
UT_String makeQuotedString(char delimiter='\'', bool escape_nonprinting=false) const
int64 opinstTests_attribstringcomp(const SOP_NodeVerb::CookParms &cookparms, const int *_idx) const
const OP_Context & context() const
Definition: OP_NodeParms.h:97
bool opinstTests_enable(const SOP_NodeVerb::CookParms &cookparms, const int *_idx) const
constexpr SYS_FORCE_INLINE T & z() noexcept
Definition: UT_Vector3.h:667
int64 exint
Definition: SYS_Types.h:125
void setNestParmValue(TempIndex idx, TempIndex instance, const UT_Matrix2D &value) override
SYS_FORCE_INLINE const char * buffer() const
GLdouble s
Definition: glad.h:3009
GLuint GLsizei GLsizei * length
Definition: glcorearb.h:795
SYS_FORCE_INLINE UT_StringHolder getToken(MergeCondition enum_value)
An output stream object that owns its own string buffer storage.
static void loadData(UT_IStream &is, UT_Vector3D &v)
UT_StringHolder opTests_countgroup(const SOP_NodeVerb::CookParms &cookparms, int _idx) const
**But if you need a result
Definition: thread.h:613
const UT_Array< Tests > & getTests() const
void getNestParmValue(TempIndex idx, TempIndex instance, UT_Matrix2D &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.
bool operator==(const SOP_SwitchIfParms &src) const
constexpr SYS_FORCE_INLINE T & x() noexcept
Definition: UT_Vector4.h:491
int64 opinstTests_countcomp(const SOP_NodeVerb::CookParms &cookparms, const int *_idx) const
GLuint GLsizei const GLuint const GLintptr * offsets
Definition: glcorearb.h:2621
void loadFromOpSubclass(const LoadParms &loadparms) override
double fpreal64
Definition: SYS_Types.h:201
UT_StringHolder createString(const UT_Array< Tests > &list) const
constexpr SYS_FORCE_INLINE T & x() noexcept
Definition: UT_Vector2.h:423
static void loadData(UT_IStream &is, UT_Matrix4D &v)
static void saveData(std::ostream &os, UT_Matrix2D v)
bool operator==(const BaseDimensions< T > &a, const BaseDimensions< Y > &b)
Definition: Dimensions.h:137
int64 opTests_countcomp(const SOP_NodeVerb::CookParms &cookparms, int _idx) const
static void saveData(std::ostream &os, UT_Vector2D v)
static void saveData(std::ostream &os, UT_Matrix3D v)
bool operator!=(const SOP_SwitchIfParms &src) const
void copyFrom(const OP_NodeParms *src) override
MergeCondition getMergeCondition() const
void setMergeCondition(MergeCondition val)
int64 opinstTests_expr(const SOP_NodeVerb::CookParms &cookparms, const int *_idx) const
int64 opinstTests_attribvaltype(const SOP_NodeVerb::CookParms &cookparms, const int *_idx) const
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
UT_StringHolder opinstTests_countgroup(const SOP_NodeVerb::CookParms &cookparms, const int *_idx) const
constexpr SYS_FORCE_INLINE T & z() noexcept
Definition: UT_Vector4.h:495
UT_StringHolder opTests_attribsval(const SOP_NodeVerb::CookParms &cookparms, int _idx) const
void buildFromOp(const OP_GraphProxy *graph, exint nodeidx, fpreal time, DEP_MicroNode *depnode)
exint read(bool *array, exint sz=1)
Definition: UT_IStream.h:276
const OP_GraphProxy * graph() const
Definition: OP_NodeParms.h:94
#define SYS_FORCE_INLINE
Definition: SYS_Inline.h:45
static void saveData(std::ostream &os, UT_Vector3D v)
bool opTests_enable(const SOP_NodeVerb::CookParms &cookparms, int _idx) const
void getNestParmValue(TempIndex idx, TempIndex instance, UT_StringHolder &value) const override
fpreal64 opTests_attribval(const SOP_NodeVerb::CookParms &cookparms, int _idx) const
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
void setNestParmValue(TempIndex idx, TempIndex instance, const UT_Vector4D &value) override
int64 opTests_type(const SOP_NodeVerb::CookParms &cookparms, int _idx) const
static void saveData(std::ostream &os, UT_Vector4D v)
int64 opTests_attribowner(const SOP_NodeVerb::CookParms &cookparms, int _idx) const
int64 opinstTests_attribowner(const SOP_NodeVerb::CookParms &cookparms, const int *_idx) const
MergeCondition opMergeCondition(const SOP_NodeVerb::CookParms &cookparms) const
virtual void evalOpParm(int64 &v, NodeIdx node, const char *parmname, fpreal time, DEP_MicroNode *depnode) const =0
void setTests(const UT_Array< Tests > &val)
TestInput getTestInput() const
void getNestParmValue(TempIndex idx, TempIndex instance, UT_Vector2D &value) const override
SYS_FORCE_INLINE void strcat(const char *src)
void doGetParmValue(TempIndex idx, TempIndex instance, T &value) const
static void saveData(std::ostream &os, UT_SharedPtr< UT_Ramp > s)
static void saveData(std::ostream &os, fpreal64 v)
void saveBinary(std::ostream &os) const
Save string to binary stream.
Definition: UT_String.h:296
void doSetParmValue(TempIndex idx, TempIndex instance, const T &value)
GT_API const UT_StringHolder version
int64 opTests_countval(const SOP_NodeVerb::CookParms &cookparms, int _idx) const
exint entries() const
Alias of size(). size() is preferred.
Definition: UT_Array.h:648
void setNestParmValue(TempIndex idx, TempIndex instance, const UT_Vector3D &value) override
static void loadData(UT_IStream &is, PRM_DataItemHandle &v)
void setNestParmValue(TempIndex idx, TempIndex instance, const UT_Matrix3D &value) override
static void loadData(UT_IStream &is, UT_Matrix3D &v)
int int appendSprintf(const char *fmt,...) SYS_PRINTF_CHECK_ATTRIBUTE(2
TestInput opTestInput(const SOP_NodeVerb::CookParms &cookparms) const
int64 opinstTests_hasinputtype(const SOP_NodeVerb::CookParms &cookparms, const int *_idx) const
static void saveData(std::ostream &os, bool v)
ParmType getNestParmType(TempIndex fieldnum) const override
bool operator!=(const Tests &src) const
int64 opTests_attribtype(const SOP_NodeVerb::CookParms &cookparms, int _idx) const
void setNestParmValue(TempIndex idx, TempIndex instance, const UT_Vector2D &value) override
static void loadData(UT_IStream &is, UT_Vector3I &v)
void setTestInput(TestInput val)
static void saveData(std::ostream &os, int64 v)
fpreal64 fpreal
Definition: SYS_Types.h:277
DEP_MicroNode * depnode() const
Definition: OP_NodeParms.h:99
bool load(UT_IStream &is)
LeafData & operator=(const LeafData &)=delete
int64 opTests_attribfloatcomp(const SOP_NodeVerb::CookParms &cookparms, int _idx) const
Utility class for containing a color ramp.
Definition: UT_Ramp.h:92
static void loadData(UT_IStream &is, UT_Vector4D &v)
static void loadData(UT_IStream &is, fpreal64 &v)
constexpr SYS_FORCE_INLINE T & w() noexcept
Definition: UT_Vector4.h:497
SYS_FORCE_INLINE void append(char character)
static void saveData(std::ostream &os, UT_Matrix4D v)
void getNestParmValue(TempIndex idx, TempIndex instance, UT_Vector3D &value) const override
GLuint GLfloat * val
Definition: glcorearb.h:1608
void getNestParmValue(TempIndex idx, TempIndex instance, UT_SharedPtr< UT_Ramp > &value) const override
static void saveData(std::ostream &os, UT_StringHolder s)
#define SOP_API
Definition: SOP_API.h:10
void getNestParmValue(TempIndex idx, TempIndex instance, exint &value) const override
int64 opTests_hasinputtype(const SOP_NodeVerb::CookParms &cookparms, int _idx) const
void getNestParmValue(TempIndex idx, TempIndex instance, UT_Matrix3D &value) const override
void setNestParmValue(TempIndex idx, TempIndex instance, const UT_StringHolder &value) override
static void loadData(UT_IStream &is, UT_Vector2I &v)
fpreal getCookTime() const
Definition: SOP_NodeVerb.h:361
void getNestParmValue(TempIndex idx, TempIndex instance, PRM_DataItemHandle &value) const override
void setNestParmValue(TempIndex idx, TempIndex instance, const PRM_DataItemHandle &value) override
int64 opinstTests_attribtype(const SOP_NodeVerb::CookParms &cookparms, const int *_idx) const
void save(std::ostream &os) const
int64 opTests_attribstringcomp(const SOP_NodeVerb::CookParms &cookparms, int _idx) const
const char * findChar(int c) const
Definition: UT_String.h:1395
#define UT_ASSERT(ZZ)
Definition: UT_Assert.h:156
Definition: core.h:1131
void setNestParmValue(TempIndex idx, TempIndex instance, const fpreal &value) override
int64 opTests_expr(const SOP_NodeVerb::CookParms &cookparms, int _idx) const
void getNestParmValue(TempIndex idx, TempIndex instance, fpreal &value) const override
static void loadData(UT_IStream &is, int64 &v)
int64 opinstTests_countval(const SOP_NodeVerb::CookParms &cookparms, const int *_idx) const
GLboolean r
Definition: glcorearb.h:1222
int64 opinstTests_counttype(const SOP_NodeVerb::CookParms &cookparms, const int *_idx) const
int64 opinstTests_type(const SOP_NodeVerb::CookParms &cookparms, const int *_idx) const
UT_StringHolder opinstTests_attribsval(const SOP_NodeVerb::CookParms &cookparms, const int *_idx) const
constexpr SYS_FORCE_INLINE T & y() noexcept
Definition: UT_Vector3.h:665
type
Definition: core.h:1059
bool isParmColorRamp(exint idx) const override
UT_SharedPtr< const PRM_DataItem > PRM_DataItemHandle
Definition: PRM_Parm.h:97
int64 opTests_counttype(const SOP_NodeVerb::CookParms &cookparms, int _idx) const
void setNestParmValue(TempIndex idx, TempIndex instance, const UT_Matrix4D &value) override
static void loadData(UT_IStream &is, UT_Matrix2D &v)
constexpr SYS_FORCE_INLINE T & y() noexcept
Definition: UT_Vector2.h:425
SYS_FORCE_INLINE bool isstring() const
int64 opinstTests_attribfloatcomp(const SOP_NodeVerb::CookParms &cookparms, const int *_idx) const
void getNestParmValue(TempIndex idx, TempIndex instance, UT_Matrix4D &value) const override
SYS_FORCE_INLINE void strncpy(const char *src, exint maxlen)
GLenum src
Definition: glcorearb.h:1793
constexpr SYS_FORCE_INLINE T & x() noexcept
Definition: UT_Vector3.h:663