Header:
plang/factor/unsigned_.hpp
Class:
unsigned_<size_t> : integer<size_t>

    unsigned int is built-in data type represents unsigned integer. In C++ code boost::shared_ptr<unsigned_<size_t>> is class corresponding to unsigned int. unsigned_<size_t> has size_t type member named val which holds value of that object; threrefore, the range of unsigned int depends on the range of size_t in C++.

Members
val
unsigned integer value

Methods

constructors

unsigned int()

unsigned int(T& x)
operators


unsigned int operator +(T& x)

unsigned int operator -(T& x)

unsigned int operator *(T& x)

unsigned int operator /(T& x)

unsigned int operator %(T& x)

bool operator &&(T& x)

bool operator ||(T& x)

bool operator ==(T& x)

bool operator !=(T& x)

bool operator <(T& x)

bool operator >(T& x)

bool operator <=(T& x)

bool operator >=(T& x)

unsigned int& operator =(T& x)

unsigned int& operator ++()

unsigned int& operator --()

bool operator !()

unsigned int operator -()
casts


operator bool()

operator unsigned int()

operator int()

operator float()

operator double()

operator string()
methods


unsigned int max()

unsigned int min()

unsigned int rand()

unsigned int()
default constructor, set val to 0

effects

val=0


template<class T> unsigned int(T& x)
constructors includes copy constructor, set val to x

parameters
T& x
T must be castable to unsigned int

effects
val=unsigned int(x)


template<class T> unsigned int operator /(T& x)
arithmetic division operator

parameters
T& x
domain of x is any value of int except 0

returns
x/unsigned int(x)

exceptions
range_error - if x equals to 0


unsigned int max()
get maximum finite unsigned integer value

returns
std::numeri_limits<size_t>::max()


unsigned int min()
get minimum finite unsigned intger value

returns
std::numeric_limits<size_t>::min()


unsigned int rand()
get simple random value

returns
::rand() - range of value is [0,RAND_MAX] where RAND_MAX is granted to be at least 32767