Thrill  0.1
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
BitStreamWriter< BlockWriter > Class Template Reference

Detailed Description

template<typename BlockWriter>
class thrill::core::BitStreamWriter< BlockWriter >

Definition at line 27 of file bit_stream.hpp.

+ Inheritance diagram for BitStreamWriter< BlockWriter >:

#include <bit_stream.hpp>

Public Member Functions

 BitStreamWriter (BlockWriter &block_writer)
 
 BitStreamWriter (const BitStreamWriter &)=delete
 non-copyable: delete copy-constructor More...
 
 BitStreamWriter (BitStreamWriter &&)=default
 move-constructor: default More...
 
 ~BitStreamWriter ()
 
void FlushBits ()
 Flush out buffered bits. More...
 
BitStreamWriteroperator= (const BitStreamWriter &)=delete
 non-copyable: delete assignment operator More...
 
BitStreamWriteroperator= (BitStreamWriter &&)=default
 move-assignment operator: default More...
 
void PutBits (const size_t &value, unsigned bits)
 Append k bits to the data array. More...
 

Protected Types

enum  : size_t { buffer_bits_ = sizeof(size_t) * 8 }
 number of bits in buffer_ More...
 
enum  : size_t { mask = buffer_bits_ - 1 }
 modulo mask of number of bits in buffer for pos_ counter More...
 

Protected Attributes

BlockWriter & block_writer_
 Output BlockWriter. More...
 
size_t buffer_ = 0
 current buffer of 32/64 bits More...
 
size_t pos_ = 0
 currently filled number of bits More...
 

Member Enumeration Documentation

anonymous enum : size_t
protected

number of bits in buffer_

Enumerator
buffer_bits_ 

Definition at line 31 of file bit_stream.hpp.

anonymous enum : size_t
protected

modulo mask of number of bits in buffer for pos_ counter

Enumerator
mask 

Definition at line 34 of file bit_stream.hpp.

Constructor & Destructor Documentation

BitStreamWriter ( BlockWriter &  block_writer)
inlineexplicit

Definition at line 37 of file bit_stream.hpp.

References die_unless.

BitStreamWriter ( const BitStreamWriter< BlockWriter > &  )
delete

non-copyable: delete copy-constructor

BitStreamWriter ( BitStreamWriter< BlockWriter > &&  )
default

move-constructor: default

~BitStreamWriter ( )
inline

Definition at line 51 of file bit_stream.hpp.

References BitStreamWriter< BlockWriter >::FlushBits().

Member Function Documentation

BitStreamWriter& operator= ( const BitStreamWriter< BlockWriter > &  )
delete

non-copyable: delete assignment operator

BitStreamWriter& operator= ( BitStreamWriter< BlockWriter > &&  )
default

move-assignment operator: default

void PutBits ( const size_t &  value,
unsigned  bits 
)
inline

Member Data Documentation

BlockWriter& block_writer_
protected

The documentation for this class was generated from the following file: