summaryrefslogtreecommitdiffstats
path: root/src/templates/generated.mako.hpp
diff options
context:
space:
mode:
authorBrad Bishop <bradleyb@fuzziesquirrel.com>2017-05-23 18:01:54 -0400
committerBrad Bishop <bradleyb@fuzziesquirrel.com>2017-06-04 22:40:30 -0400
commite73b2c35a375af51b6c7341e9a98f9571f76b266 (patch)
treebc9ac0dd9ce556068df973919200c1b6d063da75 /src/templates/generated.mako.hpp
parentb604480a43a25d0645b944fb16c1268d36782d36 (diff)
downloadphosphor-dbus-monitor-e73b2c35a375af51b6c7341e9a98f9571f76b266.tar.gz
phosphor-dbus-monitor-e73b2c35a375af51b6c7341e9a98f9571f76b266.zip
Add property and property group support
Add support for defining groups of DBus properties. Groups are a list of property/interface/metadata tuples. Metadata can be used to give a property context when required. Change-Id: I5fc27f4d815b53332a2ddea2d270fde8e355dcbc Signed-off-by: Brad Bishop <bradleyb@fuzziesquirrel.com>
Diffstat (limited to 'src/templates/generated.mako.hpp')
-rw-r--r--src/templates/generated.mako.hpp32
1 files changed, 32 insertions, 0 deletions
diff --git a/src/templates/generated.mako.hpp b/src/templates/generated.mako.hpp
index 856975f..7c6e527 100644
--- a/src/templates/generated.mako.hpp
+++ b/src/templates/generated.mako.hpp
@@ -45,6 +45,38 @@ struct ConfigPaths
return paths;
}
};
+
+struct ConfigInterfaces
+{
+ using Interfaces = std::array<std::string, ${len(interfaces)}>;
+
+ static auto& get()
+ {
+ static const Interfaces interfaces =
+ {
+% for i in interfaces:
+ "${i.name}"s,
+% endfor
+ };
+ return interfaces;
+ }
+};
+
+struct ConfigProperties
+{
+ using Properties = std::array<std::string, ${len(propertynames)}>;
+
+ static auto& get()
+ {
+ static const Properties properties =
+ {
+% for p in propertynames:
+ "${p.name}"s,
+% endfor
+ };
+ return properties;
+ }
+};
} // namespace monitoring
} // namespace dbus
} // namespace phosphor
OpenPOWER on IntegriCloud