From 90bfaea4c69773f4f252d06fad1147a718e8b863 Mon Sep 17 00:00:00 2001 From: Ratan Gupta Date: Fri, 6 Oct 2017 20:56:31 +0530 Subject: 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 --- src/templates/event.mako.cpp | 2 ++ src/templates/generated.mako.hpp | 1 + 2 files changed, 3 insertions(+) create mode 100644 src/templates/event.mako.cpp (limited to 'src/templates') 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>("${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; -- cgit v1.2.1