entry: store parent reference
Have the entry object store a reference to the error manager, passed via
the entry ctor.
Change-Id: I2c4a8c4c95929ab7005620f44ac17e9654d8e906
Signed-off-by: Deepak Kodihalli <dkodihal@in.ibm.com>
diff --git a/elog_entry.hpp b/elog_entry.hpp
index ac4949a..06f6bc2 100644
--- a/elog_entry.hpp
+++ b/elog_entry.hpp
@@ -19,6 +19,8 @@
using AssociationList =
std::vector<std::tuple<std::string, std::string, std::string>>;
+class Manager;
+
/** @class Entry
* @brief OpenBMC logging entry implementation.
* @details A concrete implementation for the
@@ -45,6 +47,7 @@
* @param[in] severityErr - The severity of the error.
* @param[in] msgErr - The message of the error.
* @param[in] additionalDataErr - The error metadata.
+ * @param[in] parent - The error's parent.
*/
Entry(sdbusplus::bus::bus& bus,
const std::string& path,
@@ -53,8 +56,10 @@
Level severityErr,
std::string&& msgErr,
std::vector<std::string>&& additionalDataErr,
- AssociationList&& objects) :
- EntryIfaces(bus, path.c_str(), true)
+ AssociationList&& objects,
+ Manager& parent) :
+ EntryIfaces(bus, path.c_str(), true),
+ parent(parent)
{
id(idErr);
severity(severityErr);
@@ -92,6 +97,9 @@
private:
/** @brief This entry's associations */
AssociationList assocs = {};
+
+ /** @brief This entry's parent */
+ Manager& parent;
};
} // namespace logging