diff --git a/python-api-src/lib_replay_unit.cpp b/python-api-src/lib_replay_unit.cpp index 63197f20a344ae22df680e8ffee70d7396aeba29..907fef4a5381287443950044f80cb58c7d17f3a6 100644 --- a/python-api-src/lib_replay_unit.cpp +++ b/python-api-src/lib_replay_unit.cpp @@ -2,6 +2,17 @@ namespace py = pybind11; +void define_replay_unit(py::module & m) +{ + py::class_<ReplayUnit, Unit>(m, "ReplayUnit") + .def_property_readonly("unit_type", &ReplayUnit::getType, "The id of the type") + .def_property_readonly("unit_type_name", &ReplayUnit::getTypeName, "The name of the type") + .def_property_readonly("target", &ReplayUnit::getTarget) + .def_property_readonly("has_target", &ReplayUnit::hasTarget) + .def("__repr__", [](const ReplayUnit & unit) { return "<Unit of type: '" + unit.getTypeName() + "'>"; }) + ; +} +/* void define_replay_unit(py::module & m) { py::class_<ReplayUnit>(m, "ReplayUnit") @@ -41,3 +52,4 @@ void define_replay_unit(py::module & m) .def("__repr__", [](const ReplayUnit & unit) { return "<Unit of type: '" + unit.getTypeName() + "'>"; }) ; } +*/ \ No newline at end of file