11#include < pybind11/pybind11.h>
22
3+ #include " fields/relation.h"
34#include " fields/field_definition.h"
45#include " fields/field_update.h"
56#include " fields/type.h"
67#include " fields/type_registry.h"
78#include " fields/input_field.h"
89#include " fields/subtraction.h"
10+ #include " fields/test_type.h"
911
1012
1113// ----------------
@@ -17,7 +19,16 @@ namespace py = pybind11;
1719PYBIND11_MODULE (aika, m)
1820{
1921 // Bind Relation
20- py::class_<Relation>(m, " Relation" );
22+ py::class_<Relation>(m, " Relation" )
23+ .def (" setReversed" , [](Relation &rel, Relation* reversed) {
24+ rel.setReversed (reversed);
25+ });
26+
27+ py::class_<RelationOne, Relation>(m, " RelationOne" )
28+ .def (py::init<int , const std::string&>());
29+
30+ py::class_<RelationMany, Relation>(m, " RelationMany" )
31+ .def (py::init<int , const std::string&>());
2132
2233 py::class_<FieldUpdate>(m, " FieldUpdate" )
2334 .def (py::init<ProcessingPhase&, QueueInterceptor*>());
@@ -59,6 +70,9 @@ PYBIND11_MODULE(aika, m)
5970 );
6071 }, py::return_value_policy::take_ownership);
6172
73+ py::class_<TestType, Type>(m, " TestType" )
74+ .def (py::init<TypeRegistry*, const std::string&>());
75+
6276 py::class_<TypeRegistry>(m, " TypeRegistry" )
6377 .def (py::init<>())
6478 .def (" getType" , &TypeRegistry::getType)
0 commit comments