summaryrefslogtreecommitdiffstats
path: root/src/templates
diff options
context:
space:
mode:
Diffstat (limited to 'src/templates')
-rw-r--r--src/templates/callbackgroup.mako.cpp2
-rw-r--r--src/templates/generated.mako.hpp17
2 files changed, 19 insertions, 0 deletions
diff --git a/src/templates/callbackgroup.mako.cpp b/src/templates/callbackgroup.mako.cpp
new file mode 100644
index 0000000..6cc6813
--- /dev/null
+++ b/src/templates/callbackgroup.mako.cpp
@@ -0,0 +1,2 @@
+std::make_unique<GroupOfCallbacks<ConfigPropertyCallbacks>>(
+${indent(1)}ConfigPropertyCallbackGroups::get()[${c.graph}])\
diff --git a/src/templates/generated.mako.hpp b/src/templates/generated.mako.hpp
index 61c2b6f..67b9149 100644
--- a/src/templates/generated.mako.hpp
+++ b/src/templates/generated.mako.hpp
@@ -128,6 +128,23 @@ struct ConfigPropertyIndicies
}
};
+struct ConfigPropertyCallbackGroups
+{
+ using CallbackGroups = std::array<std::vector<size_t>, ${len(callbackgroups)}>;
+ static auto& get()
+ {
+ static const CallbackGroups propertyCallbackGraph =
+ {
+ {
+% for g in callbackgroups:
+ {${', '.join([str(x) for x in g.members])}},
+% endfor
+ }
+ };
+ return propertyCallbackGraph;
+ }
+};
+
struct ConfigPropertyCallbacks
{
using Callbacks = std::array<std::unique_ptr<Callback>, ${len(callbacks)}>;
OpenPOWER on IntegriCloud