7#ifndef PXR_BASE_TF_WRAP_TYPE_HELPERS_H
8#define PXR_BASE_TF_WRAP_TYPE_HELPERS_H
12#include "pxr/base/tf/api.h"
13#include "pxr/base/tf/pyObjWrapper.h"
14#include "pxr/base/tf/type.h"
15#include "pxr/external/boost/python/class.hpp"
16#include "pxr/external/boost/python/def_visitor.hpp"
18PXR_NAMESPACE_OPEN_SCOPE
21namespace TfType_WrapHelpers {
23 using namespace pxr_boost::python;
25 struct _PythonClass : def_visitor<_PythonClass>
27 friend class def_visitor_access;
30 template <
class CLS,
class T>
31 void _Visit(CLS &c, T *)
const {
32 if (
TfType t = TfType::Find<T>())
33 t.DefinePythonClass(c);
38 void visit(CLS &c)
const {
42 typedef typename CLS::wrapped_type Type;
43 _Visit(c, detail::unwrap_wrapper((Type*)0));
65TF_API
TfType TfType_DefinePythonTypeAndBases(
const pxr_boost::python::object & classObj );
67PXR_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...