From a58a73a3bd75574596287d28ce0ee32a82f9dead Mon Sep 17 00:00:00 2001 From: Guilhem Saurel <guilhem.saurel@laas.fr> Date: Thu, 3 Sep 2020 13:51:00 +0200 Subject: [PATCH] dynamically add commands & signals --- include/dynamic-graph/python/module.hh | 2 ++ 1 file changed, 2 insertions(+) diff --git a/include/dynamic-graph/python/module.hh b/include/dynamic-graph/python/module.hh index c472538..b93787b 100644 --- a/include/dynamic-graph/python/module.hh +++ b/include/dynamic-graph/python/module.hh @@ -70,6 +70,8 @@ inline auto exposeEntity() { */ bp::def(T::CLASS_NAME.c_str(), &internal::makeEntity1<T, Options>); bp::def(T::CLASS_NAME.c_str(), &internal::makeEntity2<T, Options>); + if (!(Options & AddCommands)) obj.def("add_commands", &entity::addCommands); + if (!(Options & AddSignals)) obj.def("add_signals", &entity::addSignals); return obj; } -- GitLab