Main Page   Namespace List   Class Hierarchy   Compound List   File List   Namespace Members   Compound Members   File Members  

Bounded::Integer Template Class Reference

Bounded number with integral type. More...

#include <boundednumber.h>

List of all members.

Public Methods

 Integer ()
 Default constructor. More...

 Integer (value_type val)
 Constructs using specified value. More...

 Integer (const self& other)
 Copy constructor. More...

template<classOT, LargeIntOMaxVal, LargeIntOMinVal, classOBoundary>  Integer<OT, OMaxVal, OMinVal, OBoundary> (const Float<OT,OMaxVal,OMinVal,OBoundary>& other)
 Construct from a Bounded::Float. More...

void operator= (const LargeInt& val)
 Set to a numeric value; assumes LargeInt is an encompassing type. More...

self& operator *= (const LargeFloat m)
 Multiplicative scaling. More...

self operator+ (const self &B) const
 Integer addition. More...

Magnitude mag () const
 Returns the current numeric value as a fraction of the maximum. More...

value_type raw () const
 Returns the current numeric value in the native units. More...


Static Public Attributes

const value_type Min = MinVal
 Minimum legal value. More...

const value_type Max = MaxVal
 Maximum legal value. More...


Detailed Description

template<class T = unsigned char, LargeInt MaxVal = MAX_UNSIGNED(T), LargeInt MinVal = 0, class Boundary = Crop<LargeInt>> template class Bounded::Integer

Bounded number with integral type.

The template can be instantiated for any integral type smaller than or equal to type LargeInt.

Definition at line 93 of file boundednumber.h.


Constructor & Destructor Documentation

template<classT = unsigned char, LargeIntMaxVal = MAX_UNSIGNED(T), LargeIntMinVal = 0, classBoundary = Crop<LargeInt>>
Bounded::Integer<T, MaxVal, MinVal, Boundary>::Integer<T, MaxVal, MinVal, Boundary> ( )
 

Default constructor.

Definition at line 112 of file boundednumber.h.

template<classT = unsigned char, LargeIntMaxVal = MAX_UNSIGNED(T), LargeIntMinVal = 0, classBoundary = Crop<LargeInt>>
Bounded::Integer<T, MaxVal, MinVal, Boundary>::Integer<T, MaxVal, MinVal, Boundary> ( value_type val )
 

Constructs using specified value.

Definition at line 113 of file boundednumber.h.

template<classT = unsigned char, LargeIntMaxVal = MAX_UNSIGNED(T), LargeIntMinVal = 0, classBoundary = Crop<LargeInt>>
Bounded::Integer<T, MaxVal, MinVal, Boundary>::Integer<T, MaxVal, MinVal, Boundary> ( const self & other )
 

Copy constructor.

Definition at line 114 of file boundednumber.h.

template<classT = unsigned char, LargeIntMaxVal = MAX_UNSIGNED(T), LargeIntMinVal = 0, classBoundary = Crop<LargeInt>>
template<classOT, LargeIntOMaxVal, LargeIntOMinVal, classOBoundary>
Bounded::Integer<T, MaxVal, MinVal, Boundary>::Integer<T, MaxVal, MinVal, Boundary> ( const Float< OT,OMaxVal,OMinVal,OBoundary >& other )
 

Construct from a Bounded::Float.

Definition at line 119 of file boundednumber.h.


Member Function Documentation

template<classT = unsigned char, LargeIntMaxVal = MAX_UNSIGNED(T), LargeIntMinVal = 0, classBoundary = Crop<LargeInt>>
Magnitude Bounded::Integer<T, MaxVal, MinVal, Boundary>::mag ( ) const [inline]
 

Returns the current numeric value as a fraction of the maximum.

Definition at line 137 of file boundednumber.h.

template<classT = unsigned char, LargeIntMaxVal = MAX_UNSIGNED(T), LargeIntMinVal = 0, classBoundary = Crop<LargeInt>>
self & Bounded::Integer<T, MaxVal, MinVal, Boundary>::operator *= ( const LargeFloat m ) [inline]
 

Multiplicative scaling.

Definition at line 126 of file boundednumber.h.

template<classT = unsigned char, LargeIntMaxVal = MAX_UNSIGNED(T), LargeIntMinVal = 0, classBoundary = Crop<LargeInt>>
self Bounded::Integer<T, MaxVal, MinVal, Boundary>::operator+ ( const self & B ) const [inline]
 

Integer addition.

Definition at line 129 of file boundednumber.h.

template<classT = unsigned char, LargeIntMaxVal = MAX_UNSIGNED(T), LargeIntMinVal = 0, classBoundary = Crop<LargeInt>>
void Bounded::Integer<T, MaxVal, MinVal, Boundary>::operator= ( const LargeInt & val ) [inline]
 

Set to a numeric value; assumes LargeInt is an encompassing type.

Definition at line 123 of file boundednumber.h.

template<classT = unsigned char, LargeIntMaxVal = MAX_UNSIGNED(T), LargeIntMinVal = 0, classBoundary = Crop<LargeInt>>
value_type Bounded::Integer<T, MaxVal, MinVal, Boundary>::raw ( ) const [inline]
 

Returns the current numeric value in the native units.

Definition at line 140 of file boundednumber.h.


Member Data Documentation

template<classT = unsigned char, LargeIntMaxVal = MAX_UNSIGNED(T), LargeIntMinVal = 0, classBoundary = Crop<LargeInt>>
const value_type Bounded::Integer<T, MaxVal, MinVal, Boundary>::Max = MaxVal [static]
 

Maximum legal value.

Definition at line 110 of file boundednumber.h.

template<classT = unsigned char, LargeIntMaxVal = MAX_UNSIGNED(T), LargeIntMinVal = 0, classBoundary = Crop<LargeInt>>
const value_type Bounded::Integer<T, MaxVal, MinVal, Boundary>::Min = MinVal [static]
 

Minimum legal value.

Definition at line 109 of file boundednumber.h.


The documentation for this class was generated from the following file:
Generated at Mon Aug 21 00:31:18 2000 for RF-LISSOM by doxygen1.2.1 written by Dimitri van Heesch, © 1997-2000