diff --git a/1.4.1/annotated.html b/1.4.1/annotated.html new file mode 100644 index 0000000..27b090a --- /dev/null +++ b/1.4.1/annotated.html @@ -0,0 +1,174 @@ + + + +
+ + + + +
+ sbepp
+
+ |
+
▼Nsbepp | The main sbepp namespace |
▼Ndetail | Namespace for various implementation details. Should not be used directly |
Cbitset_base | Base class for bitsets |
Cbyte_range | Base class for all reference semantics types |
Ccomposite_base | Base class for composites |
Cdynamic_array_ref | Represents reference to dynamic arrays used for <data> elements |
Centry_base | Base class for group entries |
Cflat_group_base | Base class for a flat group |
Cmessage_base | Base class for messages |
Cnested_group_base | Base class for a nested group |
Coptional_base | Base class for optional types |
Crequired_base | Base class for required types |
Cstatic_array_ref | Represents reference to fixed-size array |
Cbyte_type | Trait to get view's byte type |
Cchar_opt_t | Built-in char optional type |
Cchar_t | Built-in char required type |
Ccomposite_traits | Provides various traits/attributes of a <composite> element |
Ccursor | Represents cursor which is used in cursor-based API. Clients should not use undocumented methods |
Cdata_traits | Provides various traits/attributes of a <data> element |
Cdefault_init_t | Tag for dynamic_array_ref::resize() . Used to skip value initialization |
Cdouble_opt_t | Built-in double optional type |
Cdouble_t | Built-in double required type |
Cenum_traits | Provides various traits/attributes of an <enum> element |
Cenum_value_traits | Provides various traits/attributes of a <validValue> element |
Cfield_traits | Provides various traits/attributes of a <field> element |
Cfloat_opt_t | Built-in float optional type |
Cfloat_t | Built-in float required type |
Cgroup_traits | Provides various traits/attributes of a <group> element |
Cint16_opt_t | Built-in int16 optional type |
Cint16_t | Built-in int16 required type |
Cint32_opt_t | Built-in int32 optional type |
Cint32_t | Built-in int32 required type |
Cint64_opt_t | Built-in int64 optional type |
Cint64_t | Built-in int64 required type |
Cint8_opt_t | Built-in int8 optional type |
Cint8_t | Built-in int8 required type |
Cis_enum | Checks if T is an enumeration |
Cmessage_traits | Provides various traits/attributes of a <message> element |
Cnullopt_t | Tag type used to initialize optional types with null value |
Cschema_traits | Provides various traits/attributes of a <messageSchema> element |
Cset_choice_traits | Provides various traits/attributes of a <choice> element |
Cset_traits | Provides various traits/attributes of a <set> element |
Csize_bytes_checked_result | Result type of size_bytes_checked |
Ctraits_tag | Maps representation type to its tag |
Ctype_traits | Provides various traits and attributes of a <type> element |
Cuint16_opt_t | Built-in uint16 optional type |
Cuint16_t | Built-in uint16 required type |
Cuint32_opt_t | Built-in uint32 optional type |
Cuint32_t | Built-in uint32 required type |
Cuint64_opt_t | Built-in uint64 optional type |
Cuint64_t | Built-in uint64 required type |
Cuint8_opt_t | Built-in uint8 optional type |
Cuint8_t | Built-in uint8 required type |
Cunknown_enum_value_tag | Tag for unknown enum values |
+ sbepp
+
+ |
+
To reason about the performance of generated code I've made a set of benchmarks around this message:
+They all use the same scenario: read all message fields in-order up to a certain point. For example, top_level_fields_benchmark
reads only 5 top-level fields, flat_group_benchmark
reads top-level fields and all fields in all entries of flat_group
and so on.
+ There are 4 different reading methods:
raw_reader
, a reader written by hand which uses pointer arithmetic and castssbepp_reader
, a reader which uses normal accessors of sbepp
generated codesbepp_cursor_reader
, a reader which uses cursor-based accessors of sbepp
generated codereal_logic_reader
, a reader which uses code generated by RealLogic which provides a forward-only accessThe idea was to compare performance of normal and cursor-based accessors to the code written by hand with a message of gradually increasing complexity. All the measurements were done for a pack of 1000 messages but using two different strategies:
+Fixed group size and data field size to 10
. Since all message have the same structure, this benchmark is quite stable and was used for the following analysis.
Randomized group size in range [0; 20]
and data size in range [0; 32]
. This one cannot be used to compare different reading approaches since message structure heavily changes and is only provided for a reference.
We can see that when message structure is simple, like in top_level_fields_benchmark
and flat_group_benchmark
, there's no reason to use more complex cursor-based accessors. Even in nested_group_benchmark
there's no significant gain because a single data
member is not a big deal, computing it's length is a single memory read. Only starting from nested_group2_benchmark
cursor-based API really starts to shine since message structure becomes really complex at that point.
+ sbepp
+
+ |
+
+ sbepp
+
+ |
+
This is the complete list of members for sbepp::char_opt_t, including all inherited members.
+
+ sbepp
+
+ |
+
Built-in char
optional type.
+ More...
#include <sbepp.hpp>
+Static Public Member Functions | |
+static constexpr value_type | min_value () noexcept |
Returns minValue attribute. | |
+static constexpr value_type | max_value () noexcept |
Returns maxValue attribute. | |
+static constexpr value_type | null_value () noexcept |
Returns nullValue attribute. | |
+Additional Inherited Members | |
Public Types inherited from sbepp::detail::optional_base< char, char_opt_t > | |
+using | value_type |
Underlying type. | |
Public Member Functions inherited from sbepp::detail::optional_base< char, char_opt_t > | |
+ | optional_base ()=default |
Constructs null object. | |
+constexpr | optional_base (nullopt_t) noexcept |
Constructs null object. | |
+constexpr | optional_base (value_type val) noexcept |
Constructs object from given value. | |
+constexpr value_type | value () const noexcept |
Returns underlying value. | |
+constexpr value_type & | operator* () noexcept |
Returns reference to underlying value. | |
+constexpr value_type | operator* () const noexcept |
Returns underlying value. | |
+constexpr bool | in_range () const noexcept |
Checks if value is in [Derived::min_value(); Derived::max_value()] range. | |
+constexpr value_type | value_or (char default_value) const noexcept |
Returns value if not null, default_value otherwise. | |
+constexpr bool | has_value () const noexcept |
Checks if has value. | |
+constexpr | operator bool () const noexcept |
Checks if has value. | |
Built-in char
optional type.
Also works as a tag for its traits
+
+ sbepp
+
+ |
+
This is the complete list of members for sbepp::char_t, including all inherited members.
+in_range() const noexcept | sbepp::detail::required_base< char, char_t > | inline |
max_value() noexcept | sbepp::char_t | inlinestatic |
min_value() noexcept | sbepp::char_t | inlinestatic |
operator*() noexcept | sbepp::detail::required_base< char, char_t > | inline |
operator*() const noexcept | sbepp::detail::required_base< char, char_t > | inline |
required_base()=default | sbepp::detail::required_base< char, char_t > | |
required_base(value_type val) noexcept | sbepp::detail::required_base< char, char_t > | inline |
value() const noexcept | sbepp::detail::required_base< char, char_t > | inline |
value_type typedef | sbepp::detail::required_base< char, char_t > |
+ sbepp
+
+ |
+
Built-in char
required type.
+ More...
#include <sbepp.hpp>
+Static Public Member Functions | |
+static constexpr value_type | min_value () noexcept |
Returns minValue attribute. | |
+static constexpr value_type | max_value () noexcept |
Returns maxValue attribute. | |
+Additional Inherited Members | |
Public Types inherited from sbepp::detail::required_base< char, char_t > | |
+using | value_type |
Underlying type. | |
Public Member Functions inherited from sbepp::detail::required_base< char, char_t > | |
+ | required_base ()=default |
Default constructor. Constructs value-initialized object. | |
+constexpr | required_base (value_type val) noexcept |
Constructs from given value. | |
+constexpr value_type | value () const noexcept |
Returns underlying value. | |
+constexpr value_type & | operator* () noexcept |
Returns reference to underlying value. | |
+constexpr value_type | operator* () const noexcept |
Returns underlying value. | |
+constexpr bool | in_range () const noexcept |
Checks if value is in [Derived::min_value(); Derived::max_value()] range. | |
Built-in char
required type.
Also works as a tag for its traits
+
+ sbepp
+
+ |
+
This is the complete list of members for sbepp::composite_traits< T >, including all inherited members.
+deprecated() noexcept | sbepp::composite_traits< T > | static |
description() noexcept | sbepp::composite_traits< T > | static |
name() noexcept | sbepp::composite_traits< T > | static |
offset() noexcept | sbepp::composite_traits< T > | static |
semantic_type() noexcept | sbepp::composite_traits< T > | static |
since_version() noexcept | sbepp::composite_traits< T > | static |
size_bytes() noexcept | sbepp::composite_traits< T > | static |
value_type typedef | sbepp::composite_traits< T > |
+ sbepp
+
+ |
+
Provides various traits/attributes of a <composite>
element.
+ More...
+Public Types | |
template<typename Byte > | |
using | value_type = CompositeType<Byte> |
Representation type. | |
+Static Public Member Functions | |
+static constexpr const char * | name () noexcept |
Returns name attribute. | |
+static constexpr const char * | description () noexcept |
Returns description attribute. | |
+static constexpr offset_t | offset () noexcept |
Returns type offset. Available only if offset is static, i.e. not available for public composites whose offset is different on each usage. | |
+static constexpr const char * | semantic_type () noexcept |
Returns semanticType 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. | |
+static constexpr std::size_t | size_bytes () noexcept |
Size of the composite in bytes. | |
Provides various traits/attributes of a <composite>
element.
For example: sbepp::composite_traits<SchemaTag::types::composite>::since_version();
T | composite tag |
using sbepp::composite_traits< T >::value_type = CompositeType<Byte> | +
Representation type.
+Byte | byte type |
+ sbepp
+
+ |
+
This is the complete list of members for sbepp::cursor< Byte >, including all inherited members.
+byte_type typedef | sbepp::cursor< Byte > | |
cursor()=default | sbepp::cursor< Byte > | |
cursor(cursor< Byte2 > other) noexcept | sbepp::cursor< Byte > | inline |
operator=(cursor< Byte2 > other) noexcept | sbepp::cursor< Byte > | inline |
pointer() noexcept | sbepp::cursor< Byte > | inline |
pointer() const noexcept | sbepp::cursor< Byte > | inline |
+ sbepp
+
+ |
+
Represents cursor which is used in cursor-based API. Clients should not use undocumented methods. + More...
+ +#include <sbepp.hpp>
+Public Types | |
+using | byte_type = Byte |
same as Byte | |
+Public Member Functions | |
+ | cursor ()=default |
Construct a new cursor object initialized with nullptr | |
template<typename Byte2 , typename = detail::enable_if_convertible_t<Byte2, Byte>> | |
constexpr | cursor (cursor< Byte2 > other) noexcept |
Construct from another cursor. Enabled only if Byte2* is convertible to Byte* . | |
template<typename Byte2 , typename = detail::enable_if_convertible_t<Byte2, Byte>> | |
constexpr cursor & | operator= (cursor< Byte2 > other) noexcept |
Assign from another cursor. Enabled only if Byte2* is convertible to Byte | |
constexpr Byte *& | pointer () noexcept |
access underlying pointer. Might be useful in rare cases to initialize cursor with a particular value. | |
constexpr Byte * | pointer () const noexcept |
access underlying pointer | |
Represents cursor which is used in cursor-based API. Clients should not use undocumented methods.
+Byte | byte type |
+
|
+ +inlineconstexprnoexcept | +
Construct from another cursor. Enabled only if Byte2*
is convertible to Byte*
.
Byte2 | other 's byte type |
other | cursor to construct from |
+
|
+ +inlineconstexprnoexcept | +
Assign from another cursor. Enabled only if Byte2*
is convertible to Byte
Byte2 | other 's byte type |
other | cursor to assign from |
*this
+
|
+ +inlineconstexprnoexcept | +
access underlying pointer
+
+
|
+ +inlineconstexprnoexcept | +
access underlying pointer. Might be useful in rare cases to initialize cursor with a particular value.
+
+ sbepp
+
+ |
+
This is the complete list of members for sbepp::data_traits< T >, including all inherited members.
+deprecated() noexcept | sbepp::data_traits< T > | static |
description() noexcept | sbepp::data_traits< T > | static |
id() noexcept | sbepp::data_traits< T > | static |
length_type typedef | sbepp::data_traits< T > | |
length_type_tag typedef | sbepp::data_traits< T > | |
name() noexcept | sbepp::data_traits< T > | static |
since_version() noexcept | sbepp::data_traits< T > | static |
size_bytes(const length_type::value_type size) noexcept | sbepp::data_traits< T > | static |
value_type typedef | sbepp::data_traits< T > |
+ sbepp
+
+ |
+
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. | |
Provides various traits/attributes of a <data>
element.
For example: sbepp::data_traits<message_tag::data_name>::since_version();
T | data tag |
using sbepp::data_traits< T >::value_type = DataType | +
Representation type.
+Byte | byte type |
+
|
+ +staticconstexprnoexcept | +
Returns number of bytes required to represent <data>
in memory.
size | payload size |
<data>
header)
+ sbepp
+
+ |
+
This is the complete list of members for sbepp::detail::bitset_base< T >, including all inherited members.
+bitset_base()=default | sbepp::detail::bitset_base< T > | |
bitset_base(T value) noexcept | sbepp::detail::bitset_base< T > | inlineexplicit |
operator!= | sbepp::detail::bitset_base< T > | friend |
operator*() noexcept | sbepp::detail::bitset_base< T > | inline |
operator*() const noexcept | sbepp::detail::bitset_base< T > | inline |
operator== | sbepp::detail::bitset_base< T > | friend |
+ sbepp
+
+ |
+
Base class for bitsets. + More...
+ +#include <sbepp.hpp>
+Friends | |
+constexpr friend bool | operator== (const bitset_base &lhs, const bitset_base &rhs) noexcept |
Tests if underlying values are equal. | |
+constexpr friend bool | operator!= (const bitset_base &lhs, const bitset_base &rhs) noexcept |
Tests if underlying values are not equal. | |
Base class for bitsets.
+T | underlying value type |
+ sbepp
+
+ |
+
This is the complete list of members for sbepp::detail::byte_range< Byte >, including all inherited members.
+byte_range()=default | sbepp::detail::byte_range< Byte > | |
byte_range(Byte *begin, Byte *end) noexcept | sbepp::detail::byte_range< Byte > | inline |
byte_range(Byte *ptr, const std::size_t size) noexcept | sbepp::detail::byte_range< Byte > | inline |
byte_range(const byte_range< Byte2 > &other) noexcept | sbepp::detail::byte_range< Byte > | inline |
+ sbepp
+
+ |
+
Base class for all reference semantics types. + More...
+ +#include <sbepp.hpp>
+Public Member Functions | |
+ | byte_range ()=default |
Initializes to nullptr | |
+constexpr | byte_range (Byte *begin, Byte *end) noexcept |
Constructs from a pair of pointers. | |
+constexpr | byte_range (Byte *ptr, const std::size_t size) noexcept |
Constructs from pointer and size. | |
+template<typename Byte2 , typename = enable_if_convertible_t<Byte2, Byte>> | |
constexpr | byte_range (const byte_range< Byte2 > &other) noexcept |
Copy constructor. Available if Byte2* is convertible to Byte* | |
Base class for all reference semantics types.
+Byte | byte type. Must have size equal to 1 |
+ sbepp
+
+ |
+
This is the complete list of members for sbepp::detail::composite_base< Byte >, including all inherited members.
+byte_range()=default | sbepp::detail::byte_range< Byte > | |
byte_range(Byte *begin, Byte *end) noexcept | sbepp::detail::byte_range< Byte > | inline |
byte_range(Byte *ptr, const std::size_t size) noexcept | sbepp::detail::byte_range< Byte > | inline |
byte_range(const byte_range< Byte2 > &other) noexcept | sbepp::detail::byte_range< Byte > | inline |
+ sbepp
+
+ |
+
Base class for composites. + More...
+ +#include <sbepp.hpp>
+Additional Inherited Members | |
Public Member Functions inherited from sbepp::detail::byte_range< Byte > | |
+ | byte_range ()=default |
Initializes to nullptr | |
+constexpr | byte_range (Byte *begin, Byte *end) noexcept |
Constructs from a pair of pointers. | |
+constexpr | byte_range (Byte *ptr, const std::size_t size) noexcept |
Constructs from pointer and size. | |
+template<typename Byte2 , typename = enable_if_convertible_t<Byte2, Byte>> | |
constexpr | byte_range (const byte_range< Byte2 > &other) noexcept |
Copy constructor. Available if Byte2* is convertible to Byte* | |
Base class for composites.
+
+ sbepp
+
+ |
+
This is the complete list of members for sbepp::detail::dynamic_array_ref< Byte, Value, Length, E >, including all inherited members.
+
+ sbepp
+
+ |
+
Represents reference to dynamic arrays used for <data>
elements.
+ More...
#include <sbepp.hpp>
+Public Types | |
+using | element_type = detail::apply_cv_qualifiers_t<Byte, Value> |
final element type. value_type with the same cv-qualifiers as Byte | |
+using | value_type = Value |
same as Value | |
+using | sbe_size_type = Length |
length SBE representation of data's encoding | |
+using | size_type = typename sbe_size_type::value_type |
raw size type | |
+using | difference_type = std::ptrdiff_t |
std::ptrdiff_t | |
+using | reference = element_type& |
element reference type | |
+using | pointer = element_type* |
element pointer type | |
+using | iterator = pointer |
iterator type. Satisfies std::random_access_iterator | |
+using | reverse_iterator = std::reverse_iterator<iterator> |
reverse iterator type | |
+Public Member Functions | |
+constexpr iterator | begin () const noexcept |
Returns an iterator to the beginning. | |
+constexpr iterator | end () const noexcept |
Returns an iterator to the end. | |
+constexpr reverse_iterator | rbegin () const noexcept |
Returns a reverse iterator to the beginning. | |
+constexpr reverse_iterator | rend () const noexcept |
Returns a reverse iterator to the end. | |
constexpr reference | front () const noexcept |
Access the first element. | |
constexpr reference | back () const noexcept |
Access the last element. | |
constexpr pointer | data () const noexcept |
Direct access to the underlying array. | |
constexpr reference | operator[] (size_type pos) const noexcept |
Access element at pos | |
+constexpr sbe_size_type | sbe_size () const noexcept |
Returns SBE size representation. | |
+constexpr size_type | size () const noexcept |
Returns raw size. | |
+constexpr bool | empty () const noexcept |
Checks if size() != 0 | |
+template<typename T = void, typename = enable_if_writable_t<Byte, T>> | |
constexpr void | clear () const noexcept |
Sets size to 0. | |
+template<typename T = void, typename = enable_if_writable_t<Byte, T>> | |
constexpr void | resize (size_type count) const noexcept |
Sets size to count , value initializes new elements. | |
+template<typename T = void, typename = enable_if_writable_t<Byte, T>> | |
constexpr void | resize (size_type count, value_type value) const noexcept |
Sets size to count , initializes new elements with value | |
+template<typename T = void, typename = enable_if_writable_t<Byte, T>> | |
constexpr void | resize (size_type count, sbepp::default_init_t) const noexcept |
Sets size to count , default initializes new elements. | |
+template<typename T = void, typename = enable_if_writable_t<Byte, T>> | |
constexpr void | push_back (value_type value) const noexcept |
Adds new element to the end. | |
+template<typename T = void, typename = enable_if_writable_t<Byte, T>> | |
constexpr void | pop_back () const noexcept |
Removes the last element. | |
+template<typename T = void, typename = enable_if_writable_t<Byte, T>> | |
constexpr iterator | erase (iterator pos) const noexcept |
Erases element at pos | |
+template<typename T = void, typename = enable_if_writable_t<Byte, T>> | |
constexpr iterator | erase (iterator first, iterator last) const noexcept |
Erases elements in [first; last) range. | |
+template<typename T = void, typename = enable_if_writable_t<Byte, T>> | |
constexpr iterator | insert (iterator pos, const value_type value) const noexcept |
Inserts value before pos | |
+template<typename T = void, typename = enable_if_writable_t<Byte, T>> | |
constexpr iterator | insert (iterator pos, size_type count, const value_type value) const noexcept |
Inserts count copies of value before pos | |
+template<typename InputIt , typename = detail::enable_if_t< !std::is_const<Byte>::value && std::is_convertible< typename std::iterator_traits<InputIt>::iterator_category, std::input_iterator_tag>::value>> | |
constexpr iterator | insert (iterator pos, InputIt first, InputIt last) const |
Inserts elements from [first; last) range before pos | |
+template<typename T = void, typename = enable_if_writable_t<Byte, T>> | |
constexpr iterator | insert (iterator pos, std::initializer_list< value_type > ilist) const noexcept |
Inserts elements from ilist before pos | |
+template<typename T = void, typename = enable_if_writable_t<Byte, T>> | |
constexpr void | assign (size_type count, const value_type value) const noexcept |
Replaces the contents of the container with count copies of value | |
+template<typename InputIt , typename = enable_if_writable_t<Byte, InputIt>> | |
constexpr void | assign (InputIt first, InputIt last) const |
Replaces the contents of the container with the elements from [first; last) range. | |
+template<typename T = void, typename = enable_if_writable_t<Byte, T>> | |
constexpr void | assign (std::initializer_list< value_type > ilist) const noexcept |
Replaces the contents of the container with the elements from ilist | |
constexpr dynamic_array_ref< Byte, detail::remove_cv_t< Byte >, Length, E > | raw () const noexcept |
Returns dynamic_array_ref<Byte, Byte, Length, E> . | |
template<typename T = void, typename = enable_if_writable_t<Byte, T>> | |
constexpr void | assign_string (const char *str) const noexcept |
Assigns null-terminated string. | |
template<typename R , typename = enable_if_t<!std::is_const<Byte>::value && is_range<R>::value>> | |
constexpr void | assign_range (R &&r) const |
Assigns range. | |
Public Member Functions inherited from sbepp::detail::byte_range< Byte > | |
+ | byte_range ()=default |
Initializes to nullptr | |
+constexpr | byte_range (Byte *begin, Byte *end) noexcept |
Constructs from a pair of pointers. | |
+constexpr | byte_range (Byte *ptr, const std::size_t size) noexcept |
Constructs from pointer and size. | |
+template<typename Byte2 , typename = enable_if_convertible_t<Byte2, Byte>> | |
constexpr | byte_range (const byte_range< Byte2 > &other) noexcept |
Copy constructor. Available if Byte2* is convertible to Byte* | |
+Static Public Member Functions | |
+static constexpr size_type | max_size () noexcept |
Returns max value of SBE length representation. | |
Represents reference to dynamic arrays used for <data>
elements.
The general precondition for most functions is that current buffer should be able to hold size()
number of elements
Byte | byte type |
Value | array element type |
Length | SBE length type |
E | schema endianness |
+
|
+ +inlineconstexpr | +
Assigns range.
+r | range to assign. In C++20, required to satisfy std::ranges::range , or std::begin(r) /std::end(r) as valid expressions for older C++ versions |
+
|
+ +inlineconstexprnoexcept | +
Assigns null-terminated string.
+str | null-terminated string |
str != nullptr
+
|
+ +inlineconstexprnoexcept | +
Access the last element.
+!empty()
+
|
+ +inlineconstexprnoexcept | +
+
|
+ +inlineconstexprnoexcept | +
Access the first element.
+!empty()
+
|
+ +inlineconstexprnoexcept | +
Access element at pos
pos < size()
+
|
+ +inlineconstexprnoexcept | +
Returns dynamic_array_ref<Byte, Byte, Length, E>
.
Useful in constexpr context to modify an array which has different Byte
and Value
types. For example see static_array_ref::raw()
+ sbepp
+
+ |
+
This is the complete list of members for sbepp::detail::entry_base< Byte, BlockLengthType >, including all inherited members.
+byte_range()=default | sbepp::detail::byte_range< Byte > | |
byte_range(Byte *begin, Byte *end) noexcept | sbepp::detail::byte_range< Byte > | inline |
byte_range(Byte *ptr, const std::size_t size) noexcept | sbepp::detail::byte_range< Byte > | inline |
byte_range(const byte_range< Byte2 > &other) noexcept | sbepp::detail::byte_range< Byte > | inline |
entry_base()=default | sbepp::detail::entry_base< Byte, BlockLengthType > | |
entry_base(Byte *ptr, Byte *end, BlockLengthType block_length) noexcept | sbepp::detail::entry_base< Byte, BlockLengthType > | inline |
entry_base(Byte *ptr, const std::size_t size, const BlockLengthType block_length) noexcept | sbepp::detail::entry_base< Byte, BlockLengthType > | inline |
entry_base(cursor< Byte2 > &c, Byte *end_ptr, BlockLengthType block_length) noexcept | sbepp::detail::entry_base< Byte, BlockLengthType > | inline |
entry_base(const entry_base< Byte2, BlockLengthType > &other) noexcept | sbepp::detail::entry_base< Byte, BlockLengthType > | inline |
+ sbepp
+
+ |
+
Base class for group entries. + More...
+ +#include <sbepp.hpp>
+Public Member Functions | |
+ | entry_base ()=default |
Constructs using nullptr | |
+constexpr | entry_base (Byte *ptr, Byte *end, BlockLengthType block_length) noexcept |
Constructs from two pointers. | |
+constexpr | entry_base (Byte *ptr, const std::size_t size, const BlockLengthType block_length) noexcept |
Constructs from pointer and size. | |
+template<typename Byte2 , typename = enable_if_convertible_t<Byte2, Byte>> | |
constexpr | entry_base (cursor< Byte2 > &c, Byte *end_ptr, BlockLengthType block_length) noexcept |
Constructs from cursor. | |
+template<typename Byte2 , typename = enable_if_convertible_t<Byte2, Byte>> | |
constexpr | entry_base (const entry_base< Byte2, BlockLengthType > &other) noexcept |
Constructs from entry_base of compatible byte type. Available if Byte2* is convertible to Byte* | |
Public Member Functions inherited from sbepp::detail::byte_range< Byte > | |
+ | byte_range ()=default |
Initializes to nullptr | |
+constexpr | byte_range (Byte *begin, Byte *end) noexcept |
Constructs from a pair of pointers. | |
+constexpr | byte_range (Byte *ptr, const std::size_t size) noexcept |
Constructs from pointer and size. | |
+template<typename Byte2 , typename = enable_if_convertible_t<Byte2, Byte>> | |
constexpr | byte_range (const byte_range< Byte2 > &other) noexcept |
Copy constructor. Available if Byte2* is convertible to Byte* | |
Base class for group entries.
+
+ sbepp
+
+ |
+
This is the complete list of members for sbepp::detail::flat_group_base< Byte, Entry, Dimension >, including all inherited members.
+
+ sbepp
+
+ |
+
Base class for a flat group. + More...
+ +#include <sbepp.hpp>
+Public Types | |
+using | value_type = Entry |
Entry type. | |
+using | reference = value_type |
value_type | |
+using | sbe_size_type |
numInGroup value type | |
+using | size_type = typename sbe_size_type::value_type |
Raw size type. | |
+using | difference_type = typename std::make_signed<size_type>::type |
signed size_type | |
+using | iterator |
Random access iterator to value_type . Satisfies std::random_access_iterator | |
+template<typename Byte2 > | |
using | cursor_range_t |
Type of a cursor range. Satisfies std::ranges::input_range | |
+template<typename Byte2 > | |
using | cursor_iterator = typename cursor_range_t<Byte2>::iterator |
cursor_range_t::iterator . Satisfies std::input_iterator | |
+Public Member Functions | |
+constexpr sbe_size_type | sbe_size () const noexcept |
Returns header's numInGroup | |
+constexpr size_type | size () const noexcept |
Returns raw size. | |
+constexpr void | resize (const size_type count) const noexcept |
Sets numInGroup to count | |
+constexpr bool | empty () const noexcept |
Checks if size() == 0 | |
+constexpr iterator | begin () const noexcept |
Returns an iterator to the beginning. | |
+constexpr iterator | end () const noexcept |
Returns an iterator to the end. | |
constexpr reference | operator[] (size_type pos) const noexcept |
Access group entry at pos | |
constexpr reference | front () const noexcept |
Returns the first entry. | |
constexpr reference | back () const noexcept |
Returns the last entry. | |
constexpr void | clear () const noexcept |
Resizes to 0 | |
+template<typename Byte2 , typename = enable_if_cursor_compatible_t<Byte, Byte2>> | |
constexpr cursor_range_t< Byte2 > | cursor_range (cursor< Byte2 > &c) const noexcept |
Returns cursor range to all group entries. | |
template<typename Byte2 , typename = enable_if_cursor_compatible_t<Byte, Byte2>> | |
constexpr cursor_range_t< Byte2 > | cursor_subrange (cursor< Byte2 > &c, const size_type pos) const noexcept |
Returns cursor range to [pos; size()) entries. | |
template<typename Byte2 , typename = enable_if_cursor_compatible_t<Byte, Byte2>> | |
constexpr cursor_range_t< Byte2 > | cursor_subrange (cursor< Byte2 > &c, const size_type pos, const size_type count) const noexcept |
Returns cursor range to [pos; pos+count) entries. | |
+template<typename Byte2 , typename = enable_if_cursor_compatible_t<Byte, Byte2>> | |
constexpr cursor_iterator< Byte2 > | cursor_begin (cursor< Byte2 > &c) const noexcept |
Returns cursor iterator to the beginning. | |
+template<typename Byte2 , typename = enable_if_cursor_compatible_t<Byte, Byte2>> | |
constexpr cursor_iterator< Byte2 > | cursor_end (cursor< Byte2 > &c) const noexcept |
Returns cursor iterator to the end. | |
Public Member Functions inherited from sbepp::detail::byte_range< Byte > | |
+ | byte_range ()=default |
Initializes to nullptr | |
+constexpr | byte_range (Byte *begin, Byte *end) noexcept |
Constructs from a pair of pointers. | |
+constexpr | byte_range (Byte *ptr, const std::size_t size) noexcept |
Constructs from pointer and size. | |
+template<typename Byte2 , typename = enable_if_convertible_t<Byte2, Byte>> | |
constexpr | byte_range (const byte_range< Byte2 > &other) noexcept |
Copy constructor. Available if Byte2* is convertible to Byte* | |
+Static Public Member Functions | |
+static constexpr size_type | max_size () noexcept |
Returns numInGroup 's maxValue | |
Base class for a flat group.
+
+
|
+ +inlineconstexprnoexcept | +
Returns the last entry.
+!empty()
+
|
+ +inlineconstexprnoexcept | +
Resizes to 0
size() == 0
+
|
+ +inlineconstexprnoexcept | +
+
|
+ +inlineconstexprnoexcept | +
+
|
+ +inlineconstexprnoexcept | +
Returns the first entry.
+!empty()
+
|
+ +inlineconstexprnoexcept | +
Access group entry at pos
pos < size()
+ sbepp
+
+ |
+
This is the complete list of members for sbepp::detail::message_base< Byte, Header >, including all inherited members.
+byte_range()=default | sbepp::detail::byte_range< Byte > | |
byte_range(Byte *begin, Byte *end) noexcept | sbepp::detail::byte_range< Byte > | inline |
byte_range(Byte *ptr, const std::size_t size) noexcept | sbepp::detail::byte_range< Byte > | inline |
byte_range(const byte_range< Byte2 > &other) noexcept | sbepp::detail::byte_range< Byte > | inline |
+ sbepp
+
+ |
+
Base class for messages. + More...
+ +#include <sbepp.hpp>
+Additional Inherited Members | |
Public Member Functions inherited from sbepp::detail::byte_range< Byte > | |
+ | byte_range ()=default |
Initializes to nullptr | |
+constexpr | byte_range (Byte *begin, Byte *end) noexcept |
Constructs from a pair of pointers. | |
+constexpr | byte_range (Byte *ptr, const std::size_t size) noexcept |
Constructs from pointer and size. | |
+template<typename Byte2 , typename = enable_if_convertible_t<Byte2, Byte>> | |
constexpr | byte_range (const byte_range< Byte2 > &other) noexcept |
Copy constructor. Available if Byte2* is convertible to Byte* | |
Base class for messages.
+
+ sbepp
+
+ |
+
This is the complete list of members for sbepp::detail::nested_group_base< Byte, Entry, Dimension >, including all inherited members.
+
+ sbepp
+
+ |
+
Base class for a nested group. + More...
+ +#include <sbepp.hpp>
+Public Types | |
+using | value_type = Entry |
entry type | |
+using | reference = value_type |
value_type | |
+using | sbe_size_type |
numInGroup value type | |
+using | size_type = typename sbe_size_type::value_type |
raw size type | |
+using | difference_type = typename std::make_signed<size_type>::type |
signed size_type | |
+using | iterator |
Forward iterator to value_type . Satisfies std::forward_iterator | |
+template<typename Byte2 > | |
using | cursor_range_t |
Type of a cursor range. Satisfies std::ranges::input_range | |
+template<typename Byte2 > | |
using | cursor_iterator = typename cursor_range_t<Byte2>::iterator |
cursor_range_t::iterator . Satisfies std::input_iterator | |
+Public Member Functions | |
+constexpr sbe_size_type | sbe_size () const noexcept |
Returns header's numInGroup | |
+constexpr size_type | size () const noexcept |
Returns raw size. | |
+constexpr void | resize (const size_type count) const noexcept |
Sets numInGroup to count | |
+constexpr bool | empty () const noexcept |
Checks if size() == 0 | |
+constexpr iterator | begin () const noexcept |
Returns an iterator to the beginning. | |
+constexpr iterator | end () const noexcept |
Returns an iterator to the end. | |
constexpr reference | front () const noexcept |
Returns the first element. | |
constexpr void | clear () const noexcept |
Resizes to 0 | |
+template<typename Byte2 , typename = enable_if_cursor_compatible_t<Byte, Byte2>> | |
constexpr cursor_range_t< Byte2 > | cursor_range (cursor< Byte2 > &c) const noexcept |
Returns cursor range to all group entries. | |
template<typename Byte2 , typename = enable_if_cursor_compatible_t<Byte, Byte2>> | |
constexpr cursor_range_t< Byte2 > | cursor_subrange (cursor< Byte2 > &c, const size_type pos) const noexcept |
Returns cursor range to [pos; size()) entries. | |
template<typename Byte2 , typename = enable_if_cursor_compatible_t<Byte, Byte2>> | |
constexpr cursor_range_t< Byte2 > | cursor_subrange (cursor< Byte2 > &c, const size_type pos, const size_type count) const noexcept |
Returns cursor range to [pos; pos+count) entries. | |
+template<typename Byte2 , typename = enable_if_cursor_compatible_t<Byte, Byte2>> | |
constexpr cursor_iterator< Byte2 > | cursor_begin (cursor< Byte2 > &c) const noexcept |
Returns cursor iterator to the beginning. | |
+template<typename Byte2 , typename = enable_if_cursor_compatible_t<Byte, Byte2>> | |
constexpr cursor_iterator< Byte2 > | cursor_end (cursor< Byte2 > &c) const noexcept |
Returns cursor iterator to the end. | |
Public Member Functions inherited from sbepp::detail::byte_range< Byte > | |
+ | byte_range ()=default |
Initializes to nullptr | |
+constexpr | byte_range (Byte *begin, Byte *end) noexcept |
Constructs from a pair of pointers. | |
+constexpr | byte_range (Byte *ptr, const std::size_t size) noexcept |
Constructs from pointer and size. | |
+template<typename Byte2 , typename = enable_if_convertible_t<Byte2, Byte>> | |
constexpr | byte_range (const byte_range< Byte2 > &other) noexcept |
Copy constructor. Available if Byte2* is convertible to Byte* | |
+Static Public Member Functions | |
+static constexpr size_type | max_size () noexcept |
Returns numInGroup 's maxValue | |
Base class for a nested group.
+
+
|
+ +inlineconstexprnoexcept | +
Resizes to 0
size() == 0
+
|
+ +inlineconstexprnoexcept | +
+
|
+ +inlineconstexprnoexcept | +
+
|
+ +inlineconstexprnoexcept | +
Returns the first element.
+!empty()
+ sbepp
+
+ |
+
This is the complete list of members for sbepp::detail::optional_base< T, Derived >, including all inherited members.
+
+ sbepp
+
+ |
+
Base class for optional types. + More...
+ +#include <sbepp.hpp>
+Public Types | |
+using | value_type = T |
Underlying type. | |
+Public Member Functions | |
+ | optional_base ()=default |
Constructs null object. | |
+constexpr | optional_base (nullopt_t) noexcept |
Constructs null object. | |
+constexpr | optional_base (value_type val) noexcept |
Constructs object from given value. | |
+constexpr value_type | value () const noexcept |
Returns underlying value. | |
+constexpr value_type & | operator* () noexcept |
Returns reference to underlying value. | |
+constexpr value_type | operator* () const noexcept |
Returns underlying value. | |
+constexpr bool | in_range () const noexcept |
Checks if value is in [Derived::min_value(); Derived::max_value()] range. | |
+constexpr value_type | value_or (T default_value) const noexcept |
Returns value if not null, default_value otherwise. | |
+constexpr bool | has_value () const noexcept |
Checks if has value. | |
+constexpr | operator bool () const noexcept |
Checks if has value. | |
+Friends | |
Comparisons | |
The contained values are compared only if both
| |
+constexpr friend bool | operator== (const optional_base &lhs, const optional_base &rhs) noexcept |
Tests if lhs is equal to rhs | |
+constexpr friend std::strong_ordering | operator<=> (const optional_base &lhs, const optional_base &rhs) noexcept |
Available only if SBEPP_HAS_THREE_WAY_COMPARISON == 1. | |
+constexpr friend bool | operator!= (const optional_base &lhs, const optional_base &rhs) noexcept |
Tests if lhs is not equal to rhs | |
+constexpr friend bool | operator< (const optional_base &lhs, const optional_base &rhs) noexcept |
Tests if lhs is less than rhs | |
+constexpr friend bool | operator<= (const optional_base &lhs, const optional_base &rhs) noexcept |
Tests if lhs is less than or equal to rhs | |
+constexpr friend bool | operator> (const optional_base &lhs, const optional_base &rhs) noexcept |
Tests if lhs is greater than rhs | |
+constexpr friend bool | operator>= (const optional_base &lhs, const optional_base &rhs) noexcept |
Tests if lhs is greater than or equal to rhs | |
Base class for optional types.
+in_range()
and has_value()
checks are not enforced implicitly, it's up to client to apply it.
+ sbepp
+
+ |
+
This is the complete list of members for sbepp::detail::required_base< T, Derived >, including all inherited members.
+in_range() const noexcept | sbepp::detail::required_base< T, Derived > | inline |
operator!= | sbepp::detail::required_base< T, Derived > | friend |
operator*() noexcept | sbepp::detail::required_base< T, Derived > | inline |
operator*() const noexcept | sbepp::detail::required_base< T, Derived > | inline |
operator< | sbepp::detail::required_base< T, Derived > | friend |
operator<= | sbepp::detail::required_base< T, Derived > | friend |
operator<=> | sbepp::detail::required_base< T, Derived > | friend |
operator== | sbepp::detail::required_base< T, Derived > | friend |
operator> | sbepp::detail::required_base< T, Derived > | friend |
operator>= | sbepp::detail::required_base< T, Derived > | friend |
required_base()=default | sbepp::detail::required_base< T, Derived > | |
required_base(value_type val) noexcept | sbepp::detail::required_base< T, Derived > | inline |
value() const noexcept | sbepp::detail::required_base< T, Derived > | inline |
value_type typedef | sbepp::detail::required_base< T, Derived > |
+ sbepp
+
+ |
+
Base class for required types. + More...
+ +#include <sbepp.hpp>
+Public Types | |
+using | value_type = T |
Underlying type. | |
+Public Member Functions | |
+ | required_base ()=default |
Default constructor. Constructs value-initialized object. | |
+constexpr | required_base (value_type val) noexcept |
Constructs from given value. | |
+constexpr value_type | value () const noexcept |
Returns underlying value. | |
+constexpr value_type & | operator* () noexcept |
Returns reference to underlying value. | |
+constexpr value_type | operator* () const noexcept |
Returns underlying value. | |
+constexpr bool | in_range () const noexcept |
Checks if value is in [Derived::min_value(); Derived::max_value()] range. | |
+Friends | |
Comparisons | |
Comparisons are performed on underlying values + | |
+auto | operator<=> (const required_base &, const required_base &)=default |
Available only if SBEPP_HAS_THREE_WAY_COMPARISON == 1. | |
+constexpr friend bool | operator== (const required_base &lhs, const required_base &rhs) noexcept |
Tests if lhs is equal to rhs | |
+constexpr friend bool | operator!= (const required_base &lhs, const required_base &rhs) noexcept |
Tests if lhs is not equal to rhs | |
+constexpr friend bool | operator< (const required_base &lhs, const required_base &rhs) noexcept |
Tests if lhs is less than rhs | |
+constexpr friend bool | operator<= (const required_base &lhs, const required_base &rhs) noexcept |
Tests if lhs is less than or equal to rhs | |
+constexpr friend bool | operator> (const required_base &lhs, const required_base &rhs) noexcept |
Tests if lhs is greater than rhs | |
+constexpr friend bool | operator>= (const required_base &lhs, const required_base &rhs) noexcept |
Tests if lhs is greater than or equal to rhs | |
Base class for required types.
+in_range()
check is not enforced implicitly, it's up to client to apply it
+ sbepp
+
+ |
+
This is the complete list of members for sbepp::detail::static_array_ref< Byte, Value, N, Tag >, including all inherited members.
+
+ sbepp
+
+ |
+
Represents reference to fixed-size array. + More...
+ +#include <sbepp.hpp>
+Public Types | |
+using | element_type = detail::apply_cv_qualifiers_t<Byte, Value> |
final element type. value_type with the same cv-qualifiers as Byte | |
+using | value_type = Value |
same as Value | |
+using | size_type = std::size_t |
std::size_t | |
+using | difference_type = std::ptrdiff_t |
std::ptrdiff_t | |
+using | reference = element_type& |
element reference type | |
+using | pointer = element_type* |
element pointer type | |
+using | iterator = pointer |
iterator type. Satisfies std::random_access_iterator | |
+using | reverse_iterator = std::reverse_iterator<iterator> |
reverse iterator type | |
+using | tag = Tag |
type tag | |
+Public Member Functions | |
constexpr reference | operator[] (size_type pos) const noexcept |
Access element at pos | |
+constexpr reference | front () const noexcept |
Access the first element. | |
+constexpr reference | back () const noexcept |
Access the last element. | |
+constexpr pointer | data () const noexcept |
Direct access to the underlying array. | |
+constexpr iterator | begin () const noexcept |
Returns an iterator to the beginning. | |
+constexpr iterator | end () const noexcept |
Returns an iterator to the end. | |
+constexpr reverse_iterator | rbegin () const noexcept |
Returns a reverse iterator to the beginning. | |
+constexpr reverse_iterator | rend () const noexcept |
Returns a reverse iterator to the end. | |
constexpr static_array_ref< Byte, detail::remove_cv_t< Byte >, N, Tag > | raw () const noexcept |
Returns static_array_ref<Byte, Byte, N, Tag> . | |
constexpr std::size_t | strlen () const noexcept |
Calculates string length from left to right. | |
constexpr std::size_t | strlen_r () const noexcept |
Calculates string length from right to left. | |
template<typename T = void, typename = enable_if_writable_t<Byte, T>> | |
constexpr iterator | assign_string (const char *str, const eos_null eos_mode=eos_null::all) const noexcept |
Assigns null-terminated string. | |
template<typename R , typename = enable_if_t<!std::is_const<Byte>::value && is_range<R>::value>> | |
constexpr iterator | assign_string (R &&r, const eos_null eos_mode=eos_null::all) const |
Assigns string represented by a range. | |
template<typename R , typename = enable_if_t<!std::is_const<Byte>::value && is_range<R>::value>> | |
constexpr iterator | assign_range (R &&r) const |
Assigns range. | |
template<typename T = void, typename = enable_if_writable_t<Byte, T>> | |
constexpr void | fill (const value_type value) const noexcept |
Assigns value to all elements. | |
template<typename T = void, typename = enable_if_writable_t<Byte, T>> | |
constexpr iterator | assign (size_type count, const value_type value) const noexcept |
Assigns value to first count elements. | |
template<typename InputIt , typename = enable_if_writable_t<Byte, InputIt>> | |
constexpr iterator | assign (InputIt first, InputIt last) const |
Assigns elements from [first; last) range to first elements. | |
template<typename T = void, typename = enable_if_writable_t<Byte, T>> | |
constexpr iterator | assign (std::initializer_list< value_type > ilist) const noexcept |
Assigns initializer list to first elements. | |
Public Member Functions inherited from sbepp::detail::byte_range< Byte > | |
+ | byte_range ()=default |
Initializes to nullptr | |
+constexpr | byte_range (Byte *begin, Byte *end) noexcept |
Constructs from a pair of pointers. | |
+constexpr | byte_range (Byte *ptr, const std::size_t size) noexcept |
Constructs from pointer and size. | |
+template<typename Byte2 , typename = enable_if_convertible_t<Byte2, Byte>> | |
constexpr | byte_range (const byte_range< Byte2 > &other) noexcept |
Copy constructor. Available if Byte2* is convertible to Byte* | |
+Static Public Member Functions | |
+static constexpr bool | empty () noexcept |
Checks if size() != 0 | |
+static constexpr size_type | size () noexcept |
Returns N | |
+static constexpr size_type | max_size () noexcept |
Returns size() | |
Represents reference to fixed-size array.
+The general precondition for most functions is that current buffer should be able to hold all elements
Byte | byte type |
Value | array element type from schema |
N | array length |
Tag | type tag |
+
|
+ +inlineconstexpr | +
Assigns elements from [first; last)
range to first elements.
std::distance(first, last) <= size()
+
|
+ +inlineconstexprnoexcept | +
Assigns value to first count
elements.
count | number of elements to assign to |
value | value to assign |
count <= size()
+
|
+ +inlineconstexprnoexcept | +
Assigns initializer list to first elements.
+ilist | values to assign |
ilist.size() <= size()
+
|
+ +inlineconstexpr | +
Assigns range.
+r | range to assign. In C++20, required to satisfy std::ranges::range , or std::begin(r) /std::end(r) as valid expressions for older C++ versions |
range_size(r) <= size()
+
|
+ +inlineconstexprnoexcept | +
Assigns null-terminated string.
+str | null-terminated string |
eos_mode | determines how many null bytes to write after the end-of-string when strlen(str) < size() |
str != nullptr
strlen(str) <= size()
+
|
+ +inlineconstexpr | +
Assigns string represented by a range.
+r | string range to assign. In C++20, required to satisfy std::ranges::range , or std::begin(r) /std::end(r) as valid expressions for older C++ versions |
eos_mode | determines how many null bytes to write after the end-of-string when range_size(r) < size() |
range_size(r) <= size()
+
|
+ +inlineconstexprnoexcept | +
Assigns value to all elements.
+value | value to assign |
+
|
+ +inlineconstexprnoexcept | +
Access element at pos
pos < size()
+
|
+ +inlineconstexprnoexcept | +
Returns static_array_ref<Byte, Byte, N, Tag>
.
Useful in constexpr context to modify an array which has different Byte
and Value
types. Example:
+
|
+ +inlineconstexprnoexcept | +
Calculates string length from left to right.
+Calculates stored string length by looking for the first null character from left to right. If not found, returns size()
.
+
|
+ +inlineconstexprnoexcept | +
Calculates string length from right to left.
+Calculates stored string length by looking for the first non-null character from right to left. If not found, returns 0
.
+ sbepp
+
+ |
+
This is the complete list of members for sbepp::double_opt_t, including all inherited members.
+
+ sbepp
+
+ |
+
Built-in double
optional type.
+ More...
#include <sbepp.hpp>
+Static Public Member Functions | |
+static constexpr value_type | min_value () noexcept |
Returns minValue attribute. | |
+static constexpr value_type | max_value () noexcept |
Returns maxValue attribute. | |
+static constexpr value_type | null_value () noexcept |
Returns nullValue attribute. | |
+Additional Inherited Members | |
Public Types inherited from sbepp::detail::optional_base< double, double_opt_t > | |
+using | value_type |
Underlying type. | |
Public Member Functions inherited from sbepp::detail::optional_base< double, double_opt_t > | |
+ | optional_base ()=default |
Constructs null object. | |
+constexpr | optional_base (nullopt_t) noexcept |
Constructs null object. | |
+constexpr | optional_base (value_type val) noexcept |
Constructs object from given value. | |
+constexpr value_type | value () const noexcept |
Returns underlying value. | |
+constexpr value_type & | operator* () noexcept |
Returns reference to underlying value. | |
+constexpr value_type | operator* () const noexcept |
Returns underlying value. | |
+constexpr bool | in_range () const noexcept |
Checks if value is in [Derived::min_value(); Derived::max_value()] range. | |
+constexpr value_type | value_or (double default_value) const noexcept |
Returns value if not null, default_value otherwise. | |
+constexpr bool | has_value () const noexcept |
Checks if has value. | |
+constexpr | operator bool () const noexcept |
Checks if has value. | |
Built-in double
optional type.
Also works as a tag for its traits
+
+ sbepp
+
+ |
+
This is the complete list of members for sbepp::double_t, including all inherited members.
+in_range() const noexcept | sbepp::detail::required_base< double, double_t > | inline |
max_value() noexcept | sbepp::double_t | inlinestatic |
min_value() noexcept | sbepp::double_t | inlinestatic |
operator*() noexcept | sbepp::detail::required_base< double, double_t > | inline |
operator*() const noexcept | sbepp::detail::required_base< double, double_t > | inline |
required_base()=default | sbepp::detail::required_base< double, double_t > | |
required_base(value_type val) noexcept | sbepp::detail::required_base< double, double_t > | inline |
value() const noexcept | sbepp::detail::required_base< double, double_t > | inline |
value_type typedef | sbepp::detail::required_base< double, double_t > |
+ sbepp
+
+ |
+
Built-in double
required type.
+ More...
#include <sbepp.hpp>
+Static Public Member Functions | |
+static constexpr value_type | min_value () noexcept |
Returns minValue attribute. | |
+static constexpr value_type | max_value () noexcept |
Returns maxValue attribute. | |
+Additional Inherited Members | |
Public Types inherited from sbepp::detail::required_base< double, double_t > | |
+using | value_type |
Underlying type. | |
Public Member Functions inherited from sbepp::detail::required_base< double, double_t > | |
+ | required_base ()=default |
Default constructor. Constructs value-initialized object. | |
+constexpr | required_base (value_type val) noexcept |
Constructs from given value. | |
+constexpr value_type | value () const noexcept |
Returns underlying value. | |
+constexpr value_type & | operator* () noexcept |
Returns reference to underlying value. | |
+constexpr value_type | operator* () const noexcept |
Returns underlying value. | |
+constexpr bool | in_range () const noexcept |
Checks if value is in [Derived::min_value(); Derived::max_value()] range. | |
Built-in double
required type.
Also works as a tag for its traits
+
+ sbepp
+
+ |
+
This is the complete list of members for sbepp::enum_traits< T >, including all inherited members.
+deprecated() noexcept | sbepp::enum_traits< T > | static |
description() noexcept | sbepp::enum_traits< T > | static |
encoding_type typedef | sbepp::enum_traits< T > | |
name() noexcept | sbepp::enum_traits< T > | static |
offset() noexcept | sbepp::enum_traits< T > | static |
since_version() noexcept | sbepp::enum_traits< T > | static |
value_type typedef | sbepp::enum_traits< T > |
+ sbepp
+
+ |
+
Provides various traits/attributes of an <enum>
element.
+ More...
+Public Types | |
+using | encoding_type = EncodingType |
Underlying type. | |
+using | value_type = ScopedEnumType |
Representation type. | |
+Static Public Member Functions | |
+static constexpr const char * | name () noexcept |
Returns name attribute. | |
+static constexpr const char * | description () noexcept |
Returns description attribute. | |
+static constexpr offset_t | offset () noexcept |
Returns enum offset. Available only if offset is static, i.e. not available for public enums whose offset is different on each usage. | |
+static constexpr version_t | since_version () noexcept |
Returns sinceVersion attribute. | |
+static constexpr version_t | deprecated () noexcept |
Returns deprecated attribute. Available only if provided in schema. | |
Provides various traits/attributes of an <enum>
element.
For example: sbepp::enum_traits<market_schema::schema::types::enum_name>::name();
T | enum tag |
+ sbepp
+
+ |
+
This is the complete list of members for sbepp::enum_value_traits< T >, including all inherited members.
+deprecated() noexcept | sbepp::enum_value_traits< T > | static |
description() noexcept | sbepp::enum_value_traits< T > | static |
name() noexcept | sbepp::enum_value_traits< T > | static |
since_version() noexcept | sbepp::enum_value_traits< T > | static |
value() noexcept | sbepp::enum_value_traits< T > | static |
+ sbepp
+
+ |
+
Provides various traits/attributes of a <validValue>
element.
+ More...
+Static Public Member Functions | |
+static constexpr const char * | name () noexcept |
Returns name 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 ScopedEnumType | value () noexcept |
Returns enumerator value. | |
Provides various traits/attributes of a <validValue>
element.
For example: sbepp::enum_value_traits<EnumTag::value_a>::since_version();
T | enumerator tag |
+ sbepp
+
+ |
+
This is the complete list of members for sbepp::field_traits< T >, including all inherited members.
+deprecated() noexcept | sbepp::field_traits< T > | static |
description() noexcept | sbepp::field_traits< T > | static |
id() noexcept | sbepp::field_traits< T > | static |
name() noexcept | sbepp::field_traits< T > | static |
offset() noexcept | sbepp::field_traits< T > | static |
presence() noexcept | sbepp::field_traits< T > | static |
since_version() noexcept | sbepp::field_traits< T > | static |
value_type typedef | sbepp::field_traits< T > | |
value_type typedef | sbepp::field_traits< T > | |
value_type_tag typedef | sbepp::field_traits< T > |
+ sbepp
+
+ |
+
Provides various traits/attributes of a <field>
element.
+ More...
+Public Types | |
+using | value_type = ValueType |
Representation type. | |
template<typename Byte > | |
using | value_type = Type<Byte> |
Representation type for non-constant arrays or composites. | |
+using | value_type_tag = TypeTag |
value_type 's tag. Not available for constants of numeric types | |
+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 field_presence | presence () noexcept |
Returns the actual presence. Note that it can be different from the one provided in schema, for example if field type is required but the field itself is specified as optional . | |
+static constexpr offset_t | offset () noexcept |
Returns actual offset. | |
+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. | |
Provides various traits/attributes of a <field>
element.
For example: sbepp::message_traits<message_tag::field_name>::since_version();
T | field tag |
using sbepp::field_traits< T >::value_type = Type<Byte> | +
Representation type for non-constant arrays or composites.
+Byte | byte type |
+ sbepp
+
+ |
+
This is the complete list of members for sbepp::float_opt_t, including all inherited members.
+
+ sbepp
+
+ |
+
Built-in float
optional type.
+ More...
#include <sbepp.hpp>
+Static Public Member Functions | |
+static constexpr value_type | min_value () noexcept |
Returns minValue attribute. | |
+static constexpr value_type | max_value () noexcept |
Returns maxValue attribute. | |
+static constexpr value_type | null_value () noexcept |
Returns nullValue attribute. | |
+Additional Inherited Members | |
Public Types inherited from sbepp::detail::optional_base< float, float_opt_t > | |
+using | value_type |
Underlying type. | |
Public Member Functions inherited from sbepp::detail::optional_base< float, float_opt_t > | |
+ | optional_base ()=default |
Constructs null object. | |
+constexpr | optional_base (nullopt_t) noexcept |
Constructs null object. | |
+constexpr | optional_base (value_type val) noexcept |
Constructs object from given value. | |
+constexpr value_type | value () const noexcept |
Returns underlying value. | |
+constexpr value_type & | operator* () noexcept |
Returns reference to underlying value. | |
+constexpr value_type | operator* () const noexcept |
Returns underlying value. | |
+constexpr bool | in_range () const noexcept |
Checks if value is in [Derived::min_value(); Derived::max_value()] range. | |
+constexpr value_type | value_or (float default_value) const noexcept |
Returns value if not null, default_value otherwise. | |
+constexpr bool | has_value () const noexcept |
Checks if has value. | |
+constexpr | operator bool () const noexcept |
Checks if has value. | |
Built-in float
optional type.
Also works as a tag for its traits
+
+ sbepp
+
+ |
+
This is the complete list of members for sbepp::float_t, including all inherited members.
+in_range() const noexcept | sbepp::detail::required_base< float, float_t > | inline |
max_value() noexcept | sbepp::float_t | inlinestatic |
min_value() noexcept | sbepp::float_t | inlinestatic |
operator*() noexcept | sbepp::detail::required_base< float, float_t > | inline |
operator*() const noexcept | sbepp::detail::required_base< float, float_t > | inline |
required_base()=default | sbepp::detail::required_base< float, float_t > | |
required_base(value_type val) noexcept | sbepp::detail::required_base< float, float_t > | inline |
value() const noexcept | sbepp::detail::required_base< float, float_t > | inline |
value_type typedef | sbepp::detail::required_base< float, float_t > |
+ sbepp
+
+ |
+
Built-in float
required type.
+ More...
#include <sbepp.hpp>
+Static Public Member Functions | |
+static constexpr value_type | min_value () noexcept |
Returns minValue attribute. | |
+static constexpr value_type | max_value () noexcept |
Returns maxValue attribute. | |
+Additional Inherited Members | |
Public Types inherited from sbepp::detail::required_base< float, float_t > | |
+using | value_type |
Underlying type. | |
Public Member Functions inherited from sbepp::detail::required_base< float, float_t > | |
+ | required_base ()=default |
Default constructor. Constructs value-initialized object. | |
+constexpr | required_base (value_type val) noexcept |
Constructs from given value. | |
+constexpr value_type | value () const noexcept |
Returns underlying value. | |
+constexpr value_type & | operator* () noexcept |
Returns reference to underlying value. | |
+constexpr value_type | operator* () const noexcept |
Returns underlying value. | |
+constexpr bool | in_range () const noexcept |
Checks if value is in [Derived::min_value(); Derived::max_value()] range. | |
Built-in float
required type.
Also works as a tag for its traits
+
+ sbepp
+
+ |
+
This is the complete list of members for sbepp::group_traits< T >, including all inherited members.
+block_length() noexcept | sbepp::group_traits< T > | static |
deprecated() noexcept | sbepp::group_traits< T > | static |
description() noexcept | sbepp::group_traits< T > | static |
dimension_type typedef | sbepp::group_traits< T > | |
dimension_type_tag typedef | sbepp::group_traits< T > | |
entry_type typedef | sbepp::group_traits< T > | |
id() noexcept | sbepp::group_traits< T > | static |
name() noexcept | sbepp::group_traits< T > | static |
semantic_type() noexcept | sbepp::group_traits< T > | static |
since_version() noexcept | sbepp::group_traits< T > | static |
size_bytes(const NumInGroupType num_in_group,...) noexcept | sbepp::group_traits< T > | static |
value_type typedef | sbepp::group_traits< T > |
+ sbepp
+
+ |
+
Provides various traits/attributes of a <group>
element.
+ More...
+Public Types | |
template<typename Byte > | |
using | value_type = GroupType<Byte> |
Representation type. | |
template<typename Byte > | |
using | dimension_type = HeaderType<Byte> |
Group dimension composite type. | |
+using | dimension_type_tag = HeaderTag |
Dimension composite tag. | |
template<typename Byte > | |
using | entry_type = EntryType<Byte> |
Group entry type. | |
+Static Public Member Functions | |
+static constexpr const char * | name () noexcept |
Returns name attribute. | |
+static constexpr const char * | description () noexcept |
Returns description attribute. | |
+static constexpr member_id_t | id () noexcept |
Returns id attribute. | |
+static constexpr block_length_t | block_length () noexcept |
Returns blockLength attribute. | |
+static constexpr const char * | semantic_type () noexcept |
Returns semanticType 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 NumInGroupType num_in_group,...) noexcept |
Returns number of bytes required to represent the group in given configuration. | |
Provides various traits/attributes of a <group>
element.
For example: sbepp::group_traits<message_tag::group_name>::since_version();
T | group tag |
using sbepp::group_traits< T >::dimension_type = HeaderType<Byte> | +
Group dimension composite type.
+Byte | byte type |
using sbepp::group_traits< T >::entry_type = EntryType<Byte> | +
Group entry type.
+Byte | byte type |
using sbepp::group_traits< T >::value_type = GroupType<Byte> | +
Representation type.
+Byte | byte type |
+
|
+ +staticconstexprnoexcept | +
Returns number of bytes required to represent the group in given configuration.
+num_in_group | number of entries in the group |
... | parameter list depends on the group structure |
Check message_traits::size_bytes()
to see how trailing parameter list is built.
+ sbepp
+
+ |
+
This is the complete list of members for sbepp::int16_opt_t, including all inherited members.
+
+ sbepp
+
+ |
+
Built-in int16
optional type.
+ More...
#include <sbepp.hpp>
+Static Public Member Functions | |
+static constexpr value_type | min_value () noexcept |
Returns minValue attribute. | |
+static constexpr value_type | max_value () noexcept |
Returns maxValue attribute. | |
+static constexpr value_type | null_value () noexcept |
Returns nullValue attribute. | |
+Additional Inherited Members | |
Public Types inherited from sbepp::detail::optional_base< std::int16_t, int16_opt_t > | |
+using | value_type |
Underlying type. | |
Public Member Functions inherited from sbepp::detail::optional_base< std::int16_t, int16_opt_t > | |
+ | optional_base ()=default |
Constructs null object. | |
+constexpr | optional_base (nullopt_t) noexcept |
Constructs null object. | |
+constexpr | optional_base (value_type val) noexcept |
Constructs object from given value. | |
+constexpr value_type | value () const noexcept |
Returns underlying value. | |
+constexpr value_type & | operator* () noexcept |
Returns reference to underlying value. | |
+constexpr value_type | operator* () const noexcept |
Returns underlying value. | |
+constexpr bool | in_range () const noexcept |
Checks if value is in [Derived::min_value(); Derived::max_value()] range. | |
+constexpr value_type | value_or (std::int16_t default_value) const noexcept |
Returns value if not null, default_value otherwise. | |
+constexpr bool | has_value () const noexcept |
Checks if has value. | |
+constexpr | operator bool () const noexcept |
Checks if has value. | |
Built-in int16
optional type.
Also works as a tag for its traits
+
+ sbepp
+
+ |
+
This is the complete list of members for sbepp::int16_t, including all inherited members.
+in_range() const noexcept | sbepp::detail::required_base< std::int16_t, int16_t > | inline |
max_value() noexcept | sbepp::int16_t | inlinestatic |
min_value() noexcept | sbepp::int16_t | inlinestatic |
operator*() noexcept | sbepp::detail::required_base< std::int16_t, int16_t > | inline |
operator*() const noexcept | sbepp::detail::required_base< std::int16_t, int16_t > | inline |
required_base()=default | sbepp::detail::required_base< std::int16_t, int16_t > | |
required_base(value_type val) noexcept | sbepp::detail::required_base< std::int16_t, int16_t > | inline |
value() const noexcept | sbepp::detail::required_base< std::int16_t, int16_t > | inline |
value_type typedef | sbepp::detail::required_base< std::int16_t, int16_t > |
+ sbepp
+
+ |
+
Built-in int16
required type.
+ More...
#include <sbepp.hpp>
+Static Public Member Functions | |
+static constexpr value_type | min_value () noexcept |
Returns minValue attribute. | |
+static constexpr value_type | max_value () noexcept |
Returns maxValue attribute. | |
+Additional Inherited Members | |
Public Types inherited from sbepp::detail::required_base< std::int16_t, int16_t > | |
+using | value_type |
Underlying type. | |
Public Member Functions inherited from sbepp::detail::required_base< std::int16_t, int16_t > | |
+ | required_base ()=default |
Default constructor. Constructs value-initialized object. | |
+constexpr | required_base (value_type val) noexcept |
Constructs from given value. | |
+constexpr value_type | value () const noexcept |
Returns underlying value. | |
+constexpr value_type & | operator* () noexcept |
Returns reference to underlying value. | |
+constexpr value_type | operator* () const noexcept |
Returns underlying value. | |
+constexpr bool | in_range () const noexcept |
Checks if value is in [Derived::min_value(); Derived::max_value()] range. | |
Built-in int16
required type.
Also works as a tag for its traits
+
+ sbepp
+
+ |
+
This is the complete list of members for sbepp::int32_opt_t, including all inherited members.
+
+ sbepp
+
+ |
+
Built-in int32
optional type.
+ More...
#include <sbepp.hpp>
+Static Public Member Functions | |
+static constexpr value_type | min_value () noexcept |
Returns minValue attribute. | |
+static constexpr value_type | max_value () noexcept |
Returns maxValue attribute. | |
+static constexpr value_type | null_value () noexcept |
Returns nullValue attribute. | |
+Additional Inherited Members | |
Public Types inherited from sbepp::detail::optional_base< std::int32_t, int32_opt_t > | |
+using | value_type |
Underlying type. | |
Public Member Functions inherited from sbepp::detail::optional_base< std::int32_t, int32_opt_t > | |
+ | optional_base ()=default |
Constructs null object. | |
+constexpr | optional_base (nullopt_t) noexcept |
Constructs null object. | |
+constexpr | optional_base (value_type val) noexcept |
Constructs object from given value. | |
+constexpr value_type | value () const noexcept |
Returns underlying value. | |
+constexpr value_type & | operator* () noexcept |
Returns reference to underlying value. | |
+constexpr value_type | operator* () const noexcept |
Returns underlying value. | |
+constexpr bool | in_range () const noexcept |
Checks if value is in [Derived::min_value(); Derived::max_value()] range. | |
+constexpr value_type | value_or (std::int32_t default_value) const noexcept |
Returns value if not null, default_value otherwise. | |
+constexpr bool | has_value () const noexcept |
Checks if has value. | |
+constexpr | operator bool () const noexcept |
Checks if has value. | |
Built-in int32
optional type.
Also works as a tag for its traits
+
+ sbepp
+
+ |
+
This is the complete list of members for sbepp::int32_t, including all inherited members.
+in_range() const noexcept | sbepp::detail::required_base< std::int32_t, int32_t > | inline |
max_value() noexcept | sbepp::int32_t | inlinestatic |
min_value() noexcept | sbepp::int32_t | inlinestatic |
operator*() noexcept | sbepp::detail::required_base< std::int32_t, int32_t > | inline |
operator*() const noexcept | sbepp::detail::required_base< std::int32_t, int32_t > | inline |
required_base()=default | sbepp::detail::required_base< std::int32_t, int32_t > | |
required_base(value_type val) noexcept | sbepp::detail::required_base< std::int32_t, int32_t > | inline |
value() const noexcept | sbepp::detail::required_base< std::int32_t, int32_t > | inline |
value_type typedef | sbepp::detail::required_base< std::int32_t, int32_t > |
+ sbepp
+
+ |
+
Built-in int32
required type.
+ More...
#include <sbepp.hpp>
+Static Public Member Functions | |
+static constexpr value_type | min_value () noexcept |
Returns minValue attribute. | |
+static constexpr value_type | max_value () noexcept |
Returns maxValue attribute. | |
+Additional Inherited Members | |
Public Types inherited from sbepp::detail::required_base< std::int32_t, int32_t > | |
+using | value_type |
Underlying type. | |
Public Member Functions inherited from sbepp::detail::required_base< std::int32_t, int32_t > | |
+ | required_base ()=default |
Default constructor. Constructs value-initialized object. | |
+constexpr | required_base (value_type val) noexcept |
Constructs from given value. | |
+constexpr value_type | value () const noexcept |
Returns underlying value. | |
+constexpr value_type & | operator* () noexcept |
Returns reference to underlying value. | |
+constexpr value_type | operator* () const noexcept |
Returns underlying value. | |
+constexpr bool | in_range () const noexcept |
Checks if value is in [Derived::min_value(); Derived::max_value()] range. | |
Built-in int32
required type.
Also works as a tag for its traits
+
+ sbepp
+
+ |
+
This is the complete list of members for sbepp::int64_opt_t, including all inherited members.
+
+ sbepp
+
+ |
+
Built-in int64
optional type.
+ More...
#include <sbepp.hpp>
+Static Public Member Functions | |
+static constexpr value_type | min_value () noexcept |
Returns minValue attribute. | |
+static constexpr value_type | max_value () noexcept |
Returns maxValue attribute. | |
+static constexpr value_type | null_value () noexcept |
Returns nullValue attribute. | |
+Additional Inherited Members | |
Public Types inherited from sbepp::detail::optional_base< std::int64_t, int64_opt_t > | |
+using | value_type |
Underlying type. | |
Public Member Functions inherited from sbepp::detail::optional_base< std::int64_t, int64_opt_t > | |
+ | optional_base ()=default |
Constructs null object. | |
+constexpr | optional_base (nullopt_t) noexcept |
Constructs null object. | |
+constexpr | optional_base (value_type val) noexcept |
Constructs object from given value. | |
+constexpr value_type | value () const noexcept |
Returns underlying value. | |
+constexpr value_type & | operator* () noexcept |
Returns reference to underlying value. | |
+constexpr value_type | operator* () const noexcept |
Returns underlying value. | |
+constexpr bool | in_range () const noexcept |
Checks if value is in [Derived::min_value(); Derived::max_value()] range. | |
+constexpr value_type | value_or (std::int64_t default_value) const noexcept |
Returns value if not null, default_value otherwise. | |
+constexpr bool | has_value () const noexcept |
Checks if has value. | |
+constexpr | operator bool () const noexcept |
Checks if has value. | |
Built-in int64
optional type.
Also works as a tag for its traits
+
+ sbepp
+
+ |
+
This is the complete list of members for sbepp::int64_t, including all inherited members.
+in_range() const noexcept | sbepp::detail::required_base< std::int64_t, int64_t > | inline |
max_value() noexcept | sbepp::int64_t | inlinestatic |
min_value() noexcept | sbepp::int64_t | inlinestatic |
operator*() noexcept | sbepp::detail::required_base< std::int64_t, int64_t > | inline |
operator*() const noexcept | sbepp::detail::required_base< std::int64_t, int64_t > | inline |
required_base()=default | sbepp::detail::required_base< std::int64_t, int64_t > | |
required_base(value_type val) noexcept | sbepp::detail::required_base< std::int64_t, int64_t > | inline |
value() const noexcept | sbepp::detail::required_base< std::int64_t, int64_t > | inline |
value_type typedef | sbepp::detail::required_base< std::int64_t, int64_t > |
+ sbepp
+
+ |
+
Built-in int64
required type.
+ More...
#include <sbepp.hpp>
+Static Public Member Functions | |
+static constexpr value_type | min_value () noexcept |
Returns minValue attribute. | |
+static constexpr value_type | max_value () noexcept |
Returns maxValue attribute. | |
+Additional Inherited Members | |
Public Types inherited from sbepp::detail::required_base< std::int64_t, int64_t > | |
+using | value_type |
Underlying type. | |
Public Member Functions inherited from sbepp::detail::required_base< std::int64_t, int64_t > | |
+ | required_base ()=default |
Default constructor. Constructs value-initialized object. | |
+constexpr | required_base (value_type val) noexcept |
Constructs from given value. | |
+constexpr value_type | value () const noexcept |
Returns underlying value. | |
+constexpr value_type & | operator* () noexcept |
Returns reference to underlying value. | |
+constexpr value_type | operator* () const noexcept |
Returns underlying value. | |
+constexpr bool | in_range () const noexcept |
Checks if value is in [Derived::min_value(); Derived::max_value()] range. | |
Built-in int64
required type.
Also works as a tag for its traits
+
+ sbepp
+
+ |
+
This is the complete list of members for sbepp::int8_opt_t, including all inherited members.
+
+ sbepp
+
+ |
+
Built-in int8
optional type.
+ More...
#include <sbepp.hpp>
+Static Public Member Functions | |
+static constexpr value_type | min_value () noexcept |
Returns minValue attribute. | |
+static constexpr value_type | max_value () noexcept |
Returns maxValue attribute. | |
+static constexpr value_type | null_value () noexcept |
Returns nullValue attribute. | |
+Additional Inherited Members | |
Public Types inherited from sbepp::detail::optional_base< std::int8_t, int8_opt_t > | |
+using | value_type |
Underlying type. | |
Public Member Functions inherited from sbepp::detail::optional_base< std::int8_t, int8_opt_t > | |
+ | optional_base ()=default |
Constructs null object. | |
+constexpr | optional_base (nullopt_t) noexcept |
Constructs null object. | |
+constexpr | optional_base (value_type val) noexcept |
Constructs object from given value. | |
+constexpr value_type | value () const noexcept |
Returns underlying value. | |
+constexpr value_type & | operator* () noexcept |
Returns reference to underlying value. | |
+constexpr value_type | operator* () const noexcept |
Returns underlying value. | |
+constexpr bool | in_range () const noexcept |
Checks if value is in [Derived::min_value(); Derived::max_value()] range. | |
+constexpr value_type | value_or (std::int8_t default_value) const noexcept |
Returns value if not null, default_value otherwise. | |
+constexpr bool | has_value () const noexcept |
Checks if has value. | |
+constexpr | operator bool () const noexcept |
Checks if has value. | |
Built-in int8
optional type.
Also works as a tag for its traits
+
+ sbepp
+
+ |
+
This is the complete list of members for sbepp::int8_t, including all inherited members.
+in_range() const noexcept | sbepp::detail::required_base< std::int8_t, int8_t > | inline |
max_value() noexcept | sbepp::int8_t | inlinestatic |
min_value() noexcept | sbepp::int8_t | inlinestatic |
operator*() noexcept | sbepp::detail::required_base< std::int8_t, int8_t > | inline |
operator*() const noexcept | sbepp::detail::required_base< std::int8_t, int8_t > | inline |
required_base()=default | sbepp::detail::required_base< std::int8_t, int8_t > | |
required_base(value_type val) noexcept | sbepp::detail::required_base< std::int8_t, int8_t > | inline |
value() const noexcept | sbepp::detail::required_base< std::int8_t, int8_t > | inline |
value_type typedef | sbepp::detail::required_base< std::int8_t, int8_t > |
+ sbepp
+
+ |
+
Built-in int8
required type.
+ More...
#include <sbepp.hpp>
+Static Public Member Functions | |
+static constexpr value_type | min_value () noexcept |
Returns minValue attribute. | |
+static constexpr value_type | max_value () noexcept |
Returns maxValue attribute. | |
+Additional Inherited Members | |
Public Types inherited from sbepp::detail::required_base< std::int8_t, int8_t > | |
+using | value_type |
Underlying type. | |
Public Member Functions inherited from sbepp::detail::required_base< std::int8_t, int8_t > | |
+ | required_base ()=default |
Default constructor. Constructs value-initialized object. | |
+constexpr | required_base (value_type val) noexcept |
Constructs from given value. | |
+constexpr value_type | value () const noexcept |
Returns underlying value. | |
+constexpr value_type & | operator* () noexcept |
Returns reference to underlying value. | |
+constexpr value_type | operator* () const noexcept |
Returns underlying value. | |
+constexpr bool | in_range () const noexcept |
Checks if value is in [Derived::min_value(); Derived::max_value()] range. | |
Built-in int8
required type.
Also works as a tag for its traits
+
+ sbepp
+
+ |
+
This is the complete list of members for sbepp::message_traits< T >, including all inherited members.
+block_length() noexcept | sbepp::message_traits< T > | static |
deprecated() noexcept | sbepp::message_traits< T > | static |
description() noexcept | sbepp::message_traits< T > | static |
id() noexcept | sbepp::message_traits< T > | static |
name() noexcept | sbepp::message_traits< T > | static |
schema_tag typedef | sbepp::message_traits< T > | |
semantic_type() noexcept | sbepp::message_traits< T > | static |
since_version() noexcept | sbepp::message_traits< T > | static |
size_bytes(...) noexcept | sbepp::message_traits< T > | static |
value_type typedef | sbepp::message_traits< T > |
+ sbepp
+
+ |
+
Provides various traits/attributes of a <message>
element.
+ More...
+Public Types | |
template<typename Byte > | |
using | value_type = MessageType<Byte> |
Representation type. | |
+using | schema_tag = SchemaTag |
Schema tag. | |
+Static Public Member Functions | |
+static constexpr const char * | name () noexcept |
Returns name attribute. | |
+static constexpr const char * | description () noexcept |
Returns description attribute. | |
+static constexpr message_id_t | id () noexcept |
Returns id attribute. | |
+static constexpr block_length_t | block_length () noexcept |
Returns blockLength attribute. | |
+static constexpr const char * | semantic_type () noexcept |
Returns semanticType 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 (...) noexcept |
Returns number of bytes required to represent the message in given configuration. | |
Provides various traits/attributes of a <message>
element.
For example: sbepp::message_traits<market_schema::schema::messages::msg1>::name();
T | message tag |
using sbepp::message_traits< T >::value_type = MessageType<Byte> | +
Representation type.
+Byte | byte type |
+
|
+ +staticconstexprnoexcept | +
Returns number of bytes required to represent the message in given configuration.
+... | parameter list depends on the message structure |
Parameter list is built as follows:
<group>
within the message, in a top-to-bottom order, there will be a parameter in form of NumInGroupType <group_path>_num_in_group[_<n>]
where <group_path>
is built like <parent_group_path>_<child_group_name>
. Optional _<n>
part is added to disambiguate names that otherwise would be the same. This parameter represents the total number of group entries (even if they are spread across multiple enclosing group entries).<data>
member on any level within the message, there will be additional std::size_t total_data_size
parameter at the end of parameter list, representing the total payload size from all the <data>
elements within the message.Here's the example with different cases:
For usage example, see Estimating buffer size to encode a message.
+
+ sbepp
+
+ |
+
This is the complete list of members for sbepp::schema_traits< T >, including all inherited members.
+byte_order() noexcept | sbepp::schema_traits< T > | static |
description() noexcept | sbepp::schema_traits< T > | static |
header_type typedef | sbepp::schema_traits< T > | |
header_type_tag typedef | sbepp::schema_traits< T > | |
id() noexcept | sbepp::schema_traits< T > | static |
package() noexcept | sbepp::schema_traits< T > | static |
semantic_version() noexcept | sbepp::schema_traits< T > | static |
version() noexcept | sbepp::schema_traits< T > | static |
+ sbepp
+
+ |
+
Provides various traits/attributes of a <messageSchema>
element.
+ More...
+Public Types | |
template<typename Byte > | |
using | header_type = HeaderComposite<Byte> |
Message header composite type. | |
+using | header_type_tag = HeaderTypeTag |
Message header composite tag. Can be used to access its traits. | |
+Static Public Member Functions | |
+static constexpr const char * | package () noexcept |
Returns package attribute. | |
+static constexpr schema_id_t | id () noexcept |
Returns id attribute. | |
+static constexpr version_t | version () noexcept |
Returns version attribute. | |
+static constexpr const char * | semantic_version () noexcept |
Returns semanticVersion attribute. | |
+static constexpr endian | byte_order () noexcept |
Returns byteOrder attribute. | |
+static constexpr const char * | description () noexcept |
Returns description attribute. | |
Provides various traits/attributes of a <messageSchema>
element.
Schema tags are represented using schema_name::schema
type. For example: sbepp::schema_traits<market_schema::schema>::id();
T | schema tag |
using sbepp::schema_traits< T >::header_type = HeaderComposite<Byte> | +
Message header composite type.
+Byte | byte type |
+ sbepp
+
+ |
+
This is the complete list of members for sbepp::set_choice_traits< T >, including all inherited members.
+deprecated() noexcept | sbepp::set_choice_traits< T > | static |
description() noexcept | sbepp::set_choice_traits< T > | static |
index() noexcept | sbepp::set_choice_traits< T > | static |
name() noexcept | sbepp::set_choice_traits< T > | static |
since_version() noexcept | sbepp::set_choice_traits< T > | static |
+ sbepp
+
+ |
+
Provides various traits/attributes of a <choice>
element.
+ More...
+Static Public Member Functions | |
+static constexpr const char * | name () noexcept |
Returns name 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 choice_index_t | index () noexcept |
Returns choice bit index. | |
Provides various traits/attributes of a <choice>
element.
For example: sbepp::set_choice_traits<SetTag::choice>::since_version();
T | set choice tag |
+ sbepp
+
+ |
+
This is the complete list of members for sbepp::set_traits< T >, including all inherited members.
+deprecated() noexcept | sbepp::set_traits< T > | static |
description() noexcept | sbepp::set_traits< T > | static |
encoding_type typedef | sbepp::set_traits< T > | |
name() noexcept | sbepp::set_traits< T > | static |
offset() noexcept | sbepp::set_traits< T > | static |
since_version() noexcept | sbepp::set_traits< T > | static |
value_type typedef | sbepp::set_traits< T > |
+ sbepp
+
+ |
+
Provides various traits/attributes of a <set>
element.
+ More...
+Public Types | |
+using | encoding_type = EncodingType |
Underlying type. | |
+using | value_type = SetType |
Representation type. | |
+Static Public Member Functions | |
+static constexpr const char * | name () noexcept |
Returns name 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 offset_t | offset () noexcept |
Returns type offset. Available only if offset is static, i.e. not available for public sets whose offset is different on each usage. | |
Provides various traits/attributes of a <set>
element.
For example: sbepp::set_traits<market_schema::schema::types::set_name>::since_version();
T | set tag |
+ sbepp
+
+ |
+
This is the complete list of members for sbepp::type_traits< T >, including all inherited members.
+character_encoding() noexcept | sbepp::type_traits< T > | static |
deprecated() noexcept | sbepp::type_traits< T > | static |
description() noexcept | sbepp::type_traits< T > | static |
length() noexcept | sbepp::type_traits< T > | static |
max_value() noexcept | sbepp::type_traits< T > | static |
min_value() noexcept | sbepp::type_traits< T > | static |
name() noexcept | sbepp::type_traits< T > | static |
null_value() noexcept | sbepp::type_traits< T > | static |
offset() noexcept | sbepp::type_traits< T > | static |
presence() noexcept | sbepp::type_traits< T > | static |
primitive_type typedef | sbepp::type_traits< T > | |
semantic_type() noexcept | sbepp::type_traits< T > | static |
since_version() noexcept | sbepp::type_traits< T > | static |
value_type typedef | sbepp::type_traits< T > | |
value_type typedef | sbepp::type_traits< T > |
+ sbepp
+
+ |
+
Provides various traits and attributes of a <type>
element.
+ More...
+Public Types | |
+using | primitive_type = PrimitiveType |
Underlying type. | |
+using | value_type = ValueType |
Representation type. | |
template<typename Byte > | |
using | value_type = ArrayType<Byte> |
Representation type for non-constant arrays. | |
+Static Public Member Functions | |
+static constexpr const char * | name () noexcept |
Returns name attribute. | |
+static constexpr const char * | description () noexcept |
Returns description attribute. | |
+static constexpr field_presence | presence () noexcept |
Returns presence. | |
+static constexpr primitive_type | min_value () noexcept |
Returns minValue . Available only if length() == 1 and presence() != field_presence::constant | |
+static constexpr primitive_type | max_value () noexcept |
Returns maxValue . Available only if length() == 1 and presence() != field_presence::constant | |
+static constexpr primitive_type | null_value () noexcept |
Returns nullValue . Available only if length() == 1 and presence() == field_presence::optional | |
+static constexpr length_t | length () noexcept |
Returns length attribute. | |
+static constexpr offset_t | offset () noexcept |
Returns type offset. Available only if offset is static, i.e. not available for public types whose offset is different on each usage. | |
+static constexpr const char * | semantic_type () noexcept |
Returns semanticType attribute. | |
+static constexpr version_t | since_version () noexcept |
Returns sinceVersion attribute. | |
+static constexpr version_t | deprecated () noexcept |
Returns deprecated attribute. Available only if provided in schema. | |
+static constexpr const char * | character_encoding () noexcept |
Returns characterEncoding attribute. | |
Provides various traits and attributes of a <type>
element.
For example: sbepp::type_traits<some_schema::schema::types::some_type>::name()
;
T | type tag |
using sbepp::type_traits< T >::value_type = ArrayType<Byte> | +
Representation type for non-constant arrays.
+Byte | byte type |
+ sbepp
+
+ |
+
This is the complete list of members for sbepp::uint16_opt_t, including all inherited members.
+
+ sbepp
+
+ |
+
Built-in uint16
optional type.
+ More...
#include <sbepp.hpp>
+Static Public Member Functions | |
+static constexpr value_type | min_value () noexcept |
Returns minValue attribute. | |
+static constexpr value_type | max_value () noexcept |
Returns maxValue attribute. | |
+static constexpr value_type | null_value () noexcept |
Returns nullValue attribute. | |
+Additional Inherited Members | |
Public Types inherited from sbepp::detail::optional_base< std::uint16_t, uint16_opt_t > | |
+using | value_type |
Underlying type. | |
Public Member Functions inherited from sbepp::detail::optional_base< std::uint16_t, uint16_opt_t > | |
+ | optional_base ()=default |
Constructs null object. | |
+constexpr | optional_base (nullopt_t) noexcept |
Constructs null object. | |
+constexpr | optional_base (value_type val) noexcept |
Constructs object from given value. | |
+constexpr value_type | value () const noexcept |
Returns underlying value. | |
+constexpr value_type & | operator* () noexcept |
Returns reference to underlying value. | |
+constexpr value_type | operator* () const noexcept |
Returns underlying value. | |
+constexpr bool | in_range () const noexcept |
Checks if value is in [Derived::min_value(); Derived::max_value()] range. | |
+constexpr value_type | value_or (std::uint16_t default_value) const noexcept |
Returns value if not null, default_value otherwise. | |
+constexpr bool | has_value () const noexcept |
Checks if has value. | |
+constexpr | operator bool () const noexcept |
Checks if has value. | |
Built-in uint16
optional type.
Also works as a tag for its traits
+
+ sbepp
+
+ |
+
This is the complete list of members for sbepp::uint16_t, including all inherited members.
+in_range() const noexcept | sbepp::detail::required_base< std::uint16_t, uint16_t > | inline |
max_value() noexcept | sbepp::uint16_t | inlinestatic |
min_value() noexcept | sbepp::uint16_t | inlinestatic |
operator*() noexcept | sbepp::detail::required_base< std::uint16_t, uint16_t > | inline |
operator*() const noexcept | sbepp::detail::required_base< std::uint16_t, uint16_t > | inline |
required_base()=default | sbepp::detail::required_base< std::uint16_t, uint16_t > | |
required_base(value_type val) noexcept | sbepp::detail::required_base< std::uint16_t, uint16_t > | inline |
value() const noexcept | sbepp::detail::required_base< std::uint16_t, uint16_t > | inline |
value_type typedef | sbepp::detail::required_base< std::uint16_t, uint16_t > |
+ sbepp
+
+ |
+
Built-in uint16
required type.
+ More...
#include <sbepp.hpp>
+Static Public Member Functions | |
+static constexpr value_type | min_value () noexcept |
Returns minValue attribute. | |
+static constexpr value_type | max_value () noexcept |
Returns maxValue attribute. | |
+Additional Inherited Members | |
Public Types inherited from sbepp::detail::required_base< std::uint16_t, uint16_t > | |
+using | value_type |
Underlying type. | |
Public Member Functions inherited from sbepp::detail::required_base< std::uint16_t, uint16_t > | |
+ | required_base ()=default |
Default constructor. Constructs value-initialized object. | |
+constexpr | required_base (value_type val) noexcept |
Constructs from given value. | |
+constexpr value_type | value () const noexcept |
Returns underlying value. | |
+constexpr value_type & | operator* () noexcept |
Returns reference to underlying value. | |
+constexpr value_type | operator* () const noexcept |
Returns underlying value. | |
+constexpr bool | in_range () const noexcept |
Checks if value is in [Derived::min_value(); Derived::max_value()] range. | |
Built-in uint16
required type.
Also works as a tag for its traits
+
+ sbepp
+
+ |
+
This is the complete list of members for sbepp::uint32_opt_t, including all inherited members.
+
+ sbepp
+
+ |
+
Built-in uint32
optional type.
+ More...
#include <sbepp.hpp>
+Static Public Member Functions | |
+static constexpr value_type | min_value () noexcept |
Returns minValue attribute. | |
+static constexpr value_type | max_value () noexcept |
Returns maxValue attribute. | |
+static constexpr value_type | null_value () noexcept |
Returns nullValue attribute. | |
+Additional Inherited Members | |
Public Types inherited from sbepp::detail::optional_base< std::uint32_t, uint32_opt_t > | |
+using | value_type |
Underlying type. | |
Public Member Functions inherited from sbepp::detail::optional_base< std::uint32_t, uint32_opt_t > | |
+ | optional_base ()=default |
Constructs null object. | |
+constexpr | optional_base (nullopt_t) noexcept |
Constructs null object. | |
+constexpr | optional_base (value_type val) noexcept |
Constructs object from given value. | |
+constexpr value_type | value () const noexcept |
Returns underlying value. | |
+constexpr value_type & | operator* () noexcept |
Returns reference to underlying value. | |
+constexpr value_type | operator* () const noexcept |
Returns underlying value. | |
+constexpr bool | in_range () const noexcept |
Checks if value is in [Derived::min_value(); Derived::max_value()] range. | |
+constexpr value_type | value_or (std::uint32_t default_value) const noexcept |
Returns value if not null, default_value otherwise. | |
+constexpr bool | has_value () const noexcept |
Checks if has value. | |
+constexpr | operator bool () const noexcept |
Checks if has value. | |
Built-in uint32
optional type.
Also works as a tag for its traits
+
+ sbepp
+
+ |
+
This is the complete list of members for sbepp::uint32_t, including all inherited members.
+in_range() const noexcept | sbepp::detail::required_base< std::uint32_t, uint32_t > | inline |
max_value() noexcept | sbepp::uint32_t | inlinestatic |
min_value() noexcept | sbepp::uint32_t | inlinestatic |
operator*() noexcept | sbepp::detail::required_base< std::uint32_t, uint32_t > | inline |
operator*() const noexcept | sbepp::detail::required_base< std::uint32_t, uint32_t > | inline |
required_base()=default | sbepp::detail::required_base< std::uint32_t, uint32_t > | |
required_base(value_type val) noexcept | sbepp::detail::required_base< std::uint32_t, uint32_t > | inline |
value() const noexcept | sbepp::detail::required_base< std::uint32_t, uint32_t > | inline |
value_type typedef | sbepp::detail::required_base< std::uint32_t, uint32_t > |
+ sbepp
+
+ |
+
Built-in uint32
required type.
+ More...
#include <sbepp.hpp>
+Static Public Member Functions | |
+static constexpr value_type | min_value () noexcept |
Returns minValue attribute. | |
+static constexpr value_type | max_value () noexcept |
Returns maxValue attribute. | |
+Additional Inherited Members | |
Public Types inherited from sbepp::detail::required_base< std::uint32_t, uint32_t > | |
+using | value_type |
Underlying type. | |
Public Member Functions inherited from sbepp::detail::required_base< std::uint32_t, uint32_t > | |
+ | required_base ()=default |
Default constructor. Constructs value-initialized object. | |
+constexpr | required_base (value_type val) noexcept |
Constructs from given value. | |
+constexpr value_type | value () const noexcept |
Returns underlying value. | |
+constexpr value_type & | operator* () noexcept |
Returns reference to underlying value. | |
+constexpr value_type | operator* () const noexcept |
Returns underlying value. | |
+constexpr bool | in_range () const noexcept |
Checks if value is in [Derived::min_value(); Derived::max_value()] range. | |
Built-in uint32
required type.
Also works as a tag for its traits
+
+ sbepp
+
+ |
+
This is the complete list of members for sbepp::uint64_opt_t, including all inherited members.
+
+ sbepp
+
+ |
+
Built-in uint64
optional type.
+ More...
#include <sbepp.hpp>
+Static Public Member Functions | |
+static constexpr value_type | min_value () noexcept |
Returns minValue attribute. | |
+static constexpr value_type | max_value () noexcept |
Returns maxValue attribute. | |
+static constexpr value_type | null_value () noexcept |
Returns nullValue attribute. | |
+Additional Inherited Members | |
Public Types inherited from sbepp::detail::optional_base< std::uint64_t, uint64_opt_t > | |
+using | value_type |
Underlying type. | |
Public Member Functions inherited from sbepp::detail::optional_base< std::uint64_t, uint64_opt_t > | |
+ | optional_base ()=default |
Constructs null object. | |
+constexpr | optional_base (nullopt_t) noexcept |
Constructs null object. | |
+constexpr | optional_base (value_type val) noexcept |
Constructs object from given value. | |
+constexpr value_type | value () const noexcept |
Returns underlying value. | |
+constexpr value_type & | operator* () noexcept |
Returns reference to underlying value. | |
+constexpr value_type | operator* () const noexcept |
Returns underlying value. | |
+constexpr bool | in_range () const noexcept |
Checks if value is in [Derived::min_value(); Derived::max_value()] range. | |
+constexpr value_type | value_or (std::uint64_t default_value) const noexcept |
Returns value if not null, default_value otherwise. | |
+constexpr bool | has_value () const noexcept |
Checks if has value. | |
+constexpr | operator bool () const noexcept |
Checks if has value. | |
Built-in uint64
optional type.
Also works as a tag for its traits
+
+ sbepp
+
+ |
+
This is the complete list of members for sbepp::uint64_t, including all inherited members.
+in_range() const noexcept | sbepp::detail::required_base< std::uint64_t, uint64_t > | inline |
max_value() noexcept | sbepp::uint64_t | inlinestatic |
min_value() noexcept | sbepp::uint64_t | inlinestatic |
operator*() noexcept | sbepp::detail::required_base< std::uint64_t, uint64_t > | inline |
operator*() const noexcept | sbepp::detail::required_base< std::uint64_t, uint64_t > | inline |
required_base()=default | sbepp::detail::required_base< std::uint64_t, uint64_t > | |
required_base(value_type val) noexcept | sbepp::detail::required_base< std::uint64_t, uint64_t > | inline |
value() const noexcept | sbepp::detail::required_base< std::uint64_t, uint64_t > | inline |
value_type typedef | sbepp::detail::required_base< std::uint64_t, uint64_t > |
+ sbepp
+
+ |
+
Built-in uint64
required type.
+ More...
#include <sbepp.hpp>
+Static Public Member Functions | |
+static constexpr value_type | min_value () noexcept |
Returns minValue attribute. | |
+static constexpr value_type | max_value () noexcept |
Returns maxValue attribute. | |
+Additional Inherited Members | |
Public Types inherited from sbepp::detail::required_base< std::uint64_t, uint64_t > | |
+using | value_type |
Underlying type. | |
Public Member Functions inherited from sbepp::detail::required_base< std::uint64_t, uint64_t > | |
+ | required_base ()=default |
Default constructor. Constructs value-initialized object. | |
+constexpr | required_base (value_type val) noexcept |
Constructs from given value. | |
+constexpr value_type | value () const noexcept |
Returns underlying value. | |
+constexpr value_type & | operator* () noexcept |
Returns reference to underlying value. | |
+constexpr value_type | operator* () const noexcept |
Returns underlying value. | |
+constexpr bool | in_range () const noexcept |
Checks if value is in [Derived::min_value(); Derived::max_value()] range. | |
Built-in uint64
required type.
Also works as a tag for its traits
+
+ sbepp
+
+ |
+
This is the complete list of members for sbepp::uint8_opt_t, including all inherited members.
+
+ sbepp
+
+ |
+
Built-in uint8
optional type.
+ More...
#include <sbepp.hpp>
+Static Public Member Functions | |
+static constexpr value_type | min_value () noexcept |
Returns minValue attribute. | |
+static constexpr value_type | max_value () noexcept |
Returns maxValue attribute. | |
+static constexpr value_type | null_value () noexcept |
Returns nullValue attribute. | |
+Additional Inherited Members | |
Public Types inherited from sbepp::detail::optional_base< std::uint8_t, uint8_opt_t > | |
+using | value_type |
Underlying type. | |
Public Member Functions inherited from sbepp::detail::optional_base< std::uint8_t, uint8_opt_t > | |
+ | optional_base ()=default |
Constructs null object. | |
+constexpr | optional_base (nullopt_t) noexcept |
Constructs null object. | |
+constexpr | optional_base (value_type val) noexcept |
Constructs object from given value. | |
+constexpr value_type | value () const noexcept |
Returns underlying value. | |
+constexpr value_type & | operator* () noexcept |
Returns reference to underlying value. | |
+constexpr value_type | operator* () const noexcept |
Returns underlying value. | |
+constexpr bool | in_range () const noexcept |
Checks if value is in [Derived::min_value(); Derived::max_value()] range. | |
+constexpr value_type | value_or (std::uint8_t default_value) const noexcept |
Returns value if not null, default_value otherwise. | |
+constexpr bool | has_value () const noexcept |
Checks if has value. | |
+constexpr | operator bool () const noexcept |
Checks if has value. | |
Built-in uint8
optional type.
Also works as a tag for its traits
+
+ sbepp
+
+ |
+
This is the complete list of members for sbepp::uint8_t, including all inherited members.
+in_range() const noexcept | sbepp::detail::required_base< std::uint8_t, uint8_t > | inline |
max_value() noexcept | sbepp::uint8_t | inlinestatic |
min_value() noexcept | sbepp::uint8_t | inlinestatic |
operator*() noexcept | sbepp::detail::required_base< std::uint8_t, uint8_t > | inline |
operator*() const noexcept | sbepp::detail::required_base< std::uint8_t, uint8_t > | inline |
required_base()=default | sbepp::detail::required_base< std::uint8_t, uint8_t > | |
required_base(value_type val) noexcept | sbepp::detail::required_base< std::uint8_t, uint8_t > | inline |
value() const noexcept | sbepp::detail::required_base< std::uint8_t, uint8_t > | inline |
value_type typedef | sbepp::detail::required_base< std::uint8_t, uint8_t > |
+ sbepp
+
+ |
+
Built-in uint8
required type.
+ More...
#include <sbepp.hpp>
+Static Public Member Functions | |
+static constexpr value_type | min_value () noexcept |
Returns minValue attribute. | |
+static constexpr value_type | max_value () noexcept |
Returns maxValue attribute. | |
+Additional Inherited Members | |
Public Types inherited from sbepp::detail::required_base< std::uint8_t, uint8_t > | |
+using | value_type |
Underlying type. | |
Public Member Functions inherited from sbepp::detail::required_base< std::uint8_t, uint8_t > | |
+ | required_base ()=default |
Default constructor. Constructs value-initialized object. | |
+constexpr | required_base (value_type val) noexcept |
Constructs from given value. | |
+constexpr value_type | value () const noexcept |
Returns underlying value. | |
+constexpr value_type & | operator* () noexcept |
Returns reference to underlying value. | |
+constexpr value_type | operator* () const noexcept |
Returns underlying value. | |
+constexpr bool | in_range () const noexcept |
Checks if value is in [Derived::min_value(); Derived::max_value()] range. | |
Built-in uint8
required type.
Also works as a tag for its traits
+
+ sbepp
+
+ |
+
▼Nsbepp | The main sbepp namespace |
Rarray_type | Concept for sbepp::is_array_type<T>::value |
Rrequired_type | Concept for sbepp::is_required_type<T>::value |
Roptional_type | Concept for sbepp::is_optional_type<T>::value |
Rnon_array_type | Concept for sbepp::is_non_array_type<T>::value |
Rtype | Concept for sbepp::is_type<T>::value |
Renumeration | Concept for sbepp::is_enum<T>::value |
Rset | Concept for sbepp::is_set<T>::value |
Rcomposite | Concept for sbepp::is_composite<T>::value |
Rmessage | Concept for sbepp::is_message<T>::value |
Rflat_group | Concept for sbepp::is_flat_group<T>::value |
Rnested_group | Concept for sbepp::is_nested_group<T>::value |
Rgroup | Concept for sbepp::is_group<T>::value |
Rdata | Concept for sbepp::is_data<T>::value |
+ sbepp
+
+ |
+
Concept for sbepp::is_array_type<T>::value
+More...
#include <sbepp.hpp>
Concept for sbepp::is_array_type<T>::value
+ sbepp
+
+ |
+
Concept for sbepp::is_composite<T>::value
+More...
#include <sbepp.hpp>
Concept for sbepp::is_composite<T>::value
+ sbepp
+
+ |
+
Concept for sbepp::is_data<T>::value
+More...
#include <sbepp.hpp>
Concept for sbepp::is_data<T>::value
+ sbepp
+
+ |
+
Concept for sbepp::is_enum<T>::value
+More...
#include <sbepp.hpp>
Concept for sbepp::is_enum<T>::value
+ sbepp
+
+ |
+
Concept for sbepp::is_flat_group<T>::value
+More...
#include <sbepp.hpp>
Concept for sbepp::is_flat_group<T>::value
+ sbepp
+
+ |
+
Concept for sbepp::is_group<T>::value
+More...
#include <sbepp.hpp>
Concept for sbepp::is_group<T>::value
+ sbepp
+
+ |
+
Concept for sbepp::is_message<T>::value
+More...
#include <sbepp.hpp>
Concept for sbepp::is_message<T>::value
+ sbepp
+
+ |
+
Concept for sbepp::is_nested_group<T>::value
+More...
#include <sbepp.hpp>
Concept for sbepp::is_nested_group<T>::value
+ sbepp
+
+ |
+
Concept for sbepp::is_non_array_type<T>::value
+More...
#include <sbepp.hpp>
Concept for sbepp::is_non_array_type<T>::value
+ sbepp
+
+ |
+
Concept for sbepp::is_optional_type<T>::value
+More...
#include <sbepp.hpp>
Concept for sbepp::is_optional_type<T>::value
+ sbepp
+
+ |
+
Concept for sbepp::is_required_type<T>::value
+More...
#include <sbepp.hpp>
Concept for sbepp::is_required_type<T>::value
+ sbepp
+
+ |
+
Concept for sbepp::is_set<T>::value
+More...
#include <sbepp.hpp>
Concept for sbepp::is_set<T>::value
+ sbepp
+
+ |
+
Concept for sbepp::is_type<T>::value
+More...
#include <sbepp.hpp>
Concept for sbepp::is_type<T>::value
+ sbepp
+
+ |
+
sbepp::visit
, will be removed in the next major update. sbepp::visit
, will be removed in the next major update. sbepp::visit
. You can find up-to-date stringification example here.
+ sbepp
+
+ |
+
+ sbepp
+
+ |
+
This pages shows some simple examples, most of things they demostrate are also shown on other pages.
+Here's the schema:
+There are couple of ways to decode message header from an incoming data.
+Using sbepp::schema_traits::header_type
to get header type:
Using hardcoded header type(messageHeader
here):
And finally, when one knows for sure what schema they're working with, it's legal to create any message view from that schema and use sbepp::get_header()
to get the header. This works because header is the same for all messages within the schema. Of course access anything beyond the header still requires message type check.
It is possible to estimate how much memory is required to represent encoded message using sbepp::message_traits::size_bytes()
. To do this, one needs to know message structure details, the number of entries for each group and the total size of <data>
element(s) payload. Here's how it can be done at compile-time:
or at run-time:
+Here's an example of how to build stringification visitor using fmt and Visit API (you can find the full example in stringification.test.cpp
):
Now, for a message like:
+we can get the following output:
+
+ sbepp
+
+ |
+
sbepp.hpp | Contains various utilities and implementation details which are required for generated schema headers |
+ sbepp
+
+ |
+
+ sbepp
+
+ |
+
+ sbepp
+
+ |
+
+ sbepp
+
+ |
+
+ sbepp
+
+ |
+
+ sbepp
+
+ |
+
+ sbepp
+
+ |
+
+ sbepp
+
+ |
+
+ sbepp
+
+ |
+
+ sbepp
+
+ |
+
+ sbepp
+
+ |
+
+ sbepp
+
+ |
+
+ sbepp
+
+ |
+
+ sbepp
+
+ |
+
+ sbepp
+
+ |
+
+ sbepp
+
+ |
+
+ sbepp
+
+ |
+
+ sbepp
+
+ |
+
+ sbepp
+
+ |
+
+ sbepp
+
+ |
+
+ sbepp
+
+ |
+
+ sbepp
+
+ |
+
+ sbepp
+
+ |
+
+ sbepp
+
+ |
+
+ sbepp
+
+ |
+
+ sbepp
+
+ |
+
+ sbepp
+
+ |
+
+ sbepp
+
+ |
+
+ sbepp
+
+ |
+
+ sbepp
+
+ |
+
+ sbepp
+
+ |
+
+ sbepp
+
+ |
+
+ sbepp
+
+ |
+
+ sbepp
+
+ |
+
+ sbepp
+
+ |
+
+ sbepp
+
+ |
+
+ sbepp
+
+ |
+
+ sbepp
+
+ |
+
+ sbepp
+
+ |
+
+Macros | |
+#define | SBEPP_HAS_THREE_WAY_COMPARISON 0 |
1 if compiler supports three-way comparison, 0 otherwise | |
#define | SBEPP_HAS_ENDIAN 0 |
1 if compiler supports concepts, 0 otherwise | |
+#define | SBEPP_HAS_BITCAST 0 |
1 if compiler supports std::bitcast , 0 otherwise | |
+#define | SBEPP_HAS_BYTESWAP 0 |
1 if compiler supports std::byteswap , 0 otherwise | |
+#define | SBEPP_HAS_CONSTEXPR_ALGORITHMS 0 |
1 if compiler supports constexpr std algorithms, 0 otherwise | |
+#define | SBEPP_HAS_CONSTEXPR_ACCESSORS 0 |
1 if constexpr accessors are supported, 0 otherwise | |
+#define | SBEPP_HAS_RANGES 0 |
1 if compiler supports ranges, 0 otherwise | |
+#define | SBEPP_HAS_IS_CONSTANT_EVALUATED 0 |
1 if compiler supports std::is_constant_evaluated() , 0 otherwise | |
The list of configuration macros, if necessary, their values can be enforced by client.
+#define SBEPP_HAS_ENDIAN 0 | +
1
if compiler supports concepts, 0
otherwise
1
is compiler supports inline variables, 0
otherwise
1
if compiler supports std::endian
, 0
otherwise
+ sbepp
+
+ |
+
+Classes | |
class | sbepp::type_traits< T > |
Provides various traits and attributes of a <type> element. More... | |
class | sbepp::schema_traits< T > |
Provides various traits/attributes of a <messageSchema> element. More... | |
class | sbepp::enum_traits< T > |
Provides various traits/attributes of an <enum> element. More... | |
class | sbepp::enum_value_traits< T > |
Provides various traits/attributes of a <validValue> element. More... | |
class | sbepp::set_traits< T > |
Provides various traits/attributes of a <set> element. More... | |
class | sbepp::set_choice_traits< T > |
Provides various traits/attributes of a <choice> element. More... | |
class | sbepp::composite_traits< T > |
Provides various traits/attributes of a <composite> element. More... | |
class | sbepp::message_traits< T > |
Provides various traits/attributes of a <message> element. More... | |
class | sbepp::field_traits< T > |
Provides various traits/attributes of a <field> element. More... | |
class | sbepp::group_traits< T > |
Provides various traits/attributes of a <group> element. More... | |
class | sbepp::data_traits< T > |
Provides various traits/attributes of a <data> element. More... | |
The list of available traits. For more details see Traits
+
+ sbepp
+
+ |
+
+ sbepp
+
+ |
+
sbepp is a zero-overhead C++ implementation of Simple Binary Encoding (SBE). It consists of two parts:
sbeppc
, schema compiler which generates header-only C++ codesbepp
, header-only supporting librarysbepp::sbepp
library.sbepp
has two main goals:
As a result, almost all types in sbepp
are reference semantics wrappers over memory buffer. They never manage underlying memory in any way, only treat the data according to SBE standard. The idea was to provide a thing similar to plain struct
with getters/setters and leave rest to a client. The only thing which is handled implicitly is a schema extension mechanism, everything else must be done by a client. For a boiler-plate things like header filling sbepp
provides helper utilities. Basically, all it does under the hood is offset calculation and memory read/write.
It's worth mentioning that at the moment sbepp
cannot generate schema representation at run-time like other similar software.
RealLogic is more like a platform rather than a simple tool. It can generate code in different languages, load schema at run-time, validate XML, etc. sbepp
is focused solely on generating C++ code.
Both tools generate view-like classes which don't manage memory. However, RealLogic
requires non-const
char*
buffer even for decoding, while sbepp
takes byte type as a template parameter and provides read-only access when it's const
-qualified.
The performance of the code generated by both tools is quite similar, at least in my benchmarks I don't see a significant difference. In compiler-explorer experiments I found that in some cases RealLogic
's code results in a noticeably more assembly lines while the code generated by sbepp
is nearly identical to the assembly of a hand-written code.
RealLogic
requires forward-only access when one needs to touch each field either by reading or skipping it with explicit call. sbepp
provides both, random and forward-only access. Since most messages have simple structure, random access performs just as well for them.
RealLogic
has inconvenient 2-step process for message creation. sbepp
needs only a single line to create a message wrapper and one more call to fill message header in case of encoding.
In general, RealLogic
provides poor C++ abstractions for SBE types and mixes various helper functions with getters/setters. This results in message interface being polluted with methods like field_nameId()
, field_nameEncodingOffset()
, field_nameNullValue()
along with field accessors. sbepp
provides convenient STL-like wrappers for each SBE entity and never mixes accessors with internal methods so auto-suggestion in IDE shows you only schema names and nothing else. This interface problem holds for group and fixed/variable length array interfaces. They just don't work in a C++ way.
RealLogic
uses exceptions to report boundary check violations (if checks are enabled). sbepp
uses assertions and they are supposed to be enabled only in Debug mode.
RealLogic
provides iostream
-based operator<<
with fixed formatting. sbepp
provides only stringification primitives and Visit API which allows clients to build their own to_string()
with desired format and output mechanism.
Distributed under the MIT license.
+
+ sbepp
+
+ |
+
Use classic CMake approach:
+After the build/installation, there'll be 2 CMake targets: sbepp::sbeppc
and sbepp::sbepp
, check out the Integration section to see how they can be used.
sbepp
is a C++11 header-only library which depends only on the STL.
sbeppc
requires C++17. It depends on:
Available CMake options (name = default_value
):
SBEPP_BUILD_SBEPPC = ON
, controls whether sbeppc
should be builtSBEPP_DEV_MODE = OFF
, enables developer mode.SBEPP_BUILD_BENCHMARK = OFF
, requires SBEPP_DEV_MODE=ON
, controls whether benchmarks should be built. If ON
, requires benchmarkSBEPP_BUILD_TESTS = OFF
, requires SBEPP_DEV_MODE=ON
, controls whether tests should be built. If ON
, requires googletest and fmtSBEPP_BUILD_DOCS = OFF
, controls whether documentation should be built. If ON
requires DoxygenThere's a conanfile.txt
which can be used to simplify dependency management.
Now available in ConanCenter. Use with_sbeppc
Conan option to enable/disable sbeppc
building (defaults to True
).
+ sbepp
+
+ |
+
After schema compilation, the only thing you need to use it is to include generated files into your project and link to sbepp::sbepp
CMake target.
The most simple way is to compile schema on-the-fly, that is, to store only schema XML in your source tree and generate C++ headers from it during the build process.
+sbepp
provides a couple of helpers to make on-the-fly schema compilation as easy as possible.
sbeppc_compile_schema
- creates INTERFACE
library that compiles SBE schema using sbeppc
.
+ Parameters:
SCHEMA_FILE
, the path to schema XML file.TARGET_NAME
, the name of the generated INTERFACE
library. Same target can be used to compile multiple schemas.OUTPUT_DIR
, optional, the directory in which sbeppc
will generate headers. Defaults to ${CMAKE_BINARY_DIR}/sbeppc_generated
.SCHEMA_NAME
, optional, overrides schema name from XML.SBEPPC_PATH
, optional, the path to sbeppc
binary, uses sbepp::sbeppc
CMake target by default.This function creates custom target using sbeppc_make_schema_target
(described below) and then creates INTERFACE
library on top of it. This library carries all necessary dependencies and settings so there's a minimal amount of work left to user:
sbeppc_make_schema_target
- creates a custom target that compiles SBE schema using sbeppc
.
+ Parameters:
SCHEMA_FILE
, the path to schema XML file.TARGET_NAME
, the name of generated custom target. Same target can be used to compile multiple schemas.OUTPUT_DIR
, the directory in which sbeppc
will generate headers.SCHEMA_NAME
, optional, overrides schema name from XML.SBEPPC_PATH
, optional, the path to sbeppc
binary, uses sbepp::sbeppc
CMake target by default.This is a lower-level function than sbeppc_compile_schema
. It only creates a custom command and a custom target to compile the schema leaving the rest of work up to user. When SCHEMA_NAME
is not provided, it also creates a special empty anchor file with a name like <HASH>.anchor
for a schema. This file is indirectly included into all generated headers and required for CMake and underlying build systems to establish correct dependency graph and enforce automatic recompilation of consumers of this target when either schema XML or sbeppc
itself changes.
Example:
+Here's an example of how to implement the above functionality by-hand:
+Another approach is to use pre-compiled schema headers, that is, generate headers once and store them in the source tree. This might be useful when it's not desired/possible to build/install sbeppc
in developer environment (e.g. if C++17 required for sbeppc
is not available). It requires building sbeppc
once somewhere, generating schema headers using it and pushing them to the source tree to be used by others. In this case care should be taken to keep once-generated headers compatible with sbepp
if it's installed automatically via some dependency management mechanism.
sbeppc
building for such cases.Also, since it's a third-party code, it's recommended to mark include path for generated headers as SYSTEM
to hide potential warnings.
sbepp
uses SemVer that is defined in terms of public API, its users and its changes. sbepp
defines public API as:
sbepp::sbeppc
schema compilersbepp::sbepp
supporting libraryThe most important consequence from this definition is that whether a change is compatible/incompatible depends only on how it affects user's code, not the generated one. In practice it means that headers generated by sbepp::sbeppc
version 1.2.3
might not be compatible with sbepp::sbepp
version 1.3.0
and even with 1.2.4
. Such incompatibility requires schema recompilation but not the user's code change (only MAJOR update will require that).
To summarize, the advised strategy is to use the same version of sbepp::sbeppc
and sbepp::sbepp
to generate and use headers. Types from the detail
namespace should never be mentioned/used explicitly, they can be affected even by the PATCH version change.