Fawkes API Fawkes Development Version
protoboard::enum_map< pbEnumT, bbEnumT > Class Template Reference

A compile-time constant bidirectional map that can be used to match blackboard interface enum values to ProtoBuf's enum values. More...

#include <protoboard_types.h>

Public Member Functions

constexpr enum_map (std::initializer_list< typename bimapT::value_type > init)
 constexpr constructor More...
 
constexpr const bbEnumT & of (pbEnumT v) const
 
constexpr const pbEnumT & of (bbEnumT v) const
 

Detailed Description

template<class pbEnumT, class bbEnumT>
class protoboard::enum_map< pbEnumT, bbEnumT >

A compile-time constant bidirectional map that can be used to match blackboard interface enum values to ProtoBuf's enum values.

Template Parameters
pbEnumTa ProtoBuf enum type
bbEnumTa blackboard interface enum type

Definition at line 55 of file protoboard_types.h.

Constructor & Destructor Documentation

◆ enum_map()

template<class pbEnumT , class bbEnumT >
constexpr protoboard::enum_map< pbEnumT, bbEnumT >::enum_map ( std::initializer_list< typename bimapT::value_type >  init)
inlineconstexpr

constexpr constructor

Parameters
initA curly-brace initializer list that defines the entire mapping

Definition at line 65 of file protoboard_types.h.

Member Function Documentation

◆ of() [1/2]

template<class pbEnumT , class bbEnumT >
constexpr const pbEnumT & protoboard::enum_map< pbEnumT, bbEnumT >::of ( bbEnumT  v) const
inlineconstexpr
Parameters
va blackboard interface enum value
Returns
the mapped ProtoBuf enum value

Definition at line 85 of file protoboard_types.h.

◆ of() [2/2]

template<class pbEnumT , class bbEnumT >
constexpr const bbEnumT & protoboard::enum_map< pbEnumT, bbEnumT >::of ( pbEnumT  v) const
inlineconstexpr
Parameters
va ProtoBuf enum value
Returns
the mapped blackboard interface enum value

Definition at line 75 of file protoboard_types.h.


The documentation for this class was generated from the following file: