RC5 Demo
|
#include <bitbuffer.h>
Public Member Functions | |
BitBuffer (void) | |
void | clear (void) |
bool | add (Bit bit) |
bool | isFull (void) const |
bool | isEmpty (void) const |
BASETYPE | get (void) const |
Private Attributes | |
BASETYPE | m_buffer |
Internal buffer to hold bits. More... | |
uint8_t | m_numBits |
Current number of bits in buffer. More... | |
Template class to store a series of bits.
BASETYPE | Integer base type to use as internal buffer |
MAXBITS | Maximum number of bits to store |
|
inline |
|
inline |
Adds a bit to the least significant position, shifting existing bits to the left.
[in] | bit | Bit to add |
|
inline |
Clears the internal buffer.
|
inline |
Gets the content of the internal buffer.
|
inline |
Returns true if buffer is empty.
|
inline |
Returns true if buffer is full.
|
private |
Internal buffer to hold bits.
|
private |
Current number of bits in buffer.