File tree Expand file tree Collapse file tree 1 file changed +12
-1
lines changed
Expand file tree Collapse file tree 1 file changed +12
-1
lines changed Original file line number Diff line number Diff line change 44#include " fields/field_definition.h"
55#include " fields/field_update.h"
66#include " fields/type.h"
7+ #include " fields/obj.h"
78#include " fields/type_registry.h"
89#include " fields/input_field.h"
910#include " fields/subtraction.h"
1011#include " fields/test_type.h"
12+ #include " fields/test_object.h"
1113
1214
1315// ----------------
@@ -70,8 +72,17 @@ PYBIND11_MODULE(aika, m)
7072 );
7173 }, py::return_value_policy::take_ownership);
7274
75+ py::class_<Obj>(m, " Obj" )
76+ .def (" __str__" , [](const Obj &t) {
77+ return t.toString ();
78+ });
79+
7380 py::class_<TestType, Type>(m, " TestType" )
74- .def (py::init<TypeRegistry*, const std::string&>());
81+ .def (py::init<TypeRegistry*, const std::string&>())
82+ .def (" instantiate" , &TestType::instantiate, py::return_value_policy::take_ownership);
83+
84+ py::class_<TestObject, Obj>(m, " TestObj" )
85+ .def (py::init<TestType*>());
7586
7687 py::class_<TypeRegistry>(m, " TypeRegistry" )
7788 .def (py::init<>())
You can’t perform that action at this time.
0 commit comments