diff options
author | Ratan Gupta <ratagupt@in.ibm.com> | 2017-10-06 20:56:31 +0530 |
---|---|---|
committer | Ratan Gupta <ratagupt@in.ibm.com> | 2018-02-20 09:30:04 +0530 |
commit | 90bfaea4c69773f4f252d06fad1147a718e8b863 (patch) | |
tree | 5d1ad14ac9e61ea0fbf9111bf48ec0ace714a9a9 /src/templates | |
parent | 80e9b65fdf9b1172e02de606cc193a6723791828 (diff) | |
download | phosphor-dbus-monitor-90bfaea4c69773f4f252d06fad1147a718e8b863.tar.gz phosphor-dbus-monitor-90bfaea4c69773f4f252d06fad1147a718e8b863.zip |
Initial support for event callbacks
Add parser support for template rendering of events.
Also defines the EventBase and Event classes.
EventBase is parent of Event.
Change-Id: I6b07b415acf510a8437529095bd489c0af73ddf5
Signed-off-by: Ratan Gupta <ratagupt@in.ibm.com>
Diffstat (limited to 'src/templates')
-rw-r--r-- | src/templates/event.mako.cpp | 2 | ||||
-rw-r--r-- | src/templates/generated.mako.hpp | 1 |
2 files changed, 3 insertions, 0 deletions
diff --git a/src/templates/event.mako.cpp b/src/templates/event.mako.cpp new file mode 100644 index 0000000..e5ac850 --- /dev/null +++ b/src/templates/event.mako.cpp @@ -0,0 +1,2 @@ +std::make_unique<Event<${c.datatype}>>("${c.eventName}"s, "${c.eventMessage}"s, +${indent(1)}ConfigPropertyIndicies::get()[${c.instances}])\ diff --git a/src/templates/generated.mako.hpp b/src/templates/generated.mako.hpp index 740acfa..4a5b87c 100644 --- a/src/templates/generated.mako.hpp +++ b/src/templates/generated.mako.hpp @@ -14,6 +14,7 @@ #include "propertywatchimpl.hpp" #include "resolve_errors.hpp" #include "sdbusplus.hpp" +#include "event.hpp" #include "sdevent.hpp" using namespace std::string_literals; |