LocalGuidance
A library that generates velocity references to follow a path.
std_utils::Key< Enum_ > Class Template Reference

Constexpr type that stores relation of name, id and enum. More...

#include <Key.hpp>

Public Types

using IdType = typename std::underlying_type< Enum_ >::type
 

Public Member Functions

constexpr Key (const Enum_ e, const char *name, const IdType id) noexcept
 
constexpr Key (const Enum_ e, const char *name) noexcept
 
constexpr const Enum_ getEnum () const
 
constexpr const char * getName () const
 
constexpr const IdType getId () const
 

Private Attributes

const Enum_ enum_
 
const char * name_
 
const IdType id_
 

Detailed Description

template<typename Enum_>
class std_utils::Key< Enum_ >

Constexpr type that stores relation of name, id and enum.

Template Parameters
Enum_Type of the enum

Member Typedef Documentation

◆ IdType

template<typename Enum_ >
using std_utils::Key< Enum_ >::IdType = typename std::underlying_type<Enum_>::type

Constructor & Destructor Documentation

◆ Key() [1/2]

template<typename Enum_ >
constexpr std_utils::Key< Enum_ >::Key ( const Enum_  e,
const char *  name,
const IdType  id 
)
inlinenoexcept

◆ Key() [2/2]

template<typename Enum_ >
constexpr std_utils::Key< Enum_ >::Key ( const Enum_  e,
const char *  name 
)
inlinenoexcept

Member Function Documentation

◆ getEnum()

template<typename Enum_ >
constexpr const Enum_ std_utils::Key< Enum_ >::getEnum ( ) const
inline

◆ getId()

template<typename Enum_ >
constexpr const IdType std_utils::Key< Enum_ >::getId ( ) const
inline

◆ getName()

template<typename Enum_ >
constexpr const char* std_utils::Key< Enum_ >::getName ( ) const
inline

Member Data Documentation

◆ enum_

template<typename Enum_ >
const Enum_ std_utils::Key< Enum_ >::enum_
private

◆ id_

template<typename Enum_ >
const IdType std_utils::Key< Enum_ >::id_
private

◆ name_

template<typename Enum_ >
const char* std_utils::Key< Enum_ >::name_
private

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