Contains various utilities and implementation details which are required for generated schema headers.
More...
|
| struct | sbepp::type_list< Ts > |
| | An empty structure to represent a sequence of types. More...
|
| |
| class | sbepp::detail::byte_range< Byte > |
| | Base class for all reference semantics types. More...
|
| |
| class | sbepp::cursor< Byte > |
| | Represents cursor which is used in cursor-based API. Clients should not use undocumented methods. More...
|
| |
| struct | sbepp::byte_type< View > |
| | Trait to get view's byte type. More...
|
| |
| class | sbepp::detail::composite_base< Byte > |
| | Base class for composites. More...
|
| |
| class | sbepp::detail::message_base< Byte, Header > |
| | Base class for messages. More...
|
| |
| class | sbepp::detail::entry_base< Byte, BlockLengthType > |
| | Base class for group entries. More...
|
| |
| class | sbepp::detail::flat_group_base< Byte, Entry, Dimension > |
| | Base class for a flat group. More...
|
| |
| class | sbepp::detail::nested_group_base< Byte, Entry, Dimension > |
| | Base class for a nested group. More...
|
| |
| class | sbepp::detail::bitset_base< T > |
| | Base class for bitsets. More...
|
| |
| struct | sbepp::default_init_t |
| | Tag for dynamic_array_ref::resize(). Used to skip value initialization. More...
|
| |
| class | sbepp::detail::static_array_ref< Byte, Value, N, Tag > |
| | Represents reference to fixed-size array. More...
|
| |
| class | sbepp::detail::dynamic_array_ref< Byte, Value, Length, E > |
| | Represents reference to dynamic arrays used for <data> elements. More...
|
| |
| struct | sbepp::nullopt_t |
| | Tag type used to initialize optional types with null value. More...
|
| |
| class | sbepp::detail::required_base< T, Derived > |
| | Base class for required types. More...
|
| |
| class | sbepp::detail::optional_base< T, Derived > |
| | Base class for optional types. More...
|
| |
| 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...
|
| |
| struct | sbepp::traits_tag< ValueType > |
| | Maps representation type to its tag. More...
|
| |
| struct | sbepp::traits_tag< detail::static_array_ref< Byte, Value, N, Tag > > |
| |
| class | sbepp::char_t |
| | Built-in char required type. More...
|
| |
| class | sbepp::char_opt_t |
| | Built-in char optional type. More...
|
| |
| class | sbepp::type_traits< char_t > |
| |
| struct | sbepp::traits_tag< char_t > |
| |
| class | sbepp::type_traits< char_opt_t > |
| |
| struct | sbepp::traits_tag< char_opt_t > |
| |
| class | sbepp::int8_t |
| | Built-in int8 required type. More...
|
| |
| class | sbepp::int8_opt_t |
| | Built-in int8 optional type. More...
|
| |
| class | sbepp::type_traits< int8_t > |
| |
| struct | sbepp::traits_tag< int8_t > |
| |
| class | sbepp::type_traits< int8_opt_t > |
| |
| struct | sbepp::traits_tag< int8_opt_t > |
| |
| class | sbepp::uint8_t |
| | Built-in uint8 required type. More...
|
| |
| class | sbepp::uint8_opt_t |
| | Built-in uint8 optional type. More...
|
| |
| class | sbepp::type_traits< uint8_t > |
| |
| struct | sbepp::traits_tag< uint8_t > |
| |
| class | sbepp::type_traits< uint8_opt_t > |
| |
| struct | sbepp::traits_tag< uint8_opt_t > |
| |
| class | sbepp::int16_t |
| | Built-in int16 required type. More...
|
| |
| class | sbepp::int16_opt_t |
| | Built-in int16 optional type. More...
|
| |
| class | sbepp::type_traits< int16_t > |
| |
| struct | sbepp::traits_tag< int16_t > |
| |
| class | sbepp::type_traits< int16_opt_t > |
| |
| struct | sbepp::traits_tag< int16_opt_t > |
| |
| class | sbepp::uint16_t |
| | Built-in uint16 required type. More...
|
| |
| class | sbepp::uint16_opt_t |
| | Built-in uint16 optional type. More...
|
| |
| class | sbepp::type_traits< uint16_t > |
| |
| struct | sbepp::traits_tag< uint16_t > |
| |
| class | sbepp::type_traits< uint16_opt_t > |
| |
| struct | sbepp::traits_tag< uint16_opt_t > |
| |
| class | sbepp::int32_t |
| | Built-in int32 required type. More...
|
| |
| class | sbepp::int32_opt_t |
| | Built-in int32 optional type. More...
|
| |
| class | sbepp::type_traits< int32_t > |
| |
| struct | sbepp::traits_tag< int32_t > |
| |
| class | sbepp::type_traits< int32_opt_t > |
| |
| struct | sbepp::traits_tag< int32_opt_t > |
| |
| class | sbepp::uint32_t |
| | Built-in uint32 required type. More...
|
| |
| class | sbepp::uint32_opt_t |
| | Built-in uint32 optional type. More...
|
| |
| class | sbepp::type_traits< uint32_t > |
| |
| struct | sbepp::traits_tag< uint32_t > |
| |
| class | sbepp::type_traits< uint32_opt_t > |
| |
| struct | sbepp::traits_tag< uint32_opt_t > |
| |
| class | sbepp::int64_t |
| | Built-in int64 required type. More...
|
| |
| class | sbepp::int64_opt_t |
| | Built-in int64 optional type. More...
|
| |
| class | sbepp::type_traits< int64_t > |
| |
| struct | sbepp::traits_tag< int64_t > |
| |
| class | sbepp::type_traits< int64_opt_t > |
| |
| struct | sbepp::traits_tag< int64_opt_t > |
| |
| class | sbepp::uint64_t |
| | Built-in uint64 required type. More...
|
| |
| class | sbepp::uint64_opt_t |
| | Built-in uint64 optional type. More...
|
| |
| class | sbepp::type_traits< uint64_t > |
| |
| struct | sbepp::traits_tag< uint64_t > |
| |
| class | sbepp::type_traits< uint64_opt_t > |
| |
| struct | sbepp::traits_tag< uint64_opt_t > |
| |
| class | sbepp::float_t |
| | Built-in float required type. More...
|
| |
| class | sbepp::float_opt_t |
| | Built-in float optional type. More...
|
| |
| class | sbepp::type_traits< float_t > |
| |
| struct | sbepp::traits_tag< float_t > |
| |
| class | sbepp::type_traits< float_opt_t > |
| |
| struct | sbepp::traits_tag< float_opt_t > |
| |
| class | sbepp::double_t |
| | Built-in double required type. More...
|
| |
| class | sbepp::double_opt_t |
| | Built-in double optional type. More...
|
| |
| class | sbepp::type_traits< double_t > |
| |
| struct | sbepp::traits_tag< double_t > |
| |
| class | sbepp::type_traits< double_opt_t > |
| |
| struct | sbepp::traits_tag< double_opt_t > |
| |
| struct | sbepp::unknown_enum_value_tag |
| | Tag for unknown enum values. More...
|
| |
| struct | sbepp::is_enum< T, typename > |
| | Checks if T is an enumeration. More...
|
| |
| struct | sbepp::is_enum< T, detail::void_t< decltype(tag_invoke(std::declval< detail::visit_tag >(), std::declval< T >(), std::declval< int & >()))> > |
| |
| struct | sbepp::size_bytes_checked_result |
| | Result type of size_bytes_checked More...
|
| |
|
|
using | sbepp::length_t = std::uint64_t |
| | Represents type_traits::length() value type.
|
| |
|
using | sbepp::offset_t = std::uint64_t |
| | Represents offset trait value type, e.g. type_traits::offset()
|
| |
|
using | sbepp::version_t = std::uint64_t |
| | Represents version trait value type, e.g. type_traits::since_version()
|
| |
|
using | sbepp::schema_id_t = std::uint32_t |
| | Represents schema_traits::id() value type.
|
| |
|
using | sbepp::message_id_t = std::uint32_t |
| | Represents message_traits::id() value type.
|
| |
|
using | sbepp::block_length_t = std::uint64_t |
| | Represents block_length trait value type, e.g. message_traits::block_length()
|
| |
|
using | sbepp::member_id_t = std::uint16_t |
| | Represents id trait value type, e.g. field_traits::id()
|
| |
|
using | sbepp::choice_index_t = std::uint8_t |
| | Represents set_choice_traits::index() value type.
|
| |
|
template<typename View> |
| using | sbepp::byte_type_t = typename byte_type<View>::type |
| | Shortcut for byte_type<T>::type
|
| |
|
template<typename ValueType> |
| using | sbepp::traits_tag_t = typename traits_tag<ValueType>::type |
| | Shorthand for sbepp::traits_tag<T>::type
|
| |
| template<typename T> |
| using | sbepp::is_array_type = typename detail::is_array_type_impl<T>::type |
| | Checks if T is an array type.
|
| |
| template<typename T> |
| using | sbepp::is_required_type = detail::is_base_of_tmp<detail::required_base, T> |
| | Checks if T is a required numeric type.
|
| |
| template<typename T> |
| using | sbepp::is_optional_type = detail::is_base_of_tmp<detail::optional_base, T> |
| | Checks if T is an optional numeric type.
|
| |
| template<typename T> |
| using | sbepp::is_non_array_type |
| | Checks if T is a numeric type.
|
| |
| template<typename T> |
| using | sbepp::is_type |
| | Checks if T is a type of any kind.
|
| |
| template<typename T> |
| using | sbepp::is_set = detail::is_base_of_tmp<detail::bitset_base, T> |
| | Checks if T is a set.
|
| |
| template<typename T> |
| using | sbepp::is_composite = detail::is_base_of_tmp<detail::composite_base, T> |
| | Checks if T is a composite.
|
| |
| template<typename T> |
| using | sbepp::is_message = detail::is_base_of_tmp<detail::message_base, T> |
| | Checks if T is a message.
|
| |
| template<typename T> |
| using | sbepp::is_flat_group = detail::is_base_of_tmp<detail::flat_group_base, T> |
| | Checks if T is a flat group.
|
| |
| template<typename T> |
| using | sbepp::is_nested_group = detail::is_base_of_tmp<detail::nested_group_base, T> |
| | Checks if T is a nested group.
|
| |
| template<typename T> |
| using | sbepp::is_group |
| | Checks if T is a group of any kind.
|
| |
| template<typename T> |
| using | sbepp::is_group_entry = detail::is_base_of_tmp<detail::entry_base, T> |
| | Checks if T is a group entry.
|
| |
| template<typename T> |
| using | sbepp::is_data = typename detail::is_data_impl<T>::type |
| | Checks if T is a data.
|
| |
| template<typename Tag> |
| using | sbepp::is_type_tag = detail::has_traits<type_traits, Tag> |
| | Checks if Tag is a type tag.
|
| |
| template<typename Tag> |
| using | sbepp::is_enum_tag = detail::has_traits<enum_traits, Tag> |
| | Checks if Tag is an enum tag.
|
| |
| template<typename Tag> |
| using | sbepp::is_enum_value_tag = detail::has_traits<enum_value_traits, Tag> |
| | Checks if Tag is an enum value tag.
|
| |
| template<typename Tag> |
| using | sbepp::is_set_tag = detail::has_traits<set_traits, Tag> |
| | Checks if Tag is a set tag.
|
| |
| template<typename Tag> |
| using | sbepp::is_set_choice_tag = detail::has_traits<set_choice_traits, Tag> |
| | Checks if Tag is a set choice tag.
|
| |
| template<typename Tag> |
| using | sbepp::is_composite_tag = detail::has_traits<composite_traits, Tag> |
| | Checks if Tag is a composite tag.
|
| |
| template<typename Tag> |
| using | sbepp::is_field_tag = detail::has_traits<field_traits, Tag> |
| | Checks if Tag is a field tag.
|
| |
| template<typename Tag> |
| using | sbepp::is_group_tag = detail::has_traits<group_traits, Tag> |
| | Checks if Tag is a group tag.
|
| |
| template<typename Tag> |
| using | sbepp::is_data_tag = detail::has_traits<data_traits, Tag> |
| | Checks if Tag is a data tag.
|
| |
| template<typename Tag> |
| using | sbepp::is_message_tag = detail::has_traits<message_traits, Tag> |
| | Checks if Tag is a message tag.
|
| |
| template<typename Tag> |
| using | sbepp::is_schema_tag = detail::has_traits<schema_traits, Tag> |
| | Checks if Tag is a schema tag.
|
| |
|
| void | sbepp::assertion_failed (char const *expr, char const *function, char const *file, long line) |
| | When SBEPP_ASSERT_HANDLER or SBEPP_ENABLE_ASSERTS_WITH_HANDLER is defined, this function is called for failed assertions. Must be defined by the client.
|
| |
| template<typename T> |
| constexpr std::size_t | sbepp::size_bytes (T v) noexcept |
| | Returns the size of the underlying data represented by message/group/entry/data/composite view, including headers.
|
| |
| template<typename T, typename Byte> |
| constexpr std::size_t | sbepp::size_bytes (T v, cursor< Byte > c) noexcept |
| | Similar to sbepp::size_bytes but has constant complexity because it expects c to be set at the end of v. Useful to read the whole message and then get its size in constant time. Not applicable to composites.
|
| |
| template<typename T> |
| constexpr auto | sbepp::get_header (T v) noexcept -> decltype(v(detail::get_header_tag{})) |
| | Returns the header of a message/group.
|
| |
| template<typename T> |
| constexpr auto | sbepp::addressof (T v) noexcept -> decltype(v(detail::addressof_tag{})) |
| | Returns pointer to the underlying data referenced by a view.
|
| |
| template<typename Byte> |
| constexpr detail::init_cursor_wrapper< Byte > | sbepp::cursor_ops::init (cursor< Byte > &c) noexcept |
| | Returns a wrapper which will initialize the cursor when it's used and advance after the usage.
|
| |
| template<typename Byte> |
| constexpr detail::dont_move_cursor_wrapper< Byte > | sbepp::cursor_ops::dont_move (cursor< Byte > &c) noexcept |
| | Returns a wrapper which doesn't advance the cursor when it's used.
|
| |
| template<typename Byte> |
| constexpr detail::init_dont_move_cursor_wrapper< Byte > | sbepp::cursor_ops::init_dont_move (cursor< Byte > &c) noexcept |
| | Returns a wrapper which initializes the cursor but doesn't move it. Behaves like a combination of init() and dont_move().
|
| |
| template<typename Byte> |
| constexpr detail::skip_cursor_wrapper< Byte > | sbepp::cursor_ops::skip (cursor< Byte > &c) noexcept |
| | Returns a wrapper which moves the cursor to the end of field/group/data without returning the accessed value.
|
| |
| template<typename Enum> |
| constexpr std::underlying_type< Enum >::type | sbepp::to_underlying (Enum e) noexcept |
| | Converts an enumeration to its underlying type. Equivalent to C++23 std::to_underlying()
|
| |
| template<typename View> |
| constexpr cursor< byte_type_t< View > > | sbepp::init_cursor (View view) noexcept |
| | Initializes cursor from a message/group view with the same byte type.
|
| |
| template<typename View> |
| constexpr cursor< typename std::add_const< byte_type_t< View > >::type > | sbepp::init_const_cursor (View view) noexcept |
| | Initializes cursor from a message/group view with const byte type.
|
| |
| template<typename Message> |
| constexpr auto | sbepp::fill_message_header (Message m) noexcept -> decltype(m(detail::fill_message_header_tag{})) |
| | Fills message header.
|
| |
| template<typename Group, typename Size> |
| constexpr auto | sbepp::fill_group_header (Group g, Size num_in_group) noexcept -> decltype(g(detail::fill_group_header_tag{}, num_in_group)) |
| | Fills group header.
|
| |
| template<template< typename > class View, typename Byte> |
| constexpr View< Byte > | sbepp::make_view (Byte *ptr, const std::size_t size) noexcept |
| | Constructs view from memory buffer.
|
| |
| template<template< typename > class View, typename Byte> |
| constexpr View< typename std::add_const< Byte >::type > | sbepp::make_const_view (Byte *ptr, const std::size_t size) noexcept |
| | Constructs read-only view from memory buffer.
|
| |
| template<typename Visitor, typename View, typename Cursor, typename = detail::enable_if_t<detail::is_cursor_visitable_view<View>::value>> |
| constexpr Visitor && | sbepp::visit (View view, Cursor &c, Visitor &&visitor={}) |
| | Visits a view using given cursor.
|
| |
| template<typename Visitor, typename View, typename = detail::enable_if_t<detail::is_cursor_visitable_view<View>::value>> |
| constexpr Visitor && | sbepp::visit (View view, Visitor &&visitor={}) |
| | Visits a message, group or entry view.
|
| |
| template<typename Visitor, typename Composite> |
| constexpr Visitor && | sbepp::visit (Composite view, Visitor &&visitor={}) |
| | Visits a composite view.
|
| |
| template<typename Visitor, typename Set> |
| constexpr Visitor && | sbepp::visit (Set s, Visitor &&visitor={}) |
| | Visits set choices.
|
| |
| template<typename Visitor, typename Enum> |
| constexpr Visitor && | sbepp::visit (Enum e, Visitor &&visitor={}) |
| | Visits an enum value.
|
| |
| template<typename Visitor, typename View, typename Cursor> |
| constexpr detail::enable_if_t< is_composite< View >::value, Visitor && > | sbepp::visit (View view, Cursor &c, Visitor &&visitor={}) |
| | Visits a composite view using given cursor.
|
| |
| template<typename Visitor, typename View, typename Cursor, typename = detail::enable_if_t<detail::is_cursor_visitable_view<View>::value>> |
| constexpr Visitor && | sbepp::visit_children (View view, Cursor &c, Visitor &&visitor={}) |
| | Visits view's children using provided cursor.
|
| |
| template<typename Visitor, typename View, typename = detail::enable_if_t<detail::is_cursor_visitable_view<View>::value>> |
| constexpr Visitor && | sbepp::visit_children (View view, Visitor &&visitor={}) |
| | Visits view's children.
|
| |
| template<typename Visitor, typename View> |
| constexpr detail::enable_if_t< is_composite< View >::value, Visitor && > | sbepp::visit_children (View view, Visitor &&visitor={}) |
| | Visits composite children using provided cursor.
|
| |
| template<typename Visitor, typename View, typename Cursor> |
| constexpr detail::enable_if_t< is_composite< View >::value, Visitor && > | sbepp::visit_children (View view, Cursor &c, Visitor &&visitor={}) |
| | Visits composite children using provided cursor.
|
| |
| template<typename E, typename = detail::enable_if_t<is_enum<E>::value>> |
| constexpr const char * | sbepp::enum_to_string (const E e) noexcept |
| | Converts enum to string.
|
| |
| template<typename Set, typename Visitor> |
| constexpr auto | sbepp::visit_set (const Set s, Visitor &&visitor) noexcept -> decltype(s(detail::visit_set_tag{}, std::forward< Visitor >(visitor))) |
| | Visits set choices in order of their declaration.
|
| |
| template<typename Tag, typename ViewOrSet> |
| constexpr auto | sbepp::get_by_tag (ViewOrSet viewOrSet) noexcept -> decltype(viewOrSet(detail::access_by_tag_tag{}, Tag{})) |
| | Gets field or set choice value by tag.
|
| |
| template<typename Tag, typename View, typename Cursor> |
| constexpr auto | sbepp::get_by_tag (View view, Cursor &&c) noexcept -> decltype(view(detail::access_by_tag_tag{}, Tag{}, std::forward< Cursor >(c))) |
| | Gets field value by tag using given cursor.
|
| |
| template<typename Tag, typename ViewOrSet, typename Value> |
| constexpr auto | sbepp::set_by_tag (ViewOrSet &&viewOrSet, Value &&value) noexcept -> decltype(std::forward< ViewOrSet >(viewOrSet)(detail::access_by_tag_tag{}, Tag{}, std::forward< Value >(value))) |
| | Sets field or set choice value by tag.
|
| |
| template<typename Tag, typename View, typename Value, typename Cursor> |
| constexpr auto | sbepp::set_by_tag (View view, Value &&value, Cursor &&c) -> decltype(view(detail::access_by_tag_tag{}, Tag{}, std::forward< Value >(value), std::forward< Cursor >(c))) |
| | Sets field value by tag using given cursor.
|
| |
| template<typename View> |
| constexpr size_bytes_checked_result | sbepp::size_bytes_checked (View view, std::size_t size) noexcept |
| | Calculates view size with additional safety checks.
|
| |
Contains various utilities and implementation details which are required for generated schema headers.