24 #ifndef PXR_BASE_TF_PY_OBJ_WRAPPER_H
25 #define PXR_BASE_TF_PY_OBJ_WRAPPER_H
29 #include "pxr/base/tf/api.h"
31 #include <boost/functional/hash.hpp>
32 #include <boost/python/object_fwd.hpp>
33 #include <boost/python/object_operators.hpp>
38 PXR_NAMESPACE_OPEN_SCOPE
67 :
public boost::python::api::object_operators<TfPyObjWrapper>
69 typedef boost::python::object object;
87 object const &
Get()
const {
98 TF_API PyObject *
ptr()
const;
105 return (
size_t) o.
ptr();
110 TF_API
bool operator==(TfPyObjWrapper
const &other)
const;
114 TF_API
bool operator!=(TfPyObjWrapper
const &other)
const;
120 friend class boost::python::api::object_operators<TfPyObjWrapper>;
121 operator object const &()
const {
126 std::shared_ptr<object> _objectPtr;
129 PXR_NAMESPACE_CLOSE_SCOPE
131 #endif // PXR_BASE_TF_PY_OBJ_WRAPPER_H
TF_API PyObject * ptr() const
Underlying PyObject* access.
TF_API bool operator==(TfPyObjWrapper const &other) const
Equality.
TF_API TfPyObjWrapper()
Default construct a TfPyObjWrapper holding a reference to python None.
TF_API bool operator!=(TfPyObjWrapper const &other) const
Inequality.
object const & Get() const
Underlying object access.
friend size_t hash_value(TfPyObjWrapper const &o)
Produce a hash code for this object.
Boost Python object wrapper.