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  enum class TestInput
33  {
34  FIRST = 0,
35  SECOND,
36  SPARE
37  };
38  enum class Type
39  {
40  EXPR = 0,
41  ATTRIB,
42  COUNT,
43  ATTRIBVAL,
44  HASINPUT
45  };
46  enum class Attribtype
47  {
48  ALL = 0,
49  ANY,
50  NONE,
51  MISSING
52  };
53  enum class Attribowner
54  {
55  ANY = 0,
56  DETAIL,
57  PRIM,
58  POINT,
59  VERTEX,
61  };
62  enum class Attribvaltype
63  {
64  FLT = 0,
65  STR
66  };
67  enum class Attribfloatcomp
68  {
69  EQUAL = 0,
70  NEQUAL,
71  GREATER,
72  LESS,
73  GEQUAL,
74  LEQUAL
75  };
76  enum class Attribstringcomp
77  {
78  EQUAL = 0,
79  NEQUAL,
80  MATCH,
81  NOMATCH,
82  CONTAINS
83  };
84  enum class Counttype
85  {
86  POINTS = 0,
87  PRIMS,
88  VERTICES
89  };
90  enum class Countcomp
91  {
92  EQUAL = 0,
93  NEQUAL,
94  GREATER,
95  LESS,
96  GEQUAL,
97  LEQUAL
98  };
99  enum class Hasinputtype
100  {
101  WIRED = 0,
102  NOTWIRED
103  };
104 }
105 
106 
108 {
109 public:
110  static int version() { return 1; }
111  struct Tests
112  {
113  bool enable;
129 
130 
132  {
133  enable = true;
134  type = 0;
135  expr = 1;
136  attribtype = 0;
137  attribowner = 3;
138  attributes = ""_UTsh;
139  attribvaltype = 0;
140  attribfloatcomp = 0;
141  attribstringcomp = 0;
142  attribval = 0;
143  attribsval = ""_UTsh;
144  counttype = 0;
145  countgroup = ""_UTsh;
146  countcomp = 0;
147  countval = 0;
148  hasinputtype = 0;
149 
150  }
151 
152  bool operator==(const Tests &src) const
153  {
154  if (enable != src.enable) return false;
155  if (type != src.type) return false;
156  if (expr != src.expr) return false;
157  if (attribtype != src.attribtype) return false;
158  if (attribowner != src.attribowner) return false;
159  if (attributes != src.attributes) return false;
160  if (attribvaltype != src.attribvaltype) return false;
161  if (attribfloatcomp != src.attribfloatcomp) return false;
162  if (attribstringcomp != src.attribstringcomp) return false;
163  if (attribval != src.attribval) return false;
164  if (attribsval != src.attribsval) return false;
165  if (counttype != src.counttype) return false;
166  if (countgroup != src.countgroup) return false;
167  if (countcomp != src.countcomp) return false;
168  if (countval != src.countval) return false;
169  if (hasinputtype != src.hasinputtype) return false;
170 
171  return true;
172  }
173  bool operator!=(const Tests &src) const
174  {
175  return !operator==(src);
176  }
177 
178  };
179 
181  {
183 
184  buf.strcat("[ ");
185  for (int i = 0; i < list.entries(); i++)
186  {
187  if (i)
188  buf.strcat(", ");
189  buf.strcat("( ");
190  buf.append("");
191  buf.appendSprintf("%s", (list(i).enable) ? "true" : "false");
192  buf.append(", ");
193  buf.appendSprintf("%d", (int) list(i).type);
194  buf.append(", ");
195  buf.appendSprintf("%d", (int) list(i).expr);
196  buf.append(", ");
197  buf.appendSprintf("%d", (int) list(i).attribtype);
198  buf.append(", ");
199  buf.appendSprintf("%d", (int) list(i).attribowner);
200  buf.append(", ");
201  { UT_String tmp; tmp = UT_StringWrap(list(i).attributes).makeQuotedString('"'); buf.strcat(tmp); }
202  buf.append(", ");
203  buf.appendSprintf("%d", (int) list(i).attribvaltype);
204  buf.append(", ");
205  buf.appendSprintf("%d", (int) list(i).attribfloatcomp);
206  buf.append(", ");
207  buf.appendSprintf("%d", (int) list(i).attribstringcomp);
208  buf.append(", ");
209  buf.appendSprintf("%f", (list(i).attribval));
210  buf.append(", ");
211  { UT_String tmp; tmp = UT_StringWrap(list(i).attribsval).makeQuotedString('"'); buf.strcat(tmp); }
212  buf.append(", ");
213  buf.appendSprintf("%d", (int) list(i).counttype);
214  buf.append(", ");
215  { UT_String tmp; tmp = UT_StringWrap(list(i).countgroup).makeQuotedString('"'); buf.strcat(tmp); }
216  buf.append(", ");
217  buf.appendSprintf("%d", (int) list(i).countcomp);
218  buf.append(", ");
219  buf.appendSprintf("%d", (int) list(i).countval);
220  buf.append(", ");
221  buf.appendSprintf("%d", (int) list(i).hasinputtype);
222 
223  buf.strcat(" )");
224  }
225  buf.strcat(" ]");
226 
228  return result;
229  }
230 
232  {
233  myMergeCondition = 0;
234  myTestInput = 0;
235  myTests.setSize(1);
236 
237  }
238 
239  explicit SOP_SwitchIfParms(const SOP_SwitchIfParms &) = default;
240  SOP_SwitchIfParms &operator=(const SOP_SwitchIfParms &) = default;
241  SOP_SwitchIfParms(SOP_SwitchIfParms &&) noexcept = default;
242  SOP_SwitchIfParms &operator=(SOP_SwitchIfParms &&) noexcept = default;
243 
244  ~SOP_SwitchIfParms() override {}
245 
246  bool operator==(const SOP_SwitchIfParms &src) const
247  {
248  if (myMergeCondition != src.myMergeCondition) return false;
249  if (myTestInput != src.myTestInput) return false;
250  if (myTests != src.myTests) return false;
251 
252  return true;
253  }
254  bool operator!=(const SOP_SwitchIfParms &src) const
255  {
256  return !operator==(src);
257  }
269 
270 
271 
272  void buildFromOp(const OP_GraphProxy *graph, exint nodeidx, fpreal time, DEP_MicroNode *depnode)
273  {
274  myMergeCondition = 0;
275  if (true)
276  graph->evalOpParm(myMergeCondition, nodeidx, "mergecondition", time, 0);
277  myTestInput = 0;
278  if (true)
279  graph->evalOpParm(myTestInput, nodeidx, "testinput", time, 0);
280  if (true)
281  {
282  int64 length = 0;
283  graph->evalOpParm(length, nodeidx, "tests", time, 0);
284  if (length < 0) length = 0;
285  myTests.setSize(length);
286  for (exint i = 0; i < length; i++)
287  {
288  int parmidx[1];
289  int offsets[1];
290  parmidx[0] = i+1;
291  offsets[0] = 1;
292  auto && _curentry = myTests(i);
293  (void) _curentry;
294  _curentry.enable = true;
295  if (true)
296  graph->evalOpParmInst(_curentry.enable, nodeidx, "enable#", parmidx, offsets, time, 0, 2-1);
297  _curentry.type = 0;
298  if (true && ( (true&&!(((_curentry.enable==0)))) ) )
299  graph->evalOpParmInst(_curentry.type, nodeidx, "type#", parmidx, offsets, time, 0, 2-1);
300  _curentry.expr = 1;
301  if (true && ( (true&&!(((_curentry.type!=0))||((_curentry.enable==0)))) ) )
302  graph->evalOpParmInst(_curentry.expr, nodeidx, "expr#", parmidx, offsets, time, 0, 2-1);
303  _curentry.attribtype = 0;
304  if (true && ( (true&&!(((_curentry.type!=1))||((_curentry.enable==0)))) ) )
305  graph->evalOpParmInst(_curentry.attribtype, nodeidx, "attribtype#", parmidx, offsets, time, 0, 2-1);
306  _curentry.attribowner = 3;
307  if (true && ( (true&&!(((_curentry.type!=1)&&(_curentry.type!=3))||((_curentry.enable==0)))) ) )
308  graph->evalOpParmInst(_curentry.attribowner, nodeidx, "attribowner#", parmidx, offsets, time, 0, 2-1);
309  _curentry.attributes = ""_UTsh;
310  if (true && ( (true&&!(((_curentry.type!=1)&&(_curentry.type!=3))||((_curentry.enable==0)))) ) )
311  graph->evalOpParmInst(_curentry.attributes, nodeidx, "attributes#", parmidx, offsets, time, 0, 2-1);
312  _curentry.attribvaltype = 0;
313  if (true && ( (true&&!(((_curentry.type!=3))||((_curentry.enable==0)))) ) )
314  graph->evalOpParmInst(_curentry.attribvaltype, nodeidx, "attribvaltype#", parmidx, offsets, time, 0, 2-1);
315  _curentry.attribfloatcomp = 0;
316  if (true && ( (true&&!(((_curentry.type!=3))||((_curentry.attribvaltype!=0))||((_curentry.enable==0)))) ) )
317  graph->evalOpParmInst(_curentry.attribfloatcomp, nodeidx, "attribfloatcomp#", parmidx, offsets, time, 0, 2-1);
318  _curentry.attribstringcomp = 0;
319  if (true && ( (true&&!(((_curentry.type!=3))||((_curentry.attribvaltype!=1))||((_curentry.enable==0)))) ) )
320  graph->evalOpParmInst(_curentry.attribstringcomp, nodeidx, "attribstringcomp#", parmidx, offsets, time, 0, 2-1);
321  _curentry.attribval = 0;
322  if (true && ( (true&&!(((_curentry.type!=3))||((_curentry.attribvaltype!=0))||((_curentry.enable==0)))) ) )
323  graph->evalOpParmInst(_curentry.attribval, nodeidx, "attribval#", parmidx, offsets, time, 0, 2-1);
324  _curentry.attribsval = ""_UTsh;
325  if (true && ( (true&&!(((_curentry.type!=3))||((_curentry.attribvaltype!=1))||((_curentry.enable==0)))) ) )
326  graph->evalOpParmInst(_curentry.attribsval, nodeidx, "attribsval#", parmidx, offsets, time, 0, 2-1);
327  _curentry.counttype = 0;
328  if (true && ( (true&&!(((_curentry.type!=2))||((_curentry.enable==0)))) ) )
329  graph->evalOpParmInst(_curentry.counttype, nodeidx, "counttype#", parmidx, offsets, time, 0, 2-1);
330  _curentry.countgroup = ""_UTsh;
331  if (true && ( (true&&!(((_curentry.type!=2))||((_curentry.enable==0)))) ) )
332  graph->evalOpParmInst(_curentry.countgroup, nodeidx, "countgroup#", parmidx, offsets, time, 0, 2-1);
333  _curentry.countcomp = 0;
334  if (true && ( (true&&!(((_curentry.type!=2))||((_curentry.enable==0)))) ) )
335  graph->evalOpParmInst(_curentry.countcomp, nodeidx, "countcomp#", parmidx, offsets, time, 0, 2-1);
336  _curentry.countval = 0;
337  if (true && ( (true&&!(((_curentry.type!=2))||((_curentry.enable==0)))) ) )
338  graph->evalOpParmInst(_curentry.countval, nodeidx, "countval#", parmidx, offsets, time, 0, 2-1);
339  _curentry.hasinputtype = 0;
340  if (true && ( (true&&!(((_curentry.type!=4))||((_curentry.enable==0)))) ) )
341  graph->evalOpParmInst(_curentry.hasinputtype, nodeidx, "hasinputtype#", parmidx, offsets, time, 0, 2-1);
342 
343  }
344  }
345  else
346  myTests.clear();
347 
348  }
349 
350 
351  void loadFromOpSubclass(const LoadParms &loadparms) override
352  {
353  buildFromOp(loadparms.graph(), loadparms.nodeIdx(), loadparms.context().getTime(), loadparms.depnode());
354  }
355 
356 
357  void copyFrom(const OP_NodeParms *src) override
358  {
359  *this = *((const SOP_SwitchIfParms *)src);
360  }
361 
362  template <typename T>
363  void
364  doGetParmValue(TempIndex idx, TempIndex instance, T &value) const
365  {
366  if (idx.size() < 1)
367  return;
368  UT_ASSERT(idx.size() == instance.size()+1);
369  if (idx.size() != instance.size()+1)
370  return;
371  switch (idx[0])
372  {
373  case 0:
374  coerceValue(value, myMergeCondition);
375  break;
376  case 1:
377  coerceValue(value, myTestInput);
378  break;
379  case 2:
380  if (idx.size() == 1)
381  coerceValue(value, myTests.entries());
382  else if (instance[0] < myTests.entries())
383  {
384  auto && _data = myTests(instance[0]);
385  switch (idx[1])
386  {
387  case 0:
388  coerceValue(value, _data.enable);
389  break;
390  case 1:
391  coerceValue(value, _data.type);
392  break;
393  case 2:
394  coerceValue(value, _data.expr);
395  break;
396  case 3:
397  coerceValue(value, _data.attribtype);
398  break;
399  case 4:
400  coerceValue(value, _data.attribowner);
401  break;
402  case 5:
403  coerceValue(value, _data.attributes);
404  break;
405  case 6:
406  coerceValue(value, _data.attribvaltype);
407  break;
408  case 7:
409  coerceValue(value, _data.attribfloatcomp);
410  break;
411  case 8:
412  coerceValue(value, _data.attribstringcomp);
413  break;
414  case 9:
415  coerceValue(value, _data.attribval);
416  break;
417  case 10:
418  coerceValue(value, _data.attribsval);
419  break;
420  case 11:
421  coerceValue(value, _data.counttype);
422  break;
423  case 12:
424  coerceValue(value, _data.countgroup);
425  break;
426  case 13:
427  coerceValue(value, _data.countcomp);
428  break;
429  case 14:
430  coerceValue(value, _data.countval);
431  break;
432  case 15:
433  coerceValue(value, _data.hasinputtype);
434  break;
435 
436  }
437  }
438  break;
439 
440  }
441  }
442 
443  bool isParmColorRamp(exint idx) const override
444  {
445  switch (idx)
446  {
447 
448  }
449  return false;
450  }
451 
452  void getNestParmValue(TempIndex idx, TempIndex instance, exint &value) const override
453  { doGetParmValue(idx, instance, value); }
454  void getNestParmValue(TempIndex idx, TempIndex instance, fpreal &value) const override
455  { doGetParmValue(idx, instance, value); }
456  void getNestParmValue(TempIndex idx, TempIndex instance, UT_Vector2D &value) const override
457  { doGetParmValue(idx, instance, value); }
458  void getNestParmValue(TempIndex idx, TempIndex instance, UT_Vector3D &value) const override
459  { doGetParmValue(idx, instance, value); }
460  void getNestParmValue(TempIndex idx, TempIndex instance, UT_Vector4D &value) const override
461  { doGetParmValue(idx, instance, value); }
462  void getNestParmValue(TempIndex idx, TempIndex instance, UT_Matrix2D &value) const override
463  { doGetParmValue(idx, instance, value); }
464  void getNestParmValue(TempIndex idx, TempIndex instance, UT_Matrix3D &value) const override
465  { doGetParmValue(idx, instance, value); }
466  void getNestParmValue(TempIndex idx, TempIndex instance, UT_Matrix4D &value) const override
467  { doGetParmValue(idx, instance, value); }
468  void getNestParmValue(TempIndex idx, TempIndex instance, UT_StringHolder &value) const override
469  { doGetParmValue(idx, instance, value); }
470  void getNestParmValue(TempIndex idx, TempIndex instance, UT_SharedPtr<UT_Ramp> &value) const override
471  { doGetParmValue(idx, instance, value); }
472  void getNestParmValue(TempIndex idx, TempIndex instance, PRM_DataItemHandle &value) const override
473  { doGetParmValue(idx, instance, value); }
474 
475  template <typename T>
476  void
477  doSetParmValue(TempIndex idx, TempIndex instance, const T &value)
478  {
479  if (idx.size() < 1)
480  return;
481  UT_ASSERT(idx.size() == instance.size()+1);
482  if (idx.size() != instance.size()+1)
483  return;
484  switch (idx[0])
485  {
486  case 0:
487  coerceValue(myMergeCondition, clampMinValue(0, clampMaxValue(3, value ) ));
488  break;
489  case 1:
490  coerceValue(myTestInput, clampMinValue(0, clampMaxValue(2, value ) ));
491  break;
492  case 2:
493  if (idx.size() == 1)
494  {
495  exint newsize;
496  coerceValue(newsize, value);
497  if (newsize < 0) newsize = 0;
498  myTests.setSize(newsize);
499  }
500  else
501  {
502  if (instance[0] < 0)
503  return;
504  myTests.setSizeIfNeeded(instance[0]+1);
505  auto && _data = myTests(instance[0]);
506  switch (idx[1])
507  {
508  case 0:
509  coerceValue(_data.enable, value);
510  break;
511  case 1:
512  coerceValue(_data.type, value);
513  break;
514  case 2:
515  coerceValue(_data.expr, value);
516  break;
517  case 3:
518  coerceValue(_data.attribtype, value);
519  break;
520  case 4:
521  coerceValue(_data.attribowner, value);
522  break;
523  case 5:
524  coerceValue(_data.attributes, value);
525  break;
526  case 6:
527  coerceValue(_data.attribvaltype, value);
528  break;
529  case 7:
530  coerceValue(_data.attribfloatcomp, value);
531  break;
532  case 8:
533  coerceValue(_data.attribstringcomp, value);
534  break;
535  case 9:
536  coerceValue(_data.attribval, value);
537  break;
538  case 10:
539  coerceValue(_data.attribsval, value);
540  break;
541  case 11:
542  coerceValue(_data.counttype, value);
543  break;
544  case 12:
545  coerceValue(_data.countgroup, value);
546  break;
547  case 13:
548  coerceValue(_data.countcomp, value);
549  break;
550  case 14:
551  coerceValue(_data.countval, value);
552  break;
553  case 15:
554  coerceValue(_data.hasinputtype, value);
555  break;
556 
557  }
558  }
559  break;
560 
561  }
562  }
563 
564  void setNestParmValue(TempIndex idx, TempIndex instance, const exint &value) override
565  { doSetParmValue(idx, instance, value); }
566  void setNestParmValue(TempIndex idx, TempIndex instance, const fpreal &value) override
567  { doSetParmValue(idx, instance, value); }
568  void setNestParmValue(TempIndex idx, TempIndex instance, const UT_Vector2D &value) override
569  { doSetParmValue(idx, instance, value); }
570  void setNestParmValue(TempIndex idx, TempIndex instance, const UT_Vector3D &value) override
571  { doSetParmValue(idx, instance, value); }
572  void setNestParmValue(TempIndex idx, TempIndex instance, const UT_Vector4D &value) override
573  { doSetParmValue(idx, instance, value); }
574  void setNestParmValue(TempIndex idx, TempIndex instance, const UT_Matrix2D &value) override
575  { doSetParmValue(idx, instance, value); }
576  void setNestParmValue(TempIndex idx, TempIndex instance, const UT_Matrix3D &value) override
577  { doSetParmValue(idx, instance, value); }
578  void setNestParmValue(TempIndex idx, TempIndex instance, const UT_Matrix4D &value) override
579  { doSetParmValue(idx, instance, value); }
580  void setNestParmValue(TempIndex idx, TempIndex instance, const UT_StringHolder &value) override
581  { doSetParmValue(idx, instance, value); }
582  void setNestParmValue(TempIndex idx, TempIndex instance, const UT_SharedPtr<UT_Ramp> &value) override
583  { doSetParmValue(idx, instance, value); }
584  void setNestParmValue(TempIndex idx, TempIndex instance, const PRM_DataItemHandle &value) override
585  { doSetParmValue(idx, instance, value); }
586 
587  exint getNestNumParms(TempIndex idx) const override
588  {
589  if (idx.size() == 0)
590  return 3;
591  switch (idx[0])
592  {
593  case 2:
594  return 16;
595 
596  }
597  // Invalid
598  return 0;
599  }
600 
601  const char *getNestParmName(TempIndex fieldnum) const override
602  {
603  if (fieldnum.size() < 1)
604  return 0;
605  switch (fieldnum[0])
606  {
607  case 0:
608  return "mergecondition";
609  case 1:
610  return "testinput";
611  case 2:
612  if (fieldnum.size() == 1)
613  return "tests";
614  switch (fieldnum[1])
615  {
616  case 0:
617  return "enable#";
618  case 1:
619  return "type#";
620  case 2:
621  return "expr#";
622  case 3:
623  return "attribtype#";
624  case 4:
625  return "attribowner#";
626  case 5:
627  return "attributes#";
628  case 6:
629  return "attribvaltype#";
630  case 7:
631  return "attribfloatcomp#";
632  case 8:
633  return "attribstringcomp#";
634  case 9:
635  return "attribval#";
636  case 10:
637  return "attribsval#";
638  case 11:
639  return "counttype#";
640  case 12:
641  return "countgroup#";
642  case 13:
643  return "countcomp#";
644  case 14:
645  return "countval#";
646  case 15:
647  return "hasinputtype#";
648 
649  }
650  return 0;
651 
652  }
653  return 0;
654  }
655 
656  ParmType getNestParmType(TempIndex fieldnum) const override
657  {
658  if (fieldnum.size() < 1)
659  return PARM_UNSUPPORTED;
660  switch (fieldnum[0])
661  {
662  case 0:
663  return PARM_INTEGER;
664  case 1:
665  return PARM_INTEGER;
666  case 2:
667  if (fieldnum.size() == 1)
668  return PARM_MULTIPARM;
669  switch (fieldnum[1])
670  {
671  case 0:
672  return PARM_INTEGER;
673  case 1:
674  return PARM_INTEGER;
675  case 2:
676  return PARM_INTEGER;
677  case 3:
678  return PARM_INTEGER;
679  case 4:
680  return PARM_INTEGER;
681  case 5:
682  return PARM_STRING;
683  case 6:
684  return PARM_INTEGER;
685  case 7:
686  return PARM_INTEGER;
687  case 8:
688  return PARM_INTEGER;
689  case 9:
690  return PARM_FLOAT;
691  case 10:
692  return PARM_STRING;
693  case 11:
694  return PARM_INTEGER;
695  case 12:
696  return PARM_STRING;
697  case 13:
698  return PARM_INTEGER;
699  case 14:
700  return PARM_INTEGER;
701  case 15:
702  return PARM_INTEGER;
703 
704  }
705  return PARM_UNSUPPORTED;
706 
707  }
708  return PARM_UNSUPPORTED;
709  }
710 
711  // Boiler plate to load individual types.
712  static void loadData(UT_IStream &is, int64 &v)
713  { is.bread(&v, 1); }
714  static void loadData(UT_IStream &is, bool &v)
715  { int64 iv; is.bread(&iv, 1); v = iv; }
716  static void loadData(UT_IStream &is, fpreal64 &v)
717  { is.bread<fpreal64>(&v, 1); }
718  static void loadData(UT_IStream &is, UT_Vector2D &v)
719  { is.bread<fpreal64>(&v.x(), 1); is.bread<fpreal64>(&v.y(), 1); }
720  static void loadData(UT_IStream &is, UT_Vector3D &v)
721  { is.bread<fpreal64>(&v.x(), 1); is.bread<fpreal64>(&v.y(), 1);
722  is.bread<fpreal64>(&v.z(), 1); }
723  static void loadData(UT_IStream &is, UT_Vector4D &v)
724  { is.bread<fpreal64>(&v.x(), 1); is.bread<fpreal64>(&v.y(), 1);
725  is.bread<fpreal64>(&v.z(), 1); is.bread<fpreal64>(&v.w(), 1); }
726  static void loadData(UT_IStream &is, UT_Matrix2D &v)
727  { for (int r = 0; r < 2; r++) for (int c = 0; c < 2; c++) is.bread<fpreal64>(&v(r, c), 1); }
728  static void loadData(UT_IStream &is, UT_Matrix3D &v)
729  { for (int r = 0; r < 3; r++) for (int c = 0; c < 3; c++) is.bread<fpreal64>(&v(r, c), 1); }
730  static void loadData(UT_IStream &is, UT_Matrix4D &v)
731  { for (int r = 0; r < 4; r++) for (int c = 0; c < 4; c++) is.bread<fpreal64>(&v(r, c), 1); }
732  static void loadData(UT_IStream &is, UT_Vector2I &v)
733  { is.bread<int64>(&v.x(), 1); is.bread<int64>(&v.y(), 1); }
734  static void loadData(UT_IStream &is, UT_Vector3I &v)
735  { is.bread<int64>(&v.x(), 1); is.bread<int64>(&v.y(), 1);
736  is.bread<int64>(&v.z(), 1); }
737  static void loadData(UT_IStream &is, UT_Vector4I &v)
738  { is.bread<int64>(&v.x(), 1); is.bread<int64>(&v.y(), 1);
739  is.bread<int64>(&v.z(), 1); is.bread<int64>(&v.w(), 1); }
741  { is.bread(v); }
743  { UT_StringHolder rampdata;
744  loadData(is, rampdata);
745  if (rampdata.isstring())
746  {
747  v.reset(new UT_Ramp());
748  UT_IStream istr((const char *) rampdata, rampdata.length(), UT_ISTREAM_ASCII);
749  v->load(istr);
750  }
751  else v.reset();
752  }
755  loadData(is, data);
756  if (data.isstring())
757  {
758  // Find the data type.
759  const char *colon = UT_StringWrap(data).findChar(':');
760  if (colon)
761  {
762  int typelen = colon - data.buffer();
764  type.strncpy(data.buffer(), typelen);
765  UT_IStream istr(((const char *) data) + typelen + 1, data.length() - (typelen + 1), UT_ISTREAM_BINARY);
766 
767  v = PRM_DataFactory::parseBinary(type.buffer(), istr);
768  }
769  }
770  else v.reset();
771  }
772 
773  static void saveData(std::ostream &os, int64 v)
774  { UTwrite(os, &v); }
775  static void saveData(std::ostream &os, bool v)
776  { int64 iv = v; UTwrite(os, &iv); }
777  static void saveData(std::ostream &os, fpreal64 v)
778  { UTwrite<fpreal64>(os, &v); }
779  static void saveData(std::ostream &os, UT_Vector2D v)
780  { UTwrite<fpreal64>(os, &v.x()); UTwrite<fpreal64>(os, &v.y()); }
781  static void saveData(std::ostream &os, UT_Vector3D v)
782  { UTwrite<fpreal64>(os, &v.x()); UTwrite<fpreal64>(os, &v.y());
783  UTwrite<fpreal64>(os, &v.z()); }
784  static void saveData(std::ostream &os, UT_Vector4D v)
785  { UTwrite<fpreal64>(os, &v.x()); UTwrite<fpreal64>(os, &v.y());
786  UTwrite<fpreal64>(os, &v.z()); UTwrite<fpreal64>(os, &v.w()); }
787  static void saveData(std::ostream &os, UT_Matrix2D v)
789  static void saveData(std::ostream &os, UT_Matrix3D v)
791  static void saveData(std::ostream &os, UT_Matrix4D v)
793  static void saveData(std::ostream &os, UT_StringHolder s)
794  { UT_StringWrap(s).saveBinary(os); }
795  static void saveData(std::ostream &os, UT_SharedPtr<UT_Ramp> s)
797  UT_OStringStream ostr;
798  if (s) s->save(ostr);
799  result = ostr.str();
800  saveData(os, result);
801  }
802  static void saveData(std::ostream &os, PRM_DataItemHandle s)
804  UT_OStringStream ostr;
805  if (s)
806  {
807  ostr << s->getDataTypeToken();
808  ostr << ":";
809  s->saveBinary(ostr);
810  }
811  result = ostr.str();
812  saveData(os, result);
813  }
814 
815 
816  void save(std::ostream &os) const
817  {
818  int32 v = version();
819  UTwrite(os, &v);
820  saveData(os, myMergeCondition);
821  saveData(os, myTestInput);
822  {
823  int64 length = myTests.entries();
824  UTwrite(os, &length);
825  for (exint i = 0; i < length; i++)
826  {
827  auto && _curentry = myTests(i);
828  (void) _curentry;
829  saveData(os, _curentry.enable);
830  saveData(os, _curentry.type);
831  saveData(os, _curentry.expr);
832  saveData(os, _curentry.attribtype);
833  saveData(os, _curentry.attribowner);
834  saveData(os, _curentry.attributes);
835  saveData(os, _curentry.attribvaltype);
836  saveData(os, _curentry.attribfloatcomp);
837  saveData(os, _curentry.attribstringcomp);
838  saveData(os, _curentry.attribval);
839  saveData(os, _curentry.attribsval);
840  saveData(os, _curentry.counttype);
841  saveData(os, _curentry.countgroup);
842  saveData(os, _curentry.countcomp);
843  saveData(os, _curentry.countval);
844  saveData(os, _curentry.hasinputtype);
845 
846  }
847  }
848 
849  }
850 
851  bool load(UT_IStream &is)
852  {
853  int32 v;
854  is.bread(&v, 1);
855  if (version() != v)
856  {
857  // Fail incompatible versions
858  return false;
859  }
860  loadData(is, myMergeCondition);
861  loadData(is, myTestInput);
862  {
863  int64 length;
864  is.read(&length, 1);
865  myTests.setSize(length);
866  for (exint i = 0; i < length; i++)
867  {
868  auto && _curentry = myTests(i);
869  (void) _curentry;
870  loadData(is, _curentry.enable);
871  loadData(is, _curentry.type);
872  loadData(is, _curentry.expr);
873  loadData(is, _curentry.attribtype);
874  loadData(is, _curentry.attribowner);
875  loadData(is, _curentry.attributes);
876  loadData(is, _curentry.attribvaltype);
877  loadData(is, _curentry.attribfloatcomp);
878  loadData(is, _curentry.attribstringcomp);
879  loadData(is, _curentry.attribval);
880  loadData(is, _curentry.attribsval);
881  loadData(is, _curentry.counttype);
882  loadData(is, _curentry.countgroup);
883  loadData(is, _curentry.countcomp);
884  loadData(is, _curentry.countval);
885  loadData(is, _curentry.hasinputtype);
886 
887  }
888  }
889 
890  return true;
891  }
892 
893  MergeCondition getMergeCondition() const { return MergeCondition(myMergeCondition); }
894  void setMergeCondition(MergeCondition val) { myMergeCondition = int64(val); }
896  {
897  SOP_Node *thissop = cookparms.getNode();
898  if (!thissop) return getMergeCondition();
899  int64 result;
900  OP_Utils::evalOpParm(result, thissop, "mergecondition", cookparms.getCookTime(), 0);
901  return MergeCondition(result);
902  }
903  TestInput getTestInput() const { return TestInput(myTestInput); }
904  void setTestInput(TestInput val) { myTestInput = int64(val); }
906  {
907  SOP_Node *thissop = cookparms.getNode();
908  if (!thissop) return getTestInput();
909  int64 result;
910  OP_Utils::evalOpParm(result, thissop, "testinput", cookparms.getCookTime(), 0);
911  return TestInput(result);
912  }
913  const UT_Array<Tests> &getTests() const { return myTests; }
914 void setTests(const UT_Array<Tests> &val) { myTests = val; }
915  exint opTests(const SOP_NodeVerb::CookParms &cookparms) const
916  {
917  SOP_Node *thissop = cookparms.getNode();
918  if (!thissop) return getTests().entries();
919  exint result;
920  OP_Utils::evalOpParm(result, thissop, "tests", cookparms.getCookTime(), 0);
921  return result;
922  }
923  bool opTests_enable(const SOP_NodeVerb::CookParms &cookparms, int _idx) const
924  { return opinstTests_enable(cookparms, &_idx); }
925  bool opinstTests_enable(const SOP_NodeVerb::CookParms &cookparms, const int *_idx) const
926  {
927  SOP_Node *thissop = cookparms.getNode();
928  if (!thissop) return (myTests(_idx[0]).enable);
929  int _parmidx[2-1];
930  _parmidx[1-1] = _idx[1-1] + 1;
931 
932  bool result;
933  OP_Utils::evalOpParmInst(result, thissop, "enable#", _parmidx, cookparms.getCookTime(), 0, 2-1);
934  return (result);
935  }
936  int64 opTests_type(const SOP_NodeVerb::CookParms &cookparms, int _idx) const
937  { return opinstTests_type(cookparms, &_idx); }
938  int64 opinstTests_type(const SOP_NodeVerb::CookParms &cookparms, const int *_idx) const
939  {
940  SOP_Node *thissop = cookparms.getNode();
941  if (!thissop) return (myTests(_idx[0]).type);
942  int _parmidx[2-1];
943  _parmidx[1-1] = _idx[1-1] + 1;
944 
945  int64 result;
946  OP_Utils::evalOpParmInst(result, thissop, "type#", _parmidx, cookparms.getCookTime(), 0, 2-1);
947  return (result);
948  }
949  int64 opTests_expr(const SOP_NodeVerb::CookParms &cookparms, int _idx) const
950  { return opinstTests_expr(cookparms, &_idx); }
951  int64 opinstTests_expr(const SOP_NodeVerb::CookParms &cookparms, const int *_idx) const
952  {
953  SOP_Node *thissop = cookparms.getNode();
954  if (!thissop) return (myTests(_idx[0]).expr);
955  int _parmidx[2-1];
956  _parmidx[1-1] = _idx[1-1] + 1;
957 
958  int64 result;
959  OP_Utils::evalOpParmInst(result, thissop, "expr#", _parmidx, cookparms.getCookTime(), 0, 2-1);
960  return (result);
961  }
962  int64 opTests_attribtype(const SOP_NodeVerb::CookParms &cookparms, int _idx) const
963  { return opinstTests_attribtype(cookparms, &_idx); }
964  int64 opinstTests_attribtype(const SOP_NodeVerb::CookParms &cookparms, const int *_idx) const
965  {
966  SOP_Node *thissop = cookparms.getNode();
967  if (!thissop) return (myTests(_idx[0]).attribtype);
968  int _parmidx[2-1];
969  _parmidx[1-1] = _idx[1-1] + 1;
970 
971  int64 result;
972  OP_Utils::evalOpParmInst(result, thissop, "attribtype#", _parmidx, cookparms.getCookTime(), 0, 2-1);
973  return (result);
974  }
975  int64 opTests_attribowner(const SOP_NodeVerb::CookParms &cookparms, int _idx) const
976  { return opinstTests_attribowner(cookparms, &_idx); }
977  int64 opinstTests_attribowner(const SOP_NodeVerb::CookParms &cookparms, const int *_idx) const
978  {
979  SOP_Node *thissop = cookparms.getNode();
980  if (!thissop) return (myTests(_idx[0]).attribowner);
981  int _parmidx[2-1];
982  _parmidx[1-1] = _idx[1-1] + 1;
983 
984  int64 result;
985  OP_Utils::evalOpParmInst(result, thissop, "attribowner#", _parmidx, cookparms.getCookTime(), 0, 2-1);
986  return (result);
987  }
989  { return opinstTests_attributes(cookparms, &_idx); }
990  UT_StringHolder opinstTests_attributes(const SOP_NodeVerb::CookParms &cookparms, const int *_idx) const
991  {
992  SOP_Node *thissop = cookparms.getNode();
993  if (!thissop) return (myTests(_idx[0]).attributes);
994  int _parmidx[2-1];
995  _parmidx[1-1] = _idx[1-1] + 1;
996 
998  OP_Utils::evalOpParmInst(result, thissop, "attributes#", _parmidx, cookparms.getCookTime(), 0, 2-1);
999  return (result);
1000  }
1001  int64 opTests_attribvaltype(const SOP_NodeVerb::CookParms &cookparms, int _idx) const
1002  { return opinstTests_attribvaltype(cookparms, &_idx); }
1003  int64 opinstTests_attribvaltype(const SOP_NodeVerb::CookParms &cookparms, const int *_idx) const
1004  {
1005  SOP_Node *thissop = cookparms.getNode();
1006  if (!thissop) return (myTests(_idx[0]).attribvaltype);
1007  int _parmidx[2-1];
1008  _parmidx[1-1] = _idx[1-1] + 1;
1009 
1010  int64 result;
1011  OP_Utils::evalOpParmInst(result, thissop, "attribvaltype#", _parmidx, cookparms.getCookTime(), 0, 2-1);
1012  return (result);
1013  }
1014  int64 opTests_attribfloatcomp(const SOP_NodeVerb::CookParms &cookparms, int _idx) const
1015  { return opinstTests_attribfloatcomp(cookparms, &_idx); }
1016  int64 opinstTests_attribfloatcomp(const SOP_NodeVerb::CookParms &cookparms, const int *_idx) const
1017  {
1018  SOP_Node *thissop = cookparms.getNode();
1019  if (!thissop) return (myTests(_idx[0]).attribfloatcomp);
1020  int _parmidx[2-1];
1021  _parmidx[1-1] = _idx[1-1] + 1;
1022 
1023  int64 result;
1024  OP_Utils::evalOpParmInst(result, thissop, "attribfloatcomp#", _parmidx, cookparms.getCookTime(), 0, 2-1);
1025  return (result);
1026  }
1027  int64 opTests_attribstringcomp(const SOP_NodeVerb::CookParms &cookparms, int _idx) const
1028  { return opinstTests_attribstringcomp(cookparms, &_idx); }
1029  int64 opinstTests_attribstringcomp(const SOP_NodeVerb::CookParms &cookparms, const int *_idx) const
1030  {
1031  SOP_Node *thissop = cookparms.getNode();
1032  if (!thissop) return (myTests(_idx[0]).attribstringcomp);
1033  int _parmidx[2-1];
1034  _parmidx[1-1] = _idx[1-1] + 1;
1035 
1036  int64 result;
1037  OP_Utils::evalOpParmInst(result, thissop, "attribstringcomp#", _parmidx, cookparms.getCookTime(), 0, 2-1);
1038  return (result);
1039  }
1040  fpreal64 opTests_attribval(const SOP_NodeVerb::CookParms &cookparms, int _idx) const
1041  { return opinstTests_attribval(cookparms, &_idx); }
1042  fpreal64 opinstTests_attribval(const SOP_NodeVerb::CookParms &cookparms, const int *_idx) const
1043  {
1044  SOP_Node *thissop = cookparms.getNode();
1045  if (!thissop) return (myTests(_idx[0]).attribval);
1046  int _parmidx[2-1];
1047  _parmidx[1-1] = _idx[1-1] + 1;
1048 
1049  fpreal64 result;
1050  OP_Utils::evalOpParmInst(result, thissop, "attribval#", _parmidx, cookparms.getCookTime(), 0, 2-1);
1051  return (result);
1052  }
1054  { return opinstTests_attribsval(cookparms, &_idx); }
1055  UT_StringHolder opinstTests_attribsval(const SOP_NodeVerb::CookParms &cookparms, const int *_idx) const
1056  {
1057  SOP_Node *thissop = cookparms.getNode();
1058  if (!thissop) return (myTests(_idx[0]).attribsval);
1059  int _parmidx[2-1];
1060  _parmidx[1-1] = _idx[1-1] + 1;
1061 
1063  OP_Utils::evalOpParmInst(result, thissop, "attribsval#", _parmidx, cookparms.getCookTime(), 0, 2-1);
1064  return (result);
1065  }
1066  int64 opTests_counttype(const SOP_NodeVerb::CookParms &cookparms, int _idx) const
1067  { return opinstTests_counttype(cookparms, &_idx); }
1068  int64 opinstTests_counttype(const SOP_NodeVerb::CookParms &cookparms, const int *_idx) const
1069  {
1070  SOP_Node *thissop = cookparms.getNode();
1071  if (!thissop) return (myTests(_idx[0]).counttype);
1072  int _parmidx[2-1];
1073  _parmidx[1-1] = _idx[1-1] + 1;
1074 
1075  int64 result;
1076  OP_Utils::evalOpParmInst(result, thissop, "counttype#", _parmidx, cookparms.getCookTime(), 0, 2-1);
1077  return (result);
1078  }
1080  { return opinstTests_countgroup(cookparms, &_idx); }
1081  UT_StringHolder opinstTests_countgroup(const SOP_NodeVerb::CookParms &cookparms, const int *_idx) const
1082  {
1083  SOP_Node *thissop = cookparms.getNode();
1084  if (!thissop) return (myTests(_idx[0]).countgroup);
1085  int _parmidx[2-1];
1086  _parmidx[1-1] = _idx[1-1] + 1;
1087 
1089  OP_Utils::evalOpParmInst(result, thissop, "countgroup#", _parmidx, cookparms.getCookTime(), 0, 2-1);
1090  return (result);
1091  }
1092  int64 opTests_countcomp(const SOP_NodeVerb::CookParms &cookparms, int _idx) const
1093  { return opinstTests_countcomp(cookparms, &_idx); }
1094  int64 opinstTests_countcomp(const SOP_NodeVerb::CookParms &cookparms, const int *_idx) const
1095  {
1096  SOP_Node *thissop = cookparms.getNode();
1097  if (!thissop) return (myTests(_idx[0]).countcomp);
1098  int _parmidx[2-1];
1099  _parmidx[1-1] = _idx[1-1] + 1;
1100 
1101  int64 result;
1102  OP_Utils::evalOpParmInst(result, thissop, "countcomp#", _parmidx, cookparms.getCookTime(), 0, 2-1);
1103  return (result);
1104  }
1105  int64 opTests_countval(const SOP_NodeVerb::CookParms &cookparms, int _idx) const
1106  { return opinstTests_countval(cookparms, &_idx); }
1107  int64 opinstTests_countval(const SOP_NodeVerb::CookParms &cookparms, const int *_idx) const
1108  {
1109  SOP_Node *thissop = cookparms.getNode();
1110  if (!thissop) return (myTests(_idx[0]).countval);
1111  int _parmidx[2-1];
1112  _parmidx[1-1] = _idx[1-1] + 1;
1113 
1114  int64 result;
1115  OP_Utils::evalOpParmInst(result, thissop, "countval#", _parmidx, cookparms.getCookTime(), 0, 2-1);
1116  return (result);
1117  }
1118  int64 opTests_hasinputtype(const SOP_NodeVerb::CookParms &cookparms, int _idx) const
1119  { return opinstTests_hasinputtype(cookparms, &_idx); }
1120  int64 opinstTests_hasinputtype(const SOP_NodeVerb::CookParms &cookparms, const int *_idx) const
1121  {
1122  SOP_Node *thissop = cookparms.getNode();
1123  if (!thissop) return (myTests(_idx[0]).hasinputtype);
1124  int _parmidx[2-1];
1125  _parmidx[1-1] = _idx[1-1] + 1;
1126 
1127  int64 result;
1128  OP_Utils::evalOpParmInst(result, thissop, "hasinputtype#", _parmidx, cookparms.getCookTime(), 0, 2-1);
1129  return (result);
1130  }
1131 
1132 
1133 private:
1134  int64 myMergeCondition;
1135  int64 myTestInput;
1136  UT_Array<Tests> myTests;
1137 
1138 };
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)
T clampMaxValue(fpreal maxvalue, const T &src) const
Definition: OP_NodeParms.h:315
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
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
T clampMinValue(fpreal minvalue, const T &src) const
Definition: OP_NodeParms.h:308
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
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 coerceValue(T &result, const S &src) const
Definition: OP_NodeParms.h:301
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)
int64 opTests_attribfloatcomp(const SOP_NodeVerb::CookParms &cookparms, int _idx) const
Utility class for containing a color ramp.
Definition: UT_Ramp.h:88
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:1385
#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:89
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
OP_NodeParms & operator=(const OP_NodeParms &)=default
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