vrq
Public Member Functions | List of all members
CUInt Class Reference

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. More...
 
 CUInt (unsigned int aValue)
 Create a unsigned integer object initialize with value. More...
 
 CUInt (const CUInt &aValue)
 Create a copy of unsigned integer object. More...
 
virtual ~CUInt ()
 Destory object and free any storage. More...
 
void SetHeap (CObstack *aHeap)
 Set heap to be used for storage allocation. More...
 
void Truncate (int newSize)
 Change size of unsigned integer. More...
 
UINT32 Size ()
 Calculate the number of non-zero significant bits. More...
 
Assignment operators
const CUIntoperator= (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
 

Detailed Description

Infinite precision unsigned arithmetic class Storage within object will be used whenever possible.

Constructor & Destructor Documentation

◆ CUInt() [1/3]

CUInt::CUInt ( void  )
inline

Create a unsigned integer object.

◆ CUInt() [2/3]

CUInt::CUInt ( unsigned int  aValue)
inline

Create a unsigned integer object initialize with value.

Parameters
aValueinitial value.

◆ CUInt() [3/3]

CUInt::CUInt ( const CUInt aValue)
inline

Create a copy of unsigned integer object.

Parameters
aValuereference to object to be copied.

◆ ~CUInt()

virtual CUInt::~CUInt ( )
inlinevirtual

Destory object and free any storage.

Member Function Documentation

◆ GetUINT32()

UINT32 CUInt::GetUINT32 ( ) const

◆ GetUINT64()

UINT64 CUInt::GetUINT64 ( ) const

◆ operator &() [1/2]

CUInt CUInt::operator& ( const CUInt ) const

◆ operator &() [2/2]

CUInt CUInt::operator& ( unsigned  int) const

◆ operator!=() [1/2]

int CUInt::operator!= ( const CUInt ) const

◆ operator!=() [2/2]

int CUInt::operator!= ( unsigned  int) const

◆ operator%() [1/2]

CUInt CUInt::operator% ( const CUInt ) const

◆ operator%() [2/2]

CUInt CUInt::operator% ( unsigned  int) const

◆ operator*() [1/2]

CUInt CUInt::operator* ( const CUInt ) const

◆ operator*() [2/2]

CUInt CUInt::operator* ( unsigned  int) const

◆ operator+() [1/2]

CUInt CUInt::operator+ ( const CUInt ) const

◆ operator+() [2/2]

CUInt CUInt::operator+ ( const unsigned  int) const

◆ operator-() [1/2]

CUInt CUInt::operator- ( const CUInt ) const

◆ operator-() [2/2]

CUInt CUInt::operator- ( unsigned  int) const

◆ operator/() [1/2]

CUInt CUInt::operator/ ( const CUInt ) const

◆ operator/() [2/2]

CUInt CUInt::operator/ ( unsigned  int) const

◆ operator<() [1/2]

int CUInt::operator< ( const CUInt ) const

◆ operator<() [2/2]

int CUInt::operator< ( unsigned  int) const

◆ operator<<() [1/2]

CUInt CUInt::operator<< ( const CUInt ) const

◆ operator<<() [2/2]

CUInt CUInt::operator<< ( unsigned  int) const

◆ operator<=() [1/2]

int CUInt::operator<= ( const CUInt ) const

◆ operator<=() [2/2]

int CUInt::operator<= ( unsigned  int) const

◆ operator=() [1/2]

const CUInt& CUInt::operator= ( const CUInt aValue)
inline

◆ operator=() [2/2]

const UINT64 CUInt::operator= ( const UINT64  aValue)
inline

◆ operator==() [1/2]

int CUInt::operator== ( const CUInt ) const

◆ operator==() [2/2]

int CUInt::operator== ( unsigned  int) const

◆ operator>() [1/2]

int CUInt::operator> ( const CUInt ) const

◆ operator>() [2/2]

int CUInt::operator> ( unsigned  int) const

◆ operator>=() [1/2]

int CUInt::operator>= ( const CUInt ) const

◆ operator>=() [2/2]

int CUInt::operator>= ( unsigned  int) const

◆ operator>>() [1/2]

CUInt CUInt::operator>> ( const CUInt ) const

◆ operator>>() [2/2]

CUInt CUInt::operator>> ( unsigned  int) const

◆ operator^() [1/2]

CUInt CUInt::operator^ ( const CUInt ) const

◆ operator^() [2/2]

CUInt CUInt::operator^ ( unsigned  int) const

◆ operator|() [1/2]

CUInt CUInt::operator| ( const CUInt ) const

◆ operator|() [2/2]

CUInt CUInt::operator| ( unsigned  int) const

◆ operator~()

CUInt CUInt::operator~ ( void  ) const

◆ SetHeap()

void CUInt::SetHeap ( CObstack aHeap)
inline

Set heap to be used for storage allocation.

Parameters
aHeapobstack to be used for storage.

◆ Size()

UINT32 CUInt::Size ( )

Calculate the number of non-zero significant bits.

Returns
number non-zero significant bits.

◆ Truncate()

void CUInt::Truncate ( int  newSize)
inline

Change size of unsigned integer.

Reduction in size truncates integer. Increase in size allocate space for max value.

Parameters
newSizenew size if integer in bits.

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