Thrill  0.1
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

anonymous enum : size_t
protected

number of bits in buffer_

Enumerator
buffer_bits_ 

Definition at line 31 of file bit_stream.hpp.

◆ anonymous enum

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() [1/3]

BitStreamWriter ( BlockWriter &  block_writer)
inlineexplicit

Definition at line 37 of file bit_stream.hpp.

References die_unless, and BitStreamWriter< BlockWriter >::operator=().

◆ BitStreamWriter() [2/3]

BitStreamWriter ( const BitStreamWriter< BlockWriter > &  )
delete

non-copyable: delete copy-constructor

◆ BitStreamWriter() [3/3]

BitStreamWriter ( BitStreamWriter< BlockWriter > &&  )
default

move-constructor: default

◆ ~BitStreamWriter()

~BitStreamWriter ( )
inline

Definition at line 51 of file bit_stream.hpp.

References BitStreamWriter< BlockWriter >::FlushBits().

Member Function Documentation

◆ FlushBits()

◆ operator=() [1/2]

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

◆ operator=() [2/2]

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

move-assignment operator: default

◆ PutBits()

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

Member Data Documentation

◆ block_writer_

BlockWriter& block_writer_
protected

◆ buffer_

◆ pos_


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