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

Defines the compile time keys (ctk) of Enum_ type as a variadic template. More...

#include <CompileTimeKeys.hpp>

Public Types

using Enum = Enum_
 Expose Enum. More...
 

Static Public Member Functions

static constexpr const std_utils::KeyArray< Enum_, 0 > getKeysArray ()
 Get runtime key array. More...
 
static constexpr int mapEnumToId (const Enum_ e)
 Default implementation of mapEnumToId(). More...
 
static constexpr const char * mapEnumToName (const Enum_ e)
 Default implementation of mapEnumToName(). More...
 
static constexpr Enum_ mapIdToEnum (const int id)
 Default implementation of mapIdToEnum(). More...
 
static constexpr const char * mapIdToName (const int id)
 Default implementation of mapIdToName(). More...
 
static constexpr Enum_ mapNameToEnum (const char *name)
 Default implementation of mapNameToEnum(). More...
 
static constexpr int mapNameToId (const char *name)
 Default implementation of mapNameToId(). More...
 
static constexpr bool containsEnum (const Enum_)
 Default implementation of containsEnum(). More...
 
static constexpr bool containsName (const char *)
 Default implementation of containsName(). More...
 
static constexpr bool containsId (const int)
 Default implementation of containsId(). More...
 
static constexpr std::size_t size ()
 Default implementation of size(). More...
 

Static Private Member Functions

static constexpr bool uniqueEnum (const Enum_)
 Default implementation of the uniqueEnum(). More...
 
static constexpr bool uniqueName (const char *)
 Default implementation of the uniqueName(). More...
 
static constexpr bool uniqueId (const int)
 Default implementation of the uniqueId(). More...
 

Friends

template<typename... Any>
class CompileTimeKeys
 Allow private access on all template specializations of CompileTimeKeys. More...
 

Detailed Description

template<typename Enum_, typename... REST_>
class std_utils::CompileTimeKeys< Enum_, REST_... >

Defines the compile time keys (ctk) of Enum_ type as a variadic template.

Template Parameters
Enum_Defines the type of enum of the ctk.
REST_parameter pack of the ctk.

Member Typedef Documentation

template<typename Enum_ , typename... REST_>
using std_utils::CompileTimeKeys< Enum_, REST_... >::Enum = Enum_

Expose Enum.

Member Function Documentation

template<typename Enum_ , typename... REST_>
static constexpr bool std_utils::CompileTimeKeys< Enum_, REST_... >::containsEnum ( const Enum_  )
inlinestatic

Default implementation of containsEnum().

Parameters
eenum at which ctk is evaluated.
Returns
false.
template<typename Enum_ , typename... REST_>
static constexpr bool std_utils::CompileTimeKeys< Enum_, REST_... >::containsId ( const int  )
inlinestatic

Default implementation of containsId().

Parameters
idid at which ctk is evaluated.
Returns
false.
template<typename Enum_ , typename... REST_>
static constexpr bool std_utils::CompileTimeKeys< Enum_, REST_... >::containsName ( const char *  )
inlinestatic

Default implementation of containsName().

Parameters
namename at which ctk is evaluated.
Returns
false.
template<typename Enum_ , typename... REST_>
static constexpr const std_utils::KeyArray<Enum_, 0> std_utils::CompileTimeKeys< Enum_, REST_... >::getKeysArray ( )
inlinestatic

Get runtime key array.

template<typename Enum_ , typename... REST_>
static constexpr int std_utils::CompileTimeKeys< Enum_, REST_... >::mapEnumToId ( const Enum_  e)
inlinestatic

Default implementation of mapEnumToId().

Parameters
eenum for which id is queried.
Returns
throw std::out_of_range exception.
template<typename Enum_ , typename... REST_>
static constexpr const char* std_utils::CompileTimeKeys< Enum_, REST_... >::mapEnumToName ( const Enum_  e)
inlinestatic

Default implementation of mapEnumToName().

Parameters
eenum for which name is queried.
Returns
throw std::out_of_range exception.
template<typename Enum_ , typename... REST_>
static constexpr Enum_ std_utils::CompileTimeKeys< Enum_, REST_... >::mapIdToEnum ( const int  id)
inlinestatic

Default implementation of mapIdToEnum().

Parameters
idid for which enum is queried.
Returns
throw std::out_of_range exception.
template<typename Enum_ , typename... REST_>
static constexpr const char* std_utils::CompileTimeKeys< Enum_, REST_... >::mapIdToName ( const int  id)
inlinestatic

Default implementation of mapIdToName().

Parameters
idid for which name is queried.
Returns
throw std::out_of_range exception.
template<typename Enum_ , typename... REST_>
static constexpr Enum_ std_utils::CompileTimeKeys< Enum_, REST_... >::mapNameToEnum ( const char *  name)
inlinestatic

Default implementation of mapNameToEnum().

Parameters
namename for which enum is queried.
Returns
throw std::out_of_range exception.
template<typename Enum_ , typename... REST_>
static constexpr int std_utils::CompileTimeKeys< Enum_, REST_... >::mapNameToId ( const char *  name)
inlinestatic

Default implementation of mapNameToId().

Parameters
namename for which id is queried.
Returns
throw std::out_of_range exception.
template<typename Enum_ , typename... REST_>
static constexpr std::size_t std_utils::CompileTimeKeys< Enum_, REST_... >::size ( )
inlinestatic

Default implementation of size().

Returns
0.
template<typename Enum_ , typename... REST_>
static constexpr bool std_utils::CompileTimeKeys< Enum_, REST_... >::uniqueEnum ( const Enum_  )
inlinestaticprivate

Default implementation of the uniqueEnum().

Parameters
eenum which is tested for uniqueness.
Returns
true.
template<typename Enum_ , typename... REST_>
static constexpr bool std_utils::CompileTimeKeys< Enum_, REST_... >::uniqueId ( const int  )
inlinestaticprivate

Default implementation of the uniqueId().

Parameters
idid which is tested for uniqueness.
Returns
true.
template<typename Enum_ , typename... REST_>
static constexpr bool std_utils::CompileTimeKeys< Enum_, REST_... >::uniqueName ( const char *  )
inlinestaticprivate

Default implementation of the uniqueName().

Parameters
namename which is tested for uniqueness.
Returns
true.

Friends And Related Function Documentation

template<typename Enum_ , typename... REST_>
template<typename... Any>
friend class CompileTimeKeys
friend

Allow private access on all template specializations of CompileTimeKeys.


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