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::CUInt ( void  )
inline

Create a unsigned integer object.

CUInt::CUInt ( unsigned int  aValue)
inline

Create a unsigned integer object initialize with value.

Parameters
aValueinitial value.
CUInt::CUInt ( const CUInt aValue)
inline

Create a copy of unsigned integer object.

Parameters
aValuereference to object to be copied.
virtual CUInt::~CUInt ( )
inlinevirtual

Destory object and free any storage.

Member Function Documentation

UINT32 CUInt::GetUINT32 ( ) const
UINT64 CUInt::GetUINT64 ( ) const
int CUInt::operator!= ( const CUInt ) const
int CUInt::operator!= ( unsigned  int) const
CUInt CUInt::operator% ( const CUInt ) const
CUInt CUInt::operator% ( unsigned  int) const
CUInt CUInt::operator& ( const CUInt ) const
CUInt CUInt::operator& ( unsigned  int) const
CUInt CUInt::operator* ( const CUInt ) const
CUInt CUInt::operator* ( unsigned  int) const
CUInt CUInt::operator+ ( const CUInt ) const
CUInt CUInt::operator+ ( const unsigned  int) const
CUInt CUInt::operator- ( const CUInt ) const
CUInt CUInt::operator- ( unsigned  int) const
CUInt CUInt::operator/ ( const CUInt ) const
CUInt CUInt::operator/ ( unsigned  int) const
int CUInt::operator< ( const CUInt ) const
int CUInt::operator< ( unsigned  int) const
CUInt CUInt::operator<< ( const CUInt ) const
CUInt CUInt::operator<< ( unsigned  int) const
int CUInt::operator<= ( const CUInt ) const
int CUInt::operator<= ( unsigned  int) const
const CUInt& CUInt::operator= ( const CUInt aValue)
inline
const UINT64 CUInt::operator= ( const UINT64  aValue)
inline
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>= ( const CUInt ) const
int CUInt::operator>= ( unsigned  int) const
CUInt CUInt::operator>> ( const CUInt ) const
CUInt CUInt::operator>> ( unsigned  int) const
CUInt CUInt::operator^ ( const CUInt ) const
CUInt CUInt::operator^ ( unsigned  int) const
CUInt CUInt::operator| ( const CUInt ) 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.

Parameters
aHeapobstack to be used for storage.
UINT32 CUInt::Size ( )

Calculate the number of non-zero significant bits.

Returns
number 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.

Parameters
newSizenew size if integer in bits.

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