HDK
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
HOM_DetachedAttrib.h
Go to the documentation of this file.
1 /*
2  * PROPRIETARY INFORMATION. This software is proprietary to
3  * Side Effects Software Inc., and is not to be reproduced,
4  * transmitted, or disclosed in any way without written permission.
5  *
6  * COMMENTS:
7  */
8 
9 #ifndef __HOM_DetachedAttrib_h__
10 #define __HOM_DetachedAttrib_h__
11 
12 #include "HOM_API.h"
13 #include "HOM_BinaryString.h"
14 #include "HOM_Defines.h"
15 #include "HOM_Errors.h"
16 #include "HOM_IterableList.h"
17 #include "HOM_EnumModules.h"
18 #include "HOM_Matrix4.h"
19 #include <UT/UT_Tuple.h>
20 #include <vector>
21 #include <string>
22 
23 SWIGOUT(%rename(DetachedAttrib) HOM_DetachedAttrib;)
24 // Force SWIG to output an __init__ method even though it determines this
25 // class is abstract.
26 SWIGOUT(%feature("notabstract") HOM_DetachedAttrib;)
27 
29 {
30 public:
31 #ifdef SWIG
32 %extend
33 {
35  { return HOM().newDetachedAttrib(layer); }
36 }
37 #else
39  { HOM_CONSTRUCT_OBJECT(this) }
41  { HOM_CONSTRUCT_OBJECT(this) }
42 #endif
44  { HOM_DESTRUCT_OBJECT(this) }
45 
46  virtual std::string __repr__() = 0;
47 
48  virtual HOM_DetachedAttrib *__enter__() { return this; }
49 
50 #ifdef SWIG
51 %extend
52 {
53  // We can ignore the type, value, and traceback Python objects.
54  SWIGOUT(virtual void __exit__(
55  InterpreterObject type, InterpreterObject value,
56  InterpreterObject traceback)
57  { self->close(); };)
58 }
59 #endif
60 
61  virtual void close() = 0;
62 
63  virtual HOM_EnumValue &dataType() const = 0;
64  SWIGOUT(%warnfilter(321) type;)
65  virtual HOM_EnumValue &type() const = 0;
66  virtual bool isArrayType() const = 0;
67  virtual HOM_EnumValue &numericDataType() const = 0;
68  virtual std::string qualifier() const = 0;
69 
70  virtual int tupleSize() const = 0;
71  virtual int channelCount() const = 0;
72  /// Size means tupleSize for HOM_Atrib so can't use that for our
73  /// length
74  virtual int64 length() const = 0;
75 
76  virtual bool onCPU() const = 0;
77  virtual bool onGPU() const = 0;
78 
79 
80  SWIGOUT(%newobject freeze;)
81  virtual HOM_DetachedAttrib *freeze() const = 0;
82  virtual bool isFrozen() const = 0;
83 
84  virtual std::map<std::string, hboost::any> properties() const = 0;
85  virtual void setProperties(const std::map<std::string, hboost::any> &p) = 0;
86  virtual void updateProperties(const std::map<std::string, hboost::any> &p) = 0;
87 
88  virtual HOM_BinaryString rawDetachedAttrib() const = 0;
89 
90  // statistics
91  virtual hboost::any computeMin(int channel = 0) const = 0;
92  virtual hboost::any computeMax(int channel = 0) const = 0;
93  virtual hboost::any computeMinLength() const = 0;
94  virtual hboost::any computeMaxLength() const = 0;
95  virtual double computeAverage(int channel = 0) const = 0;
96 
97 #ifdef SWIG
98 %extend
99 {
100  void setFromRawDetachedAttrib(InterpreterObject values)
101  {
102  HOM_PyBuffer buffer(values);
103  self->opaqueSetFromRawDetachedAttrib(
104  (const char *)buffer.myData, buffer.myLength);
105  }
106 }
107 #endif
108 
109  SWIGOUT(%ignore opaqueSetFromRawDetachedAttrib);
110  virtual void opaqueSetFromRawDetachedAttrib(const char *values, int64 length) = 0;
111 
112 };
113 
114 #endif
type
Definition: core.h:556
virtual HOM_DetachedAttrib * __enter__()
#define HOM_DESTRUCT_OBJECT(pointer)
Definition: HOM_Module.h:1398
GLsizei const GLfloat * value
Definition: glcorearb.h:824
#define SWIGOUT(x)
Definition: HOM_Defines.h:24
GLuint GLsizei GLsizei * length
Definition: glcorearb.h:795
string __repr__(VtArray< T > const &self)
Definition: wrapArray.h:312
void close() override
GLuint buffer
Definition: glcorearb.h:660
GLenum GLuint GLint GLint layer
Definition: glcorearb.h:1299
GLint GLint GLsizei GLint GLenum GLenum type
Definition: glcorearb.h:108
bool any(const vbool4 &v)
Definition: simd.h:3600
#define HOM_API
Definition: HOM_API.h:13
void ignore(T const &) VULKAN_HPP_NOEXCEPT
Definition: vulkan.hpp:6508
#define HOM_CONSTRUCT_OBJECT(pointer)
Definition: HOM_Module.h:1397
long long int64
Definition: SYS_Types.h:116
GLenum GLsizei GLsizei GLint * values
Definition: glcorearb.h:1602
OIIO_UTIL_API bool rename(string_view from, string_view to, std::string &err)
HOM_DetachedAttrib(const HOM_DetachedAttrib &)
virtual HOM_DetachedAttrib * newDetachedAttrib(HOM_DetachedAttrib *vdb=nullptr)=0
HOM_API HOM_Module & HOM()
HUSD_API const char * dataType()