HDK
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
pyOperators.h File Reference
#include "pxr/pxr.h"
#include "pxr/base/vt/api.h"
+ Include dependency graph for pyOperators.h:
+ This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Macros

#define VTOPERATOR_WRAP_PYTYPE_BASE(op, method, pytype, rettype, expr)
 
#define VTOPERATOR_WRAP_PYTYPE(op, lmethod, tuple, T)
 
#define VTOPERATOR_WRAP_PYTYPE_R(op, lmethod, tuple, T)
 
#define VTOPERATOR_WRAP(op, lmethod, rmethod)
 
#define VTOPERATOR_WRAP_NONCOMM(op, lmethod, rmethod)
 
#define VTOPERATOR_WRAPDECLARE_BASE(op, method, rettype)
 
#define VTOPERATOR_WRAPDECLARE(op, lmethod, rmethod)
 
#define VTOPERATOR_WRAP_PYTYPE_BOOL_BASE(func, arg1, arg2, expr)
 
#define VTOPERATOR_WRAP_PYTYPE_BOOL(func, pytype, op)
 
#define VTOPERATOR_WRAP_BOOL(func, op)
 
#define VTOPERATOR_WRAPDECLARE_BOOL(func)
 

Macro Definition Documentation

#define VTOPERATOR_WRAP (   op,
  lmethod,
  rmethod 
)
Value:
VTOPERATOR_WRAP_PYTYPE(op,lmethod,tuple,T) \
VTOPERATOR_WRAP_PYTYPE(op,lmethod,list,T) \
VTOPERATOR_WRAP_PYTYPE(op,rmethod,tuple,T) \
VTOPERATOR_WRAP_PYTYPE(op,rmethod,list,T)
#define VTOPERATOR_WRAP_PYTYPE(op, lmethod, tuple, T)
Definition: pyOperators.h:59

Definition at line 71 of file pyOperators.h.

#define VTOPERATOR_WRAP_BOOL (   func,
  op 
)
Value:
#define VTOPERATOR_WRAP_PYTYPE_BOOL(func, pytype, op)
Definition: pyOperators.h:119
GLenum func
Definition: glcorearb.h:782

Definition at line 127 of file pyOperators.h.

#define VTOPERATOR_WRAP_NONCOMM (   op,
  lmethod,
  rmethod 
)
Value:
VTOPERATOR_WRAP_PYTYPE(op,lmethod,tuple,T) \
VTOPERATOR_WRAP_PYTYPE(op,lmethod,list,T) \
VTOPERATOR_WRAP_PYTYPE_R(op,rmethod,tuple,T) \
VTOPERATOR_WRAP_PYTYPE_R(op,rmethod,list,T)
#define VTOPERATOR_WRAP_PYTYPE(op, lmethod, tuple, T)
Definition: pyOperators.h:59
#define VTOPERATOR_WRAP_PYTYPE_R(op, lmethod, tuple, T)
Definition: pyOperators.h:64

Definition at line 78 of file pyOperators.h.

#define VTOPERATOR_WRAP_PYTYPE (   op,
  lmethod,
  tuple,
 
)
Value:
VTOPERATOR_WRAP_PYTYPE_BASE(op,lmethod,tuple,T, \
(vec[i] op (T)extract<T>(obj[i])) )
GLhandleARB obj
Definition: glew.h:6266
#define VTOPERATOR_WRAP_PYTYPE_BASE(op, method, pytype, rettype, expr)
Definition: pyOperators.h:40

Definition at line 59 of file pyOperators.h.

#define VTOPERATOR_WRAP_PYTYPE_BASE (   op,
  method,
  pytype,
  rettype,
  expr 
)
Value:
template <typename T> static \
VtArray<rettype> method##pytype(VtArray<T> vec, pytype obj) \
{ \
size_t length = len(obj); \
if (length != vec.size()) { \
TfPyThrowValueError("Non-conforming inputs for operator " #op); \
return VtArray<T>(); \
} \
VtArray<rettype> ret(vec.size()); \
for (size_t i = 0; i < length; ++i) { \
if (!extract<T>(obj[i]).check()) \
TfPyThrowValueError("Element is of incorrect type."); \
ret[i] = expr; \
} \
return ret; \
}
TF_API void TfPyThrowValueError(std::string const &msg)
GLenum GLsizei len
Definition: glew.h:7782
GLhandleARB obj
Definition: glew.h:6266
Definition: types.h:166
GLuint GLsizei GLsizei * length
Definition: glcorearb.h:794
if(rank==1) return rank
int check(unformattable)
Definition: core.h:1421
* for(int i=0;i< n_subtasks;++i)*tasks.push(pool-> push(myfunc))

Definition at line 40 of file pyOperators.h.

#define VTOPERATOR_WRAP_PYTYPE_BOOL (   func,
  pytype,
  op 
)
Value:
VtArray<T> const &vec, pytype const &obj, \
(vec[i] op (T)extract<T>(obj[i])) ) \
pytype const &obj,VtArray<T> const &vec, \
((T)extract<T>(obj[i]) op vec[i]) )
GLhandleARB obj
Definition: glew.h:6266
Definition: types.h:166
GLenum func
Definition: glcorearb.h:782
#define VTOPERATOR_WRAP_PYTYPE_BOOL_BASE(func, arg1, arg2, expr)
Definition: pyOperators.h:99

Definition at line 119 of file pyOperators.h.

#define VTOPERATOR_WRAP_PYTYPE_BOOL_BASE (   func,
  arg1,
  arg2,
  expr 
)
Value:
template <typename T> static \
VtArray<bool> Vt##func(arg1, arg2) \
{ \
size_t length = len(obj); \
if (length != vec.size()) { \
TfPyThrowValueError("Non-conforming inputs for " #func); \
return VtArray<bool>(); \
} \
VtArray<bool> ret(vec.size()); \
for (size_t i = 0; i < length; ++i) { \
if (!extract<T>(obj[i]).check()) \
TfPyThrowValueError("Element is of incorrect type."); \
ret[i] = expr; \
} \
return ret; \
}
TF_API void TfPyThrowValueError(std::string const &msg)
GLuint GLuint GLuint GLuint GLuint GLuint arg2
Definition: glew.h:8296
GLenum GLsizei len
Definition: glew.h:7782
GLhandleARB obj
Definition: glew.h:6266
Definition: types.h:166
GLuint GLsizei GLsizei * length
Definition: glcorearb.h:794
GLenum func
Definition: glcorearb.h:782
GLuint GLuint GLuint arg1
Definition: glew.h:8295
if(rank==1) return rank
int check(unformattable)
Definition: core.h:1421
* for(int i=0;i< n_subtasks;++i)*tasks.push(pool-> push(myfunc))

Definition at line 99 of file pyOperators.h.

#define VTOPERATOR_WRAP_PYTYPE_R (   op,
  lmethod,
  tuple,
 
)
Value:
VTOPERATOR_WRAP_PYTYPE_BASE(op,lmethod,tuple,T, \
((T)extract<T>(obj[i]) op vec[i]) )
GLhandleARB obj
Definition: glew.h:6266
#define VTOPERATOR_WRAP_PYTYPE_BASE(op, method, pytype, rettype, expr)
Definition: pyOperators.h:40

Definition at line 64 of file pyOperators.h.

#define VTOPERATOR_WRAPDECLARE (   op,
  lmethod,
  rmethod 
)
Value:
.def(#rmethod,rmethod##tuple<Type>) \
.def(#rmethod,rmethod##list<Type>)
#define VTOPERATOR_WRAPDECLARE_BASE(op, method, rettype)
Definition: pyOperators.h:85

Definition at line 92 of file pyOperators.h.

#define VTOPERATOR_WRAPDECLARE_BASE (   op,
  method,
  rettype 
)
Value:
.def(self op self) \
.def(self op Type()) \
.def(Type() op self) \
.def(#method,method##tuple<rettype>) \
.def(#method,method##list<rettype>)

Definition at line 85 of file pyOperators.h.

#define VTOPERATOR_WRAPDECLARE_BOOL (   func)
Value:
def(#func,(VtArray<bool> (*) \
(VtArray<Type> const &,VtArray<Type> const &)) \
Vt##func<Type>); \
def(#func,(VtArray<bool> (*) \
(Type const &,VtArray<Type> const &)) \
Vt##func<Type>); \
def(#func,(VtArray<bool> (*) \
(VtArray<Type> const &,Type const &)) \
Vt##func<Type>); \
def(#func,(VtArray<bool> (*) \
(VtArray<Type> const &,tuple const &)) \
Vt##func<Type>); \
def(#func,(VtArray<bool> (*) \
(tuple const &,VtArray<Type> const &)) \
Vt##func<Type>); \
def(#func,(VtArray<bool> (*) \
(VtArray<Type> const &,list const &)) \
Vt##func<Type>); \
def(#func,(VtArray<bool> (*) \
(list const &,VtArray<Type> const &)) \
Vt##func<Type>);
Definition: types.h:166
GLenum func
Definition: glcorearb.h:782

Definition at line 132 of file pyOperators.h.