summaryrefslogtreecommitdiffstats
path: root/src/templates
diff options
context:
space:
mode:
authorBrad Bishop <bradleyb@fuzziesquirrel.com>2017-05-23 17:58:12 -0400
committerBrad Bishop <bradleyb@fuzziesquirrel.com>2017-06-04 22:40:30 -0400
commit0e7df1317a055fd0a3e15fb46b1e78b6887ee2c8 (patch)
tree015e03140cb2fecc893f6c7a0236898fd928dac8 /src/templates
parent05b0c1eef9de3dcd56fd2eee65db9e228231d3f7 (diff)
downloadphosphor-dbus-monitor-0e7df1317a055fd0a3e15fb46b1e78b6887ee2c8.tar.gz
phosphor-dbus-monitor-0e7df1317a055fd0a3e15fb46b1e78b6887ee2c8.zip
Add path and path group support
Add support for defining groups of object paths. Groups are a list of path/metadata tuples. Metadata can be used to give a path context when required. Change-Id: I355ebf76b40f2ffc8d783e94e888b930cde8ee9c Signed-off-by: Brad Bishop <bradleyb@fuzziesquirrel.com>
Diffstat (limited to 'src/templates')
-rw-r--r--src/templates/generated.mako.hpp31
1 files changed, 31 insertions, 0 deletions
diff --git a/src/templates/generated.mako.hpp b/src/templates/generated.mako.hpp
index 2a9c2d1..856975f 100644
--- a/src/templates/generated.mako.hpp
+++ b/src/templates/generated.mako.hpp
@@ -14,6 +14,37 @@ namespace dbus
namespace monitoring
{
+struct ConfigMeta
+{
+ using Meta = std::array<std::string, ${len(meta)}>;
+
+ static auto& get()
+ {
+ static const Meta meta =
+ {
+% for m in meta:
+ "${m.name}"s,
+% endfor
+ };
+ return meta;
+ }
+};
+
+struct ConfigPaths
+{
+ using Paths = std::array<std::string, ${len(paths)}>;
+
+ static auto& get()
+ {
+ static const Paths paths =
+ {
+% for p in paths:
+ "${p.name}"s,
+% endfor
+ };
+ return paths;
+ }
+};
} // namespace monitoring
} // namespace dbus
} // namespace phosphor
OpenPOWER on IntegriCloud