22 #ifndef PROTOBOARD_TYPES_H_
23 #define PROTOBOARD_TYPES_H_
25 #include <boost/bimap.hpp>
27 #include <unordered_map>
29 namespace protoboard {
33 typedef std::unordered_map<std::string, std::shared_ptr<pb_convert>> pb_conversion_map;
38 template <
typename... Ts>
45 template <
class IfaceT>
54 template <
class pbEnumT,
class bbEnumT>
58 typedef boost::bimap<pbEnumT, bbEnumT> bimapT;
65 constexpr
enum_map(std::initializer_list<typename bimapT::value_type> init)
66 : list(init), map(list.begin(), list.end())
74 constexpr
const bbEnumT &
77 return map.left.at(v);
84 constexpr
const pbEnumT &
87 return map.right.at(v);
91 const std::vector<typename bimapT::value_type> list;
97 #endif // PROTOBOARD_TYPES_H_