HDK
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
SOP_InvokeGraph.proto.h
Go to the documentation of this file.
1 /* Automagically Generated by generate_proto.py
2  * Do not Edit
3  */
4 #pragma once
5 
6 #include <SOP/SOP_API.h>
7 #include <SOP/SOP_NodeVerb.h>
8 #include <OP/OP_GraphProxy.h>
9 
10 #include <OP/OP_Utils.h>
11 #include <PRM/PRM_Parm.h>
12 #include <UT/UT_IStream.h>
13 #include <UT/UT_NTStreamUtil.h>
14 #include <UT/UT_Ramp.h>
15 #include <UT/UT_SharedPtr.h>
16 #include <UT/UT_StringHolder.h>
17 #include <UT/UT_StringStream.h>
18 #include <UT/UT_VectorTypes.h>
19 #include <UT/UT_EnvControl.h>
20 #include <SYS/SYS_Types.h>
21 
22 class DEP_MicroNode;
23 namespace SOP_InvokeGraphEnums
24 {
25  enum class Method
26  {
27  COMPILE = 0,
28  NETWORK
29  };
30 
32  getToken(Method enum_value)
33  {
34  using namespace UT::Literal;
35  switch (enum_value) {
36  case Method::COMPILE: return "compile"_sh;
37  case Method::NETWORK: return "network"_sh;
38  default: UT_ASSERT(false); return ""_sh;
39  }
40  }
41 
42  enum class OutputType
43  {
44  LAST = 0,
45  FIRST,
46  GROUP,
47  PATH
48  };
49 
51  getToken(OutputType enum_value)
52  {
53  using namespace UT::Literal;
54  switch (enum_value) {
55  case OutputType::LAST: return "last"_sh;
56  case OutputType::FIRST: return "first"_sh;
57  case OutputType::GROUP: return "group"_sh;
58  case OutputType::PATH: return "path"_sh;
59  default: UT_ASSERT(false); return ""_sh;
60  }
61  }
62 
63  enum class Unload
64  {
65  NEVER = 0,
66  FLAG,
67  ALWAYS
68  };
69 
71  getToken(Unload enum_value)
72  {
73  using namespace UT::Literal;
74  switch (enum_value) {
75  case Unload::NEVER: return "never"_sh;
76  case Unload::FLAG: return "flag"_sh;
77  case Unload::ALWAYS: return "always"_sh;
78  default: UT_ASSERT(false); return ""_sh;
79  }
80  }
81 
82 }
83 
84 
86 {
87 public:
88  static int version() { return 1; }
89  struct Inputs
90  {
92 
93 
95  {
96  name = ""_UTsh;
97 
98  }
99 
100  bool operator==(const Inputs &src) const
101  {
102  if (name != src.name) return false;
103 
104  return true;
105  }
106  bool operator!=(const Inputs &src) const
107  {
108  return !operator==(src);
109  }
110 
111  };
112 
114  {
116 
117  buf.strcat("[ ");
118  for (int i = 0; i < list.entries(); i++)
119  {
120  if (i)
121  buf.strcat(", ");
122  buf.strcat("( ");
123  buf.append("");
124  { UT_String tmp; tmp = UT_StringWrap(list(i).name).makeQuotedString('"'); buf.strcat(tmp); }
125 
126  buf.strcat(" )");
127  }
128  buf.strcat(" ]");
129 
131  return result;
132  }
133 
135  {
136  myMethod = 0;
137  myOutputType = 0;
138  myOutputGroup = ""_UTsh;
139  myOutput = ""_UTsh;
140  myInputs.setSize(4);
141  myInputGroup = ""_UTsh;
142  myUnload = 2;
143 
144  }
145 
146  explicit SOP_InvokeGraphParms(const SOP_InvokeGraphParms &) = default;
148  SOP_InvokeGraphParms(SOP_InvokeGraphParms &&) noexcept = default;
149  SOP_InvokeGraphParms &operator=(SOP_InvokeGraphParms &&) noexcept = default;
150 
151  ~SOP_InvokeGraphParms() override {}
152 
154  {
155  if (myMethod != src.myMethod) return false;
156  if (myOutputType != src.myOutputType) return false;
157  if (myOutputGroup != src.myOutputGroup) return false;
158  if (myOutput != src.myOutput) return false;
159  if (myInputs != src.myInputs) return false;
160  if (myInputGroup != src.myInputGroup) return false;
161  if (myUnload != src.myUnload) return false;
162 
163 
164  if (baseGetSignature() != src.baseGetSignature()) return false;
165 
166  return true;
167  }
169  {
170  return !operator==(src);
171  }
175 
176 
177 
178  void buildFromOp(const OP_GraphProxy *graph, exint nodeidx, fpreal time, DEP_MicroNode *depnode)
179  {
180  myMethod = 0;
181  if (true)
182  graph->evalOpParm(myMethod, nodeidx, "method", time, graph->isDirect()?nullptr:depnode);
183  myOutputType = 0;
184  if (true)
185  graph->evalOpParm(myOutputType, nodeidx, "outputtype", time, graph->isDirect()?nullptr:depnode);
186  myOutputGroup = ""_UTsh;
187  if (true && ( (true&&!(((int64(getOutputType())!=2)))) ) )
188  graph->evalOpParm(myOutputGroup, nodeidx, "outputgroup", time, graph->isDirect()?nullptr:depnode);
189  myOutput = ""_UTsh;
190  if (true && ( (true&&!(((int64(getOutputType())!=3)))) ) )
191  graph->evalOpParm(myOutput, nodeidx, "output", time, graph->isDirect()?nullptr:depnode);
192  if (true && ( (!(((int64(getMethod())!=0)))) ) )
193  {
194  int64 length = 0;
195  graph->evalOpParm(length, nodeidx, "inputs", time, graph->isDirect()?nullptr:depnode);
196  if (length < 0) length = 0;
197  myInputs.setSize(length);
198  for (exint i = 0; i < length; i++)
199  {
200  int parmidx[1];
201  int offsets[1];
202  parmidx[0] = i+0;
203  offsets[0] = 0;
204  auto && _curentry = myInputs(i);
205  (void) _curentry;
206  _curentry.name = ""_UTsh;
207  if (true && ( (!(((int64(getMethod())!=0)))) ) && ( (true&&!(((int64(getMethod())!=0)))) ) )
208  graph->evalOpParmInst(_curentry.name, nodeidx, "name#", parmidx, offsets, time, graph->isDirect()?nullptr:depnode, 2-1);
209 
210  }
211  }
212  else
213  myInputs.clear();
214  myInputGroup = ""_UTsh;
215  if (true && ( (true&&!(((int64(getMethod())!=1)))) ) )
216  graph->evalOpParm(myInputGroup, nodeidx, "inputgroup", time, graph->isDirect()?nullptr:depnode);
217  myUnload = 2;
218  if (true)
219  graph->evalOpParm(myUnload, nodeidx, "unload", time, graph->isDirect()?nullptr:depnode);
220 
221  }
222 
223 
224  void loadFromOpSubclass(const LoadParms &loadparms) override
225  {
226  buildFromOp(loadparms.graph(), loadparms.nodeIdx(), loadparms.context().getTime(), loadparms.depnode());
227  }
228 
229 
230  void copyFrom(const OP_NodeParms *src) override
231  {
232  *this = *((const SOP_InvokeGraphParms *)src);
233  }
234 
235  template <typename T>
236  void
237  doGetParmValue(TempIndex idx, TempIndex instance, T &value) const
238  {
239  if (idx.size() < 1)
240  return;
241  UT_ASSERT(idx.size() == instance.size()+1);
242  if (idx.size() != instance.size()+1)
243  return;
244  switch (idx[0])
245  {
246  case 0:
247  coerceValue(value, myMethod);
248  break;
249  case 1:
250  coerceValue(value, myOutputType);
251  break;
252  case 2:
253  coerceValue(value, myOutputGroup);
254  break;
255  case 3:
256  coerceValue(value, myOutput);
257  break;
258  case 4:
259  if (idx.size() == 1)
260  coerceValue(value, myInputs.entries());
261  else if (instance[0] < myInputs.entries())
262  {
263  auto && _data = myInputs(instance[0]);
264  switch (idx[1])
265  {
266  case 0:
267  coerceValue(value, _data.name);
268  break;
269 
270  }
271  }
272  break;
273  case 5:
274  coerceValue(value, myInputGroup);
275  break;
276  case 6:
277  coerceValue(value, myUnload);
278  break;
279 
280  }
281  }
282 
283  bool isParmColorRamp(exint idx) const override
284  {
285  switch (idx)
286  {
287 
288  }
289  return false;
290  }
291 
292  void getNestParmValue(TempIndex idx, TempIndex instance, exint &value) const override
293  { doGetParmValue(idx, instance, value); }
294  void getNestParmValue(TempIndex idx, TempIndex instance, fpreal &value) const override
295  { doGetParmValue(idx, instance, value); }
296  void getNestParmValue(TempIndex idx, TempIndex instance, UT_Vector2D &value) const override
297  { doGetParmValue(idx, instance, value); }
298  void getNestParmValue(TempIndex idx, TempIndex instance, UT_Vector3D &value) const override
299  { doGetParmValue(idx, instance, value); }
300  void getNestParmValue(TempIndex idx, TempIndex instance, UT_Vector4D &value) const override
301  { doGetParmValue(idx, instance, value); }
302  void getNestParmValue(TempIndex idx, TempIndex instance, UT_Matrix2D &value) const override
303  { doGetParmValue(idx, instance, value); }
304  void getNestParmValue(TempIndex idx, TempIndex instance, UT_Matrix3D &value) const override
305  { doGetParmValue(idx, instance, value); }
306  void getNestParmValue(TempIndex idx, TempIndex instance, UT_Matrix4D &value) const override
307  { doGetParmValue(idx, instance, value); }
308  void getNestParmValue(TempIndex idx, TempIndex instance, UT_StringHolder &value) const override
309  { doGetParmValue(idx, instance, value); }
310  void getNestParmValue(TempIndex idx, TempIndex instance, UT_SharedPtr<UT_Ramp> &value) const override
311  { doGetParmValue(idx, instance, value); }
312  void getNestParmValue(TempIndex idx, TempIndex instance, PRM_DataItemHandle &value) const override
313  { doGetParmValue(idx, instance, value); }
314 
315  template <typename T>
316  void
317  doSetParmValue(TempIndex idx, TempIndex instance, const T &value)
318  {
319  if (idx.size() < 1)
320  return;
321  UT_ASSERT(idx.size() == instance.size()+1);
322  if (idx.size() != instance.size()+1)
323  return;
324  switch (idx[0])
325  {
326  case 0:
327  coerceValue(myMethod, clampMinValue(0, clampMaxValue(1, value ) ));
328  break;
329  case 1:
330  coerceValue(myOutputType, clampMinValue(0, clampMaxValue(3, value ) ));
331  break;
332  case 2:
333  coerceValue(myOutputGroup, ( ( value ) ));
334  break;
335  case 3:
336  coerceValue(myOutput, ( ( value ) ));
337  break;
338  case 4:
339  if (idx.size() == 1)
340  {
341  exint newsize;
342  coerceValue(newsize, value);
343  if (newsize < 0) newsize = 0;
344  myInputs.setSize(newsize);
345  }
346  else
347  {
348  if (instance[0] < 0)
349  return;
350  myInputs.setSizeIfNeeded(instance[0]+1);
351  auto && _data = myInputs(instance[0]);
352  switch (idx[1])
353  {
354  case 0:
355  coerceValue(_data.name, value);
356  break;
357 
358  }
359  }
360  break;
361  case 5:
362  coerceValue(myInputGroup, ( ( value ) ));
363  break;
364  case 6:
365  coerceValue(myUnload, clampMinValue(0, clampMaxValue(2, value ) ));
366  break;
367 
368  }
369  }
370 
371  void setNestParmValue(TempIndex idx, TempIndex instance, const exint &value) override
372  { doSetParmValue(idx, instance, value); }
373  void setNestParmValue(TempIndex idx, TempIndex instance, const fpreal &value) override
374  { doSetParmValue(idx, instance, value); }
375  void setNestParmValue(TempIndex idx, TempIndex instance, const UT_Vector2D &value) override
376  { doSetParmValue(idx, instance, value); }
377  void setNestParmValue(TempIndex idx, TempIndex instance, const UT_Vector3D &value) override
378  { doSetParmValue(idx, instance, value); }
379  void setNestParmValue(TempIndex idx, TempIndex instance, const UT_Vector4D &value) override
380  { doSetParmValue(idx, instance, value); }
381  void setNestParmValue(TempIndex idx, TempIndex instance, const UT_Matrix2D &value) override
382  { doSetParmValue(idx, instance, value); }
383  void setNestParmValue(TempIndex idx, TempIndex instance, const UT_Matrix3D &value) override
384  { doSetParmValue(idx, instance, value); }
385  void setNestParmValue(TempIndex idx, TempIndex instance, const UT_Matrix4D &value) override
386  { doSetParmValue(idx, instance, value); }
387  void setNestParmValue(TempIndex idx, TempIndex instance, const UT_StringHolder &value) override
388  { doSetParmValue(idx, instance, value); }
389  void setNestParmValue(TempIndex idx, TempIndex instance, const UT_SharedPtr<UT_Ramp> &value) override
390  { doSetParmValue(idx, instance, value); }
391  void setNestParmValue(TempIndex idx, TempIndex instance, const PRM_DataItemHandle &value) override
392  { doSetParmValue(idx, instance, value); }
393 
394  exint getNestNumParms(TempIndex idx) const override
395  {
396  if (idx.size() == 0)
397  return 7;
398  switch (idx[0])
399  {
400  case 4:
401  return 1;
402 
403  }
404  // Invalid
405  return 0;
406  }
407 
408  const char *getNestParmName(TempIndex fieldnum) const override
409  {
410  if (fieldnum.size() < 1)
411  return 0;
412  switch (fieldnum[0])
413  {
414  case 0:
415  return "method";
416  case 1:
417  return "outputtype";
418  case 2:
419  return "outputgroup";
420  case 3:
421  return "output";
422  case 4:
423  if (fieldnum.size() == 1)
424  return "inputs";
425  switch (fieldnum[1])
426  {
427  case 0:
428  return "name#";
429 
430  }
431  return 0;
432  case 5:
433  return "inputgroup";
434  case 6:
435  return "unload";
436 
437  }
438  return 0;
439  }
440 
441  ParmType getNestParmType(TempIndex fieldnum) const override
442  {
443  if (fieldnum.size() < 1)
444  return PARM_UNSUPPORTED;
445  switch (fieldnum[0])
446  {
447  case 0:
448  return PARM_INTEGER;
449  case 1:
450  return PARM_INTEGER;
451  case 2:
452  return PARM_STRING;
453  case 3:
454  return PARM_STRING;
455  case 4:
456  if (fieldnum.size() == 1)
457  return PARM_MULTIPARM;
458  switch (fieldnum[1])
459  {
460  case 0:
461  return PARM_STRING;
462 
463  }
464  return PARM_UNSUPPORTED;
465  case 5:
466  return PARM_STRING;
467  case 6:
468  return PARM_INTEGER;
469 
470  }
471  return PARM_UNSUPPORTED;
472  }
473 
474  // Boiler plate to load individual types.
475  static void loadData(UT_IStream &is, int64 &v)
476  { is.bread(&v, 1); }
477  static void loadData(UT_IStream &is, bool &v)
478  { int64 iv; is.bread(&iv, 1); v = iv; }
479  static void loadData(UT_IStream &is, fpreal64 &v)
480  { is.bread<fpreal64>(&v, 1); }
481  static void loadData(UT_IStream &is, UT_Vector2D &v)
482  { is.bread<fpreal64>(&v.x(), 1); is.bread<fpreal64>(&v.y(), 1); }
483  static void loadData(UT_IStream &is, UT_Vector3D &v)
484  { is.bread<fpreal64>(&v.x(), 1); is.bread<fpreal64>(&v.y(), 1);
485  is.bread<fpreal64>(&v.z(), 1); }
486  static void loadData(UT_IStream &is, UT_Vector4D &v)
487  { is.bread<fpreal64>(&v.x(), 1); is.bread<fpreal64>(&v.y(), 1);
488  is.bread<fpreal64>(&v.z(), 1); is.bread<fpreal64>(&v.w(), 1); }
489  static void loadData(UT_IStream &is, UT_Matrix2D &v)
490  { for (int r = 0; r < 2; r++) for (int c = 0; c < 2; c++) is.bread<fpreal64>(&v(r, c), 1); }
491  static void loadData(UT_IStream &is, UT_Matrix3D &v)
492  { for (int r = 0; r < 3; r++) for (int c = 0; c < 3; c++) is.bread<fpreal64>(&v(r, c), 1); }
493  static void loadData(UT_IStream &is, UT_Matrix4D &v)
494  { for (int r = 0; r < 4; r++) for (int c = 0; c < 4; c++) is.bread<fpreal64>(&v(r, c), 1); }
495  static void loadData(UT_IStream &is, UT_Vector2I &v)
496  { is.bread<int64>(&v.x(), 1); is.bread<int64>(&v.y(), 1); }
497  static void loadData(UT_IStream &is, UT_Vector3I &v)
498  { is.bread<int64>(&v.x(), 1); is.bread<int64>(&v.y(), 1);
499  is.bread<int64>(&v.z(), 1); }
500  static void loadData(UT_IStream &is, UT_Vector4I &v)
501  { is.bread<int64>(&v.x(), 1); is.bread<int64>(&v.y(), 1);
502  is.bread<int64>(&v.z(), 1); is.bread<int64>(&v.w(), 1); }
504  { is.bread(v); }
506  { UT_StringHolder rampdata;
507  loadData(is, rampdata);
508  if (rampdata.isstring())
509  {
510  v.reset(new UT_Ramp());
511  UT_IStream istr((const char *) rampdata, rampdata.length(), UT_ISTREAM_ASCII);
512  v->load(istr);
513  }
514  else v.reset();
515  }
518  loadData(is, data);
519  if (data.isstring())
520  {
521  // Find the data type.
522  const char *colon = UT_StringWrap(data).findChar(':');
523  if (colon)
524  {
525  int typelen = colon - data.buffer();
527  type.strncpy(data.buffer(), typelen);
528  UT_IStream istr(((const char *) data) + typelen + 1, data.length() - (typelen + 1), UT_ISTREAM_BINARY);
529 
530  v = PRM_DataFactory::parseBinary(type.buffer(), istr);
531  }
532  }
533  else v.reset();
534  }
535 
536  static void saveData(std::ostream &os, int64 v)
537  { UTwrite(os, &v); }
538  static void saveData(std::ostream &os, bool v)
539  { int64 iv = v; UTwrite(os, &iv); }
540  static void saveData(std::ostream &os, fpreal64 v)
541  { UTwrite<fpreal64>(os, &v); }
542  static void saveData(std::ostream &os, UT_Vector2D v)
543  { UTwrite<fpreal64>(os, &v.x()); UTwrite<fpreal64>(os, &v.y()); }
544  static void saveData(std::ostream &os, UT_Vector3D v)
545  { UTwrite<fpreal64>(os, &v.x()); UTwrite<fpreal64>(os, &v.y());
546  UTwrite<fpreal64>(os, &v.z()); }
547  static void saveData(std::ostream &os, UT_Vector4D v)
548  { UTwrite<fpreal64>(os, &v.x()); UTwrite<fpreal64>(os, &v.y());
549  UTwrite<fpreal64>(os, &v.z()); UTwrite<fpreal64>(os, &v.w()); }
550  static void saveData(std::ostream &os, UT_Matrix2D v)
552  static void saveData(std::ostream &os, UT_Matrix3D v)
554  static void saveData(std::ostream &os, UT_Matrix4D v)
556  static void saveData(std::ostream &os, UT_StringHolder s)
557  { UT_StringWrap(s).saveBinary(os); }
558  static void saveData(std::ostream &os, UT_SharedPtr<UT_Ramp> s)
560  UT_OStringStream ostr;
561  if (s) s->save(ostr);
562  result = ostr.str();
563  saveData(os, result);
564  }
565  static void saveData(std::ostream &os, PRM_DataItemHandle s)
567  UT_OStringStream ostr;
568  if (s)
569  {
570  ostr << s->getDataTypeToken();
571  ostr << ":";
572  s->saveBinary(ostr);
573  }
574  result = ostr.str();
575  saveData(os, result);
576  }
577 
578 
579  void save(std::ostream &os) const
580  {
581  int32 v = version();
582  UTwrite(os, &v);
583  saveData(os, myMethod);
584  saveData(os, myOutputType);
585  saveData(os, myOutputGroup);
586  saveData(os, myOutput);
587  {
588  int64 length = myInputs.entries();
589  UTwrite(os, &length);
590  for (exint i = 0; i < length; i++)
591  {
592  auto && _curentry = myInputs(i);
593  (void) _curentry;
594  saveData(os, _curentry.name);
595 
596  }
597  }
598  saveData(os, myInputGroup);
599  saveData(os, myUnload);
600 
601  }
602 
603  bool load(UT_IStream &is)
604  {
605  int32 v;
606  is.bread(&v, 1);
607  if (version() != v)
608  {
609  // Fail incompatible versions
610  return false;
611  }
612  loadData(is, myMethod);
613  loadData(is, myOutputType);
614  loadData(is, myOutputGroup);
615  loadData(is, myOutput);
616  {
617  int64 length;
618  is.read(&length, 1);
619  myInputs.setSize(length);
620  for (exint i = 0; i < length; i++)
621  {
622  auto && _curentry = myInputs(i);
623  (void) _curentry;
624  loadData(is, _curentry.name);
625 
626  }
627  }
628  loadData(is, myInputGroup);
629  loadData(is, myUnload);
630 
631  return true;
632  }
633 
634  Method getMethod() const { return Method(myMethod); }
635  void setMethod(Method val) { myMethod = int64(val); }
636  Method opMethod(const SOP_NodeVerb::CookParms &cookparms) const
637  {
638  SOP_Node *thissop = cookparms.getNode();
639  if (!thissop) return getMethod();
640  int64 result;
641  OP_Utils::evalOpParm(result, thissop, "method", cookparms.getCookTime(), 0);
642  return Method(result);
643  }
644  OutputType getOutputType() const { return OutputType(myOutputType); }
645  void setOutputType(OutputType val) { myOutputType = int64(val); }
647  {
648  SOP_Node *thissop = cookparms.getNode();
649  if (!thissop) return getOutputType();
650  int64 result;
651  OP_Utils::evalOpParm(result, thissop, "outputtype", cookparms.getCookTime(), 0);
652  return OutputType(result);
653  }
654  const UT_StringHolder & getOutputGroup() const { return myOutputGroup; }
655  void setOutputGroup(const UT_StringHolder & val) { myOutputGroup = val; }
657  {
658  SOP_Node *thissop = cookparms.getNode();
659  if (!thissop) return getOutputGroup();
661  OP_Utils::evalOpParm(result, thissop, "outputgroup", cookparms.getCookTime(), 0);
662  return result;
663  }
664  const UT_StringHolder & getOutput() const { return myOutput; }
665  void setOutput(const UT_StringHolder & val) { myOutput = val; }
667  {
668  SOP_Node *thissop = cookparms.getNode();
669  if (!thissop) return getOutput();
671  OP_Utils::evalOpParm(result, thissop, "output", cookparms.getCookTime(), 0);
672  return result;
673  }
674  const UT_Array<Inputs> &getInputs() const { return myInputs; }
675 void setInputs(const UT_Array<Inputs> &val) { myInputs = val; }
676  exint opInputs(const SOP_NodeVerb::CookParms &cookparms) const
677  {
678  SOP_Node *thissop = cookparms.getNode();
679  if (!thissop) return getInputs().entries();
680  exint result;
681  OP_Utils::evalOpParm(result, thissop, "inputs", cookparms.getCookTime(), 0);
682  return result;
683  }
684  UT_StringHolder opInputs_name(const SOP_NodeVerb::CookParms &cookparms, int _idx) const
685  { return opinstInputs_name(cookparms, &_idx); }
686  UT_StringHolder opinstInputs_name(const SOP_NodeVerb::CookParms &cookparms, const int *_idx) const
687  {
688  SOP_Node *thissop = cookparms.getNode();
689  if (!thissop) return (myInputs(_idx[0]).name);
690  int _parmidx[2-1];
691  _parmidx[1-1] = _idx[1-1] + 0;
692 
694  OP_Utils::evalOpParmInst(result, thissop, "name#", _parmidx, cookparms.getCookTime(), 0, 2-1);
695  return (result);
696  }
697 
698  const UT_StringHolder & getInputGroup() const { return myInputGroup; }
699  void setInputGroup(const UT_StringHolder & val) { myInputGroup = val; }
701  {
702  SOP_Node *thissop = cookparms.getNode();
703  if (!thissop) return getInputGroup();
705  OP_Utils::evalOpParm(result, thissop, "inputgroup", cookparms.getCookTime(), 0);
706  return result;
707  }
708  Unload getUnload() const { return Unload(myUnload); }
709  void setUnload(Unload val) { myUnload = int64(val); }
710  Unload opUnload(const SOP_NodeVerb::CookParms &cookparms) const
711  {
712  SOP_Node *thissop = cookparms.getNode();
713  if (!thissop) return getUnload();
714  int64 result;
715  OP_Utils::evalOpParm(result, thissop, "unload", cookparms.getCookTime(), 0);
716  return Unload(result);
717  }
718 
719 private:
720  int64 myMethod;
721  int64 myOutputType;
722  UT_StringHolder myOutputGroup;
723  UT_StringHolder myOutput;
724  UT_Array<Inputs> myInputs;
725  UT_StringHolder myInputGroup;
726  int64 myUnload;
727 
728 };
type
Definition: core.h:556
static void saveData(std::ostream &os, UT_StringHolder s)
void setNestParmValue(TempIndex idx, TempIndex instance, const exint &value) override
void setNestParmValue(TempIndex idx, TempIndex instance, const UT_SharedPtr< UT_Ramp > &value) override
static void saveData(std::ostream &os, UT_Matrix2D v)
GLenum GLuint GLenum GLsizei const GLchar * buf
Definition: glcorearb.h:2540
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 saveData(std::ostream &os, UT_SharedPtr< UT_Ramp > s)
UT_StringHolder opOutput(const SOP_NodeVerb::CookParms &cookparms) const
void setNestParmValue(TempIndex idx, TempIndex instance, const UT_Matrix2D &value) override
void getNestParmValue(TempIndex idx, TempIndex instance, fpreal &value) const override
static void saveData(std::ostream &os, UT_Vector4D v)
void getNestParmValue(TempIndex idx, TempIndex instance, UT_Matrix3D &value) const override
void
Definition: png.h:1083
exint bread(int32 *buffer, exint asize=1)
GLboolean * data
Definition: glcorearb.h:131
GT_API const UT_StringHolder time
void setOutputGroup(const UT_StringHolder &val)
constexpr SYS_FORCE_INLINE T & y() noexcept
Definition: UT_Vector4.h:493
const GLdouble * v
Definition: glcorearb.h:837
void getNestParmValue(TempIndex idx, TempIndex instance, UT_SharedPtr< UT_Ramp > &value) const override
fpreal getTime() const
Definition: OP_Context.h:63
exint getNestNumParms(TempIndex idx) const override
GLsizei const GLfloat * value
Definition: glcorearb.h:824
const UT_Array< Inputs > & getInputs() const
UT_String makeQuotedString(char delimiter='\'', bool escape_nonprinting=false) const
const OP_Context & context() const
Definition: OP_NodeParms.h:97
UT_StringHolder opInputs_name(const SOP_NodeVerb::CookParms &cookparms, int _idx) const
constexpr SYS_FORCE_INLINE T & z() noexcept
Definition: UT_Vector3.h:667
int64 exint
Definition: SYS_Types.h:125
SYS_FORCE_INLINE const char * buffer() const
bool operator!=(const Inputs &src) const
GLdouble s
Definition: glad.h:3009
void getNestParmValue(TempIndex idx, TempIndex instance, UT_Vector2D &value) const override
GLuint GLsizei GLsizei * length
Definition: glcorearb.h:795
const UT_StringHolder & getOutput() const
An output stream object that owns its own string buffer storage.
UT_StringHolder opOutputGroup(const SOP_NodeVerb::CookParms &cookparms) const
bool load(UT_IStream &is)
static void loadData(UT_IStream &is, bool &v)
void getNestParmValue(TempIndex idx, TempIndex instance, PRM_DataItemHandle &value) const override
**But if you need a result
Definition: thread.h:622
void setNestParmValue(TempIndex idx, TempIndex instance, const UT_Vector3D &value) 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.
static void saveData(std::ostream &os, int64 v)
void setInputGroup(const UT_StringHolder &val)
constexpr SYS_FORCE_INLINE T & x() noexcept
Definition: UT_Vector4.h:491
OutputType opOutputType(const SOP_NodeVerb::CookParms &cookparms) const
GLuint GLsizei const GLuint const GLintptr * offsets
Definition: glcorearb.h:2621
void getNestParmValue(TempIndex idx, TempIndex instance, UT_Vector3D &value) const override
double fpreal64
Definition: SYS_Types.h:201
UT_SharedPtr< const PRM_DataItem > PRM_DataItemHandle
Definition: APEX_Include.h:55
constexpr SYS_FORCE_INLINE T & x() noexcept
Definition: UT_Vector2.h:423
void doSetParmValue(TempIndex idx, TempIndex instance, const T &value)
void setNestParmValue(TempIndex idx, TempIndex instance, const PRM_DataItemHandle &value) override
static void saveData(std::ostream &os, bool v)
void setNestParmValue(TempIndex idx, TempIndex instance, const UT_Vector4D &value) override
bool operator==(const BaseDimensions< T > &a, const BaseDimensions< Y > &b)
Definition: Dimensions.h:137
static void saveData(std::ostream &os, fpreal64 v)
bool isParmColorRamp(exint idx) const override
static void loadData(UT_IStream &is, UT_Vector4D &v)
static void saveData(std::ostream &os, PRM_DataItemHandle s)
const char * getNestParmName(TempIndex fieldnum) const override
static void saveData(std::ostream &os, UT_Matrix3D v)
void setOutput(const UT_StringHolder &val)
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
void setNestParmValue(TempIndex idx, TempIndex instance, const UT_Vector2D &value) override
constexpr SYS_FORCE_INLINE T & z() noexcept
Definition: UT_Vector4.h:495
static void loadData(UT_IStream &is, PRM_DataItemHandle &v)
exint opInputs(const SOP_NodeVerb::CookParms &cookparms) const
void getNestParmValue(TempIndex idx, TempIndex instance, UT_Matrix2D &value) const override
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
void doGetParmValue(TempIndex idx, TempIndex instance, T &value) const
SYS_FORCE_INLINE UT_StringHolder getToken(Method enum_value)
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
OutputType getOutputType() const
void setNestParmValue(TempIndex idx, TempIndex instance, const UT_StringHolder &value) override
void getNestParmValue(TempIndex idx, TempIndex instance, UT_StringHolder &value) const override
void setOutputType(OutputType val)
void getNestParmValue(TempIndex idx, TempIndex instance, UT_Matrix4D &value) const override
static void loadData(UT_IStream &is, int64 &v)
Unload opUnload(const SOP_NodeVerb::CookParms &cookparms) const
static void loadData(UT_IStream &is, UT_StringHolder &v)
bool operator==(const SOP_InvokeGraphParms &src) const
static void loadData(UT_IStream &is, UT_Matrix4D &v)
GLuint const GLchar * name
Definition: glcorearb.h:786
virtual void evalOpParm(int64 &v, NodeIdx node, const char *parmname, fpreal time, DEP_MicroNode *depnode) const =0
SYS_FORCE_INLINE void strcat(const char *src)
static void loadData(UT_IStream &is, UT_Vector3D &v)
void saveBinary(std::ostream &os) const
Save string to binary stream.
Definition: UT_String.h:303
UT_StringHolder createString(const UT_Array< Inputs > &list) const
GT_API const UT_StringHolder version
void save(std::ostream &os) const
static void loadData(UT_IStream &is, fpreal64 &v)
exint entries() const
Alias of size(). size() is preferred.
Definition: UT_Array.h:655
const UT_StringHolder & getOutputGroup() const
static void saveData(std::ostream &os, UT_Vector3D v)
bool operator!=(const SOP_InvokeGraphParms &src) const
static void loadData(UT_IStream &is, UT_Matrix3D &v)
void setInputs(const UT_Array< Inputs > &val)
void setNestParmValue(TempIndex idx, TempIndex instance, const UT_Matrix3D &value) override
void setNestParmValue(TempIndex idx, TempIndex instance, const UT_Matrix4D &value) override
static void loadData(UT_IStream &is, UT_SharedPtr< UT_Ramp > &v)
fpreal64 fpreal
Definition: SYS_Types.h:278
DEP_MicroNode * depnode() const
Definition: OP_NodeParms.h:99
LeafData & operator=(const LeafData &)=delete
void setNestParmValue(TempIndex idx, TempIndex instance, const fpreal &value) override
Utility class for containing a color ramp.
Definition: UT_Ramp.h:96
ParmType getNestParmType(TempIndex fieldnum) const override
constexpr SYS_FORCE_INLINE T & w() noexcept
Definition: UT_Vector4.h:497
SYS_FORCE_INLINE void append(char character)
GLuint GLfloat * val
Definition: glcorearb.h:1608
virtual UT_StringHolder baseGetSignature() const
Definition: OP_NodeParms.h:294
static void loadData(UT_IStream &is, UT_Matrix2D &v)
UT_StringHolder opInputGroup(const SOP_NodeVerb::CookParms &cookparms) const
#define SOP_API
Definition: SOP_API.h:10
fpreal getCookTime() const
Definition: SOP_NodeVerb.h:372
void loadFromOpSubclass(const LoadParms &loadparms) override
bool operator==(const Inputs &src) const
const char * findChar(int c) const
Definition: UT_String.h:1401
#define UT_ASSERT(ZZ)
Definition: UT_Assert.h:156
static void saveData(std::ostream &os, UT_Vector2D v)
GLboolean r
Definition: glcorearb.h:1222
void getNestParmValue(TempIndex idx, TempIndex instance, exint &value) const override
const UT_StringHolder & getInputGroup() const
constexpr SYS_FORCE_INLINE T & y() noexcept
Definition: UT_Vector3.h:665
void buildFromOp(const OP_GraphProxy *graph, exint nodeidx, fpreal time, DEP_MicroNode *depnode)
static void loadData(UT_IStream &is, UT_Vector2I &v)
virtual bool isDirect() const =0
Direct proxies mirror actual nodes:
UT_StringHolder opinstInputs_name(const SOP_NodeVerb::CookParms &cookparms, const int *_idx) const
static void saveData(std::ostream &os, UT_Matrix4D v)
constexpr SYS_FORCE_INLINE T & y() noexcept
Definition: UT_Vector2.h:425
SYS_FORCE_INLINE bool isstring() const
void getNestParmValue(TempIndex idx, TempIndex instance, UT_Vector4D &value) const override
Method opMethod(const SOP_NodeVerb::CookParms &cookparms) const
SYS_FORCE_INLINE void strncpy(const char *src, exint maxlen)
static void loadData(UT_IStream &is, UT_Vector3I &v)
GLenum src
Definition: glcorearb.h:1793
constexpr SYS_FORCE_INLINE T & x() noexcept
Definition: UT_Vector3.h:663
void copyFrom(const OP_NodeParms *src) override
static void loadData(UT_IStream &is, UT_Vector2D &v)