mitteLib
|
Namespaces | |
namespace | impl |
namespace | traits |
Classes | |
class | any_of |
class | bin_data |
class | bin_stream |
struct | bit_ref |
struct | encode_length |
struct | explicit_bool |
struct | fixed_size_string |
struct | length_encoded_t |
struct | lsb_t |
class | mem_counter |
class | mem_stats |
struct | msb_t |
struct | null_terminated_tag |
class | observable |
class | observable_cref |
class | observable_ref |
class | observe |
struct | ordered_extractor |
struct | ordered_injector |
struct | prealloc |
struct | range |
class | reduce_timeout |
class | result |
class | result< E > |
class | result< E, T > |
class | result< E, Ts... > |
class | result< E, void > |
struct | result_impl |
struct | result_success_type |
struct | tagged_array |
class | timer |
struct | tracker_allocator |
Concepts | |
concept | is_range_enumerable |
concept | is_injectable |
concept | is_extractable |
concept | is_signed_or_unsigned_v |
concept | is_byte_enum |
concept | is_byte_enumerable |
concept | is_byte_enum_enumerable |
concept | is_byte_sequence |
concept | container_of_injectables |
concept | container_of_extractables |
concept | is_result |
Typedefs | |
using | bin_data_base = std::conditional_t<track_bin_data_mem, std::vector<std::uint8_t, tracker_allocator<std::uint8_t>>, std::vector<std::uint8_t>> |
template<class T > | |
using | underlying_t = std::conditional_t<std::is_enum_v<T>, std::underlying_type_t<T>, T> |
template<class T > | |
using | range_value_t = std::decay_t<decltype(*std::begin(std::declval<T>()))> |
template<unsigned Bits> | |
using | uint_least_t = decltype(impl::get_uint_least<Bits>()) |
template<unsigned Bits> | |
using | uint_exact_t = decltype(impl::get_uint_exact<Bits>()) |
template<class... Ts> | |
using | tuple_container_t = impl::tuple_container_type<Ts...>::type |
using | datetime = std::chrono::time_point<std::chrono::system_clock> |
using | ms = std::chrono::milliseconds |
Enumerations | |
enum struct | stream_ref { beg , pos , end } |
enum struct | byte_order { msb_first , lsb_first } |
enum struct | result_content { error , data } |
Functions | |
std::uint32_t | log_timestamp () |
std::string | concatenate_s (std::vector< std::string > const &strs, std::string_view separator) |
std::string | concatenate (std::vector< std::string_view > const &strs, std::string_view separator) |
range< std::uint8_t const * > | data_view_from_string (std::string_view s) |
bin_data | data_from_string (std::string_view s) |
bin_data | data_from_hex_string (std::string_view s) |
std::string | data_to_string (std::vector< std::uint8_t > const &v) |
std::string | data_to_string (range< bin_data::const_iterator > rg) |
std::string | data_to_string (range< std::uint8_t const * > rg) |
std::string | data_to_string (bin_data const &bd) |
std::string | data_to_hex_string (std::vector< std::uint8_t > const &v) |
std::string | data_to_hex_string (range< bin_data::const_iterator > rg) |
std::string | data_to_hex_string (range< std::uint8_t const * > rg) |
std::string | replace_all (std::string_view text, std::string_view search, std::string_view replace) |
std::optional< datetime > | strptime (std::string_view s, std::string_view fmt) |
std::string | strftime (datetime const &dt, std::string_view fmt) |
bin_data & | operator<< (encode_length< bin_data > w, std::string_view sv) |
bin_stream & | operator>> (encode_length< bin_stream > w, std::string &c) |
template<class Iterator > | |
constexpr range< Iterator > | make_range (Iterator begin, Iterator end) |
template<class Container > | |
constexpr auto | make_range (Container &c) |
bin_data & | operator<< (bin_data &bd, prealloc const &pa) |
template<is_signed_or_unsigned_v Num, unsigned BitSize, byte_order Order> | |
bin_stream & | operator>> (ordered_extractor< BitSize, Order > e, Num &n) |
template<is_signed_or_unsigned_v Num, unsigned BitSize, byte_order Order> | |
bin_data & | operator<< (ordered_injector< BitSize, Order > i, Num n) |
template<unsigned BitSize> | |
ordered_extractor< BitSize, byte_order::lsb_first > | operator>> (bin_stream &s, lsb_t< BitSize >) |
template<unsigned BitSize> | |
ordered_extractor< BitSize, byte_order::msb_first > | operator>> (bin_stream &s, msb_t< BitSize >) |
template<unsigned BitSize> | |
ordered_injector< BitSize, byte_order::lsb_first > | operator<< (bin_data &bd, lsb_t< BitSize >) |
template<unsigned BitSize> | |
ordered_injector< BitSize, byte_order::msb_first > | operator<< (bin_data &bd, msb_t< BitSize >) |
bin_data & | operator<< (bin_data &bd, explicit_bool b) |
bin_stream & | operator>> (bin_stream &s, bool &b) |
bin_stream & | operator>> (bin_stream &s, std::uint8_t &byte) |
template<std::size_t Length> | |
bin_stream & | operator>> (bin_stream &s, std::array< std::uint8_t, Length > &out) |
template<is_byte_enum Enum> | |
bin_stream & | operator>> (bin_stream &s, Enum &t) |
template<is_byte_sequence T> | |
bin_data & | operator<< (bin_data &bd, T const &t) |
encode_length< bin_stream > | operator>> (bin_stream &s, length_encoded_t) |
encode_length< bin_data > | operator<< (bin_data &bd, length_encoded_t) |
template<container_of_injectables Container> | |
bin_data & | operator<< (encode_length< bin_data > w, Container const &c) |
template<container_of_extractables Container> | |
bin_stream & | operator>> (encode_length< bin_stream > w, Container &c) |
template<byte_order Order, unsigned Bits, class Num > | |
std::array< std::uint8_t, Bits/8 > | encode (Num n) |
template<byte_order Order, unsigned Bits, class Num > | |
Num | decode (std::array< std::uint8_t, Bits/8 > const &b) |
template<class Num , std::size_t NBytes> | |
constexpr Num | lsb_unsigned_decode (std::array< std::uint8_t, NBytes > b) |
template<class Num , std::size_t NBytes, std::size_t I = NBytes - 1> | |
constexpr Num | msb_unsigned_decode (std::array< std::uint8_t, NBytes > b) |
template<class Num , std::size_t NBytes> | |
constexpr std::array< std::uint8_t, NBytes > | lsb_unsigned_encode (Num n) |
template<class Num , std::size_t NBytes> | |
constexpr std::array< std::uint8_t, NBytes > | msb_unsigned_encode (Num n) |
template<class Num , std::size_t NBytes> | |
constexpr Num | msb_unsigned_decode (std::array< std::uint8_t, NBytes > b) |
template<class N > | |
constexpr N | next_multiple (N n, N d) |
template<class N > | |
constexpr std::pair< N, N > | log2_remainder (N n) |
template<is_result R1, is_result... Rs> | |
decltype(auto) | concat_result (R1 &&r1, Rs &&...rs) |
Concatenates as many results as provided. The returned object will contain all result::value_type of the provided results, in the given order. If any of the results provided has an error state, the error is returned. It is only returned the first found error in the order in which the results are provided. | |
template<class T , is_result R> | |
decltype(auto) | get (R &&r) |
template<is_result R> | |
auto | result_to_tuple (R &&r) |
template<class E , class Tuple > | |
auto | result_from_tuple (Tuple &&tpl) |
template<std::size_t N> | |
std::string | data_to_string (std::array< std::uint8_t, N > const &v) |
template<std::size_t N> | |
std::string | data_to_hex_string (std::array< std::uint8_t, N > const &v) |
template<class It > | |
std::string | data_to_hex_string (It begin, It end) |
template<class T , class U > | |
bool | operator== (tracker_allocator< T > const &, tracker_allocator< U > const &) noexcept |
template<class T , class U > | |
bool | operator!= (tracker_allocator< T > const &x, tracker_allocator< U > const &y) noexcept |
template<class T , std::size_t BufSize = 256> | |
constexpr auto | type_name () |
Variables | |
static const auto | _time_at_start = std::chrono::steady_clock::now() |
static constexpr bool | track_bin_data_mem = false |
static constexpr lsb_t< 16 > | lsb16 {} |
static constexpr lsb_t< 24 > | lsb24 {} |
static constexpr lsb_t< 32 > | lsb32 {} |
static constexpr lsb_t< 64 > | lsb64 {} |
static constexpr msb_t< 16 > | msb16 {} |
static constexpr msb_t< 24 > | msb24 {} |
static constexpr msb_t< 32 > | msb32 {} |
static constexpr msb_t< 64 > | msb64 {} |
static constexpr lsb_t< 0 > | lsb_auto {} |
static constexpr msb_t< 0 > | msb_auto {} |
struct mlab::length_encoded_t | length_encoded |
static constexpr result_success_type | result_success {} |
struct mlab::null_terminated_tag | null_terminated |
using mlab::bin_data_base = std::conditional_t<track_bin_data_mem, std::vector<std::uint8_t, tracker_allocator<std::uint8_t>>, std::vector<std::uint8_t>> |
using mlab::datetime = std::chrono::time_point<std::chrono::system_clock> |
using mlab::ms = std::chrono::milliseconds |
using mlab::range_value_t = std::decay_t<decltype(*std::begin(std::declval<T>()))> |
using mlab::tuple_container_t = impl::tuple_container_type<Ts...>::type |
using mlab::uint_exact_t = decltype(impl::get_uint_exact<Bits>()) |
using mlab::uint_least_t = decltype(impl::get_uint_least<Bits>()) |
using mlab::underlying_t = std::conditional_t<std::is_enum_v<T>, std::underlying_type_t<T>, T> |
|
strong |
|
strong |
|
strong |
|
nodiscard |
Concatenates as many results as provided. The returned object will contain all result::value_type of the provided results, in the given order. If any of the results provided has an error state, the error is returned. It is only returned the first found error in the order in which the results are provided.
Rs | A sequence of result types, which all must share the same result::error_type. |
rs | A sequence of result types. |
|
nodiscard |
|
nodiscard |
|
nodiscard |
|
nodiscard |
|
nodiscard |
|
nodiscard |
|
nodiscard |
|
nodiscard |
|
nodiscard |
std::string mlab::data_to_string | ( | bin_data const & | bd | ) |
|
nodiscard |
|
nodiscard |
|
nodiscard |
|
nodiscard |
|
nodiscard |
Num mlab::decode | ( | std::array< std::uint8_t, Bits/8 > const & | b | ) |
std::array< std::uint8_t, Bits/8 > mlab::encode | ( | Num | n | ) |
|
nodiscard |
|
nodiscardconstexpr |
|
nodiscard |
|
inlineconstexpr |
|
inlineconstexpr |
|
constexpr |
|
nodiscardconstexpr |
|
noexcept |
|
inline |
|
inline |
ordered_injector< BitSize, byte_order::lsb_first > mlab::operator<< | ( | bin_data & | bd, |
lsb_t< BitSize > | ) |
ordered_injector< BitSize, byte_order::msb_first > mlab::operator<< | ( | bin_data & | bd, |
msb_t< BitSize > | ) |
bin_data & mlab::operator<< | ( | encode_length< bin_data > | w, |
Container const & | c ) |
bin_data & mlab::operator<< | ( | encode_length< bin_data > | w, |
std::string_view | sv ) |
bin_data & mlab::operator<< | ( | ordered_injector< BitSize, Order > | i, |
Num | n ) |
|
noexcept |
|
inline |
bin_stream & mlab::operator>> | ( | bin_stream & | s, |
Enum & | t ) |
|
inline |
|
inline |
|
inline |
bin_stream & mlab::operator>> | ( | bin_stream & | s, |
std::array< std::uint8_t, Length > & | out ) |
|
inline |
bin_stream & mlab::operator>> | ( | encode_length< bin_stream > | w, |
Container & | c ) |
bin_stream & mlab::operator>> | ( | encode_length< bin_stream > | w, |
std::string & | c ) |
bin_stream & mlab::operator>> | ( | ordered_extractor< BitSize, Order > | e, |
Num & | n ) |
|
nodiscard |
|
nodiscard |
|
nodiscard |
|
nodiscard |
Formats C++ dates using C's strftime.
|
nodiscard |
Parse C++ dates using C's strptime.
|
nodiscardconstexpr |
|
static |
struct mlab::length_encoded_t mlab::length_encoded |
|
staticconstexpr |
|
staticconstexpr |
|
staticconstexpr |
|
staticconstexpr |
|
staticconstexpr |
|
staticconstexpr |
|
staticconstexpr |
|
staticconstexpr |
|
staticconstexpr |
|
staticconstexpr |
struct mlab::null_terminated_tag mlab::null_terminated |
|
staticconstexpr |
|
staticconstexpr |