HDK
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
SOP_FeatherBarbTangents.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 
25 {
26 public:
27  static int version() { return 1; }
28 
30  {
31 
32  }
33 
37  SOP_FeatherBarbTangentsParms &operator=(SOP_FeatherBarbTangentsParms &&) noexcept = default;
38 
40 
42  {
43 
44  return true;
45  }
47  {
48  return !operator==(src);
49  }
50 
51 
52 
53  void buildFromOp(const OP_GraphProxy *graph, exint nodeidx, fpreal time, DEP_MicroNode *depnode)
54  {
55 
56  }
57 
58 
59  void loadFromOpSubclass(const LoadParms &loadparms) override
60  {
61  buildFromOp(loadparms.graph(), loadparms.nodeIdx(), loadparms.context().getTime(), loadparms.depnode());
62  }
63 
64 
65  void copyFrom(const OP_NodeParms *src) override
66  {
67  *this = *((const SOP_FeatherBarbTangentsParms *)src);
68  }
69 
70  template <typename T>
71  void
72  doGetParmValue(TempIndex idx, TempIndex instance, T &value) const
73  {
74  if (idx.size() < 1)
75  return;
76  UT_ASSERT(idx.size() == instance.size()+1);
77  if (idx.size() != instance.size()+1)
78  return;
79  switch (idx[0])
80  {
81 
82  }
83  }
84 
85  bool isParmColorRamp(exint idx) const override
86  {
87  switch (idx)
88  {
89 
90  }
91  return false;
92  }
93 
94  void getNestParmValue(TempIndex idx, TempIndex instance, exint &value) const override
95  { doGetParmValue(idx, instance, value); }
96  void getNestParmValue(TempIndex idx, TempIndex instance, fpreal &value) const override
97  { doGetParmValue(idx, instance, value); }
98  void getNestParmValue(TempIndex idx, TempIndex instance, UT_Vector2D &value) const override
99  { doGetParmValue(idx, instance, value); }
100  void getNestParmValue(TempIndex idx, TempIndex instance, UT_Vector3D &value) const override
101  { doGetParmValue(idx, instance, value); }
102  void getNestParmValue(TempIndex idx, TempIndex instance, UT_Vector4D &value) const override
103  { doGetParmValue(idx, instance, value); }
104  void getNestParmValue(TempIndex idx, TempIndex instance, UT_Matrix2D &value) const override
105  { doGetParmValue(idx, instance, value); }
106  void getNestParmValue(TempIndex idx, TempIndex instance, UT_Matrix3D &value) const override
107  { doGetParmValue(idx, instance, value); }
108  void getNestParmValue(TempIndex idx, TempIndex instance, UT_Matrix4D &value) const override
109  { doGetParmValue(idx, instance, value); }
110  void getNestParmValue(TempIndex idx, TempIndex instance, UT_StringHolder &value) const override
111  { doGetParmValue(idx, instance, value); }
112  void getNestParmValue(TempIndex idx, TempIndex instance, UT_SharedPtr<UT_Ramp> &value) const override
113  { doGetParmValue(idx, instance, value); }
114  void getNestParmValue(TempIndex idx, TempIndex instance, PRM_DataItemHandle &value) const override
115  { doGetParmValue(idx, instance, value); }
116 
117  template <typename T>
118  void
119  doSetParmValue(TempIndex idx, TempIndex instance, const T &value)
120  {
121  if (idx.size() < 1)
122  return;
123  UT_ASSERT(idx.size() == instance.size()+1);
124  if (idx.size() != instance.size()+1)
125  return;
126  switch (idx[0])
127  {
128 
129  }
130  }
131 
132  void setNestParmValue(TempIndex idx, TempIndex instance, const exint &value) override
133  { doSetParmValue(idx, instance, value); }
134  void setNestParmValue(TempIndex idx, TempIndex instance, const fpreal &value) override
135  { doSetParmValue(idx, instance, value); }
136  void setNestParmValue(TempIndex idx, TempIndex instance, const UT_Vector2D &value) override
137  { doSetParmValue(idx, instance, value); }
138  void setNestParmValue(TempIndex idx, TempIndex instance, const UT_Vector3D &value) override
139  { doSetParmValue(idx, instance, value); }
140  void setNestParmValue(TempIndex idx, TempIndex instance, const UT_Vector4D &value) override
141  { doSetParmValue(idx, instance, value); }
142  void setNestParmValue(TempIndex idx, TempIndex instance, const UT_Matrix2D &value) override
143  { doSetParmValue(idx, instance, value); }
144  void setNestParmValue(TempIndex idx, TempIndex instance, const UT_Matrix3D &value) override
145  { doSetParmValue(idx, instance, value); }
146  void setNestParmValue(TempIndex idx, TempIndex instance, const UT_Matrix4D &value) override
147  { doSetParmValue(idx, instance, value); }
148  void setNestParmValue(TempIndex idx, TempIndex instance, const UT_StringHolder &value) override
149  { doSetParmValue(idx, instance, value); }
150  void setNestParmValue(TempIndex idx, TempIndex instance, const UT_SharedPtr<UT_Ramp> &value) override
151  { doSetParmValue(idx, instance, value); }
152  void setNestParmValue(TempIndex idx, TempIndex instance, const PRM_DataItemHandle &value) override
153  { doSetParmValue(idx, instance, value); }
154 
155  exint getNestNumParms(TempIndex idx) const override
156  {
157  if (idx.size() == 0)
158  return 0;
159  switch (idx[0])
160  {
161 
162  }
163  // Invalid
164  return 0;
165  }
166 
167  const char *getNestParmName(TempIndex fieldnum) const override
168  {
169  if (fieldnum.size() < 1)
170  return 0;
171  switch (fieldnum[0])
172  {
173 
174  }
175  return 0;
176  }
177 
178  ParmType getNestParmType(TempIndex fieldnum) const override
179  {
180  if (fieldnum.size() < 1)
181  return PARM_UNSUPPORTED;
182  switch (fieldnum[0])
183  {
184 
185  }
186  return PARM_UNSUPPORTED;
187  }
188 
189  // Boiler plate to load individual types.
190  static void loadData(UT_IStream &is, int64 &v)
191  { is.bread(&v, 1); }
192  static void loadData(UT_IStream &is, bool &v)
193  { int64 iv; is.bread(&iv, 1); v = iv; }
194  static void loadData(UT_IStream &is, fpreal64 &v)
195  { is.bread<fpreal64>(&v, 1); }
196  static void loadData(UT_IStream &is, UT_Vector2D &v)
197  { is.bread<fpreal64>(&v.x(), 1); is.bread<fpreal64>(&v.y(), 1); }
198  static void loadData(UT_IStream &is, UT_Vector3D &v)
199  { is.bread<fpreal64>(&v.x(), 1); is.bread<fpreal64>(&v.y(), 1);
200  is.bread<fpreal64>(&v.z(), 1); }
201  static void loadData(UT_IStream &is, UT_Vector4D &v)
202  { is.bread<fpreal64>(&v.x(), 1); is.bread<fpreal64>(&v.y(), 1);
203  is.bread<fpreal64>(&v.z(), 1); is.bread<fpreal64>(&v.w(), 1); }
204  static void loadData(UT_IStream &is, UT_Matrix2D &v)
205  { for (int r = 0; r < 2; r++) for (int c = 0; c < 2; c++) is.bread<fpreal64>(&v(r, c), 1); }
206  static void loadData(UT_IStream &is, UT_Matrix3D &v)
207  { for (int r = 0; r < 3; r++) for (int c = 0; c < 3; c++) is.bread<fpreal64>(&v(r, c), 1); }
208  static void loadData(UT_IStream &is, UT_Matrix4D &v)
209  { for (int r = 0; r < 4; r++) for (int c = 0; c < 4; c++) is.bread<fpreal64>(&v(r, c), 1); }
210  static void loadData(UT_IStream &is, UT_Vector2I &v)
211  { is.bread<int64>(&v.x(), 1); is.bread<int64>(&v.y(), 1); }
212  static void loadData(UT_IStream &is, UT_Vector3I &v)
213  { is.bread<int64>(&v.x(), 1); is.bread<int64>(&v.y(), 1);
214  is.bread<int64>(&v.z(), 1); }
215  static void loadData(UT_IStream &is, UT_Vector4I &v)
216  { is.bread<int64>(&v.x(), 1); is.bread<int64>(&v.y(), 1);
217  is.bread<int64>(&v.z(), 1); is.bread<int64>(&v.w(), 1); }
219  { is.bread(v); }
221  { UT_StringHolder rampdata;
222  loadData(is, rampdata);
223  if (rampdata.isstring())
224  {
225  v.reset(new UT_Ramp());
226  UT_IStream istr((const char *) rampdata, rampdata.length(), UT_ISTREAM_ASCII);
227  v->load(istr);
228  }
229  else v.reset();
230  }
233  loadData(is, data);
234  if (data.isstring())
235  {
236  // Find the data type.
237  const char *colon = UT_StringWrap(data).findChar(':');
238  if (colon)
239  {
240  int typelen = colon - data.buffer();
242  type.strncpy(data.buffer(), typelen);
243  UT_IStream istr(((const char *) data) + typelen + 1, data.length() - (typelen + 1), UT_ISTREAM_BINARY);
244 
245  v = PRM_DataFactory::parseBinary(type.buffer(), istr);
246  }
247  }
248  else v.reset();
249  }
250 
251  static void saveData(std::ostream &os, int64 v)
252  { UTwrite(os, &v); }
253  static void saveData(std::ostream &os, bool v)
254  { int64 iv = v; UTwrite(os, &iv); }
255  static void saveData(std::ostream &os, fpreal64 v)
256  { UTwrite<fpreal64>(os, &v); }
257  static void saveData(std::ostream &os, UT_Vector2D v)
258  { UTwrite<fpreal64>(os, &v.x()); UTwrite<fpreal64>(os, &v.y()); }
259  static void saveData(std::ostream &os, UT_Vector3D v)
260  { UTwrite<fpreal64>(os, &v.x()); UTwrite<fpreal64>(os, &v.y());
261  UTwrite<fpreal64>(os, &v.z()); }
262  static void saveData(std::ostream &os, UT_Vector4D v)
263  { UTwrite<fpreal64>(os, &v.x()); UTwrite<fpreal64>(os, &v.y());
264  UTwrite<fpreal64>(os, &v.z()); UTwrite<fpreal64>(os, &v.w()); }
265  static void saveData(std::ostream &os, UT_Matrix2D v)
267  static void saveData(std::ostream &os, UT_Matrix3D v)
269  static void saveData(std::ostream &os, UT_Matrix4D v)
271  static void saveData(std::ostream &os, UT_StringHolder s)
272  { UT_StringWrap(s).saveBinary(os); }
273  static void saveData(std::ostream &os, UT_SharedPtr<UT_Ramp> s)
275  UT_OStringStream ostr;
276  if (s) s->save(ostr);
277  result = ostr.str();
278  saveData(os, result);
279  }
280  static void saveData(std::ostream &os, PRM_DataItemHandle s)
282  UT_OStringStream ostr;
283  if (s)
284  {
285  ostr << s->getDataTypeToken();
286  ostr << ":";
287  s->saveBinary(ostr);
288  }
289  result = ostr.str();
290  saveData(os, result);
291  }
292 
293 
294  void save(std::ostream &os) const
295  {
296  int32 v = version();
297  UTwrite(os, &v);
298 
299  }
300 
301  bool load(UT_IStream &is)
302  {
303  int32 v;
304  is.bread(&v, 1);
305  if (version() != v)
306  {
307  // Fail incompatible versions
308  return false;
309  }
310 
311  return true;
312  }
313 
314 
315 private:
316 
317 };
static void saveData(std::ostream &os, fpreal64 v)
static void saveData(std::ostream &os, UT_Vector3D v)
static void loadData(UT_IStream &is, UT_Matrix4D &v)
void setNestParmValue(TempIndex idx, TempIndex instance, const fpreal &value) override
int int32
Definition: SYS_Types.h:39
void setNestParmValue(TempIndex idx, TempIndex instance, const UT_SharedPtr< UT_Ramp > &value) override
void setNestParmValue(TempIndex idx, TempIndex instance, const UT_Matrix2D &value) override
void getNestParmValue(TempIndex idx, TempIndex instance, UT_Vector2D &value) const override
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
exint getNestNumParms(TempIndex idx) const override
const GLdouble * v
Definition: glcorearb.h:837
void getNestParmValue(TempIndex idx, TempIndex instance, fpreal &value) const override
fpreal getTime() const
Definition: OP_Context.h:62
void setNestParmValue(TempIndex idx, TempIndex instance, const UT_Vector2D &value) override
static void loadData(UT_IStream &is, UT_Vector2I &v)
const OP_Context & context() const
Definition: OP_NodeParms.h:97
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
static void saveData(std::ostream &os, UT_StringHolder s)
GLdouble s
Definition: glad.h:3009
void setNestParmValue(TempIndex idx, TempIndex instance, const UT_StringHolder &value) override
static void loadData(UT_IStream &is, UT_SharedPtr< UT_Ramp > &v)
An output stream object that owns its own string buffer storage.
static void loadData(UT_IStream &is, fpreal64 &v)
static void loadData(UT_IStream &is, UT_Matrix2D &v)
**But if you need a result
Definition: thread.h:613
static void loadData(UT_IStream &is, UT_Vector2D &v)
void doSetParmValue(TempIndex idx, TempIndex instance, const T &value)
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.
void setNestParmValue(TempIndex idx, TempIndex instance, const UT_Vector4D &value) override
constexpr SYS_FORCE_INLINE T & x() noexcept
Definition: UT_Vector4.h:491
static void saveData(std::ostream &os, UT_SharedPtr< UT_Ramp > s)
double fpreal64
Definition: SYS_Types.h:201
constexpr SYS_FORCE_INLINE T & x() noexcept
Definition: UT_Vector2.h:423
bool operator==(const BaseDimensions< T > &a, const BaseDimensions< Y > &b)
Definition: Dimensions.h:137
static void loadData(UT_IStream &is, UT_Vector3I &v)
void save(std::ostream &os) const
static void saveData(std::ostream &os, UT_Vector4D v)
void getNestParmValue(TempIndex idx, TempIndex instance, PRM_DataItemHandle &value) const override
static void loadData(UT_IStream &is, UT_Vector3D &v)
exint length() const
static void saveData(std::ostream &os, PRM_DataItemHandle s)
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 isParmColorRamp(exint idx) const override
void getNestParmValue(TempIndex idx, TempIndex instance, UT_Matrix2D &value) const override
void setNestParmValue(TempIndex idx, TempIndex instance, const UT_Matrix4D &value) override
static void loadData(UT_IStream &is, UT_Vector4D &v)
ParmType getNestParmType(TempIndex fieldnum) const override
static void loadData(UT_IStream &is, int64 &v)
static void saveData(std::ostream &os, UT_Matrix2D v)
const OP_GraphProxy * graph() const
Definition: OP_NodeParms.h:94
static void loadData(UT_IStream &is, UT_Vector4I &v)
static void loadData(UT_IStream &is, UT_StringHolder &v)
static void loadData(UT_IStream &is, bool &v)
void setNestParmValue(TempIndex idx, TempIndex instance, const PRM_DataItemHandle &value) override
long long int64
Definition: SYS_Types.h:116
static void saveData(std::ostream &os, bool v)
void doGetParmValue(TempIndex idx, TempIndex instance, T &value) const
static void loadData(UT_IStream &is, PRM_DataItemHandle &v)
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
static void saveData(std::ostream &os, UT_Matrix4D v)
void setNestParmValue(TempIndex idx, TempIndex instance, const UT_Matrix3D &value) override
GT_API const UT_StringHolder version
void setNestParmValue(TempIndex idx, TempIndex instance, const UT_Vector3D &value) override
const char * getNestParmName(TempIndex fieldnum) const override
void getNestParmValue(TempIndex idx, TempIndex instance, UT_Vector4D &value) const override
void setNestParmValue(TempIndex idx, TempIndex instance, const exint &value) override
void getNestParmValue(TempIndex idx, TempIndex instance, UT_Matrix4D &value) const override
void getNestParmValue(TempIndex idx, TempIndex instance, UT_Vector3D &value) const override
static void saveData(std::ostream &os, UT_Matrix3D v)
fpreal64 fpreal
Definition: SYS_Types.h:277
DEP_MicroNode * depnode() const
Definition: OP_NodeParms.h:99
Utility class for containing a color ramp.
Definition: UT_Ramp.h:92
constexpr SYS_FORCE_INLINE T & w() noexcept
Definition: UT_Vector4.h:497
#define SOP_API
Definition: SOP_API.h:10
void getNestParmValue(TempIndex idx, TempIndex instance, exint &value) const override
void loadFromOpSubclass(const LoadParms &loadparms) override
const char * findChar(int c) const
Definition: UT_String.h:1395
#define UT_ASSERT(ZZ)
Definition: UT_Assert.h:156
Definition: core.h:1131
bool operator!=(const SOP_FeatherBarbTangentsParms &src) const
GLboolean r
Definition: glcorearb.h:1222
static void saveData(std::ostream &os, UT_Vector2D v)
void getNestParmValue(TempIndex idx, TempIndex instance, UT_Matrix3D &value) const override
bool operator==(const SOP_FeatherBarbTangentsParms &src) const
constexpr SYS_FORCE_INLINE T & y() noexcept
Definition: UT_Vector3.h:665
static void saveData(std::ostream &os, int64 v)
void getNestParmValue(TempIndex idx, TempIndex instance, UT_SharedPtr< UT_Ramp > &value) const override
void buildFromOp(const OP_GraphProxy *graph, exint nodeidx, fpreal time, DEP_MicroNode *depnode)
type
Definition: core.h:1059
UT_SharedPtr< const PRM_DataItem > PRM_DataItemHandle
Definition: PRM_Parm.h:97
constexpr SYS_FORCE_INLINE T & y() noexcept
Definition: UT_Vector2.h:425
SYS_FORCE_INLINE bool isstring() const
OP_NodeParms & operator=(const OP_NodeParms &)=default
SYS_FORCE_INLINE void strncpy(const char *src, exint maxlen)
void copyFrom(const OP_NodeParms *src) override
static void loadData(UT_IStream &is, UT_Matrix3D &v)
GLenum src
Definition: glcorearb.h:1793
constexpr SYS_FORCE_INLINE T & x() noexcept
Definition: UT_Vector3.h:663