24#ifndef PXR_BASE_TF_WRAP_TYPE_HELPERS_H
25#define PXR_BASE_TF_WRAP_TYPE_HELPERS_H
29#include "pxr/base/tf/api.h"
30#include "pxr/base/tf/pyObjWrapper.h"
31#include "pxr/base/tf/type.h"
32#include <boost/python/class.hpp>
33#include <boost/python/def_visitor.hpp>
35PXR_NAMESPACE_OPEN_SCOPE
38namespace TfType_WrapHelpers {
40 using namespace boost::python;
42 struct _PythonClass : def_visitor<_PythonClass>
44 friend class def_visitor_access;
47 template <
class CLS,
class T>
48 void _Visit(CLS &c, T *)
const {
49 if (
TfType t = TfType::Find<T>())
50 t.DefinePythonClass(c);
55 void visit(CLS &c)
const {
59 typedef typename CLS::wrapped_type Type;
60 _Visit(c, detail::unwrap_wrapper((Type*)0));
82TF_API
TfType TfType_DefinePythonTypeAndBases(
const boost::python::object & classObj );
84PXR_NAMESPACE_CLOSE_SCOPE
TfType represents a dynamic runtime type.
A boost.python visitor that associates the Python class object created by the wrapping with the TfTyp...