BitStream
bitstream Namespace Reference

Namespaces

 utility
 

Classes

class  bounded_range
 Class for quantizing single-precision floats into a range and precision. More...
 
class  half_precision
 Class for quantizing single-precision floats into half-precision. More...
 
struct  quantized_quaternion
 A quantized representation of a quaternion. More...
 
class  smallest_three
 Class for quantizing a user-specified quaternion into fewer bits using the smallest-three algorithm. More...
 
class  bit_measure
 A stream for writing objects tightly into a buffer. More...
 
class  bit_reader
 A stream for reading objects from a tightly packed buffer. More...
 
class  bit_writer
 A stream for writing objects tightly into a buffer. More...
 
struct  byte_buffer
 A byte buffer aligned to 4 bytes. Can be used with bit_reader and bit_writer. More...
 
struct  serialize_traits
 A class for specializing trait serialization functions. More...
 
struct  fixed_policy
 
struct  growing_policy
 
struct  array_subset
 Wrapper type for subsets of arrays. More...
 
struct  serialize_traits< array_subset< T, Trait > >
 A trait used for serializing a subset of an array of objects. More...
 
struct  serialize_traits< bool >
 A trait used to serialize a boolean as a single bit. More...
 
struct  serialize_traits< bool[Size]>
 A trait used to serialize multiple boolean values. More...
 
struct  bounded_enum
 Wrapper type for compiletime known integer bounds. More...
 
struct  serialize_traits< T, typename std::enable_if_t< std::is_enum_v< T > > >
 A trait used to serialize an enum type with runtime bounds. More...
 
struct  serialize_traits< bounded_enum< T, Min, Max >, typename std::enable_if_t< std::is_enum_v< T > > >
 A trait used to serialize an enum type with compiletime bounds. More...
 
struct  serialize_traits< float >
 A trait used to serialize a float as-is, without any bound checking or quantization. More...
 
struct  serialize_traits< double >
 A trait used to serialize a double as-is, without any bound checking or quantization. More...
 
struct  bounded_int
 Wrapper type for compiletime known integer bounds. More...
 
struct  serialize_traits< T, typename std::enable_if_t< std::is_integral_v< T > &&!std::is_const_v< T > > >
 A trait used to serialize integer values with runtime bounds. More...
 
struct  serialize_traits< bounded_int< T, Min, Max >, typename std::enable_if_t< std::is_integral_v< T > &&!std::is_const_v< T > > >
 A trait used to serialize integer values with compiletime bounds. More...
 
struct  serialize_traits< half_precision >
 A trait used to serialize a single-precision float as half-precision. More...
 
struct  serialize_traits< bounded_range >
 A trait used to quantize and serialize a float to be within a given range and precision. More...
 
struct  serialize_traits< smallest_three< Q, BitsPerElement > >
 A trait used to quantize and serialize quaternions using the smallest-three algorithm. More...
 
struct  bounded_string
 Wrapper type for compiletime known string max_size. More...
 
struct  serialize_traits< const char * >
 A trait used to serialize bounded c-style strings. More...
 
struct  serialize_traits< bounded_string< const char *, MaxSize > >
 A trait used to serialize bounded c-style strings with compiletime bounds. More...
 
struct  serialize_traits< std::basic_string< T, Traits, Alloc > >
 A trait used to serialize any combination of std::basic_string. More...
 
struct  serialize_traits< bounded_string< std::basic_string< T, Traits, Alloc >, MaxSize > >
 A trait used to serialize any combination of std::basic_string with compiletime bounds. More...
 
class  out
 
class  finally
 Test type. More...
 

Typedefs

using fixed_bit_reader = bit_reader< fixed_policy >
 
using fixed_bit_writer = bit_writer< fixed_policy >
 
template<typename T >
using growing_bit_writer = bit_writer< growing_policy< T > >
 
template<typename T >
using in = std::conditional_t<(sizeof(T)<=16 &&std::is_trivially_copy_constructible_v< T >), std::add_const_t< T >, std::add_lvalue_reference_t< std::add_const_t< T > >>
 Passes by const or const reference depending on size. More...
 
template<typename Stream , typename T >
using inout = std::conditional_t< Stream::writing, in< T >, std::add_lvalue_reference_t< T > >
 Passes by reference. More...
 

Functions

template<typename Lambda >
 finally (Lambda func) -> final ly< Lambda >
 

Typedef Documentation

◆ fixed_bit_reader

◆ fixed_bit_writer

◆ growing_bit_writer

template<typename T >
using bitstream::growing_bit_writer = typedef bit_writer<growing_policy<T> >

◆ in

template<typename T >
using bitstream::in = typedef std::conditional_t<(sizeof(T) <= 16 && std::is_trivially_copy_constructible_v<T>), std::add_const_t<T>, std::add_lvalue_reference_t<std::add_const_t<T> >>

Passes by const or const reference depending on size.

◆ inout

template<typename Stream , typename T >
using bitstream::inout = typedef std::conditional_t<Stream::writing, in<T>, std::add_lvalue_reference_t<T> >

Passes by reference.

Function Documentation

◆ finally()

template<typename Lambda >
bitstream::finally ( Lambda  func) ->
final