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

Array of elements. More...

#include <KeyArray.hpp>

Inheritance diagram for std_utils::KeyArray< Enum_, Size_ >:
Inheritance graph

Public Types

using Item = Key< Enum_ >
 
using IdType = typename Item::IdType
 
- Public Types inherited from std_utils::EnumArray< Enum_, std_utils::Key< Enum_ >, Size_ >
using Item = std_utils::Key< Enum_ >
 
using Enum = Enum_
 

Public Member Functions

constexpr KeyArray (std::array< Item, Size_ > a) noexcept
 
const ItematId (IdType id) const
 
ItematId (IdType id)
 
const ItematName (const std::string &name) const
 
ItematName (const std::string &name)
 
bool containsName (const std::string &name) const
 
bool containsId (IdType id) const
 
- Public Member Functions inherited from std_utils::EnumArray< Enum_, std_utils::Key< Enum_ >, Size_ >
constexpr EnumArray () noexcept
 
constexpr EnumArray (std::array< Item, Size_ > a) noexcept
 
 EnumArray (Item a) noexcept
 
Itemoperator[] (Enum e) noexcept
 Provide at, [] implementations for enums. More...
 
constexpr const Itemoperator[] (Enum e) const noexcept
 
Itemat (Enum e)
 
constexpr const Itemat (Enum e) const
 
Itemget () noexcept
 Provide get function, this can be used to assure compile time access in C++11. More...
 
constexpr const Itemget () const noexcept
 

Detailed Description

template<typename Enum_, std::size_t Size_ = static_cast<size_t>(Enum_::SIZE)>
class std_utils::KeyArray< Enum_, Size_ >

Array of elements.

Template Parameters
Enum_Type of the enum (starts at 0, consecutive, finishes with SIZE)

Member Typedef Documentation

template<typename Enum_ , std::size_t Size_ = static_cast<size_t>(Enum_::SIZE)>
using std_utils::KeyArray< Enum_, Size_ >::IdType = typename Item::IdType
template<typename Enum_ , std::size_t Size_ = static_cast<size_t>(Enum_::SIZE)>
using std_utils::KeyArray< Enum_, Size_ >::Item = Key<Enum_>

Constructor & Destructor Documentation

template<typename Enum_ , std::size_t Size_ = static_cast<size_t>(Enum_::SIZE)>
constexpr std_utils::KeyArray< Enum_, Size_ >::KeyArray ( std::array< Item, Size_ >  a)
inlinenoexcept

Member Function Documentation

template<typename Enum_ , std::size_t Size_ = static_cast<size_t>(Enum_::SIZE)>
const Item& std_utils::KeyArray< Enum_, Size_ >::atId ( IdType  id) const
inline
template<typename Enum_ , std::size_t Size_ = static_cast<size_t>(Enum_::SIZE)>
Item& std_utils::KeyArray< Enum_, Size_ >::atId ( IdType  id)
inline
template<typename Enum_ , std::size_t Size_ = static_cast<size_t>(Enum_::SIZE)>
const Item& std_utils::KeyArray< Enum_, Size_ >::atName ( const std::string &  name) const
inline
template<typename Enum_ , std::size_t Size_ = static_cast<size_t>(Enum_::SIZE)>
Item& std_utils::KeyArray< Enum_, Size_ >::atName ( const std::string &  name)
inline
template<typename Enum_ , std::size_t Size_ = static_cast<size_t>(Enum_::SIZE)>
bool std_utils::KeyArray< Enum_, Size_ >::containsId ( IdType  id) const
inline
template<typename Enum_ , std::size_t Size_ = static_cast<size_t>(Enum_::SIZE)>
bool std_utils::KeyArray< Enum_, Size_ >::containsName ( const std::string &  name) const
inline

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