HDK
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
SOP_CarveParms.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_NodeVerb.h>
7 #include <OP/OP_Utils.h>
8 #include <PRM/PRM_Parm.h>
9 #include <UT/UT_IStream.h>
10 #include <UT/UT_NTStreamUtil.h>
11 #include <UT/UT_Ramp.h>
12 #include <UT/UT_SharedPtr.h>
13 #include <UT/UT_StringHolder.h>
14 #include <UT/UT_StringStream.h>
15 #include <UT/UT_VectorTypes.h>
16 #include <SYS/SYS_Types.h>
17 
18 using namespace UT::Literal;
19 
20 class DEP_MicroNode;
21 
23 {
24 public:
25  static int version() { return 1; }
26 
28  {
29  myGroup = ""_sh;
30  myFirstU = true;
31  myDomainU1 = 0.25;
32  mySecondU = false;
33  myDomainU2 = 0.75;
34  myFirstV = false;
35  myDomainV1 = 0.25;
36  mySecondV = false;
37  myDomainV2 = 0.75;
38  myOnlyBreakpoints = 0;
39  myDivsU = 2;
40  myDivsV = 2;
41  myAllUBreakpoints = false;
42  myAllVBreakpoints = false;
43  myFunction = 0;
44  myKeepIn = true;
45  myKeepOut = false;
46  myExtractOp = 0;
47  myKeepOriginal = false;
48 
49  }
50 
51  explicit SOP_CarveParms(const SOP_CarveParms &) = default;
52 
53  virtual ~SOP_CarveParms() {}
54 
55  bool operator==(const SOP_CarveParms &src) const
56  {
57  if (myGroup != src.myGroup) return false;
58  if (myFirstU != src.myFirstU) return false;
59  if (myDomainU1 != src.myDomainU1) return false;
60  if (mySecondU != src.mySecondU) return false;
61  if (myDomainU2 != src.myDomainU2) return false;
62  if (myFirstV != src.myFirstV) return false;
63  if (myDomainV1 != src.myDomainV1) return false;
64  if (mySecondV != src.mySecondV) return false;
65  if (myDomainV2 != src.myDomainV2) return false;
66  if (myOnlyBreakpoints != src.myOnlyBreakpoints) return false;
67  if (myDivsU != src.myDivsU) return false;
68  if (myDivsV != src.myDivsV) return false;
69  if (myAllUBreakpoints != src.myAllUBreakpoints) return false;
70  if (myAllVBreakpoints != src.myAllVBreakpoints) return false;
71  if (myFunction != src.myFunction) return false;
72  if (myKeepIn != src.myKeepIn) return false;
73  if (myKeepOut != src.myKeepOut) return false;
74  if (myExtractOp != src.myExtractOp) return false;
75  if (myKeepOriginal != src.myKeepOriginal) return false;
76 
77  return true;
78  }
79  bool operator!=(const SOP_CarveParms &src) const
80  {
81  return !operator==(src);
82  }
83 
84 
85 
86  void buildFromOp(const OP_Node *node, fpreal time, DEP_MicroNode *depnode)
87  {
88  if (true)
89  OP_Utils::evalOpParm(myGroup, node, "group", time, 0);
90  else myGroup = ""_sh;
91  if (true)
92  OP_Utils::evalOpParm(myFirstU, node, "firstu", time, 0);
93  else myFirstU = true;
94  if (true)
95  OP_Utils::evalOpParm(myDomainU1, node, "domainu1", time, 0);
96  else myDomainU1 = 0.25;
97  if (true)
98  OP_Utils::evalOpParm(mySecondU, node, "secondu", time, 0);
99  else mySecondU = false;
100  if (true)
101  OP_Utils::evalOpParm(myDomainU2, node, "domainu2", time, 0);
102  else myDomainU2 = 0.75;
103  if (true)
104  OP_Utils::evalOpParm(myFirstV, node, "firstv", time, 0);
105  else myFirstV = false;
106  if (true)
107  OP_Utils::evalOpParm(myDomainV1, node, "domainv1", time, 0);
108  else myDomainV1 = 0.25;
109  if (true)
110  OP_Utils::evalOpParm(mySecondV, node, "secondv", time, 0);
111  else mySecondV = false;
112  if (true)
113  OP_Utils::evalOpParm(myDomainV2, node, "domainv2", time, 0);
114  else myDomainV2 = 0.75;
115  if (true)
116  OP_Utils::evalOpParm(myOnlyBreakpoints, node, "onlybreakpoints", time, 0);
117  else myOnlyBreakpoints = 0;
118  if (true && ( (getOnlyBreakpoints()==0) ) )
119  OP_Utils::evalOpParm(myDivsU, node, "divsu", time, 0);
120  else myDivsU = 2;
121  if (true && ( (getOnlyBreakpoints()==0) ) )
122  OP_Utils::evalOpParm(myDivsV, node, "divsv", time, 0);
123  else myDivsV = 2;
124  if (true && ( (getOnlyBreakpoints()==1) ) )
125  OP_Utils::evalOpParm(myAllUBreakpoints, node, "allubreakpoints", time, 0);
126  else myAllUBreakpoints = false;
127  if (true && ( (getOnlyBreakpoints()==1) ) )
128  OP_Utils::evalOpParm(myAllVBreakpoints, node, "allvbreakpoints", time, 0);
129  else myAllVBreakpoints = false;
130  if (true)
131  OP_Utils::evalOpParm(myFunction, node, "stdswitcher", time, 0);
132  else myFunction = 0;
133  if (true && ( (getFunction()==0) ) )
134  OP_Utils::evalOpParm(myKeepIn, node, "keepin", time, 0);
135  else myKeepIn = true;
136  if (true && ( (getFunction()==0) ) )
137  OP_Utils::evalOpParm(myKeepOut, node, "keepout", time, 0);
138  else myKeepOut = false;
139  if (true && ( (getFunction()==1) ) )
140  OP_Utils::evalOpParm(myExtractOp, node, "extractop", time, 0);
141  else myExtractOp = 0;
142  if (true && ( (getFunction()==1) ) )
143  OP_Utils::evalOpParm(myKeepOriginal, node, "keepOriginal", time, 0);
144  else myKeepOriginal = false;
145 
146  }
147 
148 
149  virtual void loadFromOpSubclass(const LoadParms &loadparms)
150  {
151  buildFromOp(loadparms.node(), loadparms.context().getTime(), loadparms.depnode());
152  }
153 
154 
155  virtual void copyFrom(const SOP_NodeParms *src)
156  {
157  *this = *((const SOP_CarveParms *)src);
158  }
159 
160  template <typename T>
161  void
162  doGetParmValue(exint idx, T &value) const
163  {
164  switch (idx)
165  {
166  case 0:
167  coerceValue(value, myGroup);
168  break;
169  case 1:
170  coerceValue(value, myFirstU);
171  break;
172  case 2:
173  coerceValue(value, myDomainU1);
174  break;
175  case 3:
176  coerceValue(value, mySecondU);
177  break;
178  case 4:
179  coerceValue(value, myDomainU2);
180  break;
181  case 5:
182  coerceValue(value, myFirstV);
183  break;
184  case 6:
185  coerceValue(value, myDomainV1);
186  break;
187  case 7:
188  coerceValue(value, mySecondV);
189  break;
190  case 8:
191  coerceValue(value, myDomainV2);
192  break;
193  case 9:
194  coerceValue(value, myOnlyBreakpoints);
195  break;
196  case 10:
197  coerceValue(value, myDivsU);
198  break;
199  case 11:
200  coerceValue(value, myDivsV);
201  break;
202  case 12:
203  coerceValue(value, myAllUBreakpoints);
204  break;
205  case 13:
206  coerceValue(value, myAllVBreakpoints);
207  break;
208  case 14:
209  coerceValue(value, myFunction);
210  break;
211  case 15:
212  coerceValue(value, myKeepIn);
213  break;
214  case 16:
215  coerceValue(value, myKeepOut);
216  break;
217  case 17:
218  coerceValue(value, myExtractOp);
219  break;
220  case 18:
221  coerceValue(value, myKeepOriginal);
222  break;
223 
224  }
225  }
226 
227  void getParmValue(exint idx, exint &value) const
228  { doGetParmValue(idx, value); }
229  void getParmValue(exint idx, fpreal &value) const
230  { doGetParmValue(idx, value); }
232  { doGetParmValue(idx, value); }
234  { doGetParmValue(idx, value); }
236  { doGetParmValue(idx, value); }
238  { doGetParmValue(idx, value); }
240  { doGetParmValue(idx, value); }
242  { doGetParmValue(idx, value); }
244  { doGetParmValue(idx, value); }
246  { doGetParmValue(idx, value); }
248  { doGetParmValue(idx, value); }
249 
250  template <typename T>
251  void
252  doSetParmValue(exint idx, const T &value)
253  {
254  switch (idx)
255  {
256  case 0:
257  coerceValue(myGroup, value);
258  break;
259  case 1:
260  coerceValue(myFirstU, value);
261  break;
262  case 2:
263  coerceValue(myDomainU1, value);
264  break;
265  case 3:
266  coerceValue(mySecondU, value);
267  break;
268  case 4:
269  coerceValue(myDomainU2, value);
270  break;
271  case 5:
272  coerceValue(myFirstV, value);
273  break;
274  case 6:
275  coerceValue(myDomainV1, value);
276  break;
277  case 7:
278  coerceValue(mySecondV, value);
279  break;
280  case 8:
281  coerceValue(myDomainV2, value);
282  break;
283  case 9:
284  coerceValue(myOnlyBreakpoints, value);
285  break;
286  case 10:
287  coerceValue(myDivsU, value);
288  break;
289  case 11:
290  coerceValue(myDivsV, value);
291  break;
292  case 12:
293  coerceValue(myAllUBreakpoints, value);
294  break;
295  case 13:
296  coerceValue(myAllVBreakpoints, value);
297  break;
298  case 14:
299  coerceValue(myFunction, value);
300  break;
301  case 15:
302  coerceValue(myKeepIn, value);
303  break;
304  case 16:
305  coerceValue(myKeepOut, value);
306  break;
307  case 17:
308  coerceValue(myExtractOp, value);
309  break;
310  case 18:
311  coerceValue(myKeepOriginal, value);
312  break;
313 
314  }
315  }
316 
317  void setParmValue(exint idx, const exint &value)
318  { doSetParmValue(idx, value); }
319  void setParmValue(exint idx, const fpreal &value)
320  { doSetParmValue(idx, value); }
321  void setParmValue(exint idx, const UT_Vector2D &value)
322  { doSetParmValue(idx, value); }
323  void setParmValue(exint idx, const UT_Vector3D &value)
324  { doSetParmValue(idx, value); }
325  void setParmValue(exint idx, const UT_Vector4D &value)
326  { doSetParmValue(idx, value); }
327  void setParmValue(exint idx, const UT_Matrix2D &value)
328  { doSetParmValue(idx, value); }
329  void setParmValue(exint idx, const UT_Matrix3D &value)
330  { doSetParmValue(idx, value); }
331  void setParmValue(exint idx, const UT_Matrix4D &value)
332  { doSetParmValue(idx, value); }
334  { doSetParmValue(idx, value); }
336  { doSetParmValue(idx, value); }
338  { doSetParmValue(idx, value); }
339 
340  virtual exint getNumParms() const
341  {
342  return 19;
343  }
344 
345  virtual const char *getParmName(exint fieldnum) const
346  {
347  switch (fieldnum)
348  {
349  case 0:
350  return "group";
351  case 1:
352  return "firstu";
353  case 2:
354  return "domainu1";
355  case 3:
356  return "secondu";
357  case 4:
358  return "domainu2";
359  case 5:
360  return "firstv";
361  case 6:
362  return "domainv1";
363  case 7:
364  return "secondv";
365  case 8:
366  return "domainv2";
367  case 9:
368  return "onlybreakpoints";
369  case 10:
370  return "divsu";
371  case 11:
372  return "divsv";
373  case 12:
374  return "allubreakpoints";
375  case 13:
376  return "allvbreakpoints";
377  case 14:
378  return "stdswitcher";
379  case 15:
380  return "keepin";
381  case 16:
382  return "keepout";
383  case 17:
384  return "extractop";
385  case 18:
386  return "keepOriginal";
387 
388  }
389  return 0;
390  }
391 
392  virtual ParmType getParmType(exint fieldnum) const
393  {
394  switch (fieldnum)
395  {
396  case 0:
397  return PARM_STRING;
398  case 1:
399  return PARM_INTEGER;
400  case 2:
401  return PARM_FLOAT;
402  case 3:
403  return PARM_INTEGER;
404  case 4:
405  return PARM_FLOAT;
406  case 5:
407  return PARM_INTEGER;
408  case 6:
409  return PARM_FLOAT;
410  case 7:
411  return PARM_INTEGER;
412  case 8:
413  return PARM_FLOAT;
414  case 9:
415  return PARM_INTEGER;
416  case 10:
417  return PARM_INTEGER;
418  case 11:
419  return PARM_INTEGER;
420  case 12:
421  return PARM_INTEGER;
422  case 13:
423  return PARM_INTEGER;
424  case 14:
425  return PARM_INTEGER;
426  case 15:
427  return PARM_INTEGER;
428  case 16:
429  return PARM_INTEGER;
430  case 17:
431  return PARM_INTEGER;
432  case 18:
433  return PARM_INTEGER;
434 
435  }
436  return PARM_UNSUPPORTED;
437  }
438 
439  // Boiler plate to load individual types.
440  static void loadData(UT_IStream &is, int64 &v)
441  { is.bread(&v, 1); }
442  static void loadData(UT_IStream &is, bool &v)
443  { int64 iv; is.bread(&iv, 1); v = iv; }
444  static void loadData(UT_IStream &is, fpreal64 &v)
445  { is.bread<fpreal64>(&v, 1); }
446  static void loadData(UT_IStream &is, UT_Vector2D &v)
447  { is.bread<fpreal64>(&v.x(), 1); is.bread<fpreal64>(&v.y(), 1); }
448  static void loadData(UT_IStream &is, UT_Vector3D &v)
449  { is.bread<fpreal64>(&v.x(), 1); is.bread<fpreal64>(&v.y(), 1);
450  is.bread<fpreal64>(&v.z(), 1); }
451  static void loadData(UT_IStream &is, UT_Vector4D &v)
452  { is.bread<fpreal64>(&v.x(), 1); is.bread<fpreal64>(&v.y(), 1);
453  is.bread<fpreal64>(&v.z(), 1); is.bread<fpreal64>(&v.w(), 1); }
454  static void loadData(UT_IStream &is, UT_Matrix2D &v)
455  { for (int r = 0; r < 2; r++) for (int c = 0; c < 2; c++) is.bread<fpreal64>(&v(r, c), 1); }
456  static void loadData(UT_IStream &is, UT_Matrix3D &v)
457  { for (int r = 0; r < 3; r++) for (int c = 0; c < 3; c++) is.bread<fpreal64>(&v(r, c), 1); }
458  static void loadData(UT_IStream &is, UT_Matrix4D &v)
459  { for (int r = 0; r < 4; r++) for (int c = 0; c < 4; c++) is.bread<fpreal64>(&v(r, c), 1); }
460  static void loadData(UT_IStream &is, UT_Vector2I &v)
461  { is.bread<int64>(&v.x(), 1); is.bread<int64>(&v.y(), 1); }
462  static void loadData(UT_IStream &is, UT_Vector3I &v)
463  { is.bread<int64>(&v.x(), 1); is.bread<int64>(&v.y(), 1);
464  is.bread<int64>(&v.z(), 1); }
465  static void loadData(UT_IStream &is, UT_Vector4I &v)
466  { is.bread<int64>(&v.x(), 1); is.bread<int64>(&v.y(), 1);
467  is.bread<int64>(&v.z(), 1); is.bread<int64>(&v.w(), 1); }
469  { is.bread(v); }
471  { UT_StringHolder rampdata;
472  loadData(is, rampdata);
473  if (rampdata.isstring())
474  {
475  v.reset(new UT_Ramp());
476  UT_IStream istr((const char *) rampdata, rampdata.length(), UT_ISTREAM_ASCII);
477  v->load(istr);
478  }
479  else v.reset();
480  }
483  loadData(is, data);
484  if (data.isstring())
485  {
486  // Find the data type.
487  char *colon = UT_StringWrap(data).findChar(':');
488  if (colon)
489  {
490  int typelen = colon - data.buffer();
492  type.strncpy(data.buffer(), typelen);
493  UT_IStream istr(((const char *) data) + typelen + 1, data.length() - (typelen + 1), UT_ISTREAM_BINARY);
494 
495  v = PRM_DataFactory::parseBinary(type.buffer(), istr);
496  }
497  }
498  else v.reset();
499  }
500 
501  static void saveData(std::ostream &os, int64 v)
502  { UTwrite(os, &v); }
503  static void saveData(std::ostream &os, bool v)
504  { int64 iv = v; UTwrite(os, &iv); }
505  static void saveData(std::ostream &os, fpreal64 v)
506  { UTwrite<fpreal64>(os, &v); }
507  static void saveData(std::ostream &os, UT_Vector2D v)
508  { UTwrite<fpreal64>(os, &v.x()); UTwrite<fpreal64>(os, &v.y()); }
509  static void saveData(std::ostream &os, UT_Vector3D v)
510  { UTwrite<fpreal64>(os, &v.x()); UTwrite<fpreal64>(os, &v.y());
511  UTwrite<fpreal64>(os, &v.z()); }
512  static void saveData(std::ostream &os, UT_Vector4D v)
513  { UTwrite<fpreal64>(os, &v.x()); UTwrite<fpreal64>(os, &v.y());
514  UTwrite<fpreal64>(os, &v.z()); UTwrite<fpreal64>(os, &v.w()); }
515  static void saveData(std::ostream &os, UT_Matrix2D v)
517  static void saveData(std::ostream &os, UT_Matrix3D v)
519  static void saveData(std::ostream &os, UT_Matrix4D v)
521  static void saveData(std::ostream &os, UT_StringHolder s)
522  { UT_StringWrap(s).saveBinary(os); }
523  static void saveData(std::ostream &os, UT_SharedPtr<UT_Ramp> s)
524  { UT_StringHolder result;
525  UT_OStringStream ostr;
526  if (s) s->save(ostr);
527  result = ostr.str();
528  saveData(os, result);
529  }
530  static void saveData(std::ostream &os, PRM_DataItemHandle s)
531  { UT_StringHolder result;
532  UT_OStringStream ostr;
533  if (s)
534  {
535  ostr << s->getDataTypeToken();
536  ostr << ":";
537  s->saveBinary(ostr);
538  }
539  result = ostr.str();
540  saveData(os, result);
541  }
542 
543 
544  void save(std::ostream &os) const
545  {
546  int32 v = version();
547  UTwrite(os, &v);
548  saveData(os, myGroup);
549  saveData(os, myFirstU);
550  saveData(os, myDomainU1);
551  saveData(os, mySecondU);
552  saveData(os, myDomainU2);
553  saveData(os, myFirstV);
554  saveData(os, myDomainV1);
555  saveData(os, mySecondV);
556  saveData(os, myDomainV2);
557  saveData(os, myOnlyBreakpoints);
558  saveData(os, myDivsU);
559  saveData(os, myDivsV);
560  saveData(os, myAllUBreakpoints);
561  saveData(os, myAllVBreakpoints);
562  saveData(os, myFunction);
563  saveData(os, myKeepIn);
564  saveData(os, myKeepOut);
565  saveData(os, myExtractOp);
566  saveData(os, myKeepOriginal);
567 
568  }
569 
570  bool load(UT_IStream &is)
571  {
572  int32 v;
573  is.bread(&v, 1);
574  if (version() != v)
575  {
576  // Fail incompatible versions
577  return false;
578  }
579  loadData(is, myGroup);
580  loadData(is, myFirstU);
581  loadData(is, myDomainU1);
582  loadData(is, mySecondU);
583  loadData(is, myDomainU2);
584  loadData(is, myFirstV);
585  loadData(is, myDomainV1);
586  loadData(is, mySecondV);
587  loadData(is, myDomainV2);
588  loadData(is, myOnlyBreakpoints);
589  loadData(is, myDivsU);
590  loadData(is, myDivsV);
591  loadData(is, myAllUBreakpoints);
592  loadData(is, myAllVBreakpoints);
593  loadData(is, myFunction);
594  loadData(is, myKeepIn);
595  loadData(is, myKeepOut);
596  loadData(is, myExtractOp);
597  loadData(is, myKeepOriginal);
598 
599  return true;
600  }
601 
602  const UT_StringHolder & getGroup() const { return myGroup; }
603  void setGroup(const UT_StringHolder & val) { myGroup = val; }
605  {
606  SOP_Node *thissop = cookparms.getNode();
607  if (!thissop) return getGroup();
608  UT_StringHolder result;
609  OP_Utils::evalOpParm(result, thissop, "group", cookparms.getCookTime(), 0);
610  return result;
611  }
612  bool getFirstU() const { return myFirstU; }
613  void setFirstU(bool val) { myFirstU = val; }
614  bool opFirstU(const SOP_NodeVerb::CookParms &cookparms) const
615  {
616  SOP_Node *thissop = cookparms.getNode();
617  if (!thissop) return getFirstU();
618  bool result;
619  OP_Utils::evalOpParm(result, thissop, "firstu", cookparms.getCookTime(), 0);
620  return result;
621  }
622  fpreal64 getDomainU1() const { return myDomainU1; }
623  void setDomainU1(fpreal64 val) { myDomainU1 = val; }
625  {
626  SOP_Node *thissop = cookparms.getNode();
627  if (!thissop) return getDomainU1();
628  fpreal64 result;
629  OP_Utils::evalOpParm(result, thissop, "domainu1", cookparms.getCookTime(), 0);
630  return result;
631  }
632  bool getSecondU() const { return mySecondU; }
633  void setSecondU(bool val) { mySecondU = val; }
634  bool opSecondU(const SOP_NodeVerb::CookParms &cookparms) const
635  {
636  SOP_Node *thissop = cookparms.getNode();
637  if (!thissop) return getSecondU();
638  bool result;
639  OP_Utils::evalOpParm(result, thissop, "secondu", cookparms.getCookTime(), 0);
640  return result;
641  }
642  fpreal64 getDomainU2() const { return myDomainU2; }
643  void setDomainU2(fpreal64 val) { myDomainU2 = val; }
645  {
646  SOP_Node *thissop = cookparms.getNode();
647  if (!thissop) return getDomainU2();
648  fpreal64 result;
649  OP_Utils::evalOpParm(result, thissop, "domainu2", cookparms.getCookTime(), 0);
650  return result;
651  }
652  bool getFirstV() const { return myFirstV; }
653  void setFirstV(bool val) { myFirstV = val; }
654  bool opFirstV(const SOP_NodeVerb::CookParms &cookparms) const
655  {
656  SOP_Node *thissop = cookparms.getNode();
657  if (!thissop) return getFirstV();
658  bool result;
659  OP_Utils::evalOpParm(result, thissop, "firstv", cookparms.getCookTime(), 0);
660  return result;
661  }
662  fpreal64 getDomainV1() const { return myDomainV1; }
663  void setDomainV1(fpreal64 val) { myDomainV1 = val; }
665  {
666  SOP_Node *thissop = cookparms.getNode();
667  if (!thissop) return getDomainV1();
668  fpreal64 result;
669  OP_Utils::evalOpParm(result, thissop, "domainv1", cookparms.getCookTime(), 0);
670  return result;
671  }
672  bool getSecondV() const { return mySecondV; }
673  void setSecondV(bool val) { mySecondV = val; }
674  bool opSecondV(const SOP_NodeVerb::CookParms &cookparms) const
675  {
676  SOP_Node *thissop = cookparms.getNode();
677  if (!thissop) return getSecondV();
678  bool result;
679  OP_Utils::evalOpParm(result, thissop, "secondv", cookparms.getCookTime(), 0);
680  return result;
681  }
682  fpreal64 getDomainV2() const { return myDomainV2; }
683  void setDomainV2(fpreal64 val) { myDomainV2 = val; }
685  {
686  SOP_Node *thissop = cookparms.getNode();
687  if (!thissop) return getDomainV2();
688  fpreal64 result;
689  OP_Utils::evalOpParm(result, thissop, "domainv2", cookparms.getCookTime(), 0);
690  return result;
691  }
692  int64 getOnlyBreakpoints() const { return myOnlyBreakpoints; }
693  void setOnlyBreakpoints(int64 val) { myOnlyBreakpoints = val; }
695  {
696  SOP_Node *thissop = cookparms.getNode();
697  if (!thissop) return getOnlyBreakpoints();
698  int64 result;
699  OP_Utils::evalOpParm(result, thissop, "onlybreakpoints", cookparms.getCookTime(), 0);
700  return result;
701  }
702  int64 getDivsU() const { return myDivsU; }
703  void setDivsU(int64 val) { myDivsU = val; }
704  int64 opDivsU(const SOP_NodeVerb::CookParms &cookparms) const
705  {
706  SOP_Node *thissop = cookparms.getNode();
707  if (!thissop) return getDivsU();
708  int64 result;
709  OP_Utils::evalOpParm(result, thissop, "divsu", cookparms.getCookTime(), 0);
710  return result;
711  }
712  int64 getDivsV() const { return myDivsV; }
713  void setDivsV(int64 val) { myDivsV = val; }
714  int64 opDivsV(const SOP_NodeVerb::CookParms &cookparms) const
715  {
716  SOP_Node *thissop = cookparms.getNode();
717  if (!thissop) return getDivsV();
718  int64 result;
719  OP_Utils::evalOpParm(result, thissop, "divsv", cookparms.getCookTime(), 0);
720  return result;
721  }
722  bool getAllUBreakpoints() const { return myAllUBreakpoints; }
723  void setAllUBreakpoints(bool val) { myAllUBreakpoints = val; }
724  bool opAllUBreakpoints(const SOP_NodeVerb::CookParms &cookparms) const
725  {
726  SOP_Node *thissop = cookparms.getNode();
727  if (!thissop) return getAllUBreakpoints();
728  bool result;
729  OP_Utils::evalOpParm(result, thissop, "allubreakpoints", cookparms.getCookTime(), 0);
730  return result;
731  }
732  bool getAllVBreakpoints() const { return myAllVBreakpoints; }
733  void setAllVBreakpoints(bool val) { myAllVBreakpoints = val; }
734  bool opAllVBreakpoints(const SOP_NodeVerb::CookParms &cookparms) const
735  {
736  SOP_Node *thissop = cookparms.getNode();
737  if (!thissop) return getAllVBreakpoints();
738  bool result;
739  OP_Utils::evalOpParm(result, thissop, "allvbreakpoints", cookparms.getCookTime(), 0);
740  return result;
741  }
742  int64 getFunction() const { return myFunction; }
743  void setFunction(int64 val) { myFunction = val; }
744  int64 opFunction(const SOP_NodeVerb::CookParms &cookparms) const
745  {
746  SOP_Node *thissop = cookparms.getNode();
747  if (!thissop) return getFunction();
748  int64 result;
749  OP_Utils::evalOpParm(result, thissop, "stdswitcher", cookparms.getCookTime(), 0);
750  return result;
751  }
752  bool getKeepIn() const { return myKeepIn; }
753  void setKeepIn(bool val) { myKeepIn = val; }
754  bool opKeepIn(const SOP_NodeVerb::CookParms &cookparms) const
755  {
756  SOP_Node *thissop = cookparms.getNode();
757  if (!thissop) return getKeepIn();
758  bool result;
759  OP_Utils::evalOpParm(result, thissop, "keepin", cookparms.getCookTime(), 0);
760  return result;
761  }
762  bool getKeepOut() const { return myKeepOut; }
763  void setKeepOut(bool val) { myKeepOut = val; }
764  bool opKeepOut(const SOP_NodeVerb::CookParms &cookparms) const
765  {
766  SOP_Node *thissop = cookparms.getNode();
767  if (!thissop) return getKeepOut();
768  bool result;
769  OP_Utils::evalOpParm(result, thissop, "keepout", cookparms.getCookTime(), 0);
770  return result;
771  }
772  int64 getExtractOp() const { return myExtractOp; }
773  void setExtractOp(int64 val) { myExtractOp = val; }
774  int64 opExtractOp(const SOP_NodeVerb::CookParms &cookparms) const
775  {
776  SOP_Node *thissop = cookparms.getNode();
777  if (!thissop) return getExtractOp();
778  int64 result;
779  OP_Utils::evalOpParm(result, thissop, "extractop", cookparms.getCookTime(), 0);
780  return result;
781  }
782  bool getKeepOriginal() const { return myKeepOriginal; }
783  void setKeepOriginal(bool val) { myKeepOriginal = val; }
784  bool opKeepOriginal(const SOP_NodeVerb::CookParms &cookparms) const
785  {
786  SOP_Node *thissop = cookparms.getNode();
787  if (!thissop) return getKeepOriginal();
788  bool result;
789  OP_Utils::evalOpParm(result, thissop, "keepOriginal", cookparms.getCookTime(), 0);
790  return result;
791  }
792 
793 private:
794  UT_StringHolder myGroup;
795  bool myFirstU;
796  fpreal64 myDomainU1;
797  bool mySecondU;
798  fpreal64 myDomainU2;
799  bool myFirstV;
800  fpreal64 myDomainV1;
801  bool mySecondV;
802  fpreal64 myDomainV2;
803  int64 myOnlyBreakpoints;
804  int64 myDivsU;
805  int64 myDivsV;
806  bool myAllUBreakpoints;
807  bool myAllVBreakpoints;
808  int64 myFunction;
809  bool myKeepIn;
810  bool myKeepOut;
811  int64 myExtractOp;
812  bool myKeepOriginal;
813 
814 };
fpreal64 getDomainU1() const
void setFirstV(bool val)
bool opKeepOriginal(const SOP_NodeVerb::CookParms &cookparms) const
void getParmValue(exint idx, UT_Matrix3D &value) const
int64 opDivsV(const SOP_NodeVerb::CookParms &cookparms) const
static void saveData(std::ostream &os, UT_Matrix2D v)
void setFunction(int64 val)
virtual ParmType getParmType(exint fieldnum) const
SOP_Node * getNode() const
Definition: SOP_NodeVerb.h:494
void doGetParmValue(exint idx, T &value) const
T & z(void)
Definition: UT_Vector4.h:379
bool operator==(const SOP_CarveParms &src) const
void setDivsU(int64 val)
bool operator!=(const SOP_CarveParms &src) const
bool getSecondU() const
exint bread(int32 *buffer, exint asize=1)
int64 getExtractOp() const
GT_API const UT_StringHolder time
fpreal getTime() const
Definition: OP_Context.h:60
void getParmValue(exint idx, UT_SharedPtr< UT_Ramp > &value) const
const GLdouble * v
Definition: glcorearb.h:836
static void loadData(UT_IStream &is, UT_StringHolder &v)
bool opKeepOut(const SOP_NodeVerb::CookParms &cookparms) const
static void loadData(UT_IStream &is, fpreal64 &v)
static void loadData(UT_IStream &is, UT_SharedPtr< UT_Ramp > &v)
static void saveData(std::ostream &os, int64 v)
static void loadData(UT_IStream &is, UT_Vector4D &v)
static void saveData(std::ostream &os, fpreal64 v)
static void loadData(UT_IStream &is, PRM_DataItemHandle &v)
int64 opFunction(const SOP_NodeVerb::CookParms &cookparms) const
static void saveData(std::ostream &os, UT_SharedPtr< UT_Ramp > s)
static void saveData(std::ostream &os, UT_Vector2D v)
SYS_FORCE_INLINE const char * buffer() const
T & x(void)
Definition: UT_Vector2.h:285
void setExtractOp(int64 val)
void getParmValue(exint idx, UT_Vector3D &value) const
void setKeepOriginal(bool val)
void setParmValue(exint idx, const UT_Matrix4D &value)
static int version()
An output stream object that owns its own string buffer storage.
int64 opExtractOp(const SOP_NodeVerb::CookParms &cookparms) const
void setParmValue(exint idx, const UT_Vector4D &value)
void getParmValue(exint idx, UT_Vector2D &value) const
const UT_WorkBuffer & str() const
Returns a read-only reference to the underlying UT_WorkBuffer.
static void loadData(UT_IStream &is, UT_Vector3I &v)
static void loadData(UT_IStream &is, UT_Matrix3D &v)
SYS_FORCE_INLINE T & x(void)
Definition: UT_Vector3.h:498
fpreal64 getDomainV1() const
virtual void loadFromOpSubclass(const LoadParms &loadparms)
void getParmValue(exint idx, UT_Matrix4D &value) const
bool getFirstU() const
static PRM_DataItemHandle parseBinary(const char *type, UT_IStream &is)
int64 getDivsU() const
void setParmValue(exint idx, const PRM_DataItemHandle &value)
static void loadData(UT_IStream &is, UT_Matrix2D &v)
static void saveData(std::ostream &os, UT_StringHolder s)
const UT_StringHolder & getGroup() const
static void loadData(UT_IStream &is, bool &v)
void setParmValue(exint idx, const exint &value)
bool opSecondV(const SOP_NodeVerb::CookParms &cookparms) const
bool getSecondV() const
void doSetParmValue(exint idx, const T &value)
bool load(UT_IStream &is)
SYS_FORCE_INLINE T & z(void)
Definition: UT_Vector3.h:502
bool operator==(const BaseDimensions< T > &a, const BaseDimensions< Y > &b)
Definition: Dimensions.h:137
void setDomainU1(fpreal64 val)
long long int64
Definition: SYS_Types.h:107
void setGroup(const UT_StringHolder &val)
void setKeepIn(bool val)
void setOnlyBreakpoints(int64 val)
int64 getDivsV() const
bool getKeepOriginal() const
bool opFirstU(const SOP_NodeVerb::CookParms &cookparms) const
virtual void copyFrom(const SOP_NodeParms *src)
virtual const char * getParmName(exint fieldnum) const
void setDivsV(int64 val)
virtual exint getNumParms() const
static void saveData(std::ostream &os, UT_Matrix3D v)
exint length() const
char * findChar(int c) const
Find first occurrance of character. Returns NULL upon failure.
Definition: UT_String.h:550
fpreal64 getDomainU2() const
SYS_FORCE_INLINE const char * buffer() const
std::shared_ptr< T > UT_SharedPtr
Wrapper around std::shared_ptr.
Definition: UT_SharedPtr.h:28
int64 exint
Definition: SYS_Types.h:116
const OP_Node * node() const
Definition: SOP_NodeVerb.h:104
double fpreal64
Definition: SYS_Types.h:192
bool opSecondU(const SOP_NodeVerb::CookParms &cookparms) const
void getParmValue(exint idx, UT_Matrix2D &value) const
void setSecondV(bool val)
int64 getFunction() const
void setAllUBreakpoints(bool val)
bool opAllVBreakpoints(const SOP_NodeVerb::CookParms &cookparms) const
void getParmValue(exint idx, UT_StringHolder &value) const
void getParmValue(exint idx, exint &value) const
void setSecondU(bool val)
GLboolean * data
Definition: glcorearb.h:130
int int32
Definition: SYS_Types.h:35
T & y(void)
Definition: UT_Vector4.h:377
void getParmValue(exint idx, fpreal &value) const
void setDomainV2(fpreal64 val)
void setParmValue(exint idx, const UT_Vector2D &value)
void setParmValue(exint idx, const UT_StringHolder &value)
bool opAllUBreakpoints(const SOP_NodeVerb::CookParms &cookparms) const
int64 getOnlyBreakpoints() const
void setKeepOut(bool val)
void saveBinary(std::ostream &os) const
Save string to binary stream.
Definition: UT_String.h:294
static void loadData(UT_IStream &is, UT_Vector3D &v)
GT_API const UT_StringHolder version
DEP_MicroNode * depnode() const
Definition: SOP_NodeVerb.h:111
void setDomainV1(fpreal64 val)
void setParmValue(exint idx, const UT_Matrix2D &value)
fpreal64 getDomainV2() const
bool getKeepIn() const
SYS_FORCE_INLINE T & y(void)
Definition: UT_Vector3.h:500
GLsizei const GLfloat * value
Definition: glcorearb.h:823
double fpreal
Definition: SYS_Types.h:270
bool getFirstV() const
void setParmValue(exint idx, const fpreal &value)
void setAllVBreakpoints(bool val)
static void saveData(std::ostream &os, bool v)
static void saveData(std::ostream &os, UT_Matrix4D v)
void getParmValue(exint idx, UT_Vector4D &value) const
bool getKeepOut() const
int64 opDivsU(const SOP_NodeVerb::CookParms &cookparms) const
Utility class for containing a color ramp.
Definition: UT_Ramp.h:84
fpreal64 opDomainV2(const SOP_NodeVerb::CookParms &cookparms) const
static void loadData(UT_IStream &is, UT_Matrix4D &v)
GLuint GLfloat * val
Definition: glcorearb.h:1607
#define SOP_API
Definition: SOP_API.h:10
static void loadData(UT_IStream &is, int64 &v)
UT_StringHolder opGroup(const SOP_NodeVerb::CookParms &cookparms) const
void setParmValue(exint idx, const UT_Vector3D &value)
GLint GLint GLsizei GLint GLenum GLenum type
Definition: glcorearb.h:107
bool getAllVBreakpoints() const
int64 opOnlyBreakpoints(const SOP_NodeVerb::CookParms &cookparms) const
fpreal getCookTime() const
Definition: SOP_NodeVerb.h:501
T & x(void)
Definition: UT_Vector4.h:375
fpreal64 opDomainV1(const SOP_NodeVerb::CookParms &cookparms) const
bool getAllUBreakpoints() const
T & y(void)
Definition: UT_Vector2.h:287
void setFirstU(bool val)
bool opFirstV(const SOP_NodeVerb::CookParms &cookparms) const
void setParmValue(exint idx, const UT_SharedPtr< UT_Ramp > &value)
GLboolean r
Definition: glcorearb.h:1221
fpreal64 opDomainU2(const SOP_NodeVerb::CookParms &cookparms) const
static void loadData(UT_IStream &is, UT_Vector2D &v)
T & w(void)
Definition: UT_Vector4.h:381
static void loadData(UT_IStream &is, UT_Vector4I &v)
void setDomainU2(fpreal64 val)
const OP_Context & context() const
Definition: SOP_NodeVerb.h:109
UT_SharedPtr< const PRM_DataItem > PRM_DataItemHandle
Definition: PRM_Parm.h:88
static void saveData(std::ostream &os, UT_Vector3D v)
fpreal64 opDomainU1(const SOP_NodeVerb::CookParms &cookparms) const
void buildFromOp(const OP_Node *node, fpreal time, DEP_MicroNode *depnode)
void getParmValue(exint idx, PRM_DataItemHandle &value) const
SYS_FORCE_INLINE bool isstring() const
bool opKeepIn(const SOP_NodeVerb::CookParms &cookparms) const
static void loadData(UT_IStream &is, UT_Vector2I &v)
SYS_FORCE_INLINE void strncpy(const char *src, exint maxlen)
void setParmValue(exint idx, const UT_Matrix3D &value)
static void saveData(std::ostream &os, PRM_DataItemHandle s)
static void saveData(std::ostream &os, UT_Vector4D v)
GLenum src
Definition: glcorearb.h:1792
void save(std::ostream &os) const