CARLA
Public Types | Static Public Member Functions | List of all members
carla::sensor::CompileTimeTypeMap< Items > Struct Template Reference

A compile time structure for mapping two types. More...

#include <CompileTimeTypeMap.h>

+ Inheritance diagram for carla::sensor::CompileTimeTypeMap< Items >:

Public Types

template<typename InKey >
using get = typename detail::CompileTimeTypeMapImpl< sizeof...(Items), Items... >::template get< InKey >
 
template<size_t Index>
using get_by_index = typename detail::CompileTimeTypeMapImpl< sizeof...(Items), Items... >::template get_by_index< Index >
 

Static Public Member Functions

static constexpr size_t size ()
 

Detailed Description

template<typename... Items>
struct carla::sensor::CompileTimeTypeMap< Items >

A compile time structure for mapping two types.

Lookup elements by Key or by Index.

Example usage:

using MyMap = CompileTimeTypeMap<std::pair<A, B>, std::pair<C, D>>;
using type_B = MyMap::get<A>::type;
constexpr size_t index_B = MyMap::get<A>::index;
using type_B_too = MyMap::get_by_index<index_B>::type;

Definition at line 90 of file CompileTimeTypeMap.h.

Member Typedef Documentation

◆ get

template<typename... Items>
template<typename InKey >
using carla::sensor::CompileTimeTypeMap< Items >::get = typename detail::CompileTimeTypeMapImpl<sizeof...(Items), Items...>::template get<InKey>

Definition at line 97 of file CompileTimeTypeMap.h.

◆ get_by_index

template<typename... Items>
template<size_t Index>
using carla::sensor::CompileTimeTypeMap< Items >::get_by_index = typename detail::CompileTimeTypeMapImpl<sizeof...(Items), Items...>::template get_by_index<Index>

Definition at line 100 of file CompileTimeTypeMap.h.

Member Function Documentation

◆ size()

template<typename... Items>
static constexpr size_t carla::sensor::CompileTimeTypeMap< Items >::size ( )
inlinestatic

Definition at line 92 of file CompileTimeTypeMap.h.


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