1 ## Note that this file is not auto generated, it is what generates the
2 ## elog-metadata-postprocess.cpp file
3 // This file was autogenerated.  Do not edit!
4 // See elog-gen.py for more details
5 
6 #include <string>
7 #include <vector>
8 #include <functional>
9 #include <phosphor-logging/elog-errors.hpp>
10 #include "elog_meta.hpp"
11 
12 using namespace phosphor::logging;
13 using namespace example::xyz::openbmc_project::example::elog;
14 using namespace std::placeholders;
15 
16 extern const std::map<metadata::Metadata,
17                       std::function<metadata::associations::Type>> meta = {
18 % for key, value in metadata_process.items():
19 <%
20         import inflection
21         def sdbusplus_name(name):
22             names = name.split(".")
23             classname = inflection.camelize(names[-2])
24             metadata_field = names[-1]
25             namespace_name = "::".join([inflection.underscore(x) for x in names[:-2]])
26 
27             return "::".join([namespace_name, classname, metadata_field])
28         type = sdbusplus_name(value)
29 %>\
30     {"${key}", metadata::associations::build<${type}>},
31     % endfor
32 };
33