ETL  0.04.19
Classes | Public Types | Public Member Functions | Private Types | Static Private Member Functions | Private Attributes | List of all members
fixed_base< T, FIXED_BITS > Class Template Reference

Fixed-point template base class. More...

#include <_fixed.h>

Classes

class  raw

Public Types

typedef T value_type

Public Member Functions

 fixed_base () ETL_ATTRIB_INLINE
 fixed_base (const float &f) ETL_ATTRIB_INLINE
 fixed_base (const double &f) ETL_ATTRIB_INLINE
 fixed_base (const long double &f) ETL_ATTRIB_INLINE
 fixed_base (const int &i) ETL_ATTRIB_INLINE
 fixed_base (const int &n, const int &d) ETL_ATTRIB_INLINE
 Fraction constructor.
 fixed_base (const _fixed &x) ETL_ATTRIB_INLINE
 fixed_base (value_type x, raw) ETL_ATTRIB_INLINE
T & data () ETL_ATTRIB_PURE ETL_ATTRIB_INLINE
const T & data () const ETL_ATTRIB_PURE ETL_ATTRIB_INLINE
const _fixedoperator+= (const _fixed &rhs) ETL_ATTRIB_INLINE
 fixed+=fixed
const _fixedoperator-= (const _fixed &rhs) ETL_ATTRIB_INLINE
 fixed-=fixed
template<typename U >
const _fixedoperator*= (const U &rhs) ETL_ATTRIB_INLINE
template<typename U >
const _fixedoperator/= (const U &rhs) ETL_ATTRIB_INLINE
const _fixedoperator*= (const _fixed &rhs) ETL_ATTRIB_INLINE
 fixed*=fixed
const _fixedoperator/= (const _fixed &rhs) ETL_ATTRIB_INLINE
 fixed/=fixed
const _fixedoperator*= (const int &rhs) ETL_ATTRIB_INLINE
 fixed*=int
const _fixedoperator/= (const int &rhs) ETL_ATTRIB_INLINE
 fixed/=int
template<typename U >
_fixed operator+ (const U &rhs) const ETL_ATTRIB_INLINE
 fixed + ...
template<typename U >
_fixed operator- (const U &rhs) const ETL_ATTRIB_INLINE
 fixed - ...
template<typename U >
_fixed operator* (const U &rhs) const ETL_ATTRIB_INLINE
 fixed * ...
template<typename U >
_fixed operator/ (const U &rhs) const ETL_ATTRIB_INLINE
 fixed / ...
_fixed operator+ (const _fixed &rhs) const ETL_ATTRIB_INLINE
 fixed + fixed
_fixed operator- (const _fixed &rhs) const ETL_ATTRIB_INLINE
 fixed - fixed
_fixed operator* (const _fixed &rhs) const ETL_ATTRIB_INLINE
 fixed * fixed
_fixed operator/ (const _fixed &rhs) const ETL_ATTRIB_INLINE
 fixed / fixed
_fixed operator* (const int &rhs) const ETL_ATTRIB_INLINE
 fixed * int
_fixed operator/ (const int &rhs) const ETL_ATTRIB_INLINE
 fixed / int
_fixed operator* (const float &rhs) const ETL_ATTRIB_INLINE
 fixed * float
_fixed operator* (const double &rhs) const ETL_ATTRIB_INLINE
 fixed * double
_fixed operator- () const ETL_ATTRIB_INLINE
 operator float () const ETL_ATTRIB_INLINE
 operator double () const ETL_ATTRIB_INLINE
 operator long double () const ETL_ATTRIB_INLINE
 operator int () const ETL_ATTRIB_INLINE
 operator bool () const ETL_ATTRIB_INLINE
_fixed floor () const
_fixed ceil () const
_fixed round () const
bool operator== (const _fixed &rhs) const
bool operator!= (const _fixed &rhs) const
bool operator< (const _fixed &rhs) const
bool operator> (const _fixed &rhs) const
bool operator<= (const _fixed &rhs) const
bool operator>= (const _fixed &rhs) const

Private Types

typedef fixed_base< T, FIXED_BITS > _fixed
typedef fixed_base< T, FIXED_BITS > self_type

Static Private Member Functions

static bool _TYPE_SMALLER_THAN_INT () ETL_ATTRIB_CONST ETL_ATTRIB_INLINE
static bool _USING_ALL_BITS () ETL_ATTRIB_CONST ETL_ATTRIB_INLINE
static value_type _ONE () ETL_ATTRIB_CONST ETL_ATTRIB_INLINE
static value_type _F_MASK () ETL_ATTRIB_CONST ETL_ATTRIB_INLINE
static float _EPSILON () ETL_ATTRIB_CONST ETL_ATTRIB_INLINE

Private Attributes

_data

Detailed Description

template<class T, unsigned int FIXED_BITS>
class fixed_base< T, FIXED_BITS >

Fixed-point template base class.

========================================================================

A more detailed description needs to be written.

Definition at line 100 of file _fixed.h.

Member Typedef Documentation

template<class T, unsigned int FIXED_BITS>
typedef T fixed_base< T, FIXED_BITS >::value_type

Definition at line 103 of file _fixed.h.

template<class T, unsigned int FIXED_BITS>
typedef fixed_base<T,FIXED_BITS> fixed_base< T, FIXED_BITS >::_fixed
private

Definition at line 107 of file _fixed.h.

template<class T, unsigned int FIXED_BITS>
typedef fixed_base<T,FIXED_BITS> fixed_base< T, FIXED_BITS >::self_type
private

Definition at line 108 of file _fixed.h.

Constructor & Destructor Documentation

template<class T , unsigned int FIXED_BITS>
fixed_base< T, FIXED_BITS >::fixed_base ( )

Definition at line 177 of file _fixed.h.

template<class T , unsigned int FIXED_BITS>
fixed_base< T, FIXED_BITS >::fixed_base ( const float &  f)

Definition at line 185 of file _fixed.h.

template<class T , unsigned int FIXED_BITS>
fixed_base< T, FIXED_BITS >::fixed_base ( const double &  f)

Definition at line 192 of file _fixed.h.

template<class T , unsigned int FIXED_BITS>
fixed_base< T, FIXED_BITS >::fixed_base ( const long double &  f)

Definition at line 199 of file _fixed.h.

template<class T , unsigned int FIXED_BITS>
fixed_base< T, FIXED_BITS >::fixed_base ( const int &  i)

Definition at line 206 of file _fixed.h.

template<class T , unsigned int FIXED_BITS>
fixed_base< T, FIXED_BITS >::fixed_base ( const int &  n,
const int &  d 
)

Fraction constructor.

Definition at line 213 of file _fixed.h.

template<class T , unsigned int FIXED_BITS>
fixed_base< T, FIXED_BITS >::fixed_base ( const _fixed x)

Definition at line 181 of file _fixed.h.

template<class T , unsigned int FIXED_BITS>
fixed_base< T, FIXED_BITS >::fixed_base ( value_type  x,
raw   
)

Definition at line 210 of file _fixed.h.

Member Function Documentation

template<class T , unsigned int FIXED_BITS>
bool fixed_base< T, FIXED_BITS >::_TYPE_SMALLER_THAN_INT ( )
inlinestaticprivate

Definition at line 218 of file _fixed.h.

template<class T , unsigned int FIXED_BITS>
bool fixed_base< T, FIXED_BITS >::_USING_ALL_BITS ( )
inlinestaticprivate

Definition at line 224 of file _fixed.h.

template<class T , unsigned int FIXED_BITS>
T fixed_base< T, FIXED_BITS >::_ONE ( )
inlinestaticprivate

Definition at line 230 of file _fixed.h.

template<class T , unsigned int FIXED_BITS>
T fixed_base< T, FIXED_BITS >::_F_MASK ( )
inlinestaticprivate

Definition at line 236 of file _fixed.h.

template<class T , unsigned int FIXED_BITS>
float fixed_base< T, FIXED_BITS >::_EPSILON ( )
inlinestaticprivate

Definition at line 242 of file _fixed.h.

template<class T , unsigned int FIXED_BITS>
T & fixed_base< T, FIXED_BITS >::data ( )
template<class T , unsigned int FIXED_BITS>
const T & fixed_base< T, FIXED_BITS >::data ( ) const

Definition at line 255 of file _fixed.h.

template<class T , unsigned int FIXED_BITS>
const fixed_base< T, FIXED_BITS > & fixed_base< T, FIXED_BITS >::operator+= ( const _fixed rhs)

fixed+=fixed

Definition at line 262 of file _fixed.h.

References fixed_base< T, FIXED_BITS >::_data.

template<class T , unsigned int FIXED_BITS>
const fixed_base< T, FIXED_BITS > & fixed_base< T, FIXED_BITS >::operator-= ( const _fixed rhs)

fixed-=fixed

Definition at line 270 of file _fixed.h.

References fixed_base< T, FIXED_BITS >::_data.

template<class T , unsigned int FIXED_BITS>
template<typename U >
const fixed_base< T, FIXED_BITS > & fixed_base< T, FIXED_BITS >::operator*= ( const U &  rhs)

Definition at line 306 of file _fixed.h.

template<class T , unsigned int FIXED_BITS>
template<typename U >
const fixed_base< T, FIXED_BITS > & fixed_base< T, FIXED_BITS >::operator/= ( const U &  rhs)

Definition at line 312 of file _fixed.h.

template<class T , unsigned int FIXED_BITS>
const fixed_base< T, FIXED_BITS > & fixed_base< T, FIXED_BITS >::operator*= ( const _fixed rhs)

fixed*=fixed

Definition at line 278 of file _fixed.h.

References fixed_base< T, FIXED_BITS >::_data.

template<class T , unsigned int FIXED_BITS>
const fixed_base< T, FIXED_BITS > & fixed_base< T, FIXED_BITS >::operator/= ( const _fixed rhs)

fixed/=fixed

Definition at line 293 of file _fixed.h.

References fixed_base< T, FIXED_BITS >::_data.

template<class T , unsigned int FIXED_BITS>
const fixed_base< T, FIXED_BITS > & fixed_base< T, FIXED_BITS >::operator*= ( const int &  rhs)

fixed*=int

Definition at line 319 of file _fixed.h.

template<class T , unsigned int FIXED_BITS>
const fixed_base< T, FIXED_BITS > & fixed_base< T, FIXED_BITS >::operator/= ( const int &  rhs)

fixed/=int

Definition at line 326 of file _fixed.h.

template<class T , unsigned int FIXED_BITS>
template<typename U >
fixed_base< T, FIXED_BITS > fixed_base< T, FIXED_BITS >::operator+ ( const U &  rhs) const

fixed + ...

Definition at line 377 of file _fixed.h.

template<class T , unsigned int FIXED_BITS>
template<typename U >
fixed_base< T, FIXED_BITS > fixed_base< T, FIXED_BITS >::operator- ( const U &  rhs) const

fixed - ...

Definition at line 384 of file _fixed.h.

template<class T , unsigned int FIXED_BITS>
template<typename U >
fixed_base< T, FIXED_BITS > fixed_base< T, FIXED_BITS >::operator* ( const U &  rhs) const

fixed * ...

Definition at line 391 of file _fixed.h.

References operator*().

template<class T , unsigned int FIXED_BITS>
template<typename U >
fixed_base< T, FIXED_BITS > fixed_base< T, FIXED_BITS >::operator/ ( const U &  rhs) const

fixed / ...

Definition at line 398 of file _fixed.h.

template<class T , unsigned int FIXED_BITS>
fixed_base< T, FIXED_BITS > fixed_base< T, FIXED_BITS >::operator+ ( const _fixed rhs) const

fixed + fixed

Definition at line 339 of file _fixed.h.

References fixed_base< T, FIXED_BITS >::_data.

template<class T , unsigned int FIXED_BITS>
fixed_base< T, FIXED_BITS > fixed_base< T, FIXED_BITS >::operator- ( const _fixed rhs) const

fixed - fixed

Definition at line 348 of file _fixed.h.

References fixed_base< T, FIXED_BITS >::_data.

template<class T , unsigned int FIXED_BITS>
fixed_base< T, FIXED_BITS > fixed_base< T, FIXED_BITS >::operator* ( const _fixed rhs) const

fixed * fixed

Definition at line 357 of file _fixed.h.

References fixed_base< T, FIXED_BITS >::_data.

template<class T , unsigned int FIXED_BITS>
fixed_base< T, FIXED_BITS > fixed_base< T, FIXED_BITS >::operator/ ( const _fixed rhs) const

fixed / fixed

Definition at line 367 of file _fixed.h.

References fixed_base< T, FIXED_BITS >::_data.

template<class T , unsigned int FIXED_BITS>
fixed_base< T, FIXED_BITS > fixed_base< T, FIXED_BITS >::operator* ( const int &  rhs) const

fixed * int

Definition at line 405 of file _fixed.h.

References fixed_base< T, FIXED_BITS >::_data.

template<class T , unsigned int FIXED_BITS>
fixed_base< T, FIXED_BITS > fixed_base< T, FIXED_BITS >::operator/ ( const int &  rhs) const

fixed / int

Definition at line 430 of file _fixed.h.

References fixed_base< T, FIXED_BITS >::_data.

template<class T , unsigned int FIXED_BITS>
fixed_base< T, FIXED_BITS > fixed_base< T, FIXED_BITS >::operator* ( const float &  rhs) const

fixed * float

Definition at line 415 of file _fixed.h.

template<class T , unsigned int FIXED_BITS>
fixed_base< T, FIXED_BITS > fixed_base< T, FIXED_BITS >::operator* ( const double &  rhs) const

fixed * double

Definition at line 422 of file _fixed.h.

template<class T , unsigned int FIXED_BITS>
fixed_base< T, FIXED_BITS > fixed_base< T, FIXED_BITS >::operator- ( ) const

Definition at line 459 of file _fixed.h.

References fixed_base< T, FIXED_BITS >::_data.

template<class T , unsigned int FIXED_BITS>
fixed_base< T, FIXED_BITS >::operator float ( ) const
inline

Definition at line 466 of file _fixed.h.

template<class T , unsigned int FIXED_BITS>
fixed_base< T, FIXED_BITS >::operator double ( ) const
inline

Definition at line 472 of file _fixed.h.

template<class T , unsigned int FIXED_BITS>
fixed_base< T, FIXED_BITS >::operator long double ( ) const
inline

Definition at line 478 of file _fixed.h.

template<class T , unsigned int FIXED_BITS>
fixed_base< T, FIXED_BITS >::operator int ( ) const
inline

Definition at line 484 of file _fixed.h.

template<class T , unsigned int FIXED_BITS>
fixed_base< T, FIXED_BITS >::operator bool ( ) const
inline

Definition at line 490 of file _fixed.h.

template<class T , unsigned int FIXED_BITS>
fixed_base< T, FIXED_BITS > fixed_base< T, FIXED_BITS >::floor ( ) const

Definition at line 497 of file _fixed.h.

References fixed_base< T, FIXED_BITS >::_data.

template<class T , unsigned int FIXED_BITS>
fixed_base< T, FIXED_BITS > fixed_base< T, FIXED_BITS >::ceil ( ) const

Definition at line 505 of file _fixed.h.

References fixed_base< T, FIXED_BITS >::_data.

template<class T , unsigned int FIXED_BITS>
fixed_base< T, FIXED_BITS > fixed_base< T, FIXED_BITS >::round ( ) const

Definition at line 516 of file _fixed.h.

References fixed_base< T, FIXED_BITS >::_data.

template<class T, unsigned int FIXED_BITS>
bool fixed_base< T, FIXED_BITS >::operator== ( const _fixed rhs) const
inline

Definition at line 167 of file _fixed.h.

template<class T, unsigned int FIXED_BITS>
bool fixed_base< T, FIXED_BITS >::operator!= ( const _fixed rhs) const
inline

Definition at line 168 of file _fixed.h.

template<class T, unsigned int FIXED_BITS>
bool fixed_base< T, FIXED_BITS >::operator< ( const _fixed rhs) const
inline

Definition at line 169 of file _fixed.h.

template<class T, unsigned int FIXED_BITS>
bool fixed_base< T, FIXED_BITS >::operator> ( const _fixed rhs) const
inline

Definition at line 170 of file _fixed.h.

template<class T, unsigned int FIXED_BITS>
bool fixed_base< T, FIXED_BITS >::operator<= ( const _fixed rhs) const
inline

Definition at line 171 of file _fixed.h.

template<class T, unsigned int FIXED_BITS>
bool fixed_base< T, FIXED_BITS >::operator>= ( const _fixed rhs) const
inline

Definition at line 172 of file _fixed.h.

Member Data Documentation

template<class T, unsigned int FIXED_BITS>
T fixed_base< T, FIXED_BITS >::_data
private

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