#include <fixedpt.hxx>
Inheritance diagram for xyzzy::PTFixedPtBase< T >:
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 PTFixedPtBase & | operator= (const PTFixedPtBase &r) |
std::string | toBinary () const |
double | toDouble () const |
operator double () const | |
unsigned | getNumBits () const |
T | getValidMask () const |
T | 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 PTFixedPtBase & | init (const PTFixedPtBase &r) |
void | check () |
Private Attributes | |
T | m_val |
xyzzy::PTFixedPtBase< T >::PTFixedPtBase | ( | unsigned | intN, | |
unsigned | fractN | |||
) | [inline, explicit] |
xyzzy::PTFixedPtBase< T >::PTFixedPtBase | ( | unsigned | intN, | |
unsigned | fractN, | |||
T | d | |||
) | [inline, explicit] |
xyzzy::PTFixedPtBase< T >::PTFixedPtBase | ( | unsigned | intN, | |
unsigned | fractN, | |||
double | d | |||
) | [inline, explicit] |
xyzzy::PTFixedPtBase< T >::PTFixedPtBase | ( | unsigned | intN, | |
unsigned | fractN, | |||
const PTFixedPtBase< T > & | r | |||
) | [inline, explicit] |
static T xyzzy::PTFixedPtBase< T >::toFixedPoint | ( | double | d, | |
unsigned | intN, | |||
unsigned | fractN | |||
) | [static] |
static double xyzzy::PTFixedPtBase< T >::toDouble | ( | T | x, | |
unsigned | intN, | |||
unsigned | fractN | |||
) | [static] |
std::string xyzzy::PTFixedPtBase< T >::toBinary | ( | T | x, | |
unsigned | intN, | |||
unsigned | fractN | |||
) | [static] |
const PTFixedPtBase& xyzzy::PTFixedPtBase< T >::operator= | ( | const PTFixedPtBase< T > & | r | ) | [inline] |
std::string xyzzy::PTFixedPtBase< T >::toBinary | ( | ) | const [inline] |
double xyzzy::PTFixedPtBase< T >::toDouble | ( | ) | const [inline] |
xyzzy::PTFixedPtBase< T >::operator double | ( | ) | const [inline] |
unsigned xyzzy::PTFixedPtBase< T >::getNumBits | ( | ) | const [inline] |
static T xyzzy::PTFixedPtBase< T >::getValidMask | ( | unsigned | n | ) | [inline, static] |
T xyzzy::PTFixedPtBase< T >::getValidMask | ( | ) | const [inline] |
T xyzzy::PTFixedPtBase< T >::getVal | ( | ) | const [inline] |
void xyzzy::PTFixedPtBase< T >::setVal | ( | T | v | ) | [inline, protected] |
const PTFixedPtBase< T > & xyzzy::PTFixedPtBase< T >::init | ( | const PTFixedPtBase< T > & | r | ) | [private] |
void xyzzy::PTFixedPtBase< T >::check | ( | ) | [inline, private] |
TInt64 xyzzy::PTFixedPtBase< TInt64 >::toFixedPoint | ( | double | d, | |
unsigned | intN, | |||
unsigned | fractN | |||
) |
TInt32 xyzzy::PTFixedPtBase< TInt32 >::toFixedPoint | ( | double | d, | |
unsigned | intN, | |||
unsigned | fractN | |||
) |
double xyzzy::PTFixedPtBase< TInt64 >::toDouble | ( | TInt64 | x, | |
unsigned | intN, | |||
unsigned | fractN | |||
) |
double xyzzy::PTFixedPtBase< TInt32 >::toDouble | ( | TInt32 | x, | |
unsigned | intN, | |||
unsigned | fractN | |||
) |
const unsigned xyzzy::PTFixedPtBase< T >::cIntN |
const unsigned xyzzy::PTFixedPtBase< T >::cFractN |
const unsigned xyzzy::PTFixedPtBase< T >::cNumBits = sizeof(T) * 8 [static] |
T xyzzy::PTFixedPtBase< T >::m_val [private] |