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>
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 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