emlabcpp
modern opinionated embedded C++ library
emlabcpp::protocol::converter< D, Endianess > Struct Template Reference

#include <converter.h>

+ Inheritance diagram for emlabcpp::protocol::converter< D, Endianess >:
+ Collaboration diagram for emlabcpp::protocol::converter< D, Endianess >:

Public Types

using value_type = typename traits_for< D >::value_type
 
using size_type = bounded< std::size_t, max_size, max_size >
 
using value_type = typename traits_for< D >::value_type
 
using inner_type = typename D::value_type
 
using sub_converter = converter_for< inner_type, Endianess >
 
using size_type = typename sub_converter::size_type
 

Static Public Member Functions

static constexpr auto & bget (auto &buffer, std::size_t const i)
 
static constexpr size_type serialize_at (std::span< std::byte, max_size > buffer, value_type item)
 
static constexpr conversion_result deserialize (std::span< std::byte const > const &buffer, value_type &value)
 
static constexpr size_type serialize_at (std::span< std::byte, max_size > buffer, value_type const &item)
 
static constexpr conversion_result deserialize (std::span< std::byte const > const &buffer, value_type &value)
 

Static Public Attributes

static constexpr std::size_t max_size = traits_for< D >::max_size
 
static constexpr bool is_big_endian = Endianess == std::endian::big
 

Member Typedef Documentation

◆ inner_type

template<base_type D, std::endian Endianess>
using emlabcpp::protocol::converter< D, Endianess >::inner_type = typename D::value_type

◆ size_type [1/2]

template<base_type D, std::endian Endianess>
using emlabcpp::protocol::converter< D, Endianess >::size_type = bounded< std::size_t, max_size, max_size >

◆ size_type [2/2]

template<base_type D, std::endian Endianess>
using emlabcpp::protocol::converter< D, Endianess >::size_type = typename sub_converter::size_type

◆ sub_converter

template<base_type D, std::endian Endianess>
using emlabcpp::protocol::converter< D, Endianess >::sub_converter = converter_for< inner_type, Endianess >

◆ value_type [1/2]

template<base_type D, std::endian Endianess>
using emlabcpp::protocol::converter< D, Endianess >::value_type = typename traits_for< D >::value_type

◆ value_type [2/2]

template<base_type D, std::endian Endianess>
using emlabcpp::protocol::converter< D, Endianess >::value_type = typename traits_for< D >::value_type

Member Function Documentation

◆ bget()

template<base_type D, std::endian Endianess>
static constexpr auto& emlabcpp::protocol::converter< D, Endianess >::bget ( auto &  buffer,
std::size_t const  i 
)
inlinestaticconstexpr

◆ deserialize() [1/2]

template<base_type D, std::endian Endianess>
static constexpr conversion_result emlabcpp::protocol::converter< D, Endianess >::deserialize ( std::span< std::byte const > const &  buffer,
value_type value 
)
inlinestaticconstexpr

◆ deserialize() [2/2]

template<base_type D, std::endian Endianess>
static constexpr conversion_result emlabcpp::protocol::converter< D, Endianess >::deserialize ( std::span< std::byte const > const &  buffer,
value_type value 
)
inlinestaticconstexpr

◆ serialize_at() [1/2]

template<base_type D, std::endian Endianess>
static constexpr size_type emlabcpp::protocol::converter< D, Endianess >::serialize_at ( std::span< std::byte, max_size buffer,
value_type const &  item 
)
inlinestaticconstexpr

◆ serialize_at() [2/2]

template<base_type D, std::endian Endianess>
static constexpr size_type emlabcpp::protocol::converter< D, Endianess >::serialize_at ( std::span< std::byte, max_size buffer,
value_type  item 
)
inlinestaticconstexpr

Member Data Documentation

◆ is_big_endian

template<base_type D, std::endian Endianess>
constexpr bool emlabcpp::protocol::converter< D, Endianess >::is_big_endian = Endianess == std::endian::big
staticconstexpr

◆ max_size

template<base_type D, std::endian Endianess>
static constexpr std::size_t emlabcpp::protocol::converter< D, Endianess >::max_size = traits_for< D >::max_size
staticconstexpr

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