All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Modules Pages
pyStaticTokens.h File Reference
+ Include dependency graph for pyStaticTokens.h:

Go to the source code of this file.

Macros

#define TF_PY_WRAP_PUBLIC_TOKENS(name, key, seq)
 Macro to wrap static tokens defined with TF_DEFINE_PUBLIC_TOKENS to Python.
 
#define TF_PY_WRAP_PUBLIC_TOKENS_IN_CURRENT_SCOPE(key, seq)
 Macro to wrap static tokens defined with TF_DEFINE_PUBLIC_TOKENS to Python.
 
#define _TF_PY_TOKENS_WRAP_ATTR_MEMBER(r, key, name)
 
#define _TF_PY_TOKENS_WRAP_MEMBER(r, key, name)
 
#define _TF_PY_TOKENS_WRAP_ELEMENT(key, elem)    _TF_PY_TOKENS_WRAP_MEMBER(r, key, _TF_PY_TOKEN_GET_ELEM(elem))
 
#define _TF_PY_TOKENS_WRAP_ATTR_ELEMENT(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)    TF_PP_SEQ_FOR_EACH(_TF_PY_TOKENS_WRAP_ELEMENT, key, seq)
 
#define _TF_PY_TOKENS_WRAP_ATTR_SEQ(key, seq)    TF_PP_SEQ_FOR_EACH(_TF_PY_TOKENS_WRAP_ATTR_ELEMENT, key, seq)
 

Macro Definition Documentation

◆ _TF_PY_TOKEN_GET_ELEM

#define _TF_PY_TOKEN_GET_ELEM (   elem)
Value:
_TF_PP_IFF(TF_PP_IS_TUPLE(elem), \
TF_PP_TUPLE_ELEM(0, elem), elem)
#define TF_PP_IS_TUPLE(arg)
Exapnds to 1 if the argument is a tuple, and 0 otherwise.

Definition at line 67 of file pyStaticTokens.h.

◆ _TF_PY_TOKENS_WRAP_ATTR_ELEMENT

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

Definition at line 64 of file pyStaticTokens.h.

◆ _TF_PY_TOKENS_WRAP_ATTR_MEMBER

#define _TF_PY_TOKENS_WRAP_ATTR_MEMBER (   r,
  key,
  name 
)
Value:
pxr_boost::python::scope().attr( \
TF_PP_STRINGIZE(name)) = key->name.GetString();

Definition at line 45 of file pyStaticTokens.h.

◆ _TF_PY_TOKENS_WRAP_ATTR_SEQ

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

Definition at line 75 of file pyStaticTokens.h.

◆ _TF_PY_TOKENS_WRAP_ELEMENT

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

Definition at line 61 of file pyStaticTokens.h.

◆ _TF_PY_TOKENS_WRAP_MEMBER

#define _TF_PY_TOKENS_WRAP_MEMBER (   r,
  key,
  name 
)
Value:
.add_static_property(TF_PP_STRINGIZE(name), \
+[]() { return key->name.GetString(); }) \

Definition at line 56 of file pyStaticTokens.h.

◆ _TF_PY_TOKENS_WRAP_SEQ

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

Definition at line 72 of file pyStaticTokens.h.

◆ TF_PY_WRAP_PUBLIC_TOKENS

#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.

Definition at line 30 of file pyStaticTokens.h.

◆ TF_PY_WRAP_PUBLIC_TOKENS_IN_CURRENT_SCOPE

#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 boost python scope.

Definition at line 41 of file pyStaticTokens.h.