diff options
Diffstat (limited to 'src/data_types.hpp')
-rw-r--r-- | src/data_types.hpp | 38 |
1 files changed, 14 insertions, 24 deletions
diff --git a/src/data_types.hpp b/src/data_types.hpp index 607289a..6be6431 100644 --- a/src/data_types.hpp +++ b/src/data_types.hpp @@ -17,17 +17,17 @@ constexpr auto MAPPER_BUSNAME = "xyz.openbmc_project.ObjectMapper"; constexpr auto MAPPER_PATH = "/xyz/openbmc_project/object_mapper"; constexpr auto MAPPER_INTERFACE = "xyz.openbmc_project.ObjectMapper"; -//PropertyIndex::key_type fields +// PropertyIndex::key_type fields constexpr auto pathIndex = 0; constexpr auto interfaceIndex = 1; constexpr auto propertyIndex = 2; -//PropertyIndex::mapped_type fields +// PropertyIndex::mapped_type fields constexpr auto pathMetaIndex = 0; constexpr auto propertyMetaIndex = 1; constexpr auto storageIndex = 2; -//ConfigPropertyStorage fields +// ConfigPropertyStorage fields constexpr auto valueIndex = 0; constexpr auto resultIndex = 1; @@ -42,12 +42,11 @@ template <typename Key, typename Value> using RefKeyMap = std::map<std::reference_wrapper<Key>, Value, std::less<Key>>; /** @brief A map with a tuple of references as keys. */ -template <typename Value, typename ...Keys> +template <typename Value, typename... Keys> using TupleRefMap = std::map<TupleOfRefs<Keys...>, Value, TupleOfRefsLess>; /** @brief A vector of references. */ -template <typename T> -using RefVector = std::vector<std::reference_wrapper<T>>; +template <typename T> using RefVector = std::vector<std::reference_wrapper<T>>; /** @brief * @@ -59,31 +58,23 @@ using MapperPath = std::string; /** @brief ObjectManager.InterfacesAdded signal signature alias. */ template <typename T> -using InterfacesAdded = std::map < - std::string, - std::map < - std::string, - sdbusplus::message::variant<T >>>; +using InterfacesAdded = + std::map<std::string, + std::map<std::string, sdbusplus::message::variant<T>>>; /** @brief ObjectMapper.GetObject response signature alias. */ using GetObject = std::map<MapperPath, std::vector<std::string>>; /** @brief Properties.GetAll response signature alias. */ template <typename T> -using PropertiesChanged = std::map < - std::string, - sdbusplus::message::variant<T >>; +using PropertiesChanged = std::map<std::string, sdbusplus::message::variant<T>>; /** @brief Lookup index for properties . */ // *INDENT-OFF* -using PropertyIndex = TupleRefMap < - TupleOfRefs< - const std::string, - const std::string, - std::tuple<any_ns::any, any_ns::any>>, - const std::string, - const std::string, - const std::string >; +using PropertyIndex = + TupleRefMap<TupleOfRefs<const std::string, const std::string, + std::tuple<any_ns::any, any_ns::any>>, + const std::string, const std::string, const std::string>; // *INDENT-ON* /** @brief Convert some C++ types to others. @@ -97,8 +88,7 @@ template <typename T> struct Downcast { using Type = std::remove_cv_t<std::remove_reference_t<T>>; }; -template <typename T> using DowncastType = - typename Downcast<T>::Type; +template <typename T> using DowncastType = typename Downcast<T>::Type; } // namespace monitoring } // namespace dbus |