sbepp
Loading...
Searching...
No Matches
sbepp::data_traits< T > Class Template Reference

Provides various traits/attributes of a <data> element. More...

Public Types

template<typename Byte >
using value_type = DataType
 Representation type.
 
using length_type = LengthType
 Length type.
 
using length_type_tag = LengthTypeTag
 length_type tag
 

Static Public Member Functions

static constexpr const char * name () noexcept
 Returns name attribute.
 
static constexpr member_id_t id () noexcept
 Returns id attribute.
 
static constexpr const char * description () noexcept
 Returns description attribute.
 
static constexpr version_t since_version () noexcept
 Returns addedSince attribute.
 
static constexpr version_t deprecated () noexcept
 Returns deprecated attribute. Available only if provided in schema.
 
static constexpr std::size_t size_bytes (const length_type::value_type size) noexcept
 Returns number of bytes required to represent <data> in memory.
 

Detailed Description

template<typename T>
class sbepp::data_traits< T >

Provides various traits/attributes of a <data> element.

For example: sbepp::data_traits<message_tag::data_name>::since_version();

Template Parameters
Tdata tag

Member Typedef Documentation

◆ value_type

template<typename T >
template<typename Byte >
using sbepp::data_traits< T >::value_type = DataType

Representation type.

Template Parameters
Bytebyte type

Member Function Documentation

◆ size_bytes()

template<typename T >
static constexpr std::size_t sbepp::data_traits< T >::size_bytes ( const length_type::value_type size)
staticconstexprnoexcept

Returns number of bytes required to represent <data> in memory.

Parameters
sizepayload size
Returns
total size in bytes (including <data> header)

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