From 14bf2733c14e5a4520b8edc063caae0460d64630 Mon Sep 17 00:00:00 2001 From: Thomas Winget Date: Sat, 29 Feb 2020 19:57:38 -0500 Subject: [PATCH] how to use a router event doc --- docs/tooling.txt | 14 ++++++++++++++ 1 file changed, 14 insertions(+) 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!