emlabcpp
modern opinionated embedded C++ library
emlabcpp::protocol::message< N > Class Template Reference

Protocol library has custom type that represents message, however this is just simple overaly over std::array that remembers how many bytes are used. More...

#include <message.h>

+ Inheritance diagram for emlabcpp::protocol::message< N >:

Public Types

using value_type = std::byte
 
using reference = std::byte &
 
using pointer = std::byte *
 
using const_pointer = std::byte const *
 
using iterator = std::byte *
 
using const_iterator = std::byte const *
 
using size_type = std::size_t
 

Public Member Functions

constexpr message ()=default
 
constexpr message (size_type const n) noexcept
 
constexpr message (view< const_iterator > const &v) noexcept
 
template<size_type M>
constexpr message (message< M > const &other) noexcept
 
template<size_type M>
constexpr message (std::array< value_type, M > const &inpt) noexcept
 
template<std::convertible_to< uint8_t >... Ts>
constexpr message (Ts... inpt)
 
template<size_type M>
constexpr messageoperator= (message< M > const &other) noexcept
 
constexpr const_pointer data () const noexcept
 
constexpr pointer data () noexcept
 
constexpr size_type size () const noexcept
 
constexpr value_type front () const noexcept
 
constexpr reference front () noexcept
 
constexpr value_type back () const noexcept
 
constexpr reference back () noexcept
 
constexpr const_iterator begin () const noexcept
 
constexpr iterator begin () noexcept
 
constexpr const_iterator end () const noexcept
 
constexpr iterator end () noexcept
 
value_type operator[] (size_type const i) const noexcept
 
reference operator[] (size_type const i) noexcept
 
void resize (size_type const n) noexcept
 

Static Public Attributes

static constexpr size_type capacity = N
 

Friends

auto operator== (message const &lh, message const &rh) noexcept
 

Detailed Description

template<std::size_t N>
class emlabcpp::protocol::message< N >

Protocol library has custom type that represents message, however this is just simple overaly over std::array that remembers how many bytes are used.

Member Typedef Documentation

◆ const_iterator

template<std::size_t N>
using emlabcpp::protocol::message< N >::const_iterator = std::byte const*

◆ const_pointer

template<std::size_t N>
using emlabcpp::protocol::message< N >::const_pointer = std::byte const*

◆ iterator

template<std::size_t N>
using emlabcpp::protocol::message< N >::iterator = std::byte*

◆ pointer

template<std::size_t N>
using emlabcpp::protocol::message< N >::pointer = std::byte*

◆ reference

template<std::size_t N>
using emlabcpp::protocol::message< N >::reference = std::byte&

◆ size_type

template<std::size_t N>
using emlabcpp::protocol::message< N >::size_type = std::size_t

◆ value_type

template<std::size_t N>
using emlabcpp::protocol::message< N >::value_type = std::byte

Constructor & Destructor Documentation

◆ message() [1/6]

template<std::size_t N>
constexpr emlabcpp::protocol::message< N >::message ( )
constexprdefault

◆ message() [2/6]

template<std::size_t N>
constexpr emlabcpp::protocol::message< N >::message ( size_type const  n)
inlineexplicitconstexprnoexcept

◆ message() [3/6]

template<std::size_t N>
constexpr emlabcpp::protocol::message< N >::message ( view< const_iterator > const &  v)
inlineexplicitconstexprnoexcept

◆ message() [4/6]

template<std::size_t N>
template<size_type M>
constexpr emlabcpp::protocol::message< N >::message ( message< M > const &  other)
inlineexplicitconstexprnoexcept

◆ message() [5/6]

template<std::size_t N>
template<size_type M>
constexpr emlabcpp::protocol::message< N >::message ( std::array< value_type, M > const &  inpt)
inlineexplicitconstexprnoexcept

◆ message() [6/6]

template<std::size_t N>
template<std::convertible_to< uint8_t >... Ts>
constexpr emlabcpp::protocol::message< N >::message ( Ts...  inpt)
inlineexplicitconstexpr

Member Function Documentation

◆ back() [1/2]

template<std::size_t N>
constexpr value_type emlabcpp::protocol::message< N >::back ( ) const
inlineconstexprnoexcept

◆ back() [2/2]

template<std::size_t N>
constexpr reference emlabcpp::protocol::message< N >::back ( )
inlineconstexprnoexcept

◆ begin() [1/2]

template<std::size_t N>
constexpr const_iterator emlabcpp::protocol::message< N >::begin ( ) const
inlineconstexprnoexcept

◆ begin() [2/2]

template<std::size_t N>
constexpr iterator emlabcpp::protocol::message< N >::begin ( )
inlineconstexprnoexcept

◆ data() [1/2]

template<std::size_t N>
constexpr const_pointer emlabcpp::protocol::message< N >::data ( ) const
inlineconstexprnoexcept

◆ data() [2/2]

template<std::size_t N>
constexpr pointer emlabcpp::protocol::message< N >::data ( )
inlineconstexprnoexcept

◆ end() [1/2]

template<std::size_t N>
constexpr const_iterator emlabcpp::protocol::message< N >::end ( ) const
inlineconstexprnoexcept

◆ end() [2/2]

template<std::size_t N>
constexpr iterator emlabcpp::protocol::message< N >::end ( )
inlineconstexprnoexcept

◆ front() [1/2]

template<std::size_t N>
constexpr value_type emlabcpp::protocol::message< N >::front ( ) const
inlineconstexprnoexcept

◆ front() [2/2]

template<std::size_t N>
constexpr reference emlabcpp::protocol::message< N >::front ( )
inlineconstexprnoexcept

◆ operator=()

template<std::size_t N>
template<size_type M>
constexpr message& emlabcpp::protocol::message< N >::operator= ( message< M > const &  other)
inlineconstexprnoexcept

◆ operator[]() [1/2]

template<std::size_t N>
value_type emlabcpp::protocol::message< N >::operator[] ( size_type const  i) const
inlinenoexcept

◆ operator[]() [2/2]

template<std::size_t N>
reference emlabcpp::protocol::message< N >::operator[] ( size_type const  i)
inlinenoexcept

◆ resize()

template<std::size_t N>
void emlabcpp::protocol::message< N >::resize ( size_type const  n)
inlinenoexcept

◆ size()

template<std::size_t N>
constexpr size_type emlabcpp::protocol::message< N >::size ( ) const
inlineconstexprnoexcept

Friends And Related Function Documentation

◆ operator==

template<std::size_t N>
auto operator== ( message< N > const &  lh,
message< N > const &  rh 
)
friend

Member Data Documentation

◆ capacity

template<std::size_t N>
constexpr size_type emlabcpp::protocol::message< N >::capacity = N
staticconstexpr

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