Add interface exposing utility functions
Add utility functions enabling easy method calls on sdbusplus interface
binding objects.
Change-Id: Ie1d01f82604406705869fea0ec19d84c95d90474
Signed-off-by: Brad Bishop <bradleyb@fuzziesquirrel.com>
diff --git a/utils.hpp b/utils.hpp
index 2dbd3b6..4ebb2a3 100644
--- a/utils.hpp
+++ b/utils.hpp
@@ -77,6 +77,18 @@
std::forward<Held>(held));
}
+ /** @brief Provides a weak reference to the held interface. */
+ T& get()
+ {
+ return _held;
+ }
+
+ /** @brief Provides a weak reference to the held interface. */
+ const T& get() const
+ {
+ return _held;
+ }
+
protected:
T _held;
};