24 #ifndef PXR_USD_SDF_PY_LIST_OP_H
25 #define PXR_USD_SDF_PY_LIST_OP_H
33 #include <hboost/python.hpp>
53 TfPyWrapOnce<T>([
name]() { SdfPyWrapListOp::_Wrap(name); });
59 listOp.ApplyOperations(&result);
63 _ApplyOperations2(
const T& outer,
const T& inner) {
64 if (std::optional<T>
r = outer.ApplyOperations(inner)) {
71 static size_t _Hash(
const T &
self){
77 using namespace hboost::python;
81 class_<T>(name.c_str())
82 .def(
"__str__", &This::_GetStr)
83 .def(
"__hash__", &This::_Hash)
85 .def(
"Create", &T::Create,
89 .staticmethod(
"Create")
91 .def(
"CreateExplicit", &T::CreateExplicit,
93 .staticmethod(
"CreateExplicit")
98 .def(
"HasItem", &T::HasItem)
100 .def(
"Clear", &T::Clear)
101 .def(
"ClearAndMakeExplicit", &T::ClearAndMakeExplicit)
102 .def(
"ApplyOperations", &This::_ApplyOperations1)
103 .def(
"ApplyOperations", &This::_ApplyOperations2)
105 .add_property(
"explicitItems",
106 make_function(&T::GetExplicitItems,
107 return_value_policy<return_by_value>()),
108 &T::SetExplicitItems)
109 .add_property(
"addedItems",
110 make_function(&T::GetAddedItems,
111 return_value_policy<return_by_value>()),
113 .add_property(
"prependedItems",
114 make_function(&T::GetPrependedItems,
115 return_value_policy<return_by_value>()),
116 &T::SetPrependedItems)
117 .add_property(
"appendedItems",
118 make_function(&T::GetAppendedItems,
119 return_value_policy<return_by_value>()),
120 &T::SetAppendedItems)
121 .add_property(
"deletedItems",
122 make_function(&T::GetDeletedItems,
123 return_value_policy<return_by_value>()),
125 .add_property(
"orderedItems",
126 make_function(&T::GetOrderedItems,
127 return_value_policy<return_by_value>()),
129 .def(
"GetAddedOrExplicitItems",
131 .def(
"GetAppliedItems",
134 .add_property(
"isExplicit", &T::IsExplicit)
149 #endif // PXR_USD_SDF_PY_LIST_OP_H
GLsizei const GLchar *const * string
**But if you need a result
auto arg(const Char *name, const T &arg) -> detail::named_arg< Char, T >
std::string TfStringify(const T &v)
SdfPyWrapListOp< T > This
GLuint const GLchar * name
SdfPyWrapListOp(const std::string &name)
PXR_NAMESPACE_CLOSE_SCOPE PXR_NAMESPACE_OPEN_SCOPE
#define PXR_NAMESPACE_CLOSE_SCOPE