#include <TBits.h>
Public Member Functions | |
| TBits () | |
| Construct zero-initialized. | |
| TBits (unsigned char *bpInit, int cb) | |
| Byte-string initialized. | |
| void * | GetLeft (const int n) |
| Get the n left-most bits (most significant). | |
| void * | GetRight (const int n) |
| Get the n right-most bits (least significant). | |
| TBits & | operator+= (const TBits &rhs) |
| Do long addition of two bit blocks. | |
| TBits & | operator^= (const TBits &rhs) |
| Do long xor of two bit blocks. | |
| TBits & | operator= (const TBits &rhs) |
| Assign one to another. | |
Private Attributes | |
| unsigned char | m_Bits [iBits/8] |
| The bits. Yes, I know a char needn't be 8 bits. | |
Encapsulate common properities of hashes, mostly just for notational convenience.
Definition at line 42 of file TBits.h.
|
|||||||||
|
Construct zero-initialized. Zero-initialize the Bit buffer |
|
||||||||||||||||
|
Byte-string initialized. If shorter, pad on the right, i.e. with the Least Signifcant Bytes (sic!)
|
|
||||||||||
|
Get the n left-most bits (most significant). Get the left-most n bits. This is actually sort of a dummy function, as we return a pointer, and the left-most always start at the beginning of the byte buffer where the bits are.
Definition at line 67 of file TBits.cpp. References AxPipe::Stock::TBits< iBits >::m_Bits. |
|
||||||||||
|
Get the n right-most bits (least significant). Get the right-most n bits. Assume that this is a multiple by 8 value, otherwise the function fails silently.
Definition at line 75 of file TBits.cpp. References AxPipe::Stock::TBits< iBits >::m_Bits. |
|
||||||||||
|
Do long addition of two bit blocks. Arbitrary precision add, endian independent, inefficient... Note that the byte arrays is presumed to be stored big-endian!
Definition at line 84 of file TBits.cpp. References AxPipe::Stock::TBits< iBits >::m_Bits. |
|
||||||||||
|
Assign one to another. Copy-Assign
Definition at line 110 of file TBits.cpp. References AxPipe::Stock::TBits< iBits >::m_Bits. |
|
||||||||||
|
Do long xor of two bit blocks. Arbitrary precision XOR, inefficient. Don't use if you're in a hurry.
Definition at line 96 of file TBits.cpp. References AxPipe::Stock::TBits< iBits >::m_Bits. |
1.3.5