AnimatLab  2
Test
StdUtils::CStdFixed Class Reference

Standard fixed-point number class. More...

#include <StdFixed.h>

+ Collaboration diagram for StdUtils::CStdFixed:

Public Member Functions

 CStdFixed ()
 Default constructor. More...
 
 CStdFixed (int iM, int iN, int iMultM=-1, int iMultN=-1)
 Constructor. More...
 
 CStdFixed (int iM, int iN, double dblVal, int iMultM=-1, int iMultN=-1)
 Constructor. More...
 
 CStdFixed (int iM, int iN, long lVal, int iMultM=-1, int iMultN=-1)
 Constructor. More...
 
 ~CStdFixed (void)
 Destructor. More...
 
virtual void Configure (int iM, int iN, int iMultM=-1, int iMultN=-1)
 Configures the fixed-point representation values. More...
 
void Fixed (long lVal)
 Sets the fixed-point representation of the number. More...
 
long FixedVal ()
 Gets the fixed-point representation of the number. More...
 
double GetDouble ()
 Gets the double representation of the number. More...
 
double * GetDoublePtr ()
 Gets the pointer to the floating-point representation of the number. More...
 
float GetFloat ()
 Gets the floating-point representation of the number. More...
 
float * GetFloatPtr ()
 Gets the pointer to the floating-point representation of the number. More...
 
long * GetLongPtr ()
 Gets the pointer to the fixed-point representation of the number. More...
 
int M ()
 Gets the number of bits to the left of the decimal point. More...
 
int MultM ()
 Number of bits to the left of the decimal point during multiplication. More...
 
int MultN ()
 Number of bits to the right of the decimal point during multiplication. More...
 
int N ()
 Gets the number of bits to the right of the decimal point. More...
 
 operator const double ()
 double casting operator. More...
 
 operator const float ()
 float casting operator. More...
 
 operator const int ()
 int casting operator. More...
 
 operator const long ()
 long casting operator. More...
 
bool operator!= (const float fltVal)
 = operators More...
 
bool operator!= (const double dblVal)
 Inequality operator. More...
 
bool operator!= (const int iVal)
 Inequality operator. More...
 
bool operator!= (const long lVal)
 Inequality operator. More...
 
bool operator!= (CStdFixed &fxB)
 Inequality operator. More...
 
CStdFixed operator* (const float fltVal)
 Multiplication operator. More...
 
CStdFixed operator* (const double dblVal)
 Multiplication operator. More...
 
CStdFixed operator* (const int iVal)
 Multiplication operator. More...
 
CStdFixed operator* (const long lVal)
 Multiplication operator. More...
 
CStdFixed operator* (const CStdFixed &fxB)
 Multiplication operator. More...
 
CStdFixed operator*= (const float fltVal)
 Multiplication assignment operator. More...
 
CStdFixed operator*= (const double dblVal)
 Multiplication assignment operator. More...
 
CStdFixed operator*= (const int iVal)
 Multiplication assignment operator. More...
 
CStdFixed operator*= (const long lVal)
 Multiplication assignment operator. More...
 
CStdFixed operator*= (const CStdFixed &fxB)
 Multiplication assignment operator. More...
 
CStdFixed operator+ (const float fltVal)
 Addition operator. More...
 
CStdFixed operator+ (const double dblVal)
 Addition operator. More...
 
CStdFixed operator+ (const int iVal)
 Addition operator. More...
 
CStdFixed operator+ (const long lVal)
 Addition operator. More...
 
CStdFixed operator+ (const CStdFixed &fxB)
 Addition operator. More...
 
CStdFixed operator+= (const float fltVal)
 Addition assignment operator. More...
 
CStdFixed operator+= (const double dblVal)
 Addition assignment operator. More...
 
CStdFixed operator+= (const int iVal)
 Addition assignment operator. More...
 
CStdFixed operator+= (const long lVal)
 Addition assignment operator. More...
 
CStdFixed operator+= (const CStdFixed &fxB)
 Addition assignment operator. More...
 
CStdFixed operator- (const float fltVal)
 Negation operator. More...
 
CStdFixed operator- (const double dblVal)
 Negation operator. More...
 
CStdFixed operator- (const int iVal)
 Negation operator. More...
 
CStdFixed operator- (const long lVal)
 Negation operator. More...
 
CStdFixed operator- (const CStdFixed &fxB)
 Negation operator. More...
 
CStdFixed operator-= (const float fltVal)
 Subtraction assignment operator. More...
 
CStdFixed operator-= (const double dblVal)
 Subtraction assignment operator. More...
 
CStdFixed operator-= (const int iVal)
 Subtraction assignment operator. More...
 
CStdFixed operator-= (const long lVal)
 Subtraction assignment operator. More...
 
CStdFixed operator-= (const CStdFixed &fxB)
 Subtraction assignment operator. More...
 
CStdFixed operator/ (const float fltVal)
 Division operator. More...
 
CStdFixed operator/ (const double dblVal)
 Division operator. More...
 
CStdFixed operator/ (const int iVal)
 Division operator. More...
 
CStdFixed operator/ (const long lVal)
 Division operator. More...
 
CStdFixed operator/ (const CStdFixed &fxB)
 Division operator. More...
 
CStdFixed operator/= (const float fltVal)
 Division assignment operator. More...
 
CStdFixed operator/= (const double dblVal)
 Division assignment operator. More...
 
CStdFixed operator/= (const int iVal)
 Division assignment operator. More...
 
CStdFixed operator/= (const long lVal)
 Division assignment operator. More...
 
CStdFixed operator/= (const CStdFixed &fxB)
 Division assignment operator. More...
 
bool operator< (const float fltVal)
 Less-than comparison operator. More...
 
bool operator< (const double dblVal)
 Less-than comparison operator. More...
 
bool operator< (const int iVal)
 Less-than comparison operator. More...
 
bool operator< (const long lVal)
 Less-than comparison operator. More...
 
bool operator< (CStdFixed &fxB)
 Less-than comparison operator. More...
 
std::ostream & operator<< (std::ostream &output)
 stream output operator. More...
 
bool operator<= (const float fltVal)
 Less-than-or-equal comparison operator. More...
 
bool operator<= (const double dblVal)
 Less-than-or-equal comparison operator. More...
 
bool operator<= (const int iVal)
 Less-than-or-equal comparison operator. More...
 
bool operator<= (const long lVal)
 Less-than-or-equal comparison operator. More...
 
bool operator<= (CStdFixed &fxB)
 Less-than-or-equal comparison operator. More...
 
CStdFixed operator= (float fltVal)
 Assignment operator. More...
 
CStdFixed operator= (double dblVal)
 Assignment operator. More...
 
CStdFixed operator= (long lVal)
 Assignment operator. More...
 
CStdFixed operator= (int iVal)
 Assignment operator. More...
 
bool operator== (const float fltVal)
 Equality operator. More...
 
bool operator== (const double dblVal)
 Equality operator. More...
 
bool operator== (const int iVal)
 Equality operator. More...
 
bool operator== (const long lVal)
 Equality operator. More...
 
bool operator== (CStdFixed &fxB)
 Equality operator. More...
 
bool operator> (const float fltVal)
 Greater-than comparison operator. More...
 
bool operator> (const double dblVal)
 Greater-than comparison operator. More...
 
bool operator> (const int iVal)
 Greater-than comparison operator. More...
 
bool operator> (const long lVal)
 Greater-than comparison operator. More...
 
bool operator> (CStdFixed &fxB)
 Greater-than comparison operator. More...
 
bool operator>= (const float fltVal)
 Greater-than-or-equal comparison operator. More...
 
bool operator>= (const double dblVal)
 Greater-than-or-equal comparison operator. More...
 
bool operator>= (const int iVal)
 Greater-than-or-equal comparison operator. More...
 
bool operator>= (const long lVal)
 Greater-than-or-equal comparison operator. More...
 
bool operator>= (CStdFixed &fxB)
 Greater-than-or-equal comparison operator. More...
 

Protected Member Functions

long Convert (double dblVal)
 Converts floating-point number to a fixed-point number. More...
 
double Convert (long lVal)
 Converts a fixed-point number to a floating-point number. More...
 

Protected Attributes

double m_dblConvertInt
 The value to convert a floating-point number to a fixed-point number.
 
double m_dblConvertReal
 The value to convert a fixed-point number to a floating-point number.
 
double m_dblVal
 Actual value in double variable.
 
float m_fltVal
 Actual value in float variable.
 
int m_iM
 
int m_iMultiplyM
 
int m_iMultiplyN
 
int m_iN
 
long m_lAddNegMask
 Mask that is used to make certain that the number cannot go above the maximum number of bits.
 
long m_lAddPosMask
 Mask that is used to make certain that the number cannot go above the maximum number of bits.
 
long m_lAddTestMask
 Mask that is used to make certain that the number cannot go above the maximum number of bits.
 
long m_lFixed
 The fixed-point representation of the number.
 
unsigned long m_lMaxInt
 This is the maximum integer value attainable by the fixed number.
 
unsigned long m_lMaxReal
 This is the maximum real value attainable by the fixed number.
 

Detailed Description

Standard fixed-point number class.

This is used to calculate fixed point numbers.

Author
dcofer
Date
5/3/2011

Definition at line 19 of file StdFixed.h.

Constructor & Destructor Documentation

StdUtils::CStdFixed::CStdFixed ( )
inline

Default constructor.

Author
dcofer
Date
4/1/2011

Definition at line 110 of file StdFixed.h.

StdUtils::CStdFixed::CStdFixed ( int  iM,
int  iN,
int  iMultM = -1,
int  iMultN = -1 
)

Constructor.

Author
dcofer
Date
5/3/2011
Parameters
iMNumber of bits to the left of the decimal point.
iNNumber of bits to the right of the decimal point.
iMultMNumber of bits to the left of the decimal point during multiplication.
iMultNNumber of bits to the right of the decimal point during multiplication.

Definition at line 22 of file StdFixed.cpp.

References Configure().

+ Here is the call graph for this function:

StdUtils::CStdFixed::CStdFixed ( int  iM,
int  iN,
double  dblVal,
int  iMultM = -1,
int  iMultN = -1 
)

Constructor.

Author
dcofer
Date
5/3/2011
Parameters
iMNumber of bits to the left of the decimal point.
iNNumber of bits to the right of the decimal point.
dblValThe initial floating-point value of the variable.
iMultMNumber of bits to the left of the decimal point during multiplication.
iMultNNumber of bits to the right of the decimal point during multiplication.

Definition at line 39 of file StdFixed.cpp.

References Configure(), Convert(), and Fixed().

+ Here is the call graph for this function:

StdUtils::CStdFixed::CStdFixed ( int  iM,
int  iN,
long  lVal,
int  iMultM = -1,
int  iMultN = -1 
)

Constructor.

Author
dcofer
Date
5/3/2011
Parameters
iMNumber of bits to the left of the decimal point.
iNNumber of bits to the right of the decimal point.
lValThe initial fixed-point value of the variable.
iMultMNumber of bits to the left of the decimal point during multiplication.
iMultNNumber of bits to the right of the decimal point during multiplication.

Definition at line 57 of file StdFixed.cpp.

References Configure(), and Fixed().

+ Here is the call graph for this function:

StdUtils::CStdFixed::~CStdFixed ( void  )

Destructor.

Author
dcofer
Date
5/3/2011

Definition at line 69 of file StdFixed.cpp.

Member Function Documentation

void StdUtils::CStdFixed::Configure ( int  iM,
int  iN,
int  iMultM = -1,
int  iMultN = -1 
)
virtual

Configures the fixed-point representation values.

Author
dcofer
Date
4/1/2011
Parameters
iMNumber of bits to the left of the decimal point.
iNNumber of bits to the right of the decimal point.
iMultMNumber of bits to the left of the decimal point during multiplication.
iMultNNumber of bits to the right of the decimal point during multiplication.

Definition at line 84 of file StdFixed.cpp.

References m_dblConvertInt, m_dblConvertReal, m_dblVal, m_fltVal, m_iM, m_iMultiplyM, m_iMultiplyN, m_iN, m_lAddNegMask, m_lAddPosMask, m_lAddTestMask, m_lFixed, m_lMaxInt, and m_lMaxReal.

Referenced by CStdFixed().

+ Here is the caller graph for this function:

long StdUtils::CStdFixed::Convert ( double  dblVal)
inlineprotected

Converts floating-point number to a fixed-point number.

Author
dcofer
Date
4/1/2011
Parameters
dblValThe floating-point value to convert.
Returns
Converted fixed-point number.

Definition at line 82 of file StdFixed.h.

Referenced by CStdFixed().

+ Here is the caller graph for this function:

double StdUtils::CStdFixed::Convert ( long  lVal)
inlineprotected

Converts a fixed-point number to a floating-point number.

Author
dcofer
Date
4/1/2011
Parameters
lValThe fixed-point value to convert.
Returns
Converted floating-point number.

Definition at line 97 of file StdFixed.h.

void StdUtils::CStdFixed::Fixed ( long  lVal)
inline

Sets the fixed-point representation of the number.

Author
dcofer
Date
4/1/2011
Parameters
lValThe new value.

Definition at line 191 of file StdFixed.h.

Referenced by CStdFixed(), operator*(), operator+(), operator-(), and operator/().

+ Here is the caller graph for this function:

long StdUtils::CStdFixed::FixedVal ( )
inline

Gets the fixed-point representation of the number.

Author
dcofer
Date
4/1/2011
Returns
fixed-point number.

Definition at line 181 of file StdFixed.h.

double StdUtils::CStdFixed::GetDouble ( )
inline

Gets the double representation of the number.

Author
dcofer
Date
4/1/2011
Returns
The double number.

Definition at line 227 of file StdFixed.h.

double* StdUtils::CStdFixed::GetDoublePtr ( )
inline

Gets the pointer to the floating-point representation of the number.

Author
dcofer
Date
4/1/2011
Returns
Pointer to double number.

Definition at line 237 of file StdFixed.h.

float StdUtils::CStdFixed::GetFloat ( )
inline

Gets the floating-point representation of the number.

Author
dcofer
Date
4/1/2011
Returns
The number.

Definition at line 207 of file StdFixed.h.

float* StdUtils::CStdFixed::GetFloatPtr ( )
inline

Gets the pointer to the floating-point representation of the number.

Author
dcofer
Date
4/1/2011
Returns
Pointer to float number.

Definition at line 217 of file StdFixed.h.

long* StdUtils::CStdFixed::GetLongPtr ( )
inline

Gets the pointer to the fixed-point representation of the number.

Author
dcofer
Date
4/1/2011
Returns
Pointer to the fixed-point number.

Definition at line 247 of file StdFixed.h.

int StdUtils::CStdFixed::M ( )
inline

Gets the number of bits to the left of the decimal point.

Author
dcofer
Date
4/1/2011
Returns
bits.

Definition at line 141 of file StdFixed.h.

int StdUtils::CStdFixed::MultM ( )
inline

Number of bits to the left of the decimal point during multiplication.

Author
dcofer
Date
4/1/2011
Returns
bits.

Definition at line 161 of file StdFixed.h.

int StdUtils::CStdFixed::MultN ( )
inline

Number of bits to the right of the decimal point during multiplication.

Author
dcofer
Date
4/1/2011
Returns
bits.

Definition at line 171 of file StdFixed.h.

int StdUtils::CStdFixed::N ( )
inline

Gets the number of bits to the right of the decimal point.

Author
dcofer
Date
4/1/2011
Returns
bits.

Definition at line 151 of file StdFixed.h.

StdUtils::CStdFixed::operator const double ( )
inline

double casting operator.

Author
dcofer
Date
5/3/2011
Returns
The result of the operation.

Definition at line 1060 of file StdFixed.h.

StdUtils::CStdFixed::operator const float ( )
inline

float casting operator.

Author
dcofer
Date
5/3/2011
Returns
The result of the operation.

Definition at line 1049 of file StdFixed.h.

StdUtils::CStdFixed::operator const int ( )
inline

int casting operator.

Author
dcofer
Date
5/3/2011
Returns
The result of the operation.

Definition at line 1082 of file StdFixed.h.

StdUtils::CStdFixed::operator const long ( )
inline

long casting operator.

Author
dcofer
Date
5/3/2011
Returns
The result of the operation.

Definition at line 1071 of file StdFixed.h.

bool StdUtils::CStdFixed::operator!= ( const float  fltVal)
inline

= operators

Inequality operator.

Author
dcofer
Date
5/3/2011
Parameters
fltValThe value.
Returns
true if the parameters are not considered equivalent.

Definition at line 1541 of file StdFixed.h.

bool StdUtils::CStdFixed::operator!= ( const double  dblVal)
inline

Inequality operator.

Author
dcofer
Date
5/3/2011
Parameters
dblValThe value.
Returns
true if the parameters are not considered equivalent.

Definition at line 1557 of file StdFixed.h.

bool StdUtils::CStdFixed::operator!= ( const int  iVal)
inline

Inequality operator.

Author
dcofer
Date
5/3/2011
Parameters
iValThe value.
Returns
true if the parameters are not considered equivalent.

Definition at line 1573 of file StdFixed.h.

bool StdUtils::CStdFixed::operator!= ( const long  lVal)
inline

Inequality operator.

Author
dcofer
Date
5/3/2011
Parameters
lValThe value.
Returns
true if the parameters are not considered equivalent.

Definition at line 1589 of file StdFixed.h.

bool StdUtils::CStdFixed::operator!= ( CStdFixed fxB)
inline

Inequality operator.

Author
dcofer
Date
5/3/2011
Parameters
[in,out]fxBThe fx b.
Returns
true if the parameters are not considered equivalent.

Definition at line 1605 of file StdFixed.h.

CStdFixed StdUtils::CStdFixed::operator* ( const float  fltVal)
inline

Multiplication operator.

Author
dcofer
Date
5/3/2011
Parameters
fltValThe value.
Returns
The result of the operation.

Definition at line 705 of file StdFixed.h.

CStdFixed StdUtils::CStdFixed::operator* ( const double  dblVal)
inline

Multiplication operator.

Author
dcofer
Date
5/3/2011
Parameters
dblValThe value.
Returns
The result of the operation.

Definition at line 721 of file StdFixed.h.

CStdFixed StdUtils::CStdFixed::operator* ( const int  iVal)
inline

Multiplication operator.

Author
dcofer
Date
5/3/2011
Parameters
iValThe value.
Returns
The result of the operation.

Definition at line 737 of file StdFixed.h.

CStdFixed StdUtils::CStdFixed::operator* ( const long  lVal)
inline

Multiplication operator.

Author
dcofer
Date
5/3/2011
Parameters
lValThe value.
Returns
The result of the operation.

Definition at line 753 of file StdFixed.h.

CStdFixed StdUtils::CStdFixed::operator* ( const CStdFixed fxB)
inline

Multiplication operator.

Author
dcofer
Date
5/3/2011
Parameters
fxBThe fx b.
Returns
The result of the operation.

Definition at line 769 of file StdFixed.h.

References Fixed(), m_iN, and m_lFixed.

+ Here is the call graph for this function:

CStdFixed StdUtils::CStdFixed::operator*= ( const float  fltVal)
inline

Multiplication assignment operator.

Author
dcofer
Date
5/3/2011
Parameters
fltValThe value.
Returns
The result of the operation.

Definition at line 793 of file StdFixed.h.

CStdFixed StdUtils::CStdFixed::operator*= ( const double  dblVal)
inline

Multiplication assignment operator.

Author
dcofer
Date
5/3/2011
Parameters
dblValThe value.
Returns
The result of the operation.

Definition at line 809 of file StdFixed.h.

CStdFixed StdUtils::CStdFixed::operator*= ( const int  iVal)
inline

Multiplication assignment operator.

Author
dcofer
Date
5/3/2011
Parameters
iValThe value.
Returns
The result of the operation.

Definition at line 825 of file StdFixed.h.

CStdFixed StdUtils::CStdFixed::operator*= ( const long  lVal)
inline

Multiplication assignment operator.

Author
dcofer
Date
5/3/2011
Parameters
lValThe value.
Returns
The result of the operation.

Definition at line 841 of file StdFixed.h.

CStdFixed StdUtils::CStdFixed::operator*= ( const CStdFixed fxB)
inline

Multiplication assignment operator.

Author
dcofer
Date
5/3/2011
Parameters
fxBThe fx b.
Returns
The result of the operation.

Definition at line 857 of file StdFixed.h.

References m_iN, and m_lFixed.

CStdFixed StdUtils::CStdFixed::operator+ ( const float  fltVal)
inline

Addition operator.

Author
dcofer
Date
5/3/2011
Parameters
fltValThe value.
Returns
The result of the operation.

Definition at line 329 of file StdFixed.h.

CStdFixed StdUtils::CStdFixed::operator+ ( const double  dblVal)
inline

Addition operator.

Author
dcofer
Date
5/3/2011
Parameters
dblValThe value.
Returns
The result of the operation.

Definition at line 345 of file StdFixed.h.

CStdFixed StdUtils::CStdFixed::operator+ ( const int  iVal)
inline

Addition operator.

Author
dcofer
Date
5/3/2011
Parameters
iValThe value.
Returns
The result of the operation.

Definition at line 361 of file StdFixed.h.

CStdFixed StdUtils::CStdFixed::operator+ ( const long  lVal)
inline

Addition operator.

Author
dcofer
Date
5/3/2011
Parameters
lValThe value.
Returns
The result of the operation.

Definition at line 377 of file StdFixed.h.

CStdFixed StdUtils::CStdFixed::operator+ ( const CStdFixed fxB)
inline

Addition operator.

Author
dcofer
Date
5/3/2011
Parameters
fxBThe fx b.
Returns
The result of the operation.

Definition at line 393 of file StdFixed.h.

References Fixed(), and m_lFixed.

+ Here is the call graph for this function:

CStdFixed StdUtils::CStdFixed::operator+= ( const float  fltVal)
inline

Addition assignment operator.

Author
dcofer
Date
5/3/2011
Parameters
fltValThe value.
Returns
The result of the operation.

Definition at line 423 of file StdFixed.h.

CStdFixed StdUtils::CStdFixed::operator+= ( const double  dblVal)
inline

Addition assignment operator.

Author
dcofer
Date
5/3/2011
Parameters
dblValThe value.
Returns
The result of the operation.

Definition at line 439 of file StdFixed.h.

CStdFixed StdUtils::CStdFixed::operator+= ( const int  iVal)
inline

Addition assignment operator.

Author
dcofer
Date
5/3/2011
Parameters
iValThe value.
Returns
The result of the operation.

Definition at line 455 of file StdFixed.h.

CStdFixed StdUtils::CStdFixed::operator+= ( const long  lVal)
inline

Addition assignment operator.

Author
dcofer
Date
5/3/2011
Parameters
lValThe value.
Returns
The result of the operation.

Definition at line 471 of file StdFixed.h.

CStdFixed StdUtils::CStdFixed::operator+= ( const CStdFixed fxB)
inline

Addition assignment operator.

Author
dcofer
Date
5/3/2011
Parameters
fxBThe fx b.
Returns
The result of the operation.

Definition at line 487 of file StdFixed.h.

References m_lFixed.

CStdFixed StdUtils::CStdFixed::operator- ( const float  fltVal)
inline

Negation operator.

Author
dcofer
Date
5/3/2011
Parameters
fltValThe value.
Returns
The result of the operation.

Definition at line 516 of file StdFixed.h.

CStdFixed StdUtils::CStdFixed::operator- ( const double  dblVal)
inline

Negation operator.

Author
dcofer
Date
5/3/2011
Parameters
dblValThe value.
Returns
The result of the operation.

Definition at line 532 of file StdFixed.h.

CStdFixed StdUtils::CStdFixed::operator- ( const int  iVal)
inline

Negation operator.

Author
dcofer
Date
5/3/2011
Parameters
iValThe value.
Returns
The result of the operation.

Definition at line 548 of file StdFixed.h.

CStdFixed StdUtils::CStdFixed::operator- ( const long  lVal)
inline

Negation operator.

Author
dcofer
Date
5/3/2011
Parameters
lValThe value.
Returns
The result of the operation.

Definition at line 564 of file StdFixed.h.

CStdFixed StdUtils::CStdFixed::operator- ( const CStdFixed fxB)
inline

Negation operator.

Author
dcofer
Date
5/3/2011
Parameters
fxBThe fx b.
Returns
The result of the operation.

Definition at line 580 of file StdFixed.h.

References Fixed(), and m_lFixed.

+ Here is the call graph for this function:

CStdFixed StdUtils::CStdFixed::operator-= ( const float  fltVal)
inline

Subtraction assignment operator.

Author
dcofer
Date
5/3/2011
Parameters
fltValThe value.
Returns
The result of the operation.

Definition at line 612 of file StdFixed.h.

CStdFixed StdUtils::CStdFixed::operator-= ( const double  dblVal)
inline

Subtraction assignment operator.

Author
dcofer
Date
5/3/2011
Parameters
dblValThe value.
Returns
The result of the operation.

Definition at line 628 of file StdFixed.h.

CStdFixed StdUtils::CStdFixed::operator-= ( const int  iVal)
inline

Subtraction assignment operator.

Author
dcofer
Date
5/3/2011
Parameters
iValThe value.
Returns
The result of the operation.

Definition at line 644 of file StdFixed.h.

CStdFixed StdUtils::CStdFixed::operator-= ( const long  lVal)
inline

Subtraction assignment operator.

Author
dcofer
Date
5/3/2011
Parameters
lValThe value.
Returns
The result of the operation.

Definition at line 660 of file StdFixed.h.

CStdFixed StdUtils::CStdFixed::operator-= ( const CStdFixed fxB)
inline

Subtraction assignment operator.

Author
dcofer
Date
5/3/2011
Parameters
fxBThe fx b.
Returns
The result of the operation.

Definition at line 676 of file StdFixed.h.

References m_lFixed.

CStdFixed StdUtils::CStdFixed::operator/ ( const float  fltVal)
inline

Division operator.

Author
dcofer
Date
5/3/2011
Parameters
fltValThe value.
Returns
The result of the operation.

Definition at line 880 of file StdFixed.h.

CStdFixed StdUtils::CStdFixed::operator/ ( const double  dblVal)
inline

Division operator.

Author
dcofer
Date
5/3/2011
Parameters
dblValThe value.
Returns
The result of the operation.

Definition at line 896 of file StdFixed.h.

CStdFixed StdUtils::CStdFixed::operator/ ( const int  iVal)
inline

Division operator.

Author
dcofer
Date
5/3/2011
Parameters
iValThe value.
Returns
The result of the operation.

Definition at line 912 of file StdFixed.h.

CStdFixed StdUtils::CStdFixed::operator/ ( const long  lVal)
inline

Division operator.

Author
dcofer
Date
5/3/2011
Parameters
lValThe value.
Returns
The result of the operation.

Definition at line 928 of file StdFixed.h.

CStdFixed StdUtils::CStdFixed::operator/ ( const CStdFixed fxB)
inline

Division operator.

Author
dcofer
Date
5/3/2011
Parameters
fxBThe fx b.
Returns
The result of the operation.

Definition at line 944 of file StdFixed.h.

References Fixed(), m_iN, and m_lFixed.

+ Here is the call graph for this function:

CStdFixed StdUtils::CStdFixed::operator/= ( const float  fltVal)
inline

Division assignment operator.

Author
dcofer
Date
5/3/2011
Parameters
fltValThe value.
Returns
The result of the operation.

Definition at line 965 of file StdFixed.h.

CStdFixed StdUtils::CStdFixed::operator/= ( const double  dblVal)
inline

Division assignment operator.

Author
dcofer
Date
5/3/2011
Parameters
dblValThe value.
Returns
The result of the operation.

Definition at line 981 of file StdFixed.h.

CStdFixed StdUtils::CStdFixed::operator/= ( const int  iVal)
inline

Division assignment operator.

Author
dcofer
Date
5/3/2011
Parameters
iValThe value.
Returns
The result of the operation.

Definition at line 997 of file StdFixed.h.

CStdFixed StdUtils::CStdFixed::operator/= ( const long  lVal)
inline

Division assignment operator.

Author
dcofer
Date
5/3/2011
Parameters
lValThe value.
Returns
The result of the operation.

Definition at line 1013 of file StdFixed.h.

CStdFixed StdUtils::CStdFixed::operator/= ( const CStdFixed fxB)
inline

Division assignment operator.

Author
dcofer
Date
5/3/2011
Parameters
fxBThe fx b.
Returns
The result of the operation.

Definition at line 1029 of file StdFixed.h.

References m_iN, and m_lFixed.

bool StdUtils::CStdFixed::operator< ( const float  fltVal)
inline

Less-than comparison operator.

Author
dcofer
Date
5/3/2011
Parameters
fltValThe value.
Returns
true if the first parameter is less than the second.

Definition at line 1187 of file StdFixed.h.

bool StdUtils::CStdFixed::operator< ( const double  dblVal)
inline

Less-than comparison operator.

Author
dcofer
Date
5/3/2011
Parameters
dblValThe value.
Returns
true if the first parameter is less than the second.

Definition at line 1203 of file StdFixed.h.

bool StdUtils::CStdFixed::operator< ( const int  iVal)
inline

Less-than comparison operator.

Author
dcofer
Date
5/3/2011
Parameters
iValThe value.
Returns
true if the first parameter is less than the second.

Definition at line 1219 of file StdFixed.h.

bool StdUtils::CStdFixed::operator< ( const long  lVal)
inline

Less-than comparison operator.

Author
dcofer
Date
5/3/2011
Parameters
lValThe value.
Returns
true if the first parameter is less than the second.

Definition at line 1235 of file StdFixed.h.

bool StdUtils::CStdFixed::operator< ( CStdFixed fxB)
inline

Less-than comparison operator.

Author
dcofer
Date
5/3/2011
Parameters
[in,out]fxBThe fx b.
Returns
true if the first parameter is less than the second.

Definition at line 1251 of file StdFixed.h.

std::ostream& StdUtils::CStdFixed::operator<< ( std::ostream &  output)
inline

stream output operator.

Author
dcofer
Date
5/3/2011
Parameters
[in,out]outputThe output.
Returns
The output stream.

Definition at line 1626 of file StdFixed.h.

bool StdUtils::CStdFixed::operator<= ( const float  fltVal)
inline

Less-than-or-equal comparison operator.

Author
dcofer
Date
5/3/2011
Parameters
fltValThe value.
Returns
true if the first parameter is less than or equal to the second.

Definition at line 1274 of file StdFixed.h.

bool StdUtils::CStdFixed::operator<= ( const double  dblVal)
inline

Less-than-or-equal comparison operator.

Author
dcofer
Date
5/3/2011
Parameters
dblValThe value.
Returns
true if the first parameter is less than or equal to the second.

Definition at line 1290 of file StdFixed.h.

bool StdUtils::CStdFixed::operator<= ( const int  iVal)
inline

Less-than-or-equal comparison operator.

Author
dcofer
Date
5/3/2011
Parameters
iValThe value.
Returns
true if the first parameter is less than or equal to the second.

Definition at line 1306 of file StdFixed.h.

bool StdUtils::CStdFixed::operator<= ( const long  lVal)
inline

Less-than-or-equal comparison operator.

Author
dcofer
Date
5/3/2011
Parameters
lValThe value.
Returns
true if the first parameter is less than or equal to the second.

Definition at line 1322 of file StdFixed.h.

bool StdUtils::CStdFixed::operator<= ( CStdFixed fxB)
inline

Less-than-or-equal comparison operator.

Author
dcofer
Date
5/3/2011
Parameters
[in,out]fxBThe fx b.
Returns
true if the first parameter is less than or equal to the second.

Definition at line 1338 of file StdFixed.h.

CStdFixed StdUtils::CStdFixed::operator= ( float  fltVal)
inline

Assignment operator.

Author
dcofer
Date
5/3/2011
Parameters
fltValThe value.
Returns
A shallow copy of this object.

Definition at line 263 of file StdFixed.h.

CStdFixed StdUtils::CStdFixed::operator= ( double  dblVal)
inline

Assignment operator.

Author
dcofer
Date
5/3/2011
Parameters
dblValThe value.
Returns
A shallow copy of this object.

Definition at line 279 of file StdFixed.h.

CStdFixed StdUtils::CStdFixed::operator= ( long  lVal)
inline

Assignment operator.

Author
dcofer
Date
5/3/2011
Parameters
lValThe value.
Returns
A shallow copy of this object.

Definition at line 295 of file StdFixed.h.

CStdFixed StdUtils::CStdFixed::operator= ( int  iVal)
inline

Assignment operator.

Author
dcofer
Date
5/3/2011
Parameters
iValThe value.
Returns
A shallow copy of this object.

Definition at line 311 of file StdFixed.h.

bool StdUtils::CStdFixed::operator== ( const float  fltVal)
inline

Equality operator.

Author
dcofer
Date
5/3/2011
Parameters
fltValThe value.
Returns
true if the parameters are considered equivalent.

Definition at line 1099 of file StdFixed.h.

bool StdUtils::CStdFixed::operator== ( const double  dblVal)
inline

Equality operator.

Author
dcofer
Date
5/3/2011
Parameters
dblValThe value.
Returns
true if the parameters are considered equivalent.

Definition at line 1115 of file StdFixed.h.

bool StdUtils::CStdFixed::operator== ( const int  iVal)
inline

Equality operator.

Author
dcofer
Date
5/3/2011
Parameters
iValThe value.
Returns
true if the parameters are considered equivalent.

Definition at line 1131 of file StdFixed.h.

bool StdUtils::CStdFixed::operator== ( const long  lVal)
inline

Equality operator.

Author
dcofer
Date
5/3/2011
Parameters
lValThe value.
Returns
true if the parameters are considered equivalent.

Definition at line 1147 of file StdFixed.h.

bool StdUtils::CStdFixed::operator== ( CStdFixed fxB)
inline

Equality operator.

Author
dcofer
Date
5/3/2011
Parameters
[in,out]fxBThe fx b.
Returns
true if the parameters are considered equivalent.

Definition at line 1163 of file StdFixed.h.

bool StdUtils::CStdFixed::operator> ( const float  fltVal)
inline

Greater-than comparison operator.

Author
dcofer
Date
5/3/2011
Parameters
fltValThe value.
Returns
true if the first parameter is greater than to the second.

Definition at line 1363 of file StdFixed.h.

bool StdUtils::CStdFixed::operator> ( const double  dblVal)
inline

Greater-than comparison operator.

Author
dcofer
Date
5/3/2011
Parameters
dblValThe value.
Returns
true if the first parameter is greater than to the second.

Definition at line 1379 of file StdFixed.h.

bool StdUtils::CStdFixed::operator> ( const int  iVal)
inline

Greater-than comparison operator.

Author
dcofer
Date
5/3/2011
Parameters
iValThe value.
Returns
true if the first parameter is greater than to the second.

Definition at line 1395 of file StdFixed.h.

bool StdUtils::CStdFixed::operator> ( const long  lVal)
inline

Greater-than comparison operator.

Author
dcofer
Date
5/3/2011
Parameters
lValThe value.
Returns
true if the first parameter is greater than to the second.

Definition at line 1411 of file StdFixed.h.

bool StdUtils::CStdFixed::operator> ( CStdFixed fxB)
inline

Greater-than comparison operator.

Author
dcofer
Date
5/3/2011
Parameters
[in,out]fxBThe fx b.
Returns
true if the first parameter is greater than to the second.

Definition at line 1427 of file StdFixed.h.

bool StdUtils::CStdFixed::operator>= ( const float  fltVal)
inline

Greater-than-or-equal comparison operator.

Author
dcofer
Date
5/3/2011
Parameters
fltValThe value.
Returns
true if the first parameter is greater than or equal to the second.

Definition at line 1452 of file StdFixed.h.

bool StdUtils::CStdFixed::operator>= ( const double  dblVal)
inline

Greater-than-or-equal comparison operator.

Author
dcofer
Date
5/3/2011
Parameters
dblValThe value.
Returns
true if the first parameter is greater than or equal to the second.

Definition at line 1468 of file StdFixed.h.

bool StdUtils::CStdFixed::operator>= ( const int  iVal)
inline

Greater-than-or-equal comparison operator.

Author
dcofer
Date
5/3/2011
Parameters
iValThe value.
Returns
true if the first parameter is greater than or equal to the second.

Definition at line 1484 of file StdFixed.h.

bool StdUtils::CStdFixed::operator>= ( const long  lVal)
inline

Greater-than-or-equal comparison operator.

Author
dcofer
Date
5/3/2011
Parameters
lValThe value.
Returns
true if the first parameter is greater than or equal to the second.

Definition at line 1500 of file StdFixed.h.

bool StdUtils::CStdFixed::operator>= ( CStdFixed fxB)
inline

Greater-than-or-equal comparison operator.

Author
dcofer
Date
5/3/2011
Parameters
[in,out]fxBThe fx b.
Returns
true if the first parameter is greater than or equal to the second.

Definition at line 1516 of file StdFixed.h.

Member Data Documentation

int StdUtils::CStdFixed::m_iM
protected

The number of bits to the left of the decimal point of the fixed-point number representation.

Definition at line 24 of file StdFixed.h.

Referenced by Configure().

int StdUtils::CStdFixed::m_iMultiplyM
protected

The number of digits to shift when doing a multiplication. For this we assume we are using some standard M.N format, but sometimes we may have to multiply be a different format. When that multiplication occurs we must always output things in the M.N format though.

Definition at line 34 of file StdFixed.h.

Referenced by Configure().

int StdUtils::CStdFixed::m_iMultiplyN
protected

The number of digits to shift when doing a multiplication. For this we assume we are using some standard M.N format, but sometimes we may have to multiply be a different format. When that multiplication occurs we must always output things in the M.N format though.

Definition at line 40 of file StdFixed.h.

Referenced by Configure().

int StdUtils::CStdFixed::m_iN
protected

The number of bits to the right of the decimal point of the fixed-point number representation.

Definition at line 28 of file StdFixed.h.

Referenced by Configure(), operator*(), operator*=(), operator/(), and operator/=().


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