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.

Classes

struct  PXR_NAMESPACE_OPEN_SCOPE::_ArrayPyOpHelp< T >
 
struct  PXR_NAMESPACE_OPEN_SCOPE::_ArrayPyOpHelp< bool >
 

Namespaces

 PXR_NAMESPACE_OPEN_SCOPE
 

Macros

#define VTOPERATOR_WRAP_PYTYPE_BASE(op, method, pytype, isRightVer)
 
#define VTOPERATOR_WRAP_PYTYPE(op, method, pytype)   VTOPERATOR_WRAP_PYTYPE_BASE(op, method, pytype, false)
 
#define VTOPERATOR_WRAP_PYTYPE_R(op, method, pytype)   VTOPERATOR_WRAP_PYTYPE_BASE(op, method, pytype, true)
 
#define VTOPERATOR_WRAP(lmethod, rmethod)
 
#define VTOPERATOR_WRAP_NONCOMM(lmethod, rmethod)
 
#define VTOPERATOR_WRAPDECLARE_BASE(op, method, rettype)
 
#define VTOPERATOR_WRAPDECLARE(op, lmethod, rmethod)
 
#define VTOPERATOR_WRAP_PYTYPE_BOOL(func, pytype, op)
 
#define VTOPERATOR_WRAP_BOOL(func, op)
 

Macro Definition Documentation

#define VTOPERATOR_WRAP (   lmethod,
  rmethod 
)
Value:
VTOPERATOR_WRAP_PYTYPE(lmethod,lmethod,tuple) \
VTOPERATOR_WRAP_PYTYPE(lmethod,lmethod,list) \
VTOPERATOR_WRAP_PYTYPE(lmethod,rmethod,tuple) \
VTOPERATOR_WRAP_PYTYPE(lmethod,rmethod,list)
#define VTOPERATOR_WRAP_PYTYPE(op, method, pytype)
Definition: pyOperators.h:72

Definition at line 82 of file pyOperators.h.

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

Definition at line 118 of file pyOperators.h.

#define VTOPERATOR_WRAP_NONCOMM (   lmethod,
  rmethod 
)
Value:
VTOPERATOR_WRAP_PYTYPE(lmethod,lmethod,tuple) \
VTOPERATOR_WRAP_PYTYPE(lmethod,lmethod,list) \
VTOPERATOR_WRAP_PYTYPE_R(lmethod,rmethod,tuple) \
VTOPERATOR_WRAP_PYTYPE_R(lmethod,rmethod,list)
#define VTOPERATOR_WRAP_PYTYPE(op, method, pytype)
Definition: pyOperators.h:72
#define VTOPERATOR_WRAP_PYTYPE_R(op, method, pytype)
Definition: pyOperators.h:76

Definition at line 89 of file pyOperators.h.

#define VTOPERATOR_WRAP_PYTYPE (   op,
  method,
  pytype 
)    VTOPERATOR_WRAP_PYTYPE_BASE(op, method, pytype, false)

Definition at line 72 of file pyOperators.h.

#define VTOPERATOR_WRAP_PYTYPE_BASE (   op,
  method,
  pytype,
  isRightVer 
)
Value:
template <typename T> static \
VtArray<T> method##pytype(VtArray<T> vec, pytype obj) { \
size_t length = len(obj); \
if (length != vec.size()) { \
TfPyThrowValueError("Non-conforming inputs for operator " \
#method); \
return VtArray<T>(); \
} \
VtArray<T> ret(vec.size()); \
for (size_t i = 0; i < length; ++i) { \
if (!extract<T>(obj[i]).check()) \
TfPyThrowValueError("Element is of incorrect type."); \
if (isRightVer) { \
(T)extract<T>(obj[i]), vec[i]); \
} \
else { \
vec[i], (T)extract<T>(obj[i])); \
} \
} \
return ret; \
}
GLuint GLsizei GLsizei * length
Definition: glcorearb.h:795
TF_API void TfPyThrowValueError(const char *msg)
Definition: types.h:153
if(num_boxed_items<=0)
Definition: UT_RTreeImpl.h:697
* for(int i=0;i< n_subtasks;++i)*tasks.push(pool-> push(myfunc))
Definition: UT_RTreeImpl.h:685

Definition at line 46 of file pyOperators.h.

#define VTOPERATOR_WRAP_PYTYPE_BOOL (   func,
  pytype,
  op 
)
Value:
VTOPERATOR_WRAP_PYTYPE_BOOL_BASE(func, \
VtArray<T> const &vec, pytype const &obj, \
(vec[i] op (T)extract<T>(obj[i])) ) \
VTOPERATOR_WRAP_PYTYPE_BOOL_BASE(func, \
pytype const &obj,VtArray<T> const &vec, \
((T)extract<T>(obj[i]) op vec[i]) )
Definition: types.h:153
GLenum func
Definition: glcorearb.h:783

Definition at line 110 of file pyOperators.h.

#define VTOPERATOR_WRAP_PYTYPE_R (   op,
  method,
  pytype 
)    VTOPERATOR_WRAP_PYTYPE_BASE(op, method, pytype, true)

Definition at line 76 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:96

Definition at line 103 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 96 of file pyOperators.h.