HDK
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
SOP_GroupFindPath.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_GroupFindPathEnums
24 {
25  enum class Grouptype
26  {
27  AUTO = 0,
28  EDGES,
29  POINTS,
30  PRIMS,
31  VERTICES
32  };
33 
35  getToken(Grouptype enum_value)
36  {
37  using namespace UT::Literal;
38  switch (enum_value) {
39  case Grouptype::AUTO: return "auto"_sh;
40  case Grouptype::EDGES: return "edges"_sh;
41  case Grouptype::POINTS: return "points"_sh;
42  case Grouptype::PRIMS: return "prims"_sh;
43  case Grouptype::VERTICES: return "vertices"_sh;
44  default: UT_ASSERT(false); return ""_sh;
45  }
46  }
47 
48  enum class Pathcontroltype
49  {
50  CONTROLS = 0,
51  STARTS,
52  STARTEND
53  };
54 
57  {
58  using namespace UT::Literal;
59  switch (enum_value) {
60  case Pathcontroltype::CONTROLS: return "controls"_sh;
61  case Pathcontroltype::STARTS: return "starts"_sh;
62  case Pathcontroltype::STARTEND: return "startend"_sh;
63  default: UT_ASSERT(false); return ""_sh;
64  }
65  }
66 
67  enum class Operation
68  {
69  PATH = 0,
72  };
73 
75  getToken(Operation enum_value)
76  {
77  using namespace UT::Literal;
78  switch (enum_value) {
79  case Operation::PATH: return "path"_sh;
80  case Operation::EXTENDEDPATH: return "extendedpath"_sh;
81  case Operation::CLOSEDPATH: return "closedpath"_sh;
82  default: UT_ASSERT(false); return ""_sh;
83  }
84  }
85 
86  enum class Edgestyle
87  {
88  AUTO = 0,
89  LOOP,
90  RING
91  };
92 
94  getToken(Edgestyle enum_value)
95  {
96  using namespace UT::Literal;
97  switch (enum_value) {
98  case Edgestyle::AUTO: return "auto"_sh;
99  case Edgestyle::LOOP: return "loop"_sh;
100  case Edgestyle::RING: return "ring"_sh;
101  default: UT_ASSERT(false); return ""_sh;
102  }
103  }
104 
105  enum class Colgrouptype
106  {
107  AUTO = 0,
108  EDGES,
109  POINTS,
110  PRIMS,
111  VERTICES
112  };
113 
115  getToken(Colgrouptype enum_value)
116  {
117  using namespace UT::Literal;
118  switch (enum_value) {
119  case Colgrouptype::AUTO: return "auto"_sh;
120  case Colgrouptype::EDGES: return "edges"_sh;
121  case Colgrouptype::POINTS: return "points"_sh;
122  case Colgrouptype::PRIMS: return "prims"_sh;
123  case Colgrouptype::VERTICES: return "vertices"_sh;
124  default: UT_ASSERT(false); return ""_sh;
125  }
126  }
127 
128 }
129 
130 
132 {
133 public:
134  static int version() { return 1; }
135 
137  {
138  myOutgroup = ""_UTsh;
139  myGroup = ""_UTsh;
140  myGrouptype = 0;
141  myPathcontroltype = 0;
142  myOperation = 0;
143  myAvoidprevious = true;
144  myEdgestyle = 0;
145  myUseuvattrib = false;
146  myUvattrib = "uv"_UTsh;
147  myUsecolgroup = false;
148  myColgroup = ""_UTsh;
149  myColgrouptype = 0;
150  myColgroupinvert = false;
151  myColgrouponbnd = false;
152 
153  }
154 
155  explicit SOP_GroupFindPathParms(const SOP_GroupFindPathParms &) = default;
157  SOP_GroupFindPathParms(SOP_GroupFindPathParms &&) noexcept = default;
158  SOP_GroupFindPathParms &operator=(SOP_GroupFindPathParms &&) noexcept = default;
159 
160  ~SOP_GroupFindPathParms() override {}
161 
163  {
164  if (myOutgroup != src.myOutgroup) return false;
165  if (myGroup != src.myGroup) return false;
166  if (myGrouptype != src.myGrouptype) return false;
167  if (myPathcontroltype != src.myPathcontroltype) return false;
168  if (myOperation != src.myOperation) return false;
169  if (myAvoidprevious != src.myAvoidprevious) return false;
170  if (myEdgestyle != src.myEdgestyle) return false;
171  if (myUseuvattrib != src.myUseuvattrib) return false;
172  if (myUvattrib != src.myUvattrib) return false;
173  if (myUsecolgroup != src.myUsecolgroup) return false;
174  if (myColgroup != src.myColgroup) return false;
175  if (myColgrouptype != src.myColgrouptype) return false;
176  if (myColgroupinvert != src.myColgroupinvert) return false;
177  if (myColgrouponbnd != src.myColgrouponbnd) return false;
178 
179  return true;
180  }
182  {
183  return !operator==(src);
184  }
190 
191 
192 
193  void buildFromOp(const OP_GraphProxy *graph, exint nodeidx, fpreal time, DEP_MicroNode *depnode)
194  {
195  myOutgroup = ""_UTsh;
196  if (true)
197  graph->evalOpParm(myOutgroup, nodeidx, "outgroup", time, 0);
198  myGroup = ""_UTsh;
199  if (true)
200  graph->evalOpParm(myGroup, nodeidx, "group", time, 0);
201  myGrouptype = 0;
202  if (true)
203  graph->evalOpParm(myGrouptype, nodeidx, "grouptype", time, 0);
204  myPathcontroltype = 0;
205  if (true)
206  graph->evalOpParm(myPathcontroltype, nodeidx, "pathcontroltype", time, 0);
207  myOperation = 0;
208  if (true)
209  graph->evalOpParm(myOperation, nodeidx, "operation", time, 0);
210  myAvoidprevious = true;
211  if (true)
212  graph->evalOpParm(myAvoidprevious, nodeidx, "avoidprevious", time, 0);
213  myEdgestyle = 0;
214  if (true && ( (true&&!(((int64(getGrouptype())==2))||((int64(getGrouptype())==3))||((int64(getGrouptype())==4)))) ) )
215  graph->evalOpParm(myEdgestyle, nodeidx, "edgestyle", time, 0);
216  myUseuvattrib = false;
217  if (true)
218  graph->evalOpParm(myUseuvattrib, nodeidx, "useuvattrib", time, 0);
219  myUvattrib = "uv"_UTsh;
220  if (true && ( (true&&!(((getUseuvattrib()==0)))) ) )
221  graph->evalOpParm(myUvattrib, nodeidx, "uvattrib", time, 0);
222  myUsecolgroup = false;
223  if (true)
224  graph->evalOpParm(myUsecolgroup, nodeidx, "usecolgroup", time, 0);
225  myColgroup = ""_UTsh;
226  if (true && ( (true&&!(((getUsecolgroup()==0)))) ) )
227  graph->evalOpParm(myColgroup, nodeidx, "colgroup", time, 0);
228  myColgrouptype = 0;
229  if (true && ( (true&&!(((getUsecolgroup()==0)))) ) )
230  graph->evalOpParm(myColgrouptype, nodeidx, "colgrouptype", time, 0);
231  myColgroupinvert = false;
232  if (true && ( (true&&!(((getUsecolgroup()==0)))) ) )
233  graph->evalOpParm(myColgroupinvert, nodeidx, "colgroupinvert", time, 0);
234  myColgrouponbnd = false;
235  if (true && ( (true&&!(((getUsecolgroup()==0))||((getColgroupinvert()==1)))) ) )
236  graph->evalOpParm(myColgrouponbnd, nodeidx, "colgrouponbnd", time, 0);
237 
238  }
239 
240 
241  void loadFromOpSubclass(const LoadParms &loadparms) override
242  {
243  buildFromOp(loadparms.graph(), loadparms.nodeIdx(), loadparms.context().getTime(), loadparms.depnode());
244  }
245 
246 
247  void copyFrom(const OP_NodeParms *src) override
248  {
249  *this = *((const SOP_GroupFindPathParms *)src);
250  }
251 
252  template <typename T>
253  void
254  doGetParmValue(TempIndex idx, TempIndex instance, T &value) const
255  {
256  if (idx.size() < 1)
257  return;
258  UT_ASSERT(idx.size() == instance.size()+1);
259  if (idx.size() != instance.size()+1)
260  return;
261  switch (idx[0])
262  {
263  case 0:
264  coerceValue(value, myOutgroup);
265  break;
266  case 1:
267  coerceValue(value, myGroup);
268  break;
269  case 2:
270  coerceValue(value, myGrouptype);
271  break;
272  case 3:
273  coerceValue(value, myPathcontroltype);
274  break;
275  case 4:
276  coerceValue(value, myOperation);
277  break;
278  case 5:
279  coerceValue(value, myAvoidprevious);
280  break;
281  case 6:
282  coerceValue(value, myEdgestyle);
283  break;
284  case 7:
285  coerceValue(value, myUseuvattrib);
286  break;
287  case 8:
288  coerceValue(value, myUvattrib);
289  break;
290  case 9:
291  coerceValue(value, myUsecolgroup);
292  break;
293  case 10:
294  coerceValue(value, myColgroup);
295  break;
296  case 11:
297  coerceValue(value, myColgrouptype);
298  break;
299  case 12:
300  coerceValue(value, myColgroupinvert);
301  break;
302  case 13:
303  coerceValue(value, myColgrouponbnd);
304  break;
305 
306  }
307  }
308 
309  bool isParmColorRamp(exint idx) const override
310  {
311  switch (idx)
312  {
313 
314  }
315  return false;
316  }
317 
318  void getNestParmValue(TempIndex idx, TempIndex instance, exint &value) const override
319  { doGetParmValue(idx, instance, value); }
320  void getNestParmValue(TempIndex idx, TempIndex instance, fpreal &value) const override
321  { doGetParmValue(idx, instance, value); }
322  void getNestParmValue(TempIndex idx, TempIndex instance, UT_Vector2D &value) const override
323  { doGetParmValue(idx, instance, value); }
324  void getNestParmValue(TempIndex idx, TempIndex instance, UT_Vector3D &value) const override
325  { doGetParmValue(idx, instance, value); }
326  void getNestParmValue(TempIndex idx, TempIndex instance, UT_Vector4D &value) const override
327  { doGetParmValue(idx, instance, value); }
328  void getNestParmValue(TempIndex idx, TempIndex instance, UT_Matrix2D &value) const override
329  { doGetParmValue(idx, instance, value); }
330  void getNestParmValue(TempIndex idx, TempIndex instance, UT_Matrix3D &value) const override
331  { doGetParmValue(idx, instance, value); }
332  void getNestParmValue(TempIndex idx, TempIndex instance, UT_Matrix4D &value) const override
333  { doGetParmValue(idx, instance, value); }
334  void getNestParmValue(TempIndex idx, TempIndex instance, UT_StringHolder &value) const override
335  { doGetParmValue(idx, instance, value); }
336  void getNestParmValue(TempIndex idx, TempIndex instance, UT_SharedPtr<UT_Ramp> &value) const override
337  { doGetParmValue(idx, instance, value); }
338  void getNestParmValue(TempIndex idx, TempIndex instance, PRM_DataItemHandle &value) const override
339  { doGetParmValue(idx, instance, value); }
340 
341  template <typename T>
342  void
343  doSetParmValue(TempIndex idx, TempIndex instance, const T &value)
344  {
345  if (idx.size() < 1)
346  return;
347  UT_ASSERT(idx.size() == instance.size()+1);
348  if (idx.size() != instance.size()+1)
349  return;
350  switch (idx[0])
351  {
352  case 0:
353  coerceValue(myOutgroup, ( ( value ) ));
354  break;
355  case 1:
356  coerceValue(myGroup, ( ( value ) ));
357  break;
358  case 2:
359  coerceValue(myGrouptype, clampMinValue(0, clampMaxValue(4, value ) ));
360  break;
361  case 3:
362  coerceValue(myPathcontroltype, clampMinValue(0, clampMaxValue(2, value ) ));
363  break;
364  case 4:
365  coerceValue(myOperation, clampMinValue(0, clampMaxValue(2, value ) ));
366  break;
367  case 5:
368  coerceValue(myAvoidprevious, ( ( value ) ));
369  break;
370  case 6:
371  coerceValue(myEdgestyle, clampMinValue(0, clampMaxValue(2, value ) ));
372  break;
373  case 7:
374  coerceValue(myUseuvattrib, ( ( value ) ));
375  break;
376  case 8:
377  coerceValue(myUvattrib, ( ( value ) ));
378  break;
379  case 9:
380  coerceValue(myUsecolgroup, ( ( value ) ));
381  break;
382  case 10:
383  coerceValue(myColgroup, ( ( value ) ));
384  break;
385  case 11:
386  coerceValue(myColgrouptype, clampMinValue(0, clampMaxValue(4, value ) ));
387  break;
388  case 12:
389  coerceValue(myColgroupinvert, ( ( value ) ));
390  break;
391  case 13:
392  coerceValue(myColgrouponbnd, ( ( value ) ));
393  break;
394 
395  }
396  }
397 
398  void setNestParmValue(TempIndex idx, TempIndex instance, const exint &value) override
399  { doSetParmValue(idx, instance, value); }
400  void setNestParmValue(TempIndex idx, TempIndex instance, const fpreal &value) override
401  { doSetParmValue(idx, instance, value); }
402  void setNestParmValue(TempIndex idx, TempIndex instance, const UT_Vector2D &value) override
403  { doSetParmValue(idx, instance, value); }
404  void setNestParmValue(TempIndex idx, TempIndex instance, const UT_Vector3D &value) override
405  { doSetParmValue(idx, instance, value); }
406  void setNestParmValue(TempIndex idx, TempIndex instance, const UT_Vector4D &value) override
407  { doSetParmValue(idx, instance, value); }
408  void setNestParmValue(TempIndex idx, TempIndex instance, const UT_Matrix2D &value) override
409  { doSetParmValue(idx, instance, value); }
410  void setNestParmValue(TempIndex idx, TempIndex instance, const UT_Matrix3D &value) override
411  { doSetParmValue(idx, instance, value); }
412  void setNestParmValue(TempIndex idx, TempIndex instance, const UT_Matrix4D &value) override
413  { doSetParmValue(idx, instance, value); }
414  void setNestParmValue(TempIndex idx, TempIndex instance, const UT_StringHolder &value) override
415  { doSetParmValue(idx, instance, value); }
416  void setNestParmValue(TempIndex idx, TempIndex instance, const UT_SharedPtr<UT_Ramp> &value) override
417  { doSetParmValue(idx, instance, value); }
418  void setNestParmValue(TempIndex idx, TempIndex instance, const PRM_DataItemHandle &value) override
419  { doSetParmValue(idx, instance, value); }
420 
421  exint getNestNumParms(TempIndex idx) const override
422  {
423  if (idx.size() == 0)
424  return 14;
425  switch (idx[0])
426  {
427 
428  }
429  // Invalid
430  return 0;
431  }
432 
433  const char *getNestParmName(TempIndex fieldnum) const override
434  {
435  if (fieldnum.size() < 1)
436  return 0;
437  switch (fieldnum[0])
438  {
439  case 0:
440  return "outgroup";
441  case 1:
442  return "group";
443  case 2:
444  return "grouptype";
445  case 3:
446  return "pathcontroltype";
447  case 4:
448  return "operation";
449  case 5:
450  return "avoidprevious";
451  case 6:
452  return "edgestyle";
453  case 7:
454  return "useuvattrib";
455  case 8:
456  return "uvattrib";
457  case 9:
458  return "usecolgroup";
459  case 10:
460  return "colgroup";
461  case 11:
462  return "colgrouptype";
463  case 12:
464  return "colgroupinvert";
465  case 13:
466  return "colgrouponbnd";
467 
468  }
469  return 0;
470  }
471 
472  ParmType getNestParmType(TempIndex fieldnum) const override
473  {
474  if (fieldnum.size() < 1)
475  return PARM_UNSUPPORTED;
476  switch (fieldnum[0])
477  {
478  case 0:
479  return PARM_STRING;
480  case 1:
481  return PARM_STRING;
482  case 2:
483  return PARM_INTEGER;
484  case 3:
485  return PARM_INTEGER;
486  case 4:
487  return PARM_INTEGER;
488  case 5:
489  return PARM_INTEGER;
490  case 6:
491  return PARM_INTEGER;
492  case 7:
493  return PARM_INTEGER;
494  case 8:
495  return PARM_STRING;
496  case 9:
497  return PARM_INTEGER;
498  case 10:
499  return PARM_STRING;
500  case 11:
501  return PARM_INTEGER;
502  case 12:
503  return PARM_INTEGER;
504  case 13:
505  return PARM_INTEGER;
506 
507  }
508  return PARM_UNSUPPORTED;
509  }
510 
511  // Boiler plate to load individual types.
512  static void loadData(UT_IStream &is, int64 &v)
513  { is.bread(&v, 1); }
514  static void loadData(UT_IStream &is, bool &v)
515  { int64 iv; is.bread(&iv, 1); v = iv; }
516  static void loadData(UT_IStream &is, fpreal64 &v)
517  { is.bread<fpreal64>(&v, 1); }
518  static void loadData(UT_IStream &is, UT_Vector2D &v)
519  { is.bread<fpreal64>(&v.x(), 1); is.bread<fpreal64>(&v.y(), 1); }
520  static void loadData(UT_IStream &is, UT_Vector3D &v)
521  { is.bread<fpreal64>(&v.x(), 1); is.bread<fpreal64>(&v.y(), 1);
522  is.bread<fpreal64>(&v.z(), 1); }
523  static void loadData(UT_IStream &is, UT_Vector4D &v)
524  { is.bread<fpreal64>(&v.x(), 1); is.bread<fpreal64>(&v.y(), 1);
525  is.bread<fpreal64>(&v.z(), 1); is.bread<fpreal64>(&v.w(), 1); }
526  static void loadData(UT_IStream &is, UT_Matrix2D &v)
527  { for (int r = 0; r < 2; r++) for (int c = 0; c < 2; c++) is.bread<fpreal64>(&v(r, c), 1); }
528  static void loadData(UT_IStream &is, UT_Matrix3D &v)
529  { for (int r = 0; r < 3; r++) for (int c = 0; c < 3; c++) is.bread<fpreal64>(&v(r, c), 1); }
530  static void loadData(UT_IStream &is, UT_Matrix4D &v)
531  { for (int r = 0; r < 4; r++) for (int c = 0; c < 4; c++) is.bread<fpreal64>(&v(r, c), 1); }
532  static void loadData(UT_IStream &is, UT_Vector2I &v)
533  { is.bread<int64>(&v.x(), 1); is.bread<int64>(&v.y(), 1); }
534  static void loadData(UT_IStream &is, UT_Vector3I &v)
535  { is.bread<int64>(&v.x(), 1); is.bread<int64>(&v.y(), 1);
536  is.bread<int64>(&v.z(), 1); }
537  static void loadData(UT_IStream &is, UT_Vector4I &v)
538  { is.bread<int64>(&v.x(), 1); is.bread<int64>(&v.y(), 1);
539  is.bread<int64>(&v.z(), 1); is.bread<int64>(&v.w(), 1); }
541  { is.bread(v); }
543  { UT_StringHolder rampdata;
544  loadData(is, rampdata);
545  if (rampdata.isstring())
546  {
547  v.reset(new UT_Ramp());
548  UT_IStream istr((const char *) rampdata, rampdata.length(), UT_ISTREAM_ASCII);
549  v->load(istr);
550  }
551  else v.reset();
552  }
555  loadData(is, data);
556  if (data.isstring())
557  {
558  // Find the data type.
559  const char *colon = UT_StringWrap(data).findChar(':');
560  if (colon)
561  {
562  int typelen = colon - data.buffer();
564  type.strncpy(data.buffer(), typelen);
565  UT_IStream istr(((const char *) data) + typelen + 1, data.length() - (typelen + 1), UT_ISTREAM_BINARY);
566 
567  v = PRM_DataFactory::parseBinary(type.buffer(), istr);
568  }
569  }
570  else v.reset();
571  }
572 
573  static void saveData(std::ostream &os, int64 v)
574  { UTwrite(os, &v); }
575  static void saveData(std::ostream &os, bool v)
576  { int64 iv = v; UTwrite(os, &iv); }
577  static void saveData(std::ostream &os, fpreal64 v)
578  { UTwrite<fpreal64>(os, &v); }
579  static void saveData(std::ostream &os, UT_Vector2D v)
580  { UTwrite<fpreal64>(os, &v.x()); UTwrite<fpreal64>(os, &v.y()); }
581  static void saveData(std::ostream &os, UT_Vector3D v)
582  { UTwrite<fpreal64>(os, &v.x()); UTwrite<fpreal64>(os, &v.y());
583  UTwrite<fpreal64>(os, &v.z()); }
584  static void saveData(std::ostream &os, UT_Vector4D v)
585  { UTwrite<fpreal64>(os, &v.x()); UTwrite<fpreal64>(os, &v.y());
586  UTwrite<fpreal64>(os, &v.z()); UTwrite<fpreal64>(os, &v.w()); }
587  static void saveData(std::ostream &os, UT_Matrix2D v)
589  static void saveData(std::ostream &os, UT_Matrix3D v)
591  static void saveData(std::ostream &os, UT_Matrix4D v)
593  static void saveData(std::ostream &os, UT_StringHolder s)
594  { UT_StringWrap(s).saveBinary(os); }
595  static void saveData(std::ostream &os, UT_SharedPtr<UT_Ramp> s)
597  UT_OStringStream ostr;
598  if (s) s->save(ostr);
599  result = ostr.str();
600  saveData(os, result);
601  }
602  static void saveData(std::ostream &os, PRM_DataItemHandle s)
604  UT_OStringStream ostr;
605  if (s)
606  {
607  ostr << s->getDataTypeToken();
608  ostr << ":";
609  s->saveBinary(ostr);
610  }
611  result = ostr.str();
612  saveData(os, result);
613  }
614 
615 
616  void save(std::ostream &os) const
617  {
618  int32 v = version();
619  UTwrite(os, &v);
620  saveData(os, myOutgroup);
621  saveData(os, myGroup);
622  saveData(os, myGrouptype);
623  saveData(os, myPathcontroltype);
624  saveData(os, myOperation);
625  saveData(os, myAvoidprevious);
626  saveData(os, myEdgestyle);
627  saveData(os, myUseuvattrib);
628  saveData(os, myUvattrib);
629  saveData(os, myUsecolgroup);
630  saveData(os, myColgroup);
631  saveData(os, myColgrouptype);
632  saveData(os, myColgroupinvert);
633  saveData(os, myColgrouponbnd);
634 
635  }
636 
637  bool load(UT_IStream &is)
638  {
639  int32 v;
640  is.bread(&v, 1);
641  if (version() != v)
642  {
643  // Fail incompatible versions
644  return false;
645  }
646  loadData(is, myOutgroup);
647  loadData(is, myGroup);
648  loadData(is, myGrouptype);
649  loadData(is, myPathcontroltype);
650  loadData(is, myOperation);
651  loadData(is, myAvoidprevious);
652  loadData(is, myEdgestyle);
653  loadData(is, myUseuvattrib);
654  loadData(is, myUvattrib);
655  loadData(is, myUsecolgroup);
656  loadData(is, myColgroup);
657  loadData(is, myColgrouptype);
658  loadData(is, myColgroupinvert);
659  loadData(is, myColgrouponbnd);
660 
661  return true;
662  }
663 
664  const UT_StringHolder & getOutgroup() const { return myOutgroup; }
665  void setOutgroup(const UT_StringHolder & val) { myOutgroup = val; }
667  {
668  SOP_Node *thissop = cookparms.getNode();
669  if (!thissop) return getOutgroup();
671  OP_Utils::evalOpParm(result, thissop, "outgroup", cookparms.getCookTime(), 0);
672  return result;
673  }
674  const UT_StringHolder & getGroup() const { return myGroup; }
675  void setGroup(const UT_StringHolder & val) { myGroup = val; }
677  {
678  SOP_Node *thissop = cookparms.getNode();
679  if (!thissop) return getGroup();
681  OP_Utils::evalOpParm(result, thissop, "group", cookparms.getCookTime(), 0);
682  return result;
683  }
684  Grouptype getGrouptype() const { return Grouptype(myGrouptype); }
685  void setGrouptype(Grouptype val) { myGrouptype = int64(val); }
687  {
688  SOP_Node *thissop = cookparms.getNode();
689  if (!thissop) return getGrouptype();
690  int64 result;
691  OP_Utils::evalOpParm(result, thissop, "grouptype", cookparms.getCookTime(), 0);
692  return Grouptype(result);
693  }
694  Pathcontroltype getPathcontroltype() const { return Pathcontroltype(myPathcontroltype); }
695  void setPathcontroltype(Pathcontroltype val) { myPathcontroltype = int64(val); }
697  {
698  SOP_Node *thissop = cookparms.getNode();
699  if (!thissop) return getPathcontroltype();
700  int64 result;
701  OP_Utils::evalOpParm(result, thissop, "pathcontroltype", cookparms.getCookTime(), 0);
702  return Pathcontroltype(result);
703  }
704  Operation getOperation() const { return Operation(myOperation); }
705  void setOperation(Operation val) { myOperation = int64(val); }
707  {
708  SOP_Node *thissop = cookparms.getNode();
709  if (!thissop) return getOperation();
710  int64 result;
711  OP_Utils::evalOpParm(result, thissop, "operation", cookparms.getCookTime(), 0);
712  return Operation(result);
713  }
714  bool getAvoidprevious() const { return myAvoidprevious; }
715  void setAvoidprevious(bool val) { myAvoidprevious = val; }
716  bool opAvoidprevious(const SOP_NodeVerb::CookParms &cookparms) const
717  {
718  SOP_Node *thissop = cookparms.getNode();
719  if (!thissop) return getAvoidprevious();
720  bool result;
721  OP_Utils::evalOpParm(result, thissop, "avoidprevious", cookparms.getCookTime(), 0);
722  return result;
723  }
724  Edgestyle getEdgestyle() const { return Edgestyle(myEdgestyle); }
725  void setEdgestyle(Edgestyle val) { myEdgestyle = int64(val); }
727  {
728  SOP_Node *thissop = cookparms.getNode();
729  if (!thissop) return getEdgestyle();
730  int64 result;
731  OP_Utils::evalOpParm(result, thissop, "edgestyle", cookparms.getCookTime(), 0);
732  return Edgestyle(result);
733  }
734  bool getUseuvattrib() const { return myUseuvattrib; }
735  void setUseuvattrib(bool val) { myUseuvattrib = val; }
736  bool opUseuvattrib(const SOP_NodeVerb::CookParms &cookparms) const
737  {
738  SOP_Node *thissop = cookparms.getNode();
739  if (!thissop) return getUseuvattrib();
740  bool result;
741  OP_Utils::evalOpParm(result, thissop, "useuvattrib", cookparms.getCookTime(), 0);
742  return result;
743  }
744  const UT_StringHolder & getUvattrib() const { return myUvattrib; }
745  void setUvattrib(const UT_StringHolder & val) { myUvattrib = val; }
747  {
748  SOP_Node *thissop = cookparms.getNode();
749  if (!thissop) return getUvattrib();
751  OP_Utils::evalOpParm(result, thissop, "uvattrib", cookparms.getCookTime(), 0);
752  return result;
753  }
754  bool getUsecolgroup() const { return myUsecolgroup; }
755  void setUsecolgroup(bool val) { myUsecolgroup = val; }
756  bool opUsecolgroup(const SOP_NodeVerb::CookParms &cookparms) const
757  {
758  SOP_Node *thissop = cookparms.getNode();
759  if (!thissop) return getUsecolgroup();
760  bool result;
761  OP_Utils::evalOpParm(result, thissop, "usecolgroup", cookparms.getCookTime(), 0);
762  return result;
763  }
764  const UT_StringHolder & getColgroup() const { return myColgroup; }
765  void setColgroup(const UT_StringHolder & val) { myColgroup = val; }
767  {
768  SOP_Node *thissop = cookparms.getNode();
769  if (!thissop) return getColgroup();
771  OP_Utils::evalOpParm(result, thissop, "colgroup", cookparms.getCookTime(), 0);
772  return result;
773  }
774  Colgrouptype getColgrouptype() const { return Colgrouptype(myColgrouptype); }
775  void setColgrouptype(Colgrouptype val) { myColgrouptype = int64(val); }
777  {
778  SOP_Node *thissop = cookparms.getNode();
779  if (!thissop) return getColgrouptype();
780  int64 result;
781  OP_Utils::evalOpParm(result, thissop, "colgrouptype", cookparms.getCookTime(), 0);
782  return Colgrouptype(result);
783  }
784  bool getColgroupinvert() const { return myColgroupinvert; }
785  void setColgroupinvert(bool val) { myColgroupinvert = val; }
786  bool opColgroupinvert(const SOP_NodeVerb::CookParms &cookparms) const
787  {
788  SOP_Node *thissop = cookparms.getNode();
789  if (!thissop) return getColgroupinvert();
790  bool result;
791  OP_Utils::evalOpParm(result, thissop, "colgroupinvert", cookparms.getCookTime(), 0);
792  return result;
793  }
794  bool getColgrouponbnd() const { return myColgrouponbnd; }
795  void setColgrouponbnd(bool val) { myColgrouponbnd = val; }
796  bool opColgrouponbnd(const SOP_NodeVerb::CookParms &cookparms) const
797  {
798  SOP_Node *thissop = cookparms.getNode();
799  if (!thissop) return getColgrouponbnd();
800  bool result;
801  OP_Utils::evalOpParm(result, thissop, "colgrouponbnd", cookparms.getCookTime(), 0);
802  return result;
803  }
804 
805 private:
806  UT_StringHolder myOutgroup;
807  UT_StringHolder myGroup;
808  int64 myGrouptype;
809  int64 myPathcontroltype;
810  int64 myOperation;
811  bool myAvoidprevious;
812  int64 myEdgestyle;
813  bool myUseuvattrib;
814  UT_StringHolder myUvattrib;
815  bool myUsecolgroup;
816  UT_StringHolder myColgroup;
817  int64 myColgrouptype;
818  bool myColgroupinvert;
819  bool myColgrouponbnd;
820 
821 };
void setNestParmValue(TempIndex idx, TempIndex instance, const exint &value) override
static void loadData(UT_IStream &is, UT_Vector4D &v)
void copyFrom(const OP_NodeParms *src) override
void getNestParmValue(TempIndex idx, TempIndex instance, UT_Vector3D &value) const override
const char * getNestParmName(TempIndex fieldnum) const override
int int32
Definition: SYS_Types.h:39
SOP_Node * getNode() const
Definition: SOP_NodeVerb.h:347
Grouptype opGrouptype(const SOP_NodeVerb::CookParms &cookparms) const
void setNestParmValue(TempIndex idx, TempIndex instance, const PRM_DataItemHandle &value) override
static void loadData(UT_IStream &is, UT_Vector4I &v)
static void saveData(std::ostream &os, UT_Vector2D v)
void doSetParmValue(TempIndex idx, TempIndex instance, const T &value)
void getNestParmValue(TempIndex idx, TempIndex instance, exint &value) const override
Pathcontroltype getPathcontroltype() const
exint bread(int32 *buffer, exint asize=1)
GLboolean * data
Definition: glcorearb.h:131
GT_API const UT_StringHolder time
constexpr SYS_FORCE_INLINE T & y() noexcept
Definition: UT_Vector4.h:493
const GLdouble * v
Definition: glcorearb.h:837
fpreal getTime() const
Definition: OP_Context.h:62
void buildFromOp(const OP_GraphProxy *graph, exint nodeidx, fpreal time, DEP_MicroNode *depnode)
void getNestParmValue(TempIndex idx, TempIndex instance, UT_Vector2D &value) const override
bool opAvoidprevious(const SOP_NodeVerb::CookParms &cookparms) const
void setColgroup(const UT_StringHolder &val)
const OP_Context & context() const
Definition: OP_NodeParms.h:97
static void loadData(UT_IStream &is, int64 &v)
constexpr SYS_FORCE_INLINE T & z() noexcept
Definition: UT_Vector3.h:667
int64 exint
Definition: SYS_Types.h:125
Operation opOperation(const SOP_NodeVerb::CookParms &cookparms) const
SYS_FORCE_INLINE const char * buffer() const
GLdouble s
Definition: glad.h:3009
static void saveData(std::ostream &os, bool v)
void setPathcontroltype(Pathcontroltype val)
An output stream object that owns its own string buffer storage.
void setNestParmValue(TempIndex idx, TempIndex instance, const UT_StringHolder &value) override
void setEdgestyle(Edgestyle val)
void setOperation(Operation val)
**But if you need a result
Definition: thread.h:613
const UT_StringHolder & getUvattrib() const
exint nodeIdx() const
Definition: OP_NodeParms.h:95
static PRM_DataItemHandle parseBinary(const char *type, UT_IStream &is)
static void saveData(std::ostream &os, UT_SharedPtr< UT_Ramp > s)
const UT_WorkBuffer & str()
Returns a read-only reference to the underlying UT_WorkBuffer.
bool opColgrouponbnd(const SOP_NodeVerb::CookParms &cookparms) const
Colgrouptype opColgrouptype(const SOP_NodeVerb::CookParms &cookparms) const
constexpr SYS_FORCE_INLINE T & x() noexcept
Definition: UT_Vector4.h:491
void getNestParmValue(TempIndex idx, TempIndex instance, fpreal &value) const override
static void saveData(std::ostream &os, fpreal64 v)
const UT_StringHolder & getGroup() const
static void saveData(std::ostream &os, UT_Matrix4D v)
void setNestParmValue(TempIndex idx, TempIndex instance, const UT_Vector3D &value) override
static void loadData(UT_IStream &is, UT_Matrix4D &v)
double fpreal64
Definition: SYS_Types.h:201
constexpr SYS_FORCE_INLINE T & x() noexcept
Definition: UT_Vector2.h:423
bool operator==(const SOP_GroupFindPathParms &src) const
void getNestParmValue(TempIndex idx, TempIndex instance, UT_Matrix4D &value) const override
void setNestParmValue(TempIndex idx, TempIndex instance, const fpreal &value) override
void setGroup(const UT_StringHolder &val)
void setGrouptype(Grouptype val)
bool operator==(const BaseDimensions< T > &a, const BaseDimensions< Y > &b)
Definition: Dimensions.h:137
static void loadData(UT_IStream &is, UT_Vector2I &v)
ParmType getNestParmType(TempIndex fieldnum) const override
bool isParmColorRamp(exint idx) const override
const UT_StringHolder & getColgroup() const
static void loadData(UT_IStream &is, PRM_DataItemHandle &v)
exint length() const
UT_StringHolder opOutgroup(const SOP_NodeVerb::CookParms &cookparms) const
SYS_FORCE_INLINE const char * buffer() const
std::shared_ptr< T > UT_SharedPtr
Wrapper around std::shared_ptr.
Definition: UT_SharedPtr.h:36
constexpr SYS_FORCE_INLINE T & z() noexcept
Definition: UT_Vector4.h:495
bool opUsecolgroup(const SOP_NodeVerb::CookParms &cookparms) const
const OP_GraphProxy * graph() const
Definition: OP_NodeParms.h:94
#define SYS_FORCE_INLINE
Definition: SYS_Inline.h:45
static void loadData(UT_IStream &is, UT_Matrix2D &v)
static void saveData(std::ostream &os, UT_StringHolder s)
exint getNestNumParms(TempIndex idx) const override
UT_StringHolder opColgroup(const SOP_NodeVerb::CookParms &cookparms) const
void setNestParmValue(TempIndex idx, TempIndex instance, const UT_SharedPtr< UT_Ramp > &value) override
long long int64
Definition: SYS_Types.h:116
static void saveData(std::ostream &os, UT_Matrix2D v)
void setNestParmValue(TempIndex idx, TempIndex instance, const UT_Vector2D &value) override
bool operator!=(const SOP_GroupFindPathParms &src) const
static void loadData(UT_IStream &is, UT_Vector2D &v)
void getNestParmValue(TempIndex idx, TempIndex instance, UT_SharedPtr< UT_Ramp > &value) const override
void getNestParmValue(TempIndex idx, TempIndex instance, UT_Matrix2D &value) const override
static void saveData(std::ostream &os, UT_Vector3D v)
static void saveData(std::ostream &os, int64 v)
UT_StringHolder opUvattrib(const SOP_NodeVerb::CookParms &cookparms) const
SYS_FORCE_INLINE UT_StringHolder getToken(Grouptype enum_value)
void setOutgroup(const UT_StringHolder &val)
virtual void evalOpParm(int64 &v, NodeIdx node, const char *parmname, fpreal time, DEP_MicroNode *depnode) const =0
Colgrouptype getColgrouptype() const
void getNestParmValue(TempIndex idx, TempIndex instance, UT_StringHolder &value) const override
void saveBinary(std::ostream &os) const
Save string to binary stream.
Definition: UT_String.h:296
void loadFromOpSubclass(const LoadParms &loadparms) override
GT_API const UT_StringHolder version
static void loadData(UT_IStream &is, UT_Vector3I &v)
void doGetParmValue(TempIndex idx, TempIndex instance, T &value) const
static void saveData(std::ostream &os, PRM_DataItemHandle s)
void setUvattrib(const UT_StringHolder &val)
void getNestParmValue(TempIndex idx, TempIndex instance, PRM_DataItemHandle &value) const override
fpreal64 fpreal
Definition: SYS_Types.h:277
DEP_MicroNode * depnode() const
Definition: OP_NodeParms.h:99
LeafData & operator=(const LeafData &)=delete
Utility class for containing a color ramp.
Definition: UT_Ramp.h:92
constexpr SYS_FORCE_INLINE T & w() noexcept
Definition: UT_Vector4.h:497
static void loadData(UT_IStream &is, UT_StringHolder &v)
GLuint GLfloat * val
Definition: glcorearb.h:1608
#define SOP_API
Definition: SOP_API.h:10
static void loadData(UT_IStream &is, bool &v)
void setNestParmValue(TempIndex idx, TempIndex instance, const UT_Vector4D &value) override
fpreal getCookTime() const
Definition: SOP_NodeVerb.h:361
static void loadData(UT_IStream &is, fpreal64 &v)
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 getNestParmValue(TempIndex idx, TempIndex instance, UT_Matrix3D &value) const override
Edgestyle opEdgestyle(const SOP_NodeVerb::CookParms &cookparms) const
bool opUseuvattrib(const SOP_NodeVerb::CookParms &cookparms) const
UT_StringHolder opGroup(const SOP_NodeVerb::CookParms &cookparms) const
void setNestParmValue(TempIndex idx, TempIndex instance, const UT_Matrix4D &value) override
GLboolean r
Definition: glcorearb.h:1222
void setNestParmValue(TempIndex idx, TempIndex instance, const UT_Matrix3D &value) override
void save(std::ostream &os) const
static void saveData(std::ostream &os, UT_Vector4D v)
constexpr SYS_FORCE_INLINE T & y() noexcept
Definition: UT_Vector3.h:665
void setNestParmValue(TempIndex idx, TempIndex instance, const UT_Matrix2D &value) override
type
Definition: core.h:1059
const UT_StringHolder & getOutgroup() const
static void loadData(UT_IStream &is, UT_SharedPtr< UT_Ramp > &v)
void getNestParmValue(TempIndex idx, TempIndex instance, UT_Vector4D &value) const override
static void loadData(UT_IStream &is, UT_Vector3D &v)
UT_SharedPtr< const PRM_DataItem > PRM_DataItemHandle
Definition: PRM_Parm.h:97
static void saveData(std::ostream &os, UT_Matrix3D v)
constexpr SYS_FORCE_INLINE T & y() noexcept
Definition: UT_Vector2.h:425
SYS_FORCE_INLINE bool isstring() const
void setColgrouptype(Colgrouptype val)
SYS_FORCE_INLINE void strncpy(const char *src, exint maxlen)
static void loadData(UT_IStream &is, UT_Matrix3D &v)
Pathcontroltype opPathcontroltype(const SOP_NodeVerb::CookParms &cookparms) const
GLenum src
Definition: glcorearb.h:1793
bool opColgroupinvert(const SOP_NodeVerb::CookParms &cookparms) const
constexpr SYS_FORCE_INLINE T & x() noexcept
Definition: UT_Vector3.h:663