#include <bit/bstream.h>
It also provides endian management.
Public Types | |
enum | State { WHOLE, BITS, OCTETS } |
typedef enum bit::bstream::State | State |
Public Member Functions | |
bstream () | |
virtual | ~bstream () |
bool | is_host_big_endian () |
bool | is_host_little_endian () |
void | host_big_endian (bool b=true) |
void | host_little_endian (bool b=true) |
Protected Attributes | |
bool | m_host_big_endian |
unsigned char | m_leftoverbits |
size_t | m_numleftoverbits |
State | m_state |
size_t | m_stateval |
Static Protected Attributes | |
static const int | m_masks [8] = {0x00, 0x01, 0x03, 0x07, 0x0F, 0x1F, 0x3F, 0x7F} |
typedef enum bit::bstream::State bit::bstream::State |
enum bit::bstream::State |
bstream::bstream | ( | ) |
References m_host_big_endian.
bstream::~bstream | ( | ) | [virtual] |
bool bit::bstream::is_host_big_endian | ( | ) | [inline] |
References m_host_big_endian.
bool bit::bstream::is_host_little_endian | ( | ) | [inline] |
References m_host_big_endian.
void bit::bstream::host_big_endian | ( | bool | b = true |
) | [inline] |
References m_host_big_endian.
void bit::bstream::host_little_endian | ( | bool | b = true |
) | [inline] |
References m_host_big_endian.
bool bit::bstream::m_host_big_endian [protected] |
Referenced by bstream(), host_big_endian(), host_little_endian(), is_host_big_endian(), and is_host_little_endian().
unsigned char bit::bstream::m_leftoverbits [protected] |
size_t bit::bstream::m_numleftoverbits [protected] |
const int bstream::m_masks = {0x00, 0x01, 0x03, 0x07, 0x0F, 0x1F, 0x3F, 0x7F} [static, protected] |
State bit::bstream::m_state [protected] |
Referenced by bit::operator<<(), and bit::operator>>().
size_t bit::bstream::m_stateval [protected] |
Referenced by bit::operator<<(), and bit::operator>>().