From 1abcb06bedadfbd40b4ec6f7e5f6a95021df3c96 Mon Sep 17 00:00:00 2001 From: Matt Spinler Date: Mon, 26 Feb 2018 09:14:31 -0600 Subject: Add constants for tuple fields Add constants for use with std::get. Tested: Run unit tests Change-Id: Ic09c13feeda69d61c98f63d227cae8f08d1bf50e Signed-off-by: Matt Spinler --- src/data_types.hpp | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) (limited to 'src/data_types.hpp') diff --git a/src/data_types.hpp b/src/data_types.hpp index f1512db..607289a 100644 --- a/src/data_types.hpp +++ b/src/data_types.hpp @@ -16,11 +16,20 @@ namespace monitoring 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 constexpr auto pathIndex = 0; +constexpr auto interfaceIndex = 1; constexpr auto propertyIndex = 2; + +//PropertyIndex::mapped_type fields +constexpr auto pathMetaIndex = 0; +constexpr auto propertyMetaIndex = 1; constexpr auto storageIndex = 2; + +//ConfigPropertyStorage fields constexpr auto valueIndex = 0; -constexpr auto metaIndex = 1; +constexpr auto resultIndex = 1; enum class Context { -- cgit v1.2.1