mitteLib
Loading...
Searching...
No Matches
bin_data.hpp File Reference
#include <algorithm>
#include <array>
#include <cstdint>
#include <limits>
#include <mlab/byte_order.hpp>
#include <mlab/log.hpp>
#include <mlab/tracker_allocator.hpp>
#include <type_traits>
#include <vector>
Include dependency graph for bin_data.hpp:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Classes

struct  mlab::range< Iterator >
 
struct  mlab::tagged_array< class, Size >
 
struct  mlab::explicit_bool
 
struct  mlab::bit_ref
 
struct  mlab::prealloc
 
class  mlab::bin_data
 
class  mlab::bin_stream
 
struct  mlab::lsb_t< Bits >
 
struct  mlab::msb_t< Bits >
 
struct  mlab::ordered_injector< BitSize, Order >
 
struct  mlab::ordered_extractor< BitSize, Order >
 
struct  mlab::length_encoded_t
 
struct  mlab::encode_length< T >
 

Namespaces

namespace  mlab_literals
 
namespace  mlab
 

Concepts

concept  mlab::is_range_enumerable
 
concept  mlab::is_injectable
 
concept  mlab::is_extractable
 
concept  mlab::is_signed_or_unsigned_v
 
concept  mlab::is_byte_enum
 
concept  mlab::is_byte_enumerable
 
concept  mlab::is_byte_enum_enumerable
 
concept  mlab::is_byte_sequence
 
concept  mlab::container_of_injectables
 
concept  mlab::container_of_extractables
 

Typedefs

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>>
 
template<class T >
using mlab::underlying_t = std::conditional_t<std::is_enum_v<T>, std::underlying_type_t<T>, T>
 
template<class T >
using mlab::range_value_t = std::decay_t<decltype(*std::begin(std::declval<T>()))>
 

Enumerations

enum struct  mlab::stream_ref { mlab::beg , mlab::pos , mlab::end }
 

Functions

constexpr std::uint8_t mlab_literals::operator""_b (unsigned long long int n)
 
template<class Iterator >
constexpr range< Iterator > mlab::make_range (Iterator begin, Iterator end)
 
template<class Container >
constexpr auto mlab::make_range (Container &c)
 
bin_datamlab::operator<< (bin_data &bd, prealloc const &pa)
 
template<is_signed_or_unsigned_v Num, unsigned BitSize, byte_order Order>
bin_streammlab::operator>> (ordered_extractor< BitSize, Order > e, Num &n)
 
template<is_signed_or_unsigned_v Num, unsigned BitSize, byte_order Order>
bin_datamlab::operator<< (ordered_injector< BitSize, Order > i, Num n)
 
template<unsigned BitSize>
ordered_extractor< BitSize, byte_order::lsb_firstmlab::operator>> (bin_stream &s, lsb_t< BitSize >)
 
template<unsigned BitSize>
ordered_extractor< BitSize, byte_order::msb_firstmlab::operator>> (bin_stream &s, msb_t< BitSize >)
 
template<unsigned BitSize>
ordered_injector< BitSize, byte_order::lsb_firstmlab::operator<< (bin_data &bd, lsb_t< BitSize >)
 
template<unsigned BitSize>
ordered_injector< BitSize, byte_order::msb_firstmlab::operator<< (bin_data &bd, msb_t< BitSize >)
 
bin_datamlab::operator<< (bin_data &bd, explicit_bool b)
 
bin_streammlab::operator>> (bin_stream &s, bool &b)
 
bin_streammlab::operator>> (bin_stream &s, std::uint8_t &byte)
 
template<std::size_t Length>
bin_streammlab::operator>> (bin_stream &s, std::array< std::uint8_t, Length > &out)
 
template<is_byte_enum Enum>
bin_streammlab::operator>> (bin_stream &s, Enum &t)
 
template<is_byte_sequence T>
bin_datamlab::operator<< (bin_data &bd, T const &t)
 
encode_length< bin_streammlab::operator>> (bin_stream &s, length_encoded_t)
 
encode_length< bin_datamlab::operator<< (bin_data &bd, length_encoded_t)
 
template<container_of_injectables Container>
bin_datamlab::operator<< (encode_length< bin_data > w, Container const &c)
 
template<container_of_extractables Container>
bin_streammlab::operator>> (encode_length< bin_stream > w, Container &c)
 

Variables

static constexpr bool mlab::track_bin_data_mem = false
 
static constexpr lsb_t< 16 > mlab::lsb16 {}
 
static constexpr lsb_t< 24 > mlab::lsb24 {}
 
static constexpr lsb_t< 32 > mlab::lsb32 {}
 
static constexpr lsb_t< 64 > mlab::lsb64 {}
 
static constexpr msb_t< 16 > mlab::msb16 {}
 
static constexpr msb_t< 24 > mlab::msb24 {}
 
static constexpr msb_t< 32 > mlab::msb32 {}
 
static constexpr msb_t< 64 > mlab::msb64 {}
 
static constexpr lsb_t< 0 > mlab::lsb_auto {}
 
static constexpr msb_t< 0 > mlab::msb_auto {}
 
struct mlab::length_encoded_t mlab::length_encoded