HDK
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
pyStaticTokens.h File Reference
#include "pxr/pxr.h"
#include <locale>
#include "pxr/base/tf/staticTokens.h"
#include "pxr/base/tf/preprocessorUtilsLite.h"
#include <hboost/python/class.hpp>
#include <hboost/python/scope.hpp>
+ Include dependency graph for pyStaticTokens.h:

Go to the source code of this file.

Classes

class  _TfPyWrapStaticToken
 

Macros

#define TF_PY_WRAP_PUBLIC_TOKENS(name, key, seq)
 
#define TF_PY_WRAP_PUBLIC_TOKENS_IN_CURRENT_SCOPE(key, seq)
 
#define _TF_PY_TOKENS_WRAP_ATTR_MEMBER(r, key, name)
 
#define _TF_PY_TOKENS_WRAP_MEMBER(r, key, name)
 
#define _TF_PY_TOKENS_EXPAND(seq)
 
#define _TF_PY_TOKENS_WRAP_ELEMENT(r, key, elem)   _TF_PY_TOKENS_WRAP_MEMBER(r, key, _TF_PY_TOKEN_GET_ELEM(elem))
 
#define _TF_PY_TOKENS_WRAP_ATTR_ELEMENT(r, key, elem)   _TF_PY_TOKENS_WRAP_ATTR_MEMBER(r, key, _TF_PY_TOKEN_GET_ELEM(elem))
 
#define _TF_PY_TOKEN_GET_ELEM(elem)
 
#define _TF_PY_TOKENS_WRAP_SEQ(key, seq)   HBOOST_PP_SEQ_FOR_EACH(_TF_PY_TOKENS_WRAP_ELEMENT, key, seq)
 
#define _TF_PY_TOKENS_WRAP_ATTR_SEQ(key, seq)   HBOOST_PP_SEQ_FOR_EACH(_TF_PY_TOKENS_WRAP_ATTR_ELEMENT, key, seq)
 

Macro Definition Documentation

#define _TF_PY_TOKEN_GET_ELEM (   elem)
Value:
HBOOST_PP_IIF(TF_PP_IS_TUPLE(elem), \
HBOOST_PP_TUPLE_ELEM(2, 0, elem), elem)
#define TF_PP_IS_TUPLE(arg)

Definition at line 104 of file pyStaticTokens.h.

#define _TF_PY_TOKENS_EXPAND (   seq)
Value:
HBOOST_PP_SEQ_FILTER(_TF_TOKENS_IS_NOT_ARRAY, ~, seq) \
#define _TF_TOKENS_IS_NOT_ARRAY(s, data, elem)
Definition: staticTokens.h:265
#define _TF_TOKENS_EXPAND_ARRAY_ELEMENTS(seq)
Definition: staticTokens.h:188

Definition at line 93 of file pyStaticTokens.h.

#define _TF_PY_TOKENS_WRAP_ATTR_ELEMENT (   r,
  key,
  elem 
)    _TF_PY_TOKENS_WRAP_ATTR_MEMBER(r, key, _TF_PY_TOKEN_GET_ELEM(elem))

Definition at line 101 of file pyStaticTokens.h.

#define _TF_PY_TOKENS_WRAP_ATTR_MEMBER (   r,
  key,
  name 
)
Value:
hboost::python::scope().attr( \
TF_PP_STRINGIZE(name)) = key->name.GetString();
GLuint const GLchar * name
Definition: glew.h:1814
#define TF_PP_STRINGIZE(x)
Expand and convert the argument to a string, using a most minimal macro.

Definition at line 82 of file pyStaticTokens.h.

#define _TF_PY_TOKENS_WRAP_ATTR_SEQ (   key,
  seq 
)    HBOOST_PP_SEQ_FOR_EACH(_TF_PY_TOKENS_WRAP_ATTR_ELEMENT, key, seq)

Definition at line 112 of file pyStaticTokens.h.

#define _TF_PY_TOKENS_WRAP_ELEMENT (   r,
  key,
  elem 
)    _TF_PY_TOKENS_WRAP_MEMBER(r, key, _TF_PY_TOKEN_GET_ELEM(elem))

Definition at line 98 of file pyStaticTokens.h.

#define _TF_PY_TOKENS_WRAP_MEMBER (   r,
  key,
  name 
)
Value:
.add_static_property(TF_PP_STRINGIZE(name), \
hboost::python::make_function(_TfPyWrapStaticToken((&key->name)), \
hboost::python::return_value_policy< \
hboost::python::return_by_value>(), \
hboost::mpl::vector1<std::string>()))
GLuint const GLchar * name
Definition: glew.h:1814
#define TF_PP_STRINGIZE(x)
Expand and convert the argument to a string, using a most minimal macro.

Definition at line 86 of file pyStaticTokens.h.

#define _TF_PY_TOKENS_WRAP_SEQ (   key,
  seq 
)    HBOOST_PP_SEQ_FOR_EACH(_TF_PY_TOKENS_WRAP_ELEMENT, key, seq)

Definition at line 109 of file pyStaticTokens.h.

#define TF_PY_WRAP_PUBLIC_TOKENS (   name,
  key,
  seq 
)

Macro to wrap static tokens defined with TF_DEFINE_PUBLIC_TOKENS to Python. It creates a class of name name in the current scope containing just the tokens in seq in the static tokens named by key. Arrays are not wrapped but their components are.

Definition at line 50 of file pyStaticTokens.h.

#define TF_PY_WRAP_PUBLIC_TOKENS_IN_CURRENT_SCOPE (   key,
  seq 
)

Macro to wrap static tokens defined with TF_DEFINE_PUBLIC_TOKENS to Python. This wraps tokens in seq in the static tokens named by key as attributes on the current hboost python scope. Arrays are not wrapped but their components are.

Definition at line 61 of file pyStaticTokens.h.