Use a Mako template for generated code.

Change-Id: I8901e7719da57f13eff7ba49d50113b01fec88aa
Signed-off-by: Brad Bishop <bradleyb@fuzziesquirrel.com>
diff --git a/generated.mako.cpp b/generated.mako.cpp
new file mode 100644
index 0000000..a92daf1
--- /dev/null
+++ b/generated.mako.cpp
@@ -0,0 +1,60 @@
+## This file is a template.  The comment below is emitted
+## into the rendered file; feel free to edit this file.
+// This file was auto generated.  Do not edit.
+
+#include "manager.hpp"
+
+namespace phosphor
+{
+namespace inventory
+{
+namespace manager
+{
+
+const Manager::Events Manager::_events{
+% for e in events:
+    {
+    % if e.get('description'):
+        // ${e['description']}
+    % endif
+        "${e['name']}",
+        std::make_tuple(
+        % for i, s in enumerate(e['signature'].items()):
+            % if i + 1 == len(e['signature']):
+            ${'"{0}=\'{1}\'"'.format(*s)},
+            % else:
+            ${'"{0}=\'{1}\',"'.format(*s)}
+            % endif
+        % endfor
+            % if e['filter'].get('args'):
+            filters::${e['filter']['type']}(
+                % for i, a in enumerate(e['filter']['args']):
+                    % if i + 1 == len(e['filter']['args']):
+                "${a['value']}"),
+                    % else:
+                "${a['value']}",
+                    % endif
+                % endfor
+            % else:
+            filters::${e['filter']['type']},
+            % endif
+            % if e['action'].get('args'):
+            actions::${e['action']['type']}(
+                % for i, a in enumerate(e['action']['args']):
+                    % if i + 1 == len(e['action']['args']):
+                "${a['value']}")
+                    % else:
+                "${a['value']}",
+                    % endif
+                % endfor
+            % else:
+            actions::${e['action']['type']}
+            % endif
+        ),
+    },
+% endfor
+};
+
+} // namespace manager
+} // namespace inventory
+} // namespace phosphor