Infinite precision unsigned arithmetic class Storage within object will be used whenever possible. More...
#include <cuint.h>
Public Member Functions | |
CUInt (void) | |
Create a unsigned integer object. | |
CUInt (unsigned int aValue) | |
Create a unsigned integer object initialize with value. | |
CUInt (const CUInt &aValue) | |
Create a copy of unsigned integer object. | |
virtual | ~CUInt () |
Destory object and free any storage. | |
void | SetHeap (CObstack *aHeap) |
Set heap to be used for storage allocation. | |
void | Truncate (int newSize) |
Change size of unsigned integer. | |
UINT32 | Size () |
Calculate the number of non-zero significant bits. | |
Assignment operators | |
const CUInt & | operator= (const CUInt &aValue) |
const UINT64 | operator= (const UINT64 aValue) |
Unary operators | |
CUInt | operator~ (void) const |
Binary operators | |
CUInt | operator+ (const CUInt &) const |
CUInt | operator+ (const unsigned int) const |
CUInt | operator- (const CUInt &) const |
CUInt | operator- (unsigned int) const |
CUInt | operator* (const CUInt &) const |
CUInt | operator* (unsigned int) const |
CUInt | operator/ (const CUInt &) const |
CUInt | operator/ (unsigned int) const |
CUInt | operator% (const CUInt &) const |
CUInt | operator% (unsigned int) const |
CUInt | operator>> (const CUInt &) const |
CUInt | operator>> (unsigned int) const |
CUInt | operator<< (const CUInt &) const |
CUInt | operator<< (unsigned int) const |
CUInt | operator& (const CUInt &) const |
CUInt | operator& (unsigned int) const |
CUInt | operator| (const CUInt &) const |
CUInt | operator| (unsigned int) const |
CUInt | operator^ (const CUInt &) const |
CUInt | operator^ (unsigned int) const |
Comparision operators | |
int | operator< (const CUInt &) const |
int | operator< (unsigned int) const |
int | operator<= (const CUInt &) const |
int | operator<= (unsigned int) const |
int | operator> (const CUInt &) const |
int | operator> (unsigned int) const |
int | operator>= (const CUInt &) const |
int | operator>= (unsigned int) const |
int | operator== (const CUInt &) const |
int | operator== (unsigned int) const |
int | operator!= (const CUInt &) const |
int | operator!= (unsigned int) const |
Cast operations | |
UINT32 | GetUINT32 () const |
UINT64 | GetUINT64 () const |
Infinite precision unsigned arithmetic class Storage within object will be used whenever possible.
CUInt::CUInt | ( | void | ) | [inline] |
Create a unsigned integer object.
CUInt::CUInt | ( | unsigned int | aValue | ) | [inline] |
Create a unsigned integer object initialize with value.
aValue | initial value. |
CUInt::CUInt | ( | const CUInt & | aValue | ) | [inline] |
Create a copy of unsigned integer object.
aValue | reference to object to be copied. |
virtual CUInt::~CUInt | ( | ) | [inline, virtual] |
Destory object and free any storage.
UINT32 CUInt::GetUINT32 | ( | ) | const |
UINT64 CUInt::GetUINT64 | ( | ) | const |
int CUInt::operator!= | ( | const CUInt & | ) | const |
int CUInt::operator!= | ( | unsigned | int | ) | const |
CUInt CUInt::operator% | ( | unsigned | int | ) | const |
CUInt CUInt::operator& | ( | unsigned | int | ) | const |
CUInt CUInt::operator* | ( | unsigned | int | ) | const |
CUInt CUInt::operator+ | ( | const unsigned | int | ) | const |
CUInt CUInt::operator- | ( | unsigned | int | ) | const |
CUInt CUInt::operator/ | ( | unsigned | int | ) | const |
int CUInt::operator< | ( | unsigned | int | ) | const |
int CUInt::operator< | ( | const CUInt & | ) | const |
CUInt CUInt::operator<< | ( | unsigned | int | ) | const |
int CUInt::operator<= | ( | const CUInt & | ) | const |
int CUInt::operator<= | ( | unsigned | int | ) | const |
int CUInt::operator== | ( | const CUInt & | ) | const |
int CUInt::operator== | ( | unsigned | int | ) | const |
int CUInt::operator> | ( | unsigned | int | ) | const |
int CUInt::operator> | ( | const CUInt & | ) | const |
int CUInt::operator>= | ( | unsigned | int | ) | const |
int CUInt::operator>= | ( | const CUInt & | ) | const |
CUInt CUInt::operator>> | ( | unsigned | int | ) | const |
CUInt CUInt::operator^ | ( | unsigned | int | ) | const |
CUInt CUInt::operator| | ( | unsigned | int | ) | const |
CUInt CUInt::operator~ | ( | void | ) | const |
void CUInt::SetHeap | ( | CObstack * | aHeap | ) | [inline] |
Set heap to be used for storage allocation.
aHeap | obstack to be used for storage. |
UINT32 CUInt::Size | ( | ) |
Calculate the number of non-zero significant bits.
void CUInt::Truncate | ( | int | newSize | ) | [inline] |
Change size of unsigned integer.
Reduction in size truncates integer. Increase in size allocate space for max value.
newSize | new size if integer in bits. |