diff --git a/docs/tooling.txt b/docs/tooling.txt index 1c1bd1270..9edb282d4 100644 --- a/docs/tooling.txt +++ b/docs/tooling.txt @@ -22,3 +22,17 @@ What if I need to refer to classes which aren't available already in pybind? pybind/common.hpp pybind/module.cpp pybind/CMakeLists.txt + +How do I use a RouterEvent? + + From the cpp side, find the place in the code where it makes the most logical sense + that the conceptual event has taken place (and you have the relevant information to + create the "event" instance) and create it there as follows: + + #include + + where the event takes place, do the following: + auto event = std::make_unique(constructor_args...); + somehow_get_a_router->NotifyRouterEvent(std::move(event)); + + From the Python side...it's a python object!