xyzzy::PTFixedPtBase< T > Class Template Reference

#include <fixedpt.hxx>

Inheritance diagram for xyzzy::PTFixedPtBase< T >:

xyzzy::TFixedPt32< INTN, FRACTN > xyzzy::TFixedPt64< INTN, FRACTN > List of all members.

Public Member Functions

 PTFixedPtBase (unsigned intN, unsigned fractN)
 PTFixedPtBase (unsigned intN, unsigned fractN, T d)
 PTFixedPtBase (unsigned intN, unsigned fractN, double d)
 PTFixedPtBase (unsigned intN, unsigned fractN, const PTFixedPtBase &r)
const PTFixedPtBaseoperator= (const PTFixedPtBase &r)
std::string toBinary () const
double toDouble () const
 operator double () const
unsigned getNumBits () const
getValidMask () const
getVal () const
template<>
TInt64 toFixedPoint (double d, unsigned intN, unsigned fractN)
template<>
TInt32 toFixedPoint (double d, unsigned intN, unsigned fractN)
template<>
double toDouble (TInt64 x, unsigned intN, unsigned fractN)
template<>
double toDouble (TInt32 x, unsigned intN, unsigned fractN)

Static Public Member Functions

static T toFixedPoint (double d, unsigned intN, unsigned fractN)
static double toDouble (T x, unsigned intN, unsigned fractN)
static std::string toBinary (T x, unsigned intN, unsigned fractN)
static T getValidMask (unsigned n)

Public Attributes

const unsigned cIntN
const unsigned cFractN

Static Public Attributes

static const unsigned cNumBits = sizeof(T) * 8

Protected Member Functions

void setVal (T v)

Private Member Functions

const PTFixedPtBaseinit (const PTFixedPtBase &r)
void check ()

Private Attributes

m_val

template<typename T>
class xyzzy::PTFixedPtBase< T >


Constructor & Destructor Documentation

template<typename T>
xyzzy::PTFixedPtBase< T >::PTFixedPtBase ( unsigned  intN,
unsigned  fractN 
) [inline, explicit]

template<typename T>
xyzzy::PTFixedPtBase< T >::PTFixedPtBase ( unsigned  intN,
unsigned  fractN,
d 
) [inline, explicit]

template<typename T>
xyzzy::PTFixedPtBase< T >::PTFixedPtBase ( unsigned  intN,
unsigned  fractN,
double  d 
) [inline, explicit]

template<typename T>
xyzzy::PTFixedPtBase< T >::PTFixedPtBase ( unsigned  intN,
unsigned  fractN,
const PTFixedPtBase< T > &  r 
) [inline, explicit]


Member Function Documentation

template<typename T>
static T xyzzy::PTFixedPtBase< T >::toFixedPoint ( double  d,
unsigned  intN,
unsigned  fractN 
) [static]

template<typename T>
static double xyzzy::PTFixedPtBase< T >::toDouble ( x,
unsigned  intN,
unsigned  fractN 
) [static]

template<typename T>
std::string xyzzy::PTFixedPtBase< T >::toBinary ( x,
unsigned  intN,
unsigned  fractN 
) [static]

template<typename T>
const PTFixedPtBase& xyzzy::PTFixedPtBase< T >::operator= ( const PTFixedPtBase< T > &  r  )  [inline]

template<typename T>
std::string xyzzy::PTFixedPtBase< T >::toBinary (  )  const [inline]

template<typename T>
double xyzzy::PTFixedPtBase< T >::toDouble (  )  const [inline]

template<typename T>
xyzzy::PTFixedPtBase< T >::operator double (  )  const [inline]

template<typename T>
unsigned xyzzy::PTFixedPtBase< T >::getNumBits (  )  const [inline]

template<typename T>
static T xyzzy::PTFixedPtBase< T >::getValidMask ( unsigned  n  )  [inline, static]

template<typename T>
T xyzzy::PTFixedPtBase< T >::getValidMask (  )  const [inline]

template<typename T>
T xyzzy::PTFixedPtBase< T >::getVal (  )  const [inline]

template<typename T>
void xyzzy::PTFixedPtBase< T >::setVal ( v  )  [inline, protected]

template<typename T>
const PTFixedPtBase< T > & xyzzy::PTFixedPtBase< T >::init ( const PTFixedPtBase< T > &  r  )  [private]

template<typename T>
void xyzzy::PTFixedPtBase< T >::check (  )  [inline, private]

template<>
TInt64 xyzzy::PTFixedPtBase< TInt64 >::toFixedPoint ( double  d,
unsigned  intN,
unsigned  fractN 
)

template<>
TInt32 xyzzy::PTFixedPtBase< TInt32 >::toFixedPoint ( double  d,
unsigned  intN,
unsigned  fractN 
)

template<>
double xyzzy::PTFixedPtBase< TInt64 >::toDouble ( TInt64  x,
unsigned  intN,
unsigned  fractN 
)

template<>
double xyzzy::PTFixedPtBase< TInt32 >::toDouble ( TInt32  x,
unsigned  intN,
unsigned  fractN 
)


Member Data Documentation

template<typename T>
const unsigned xyzzy::PTFixedPtBase< T >::cIntN

template<typename T>
const unsigned xyzzy::PTFixedPtBase< T >::cFractN

template<typename T>
const unsigned xyzzy::PTFixedPtBase< T >::cNumBits = sizeof(T) * 8 [static]

template<typename T>
T xyzzy::PTFixedPtBase< T >::m_val [private]


The documentation for this class was generated from the following file:
Generated on Thu Mar 22 13:51:08 2007 for anvil by  doxygen 1.5.1