summaryrefslogtreecommitdiffstats
path: root/entity_map_json.hpp
diff options
context:
space:
mode:
Diffstat (limited to 'entity_map_json.hpp')
-rw-r--r--entity_map_json.hpp20
1 files changed, 20 insertions, 0 deletions
diff --git a/entity_map_json.hpp b/entity_map_json.hpp
index 54884ee..3ab4ff2 100644
--- a/entity_map_json.hpp
+++ b/entity_map_json.hpp
@@ -1,6 +1,7 @@
#pragma once
#include <ipmid/types.hpp>
+#include <memory>
#include <nlohmann/json.hpp>
namespace ipmi
@@ -33,5 +34,24 @@ EntityInfoMap buildEntityMapFromFile();
*/
EntityInfoMap buildJsonEntityMap(const nlohmann::json& data);
+/**
+ * @brief Owner of the EntityInfoMap.
+ */
+class EntityInfoMapContainer
+{
+ public:
+ /** Get ahold of the owner. */
+ static EntityInfoMapContainer* getContainer();
+ /** Get ahold of the records. */
+ const EntityInfoMap& getIpmiEntityRecords();
+
+ private:
+ EntityInfoMapContainer(const EntityInfoMap& entityRecords) :
+ entityRecords(entityRecords)
+ {
+ }
+ EntityInfoMap entityRecords;
+};
+
} // namespace sensor
} // namespace ipmi
OpenPOWER on IntegriCloud