Loading...
Searching...
No Matches
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 96 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 93 of file pyStaticTokens.h.

◆ _TF_PY_TOKENS_WRAP_ATTR_MEMBER

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

Definition at line 78 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 104 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 90 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), \
boost::python::make_function(_TfPyWrapStaticToken((&key->name)), \
boost::python::return_value_policy< \
boost::python::return_by_value>(), \
boost::mpl::vector1<std::string>()))

Definition at line 82 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 101 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 47 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 57 of file pyStaticTokens.h.