fixed.hpp File Reference

#include <cassert>
#include <cmath>
#include <iomanip>
#include <ios>
#include <istream>
#include <locale>
#include <ostream>
#include <sstream>
#include <stdexcept>
#include <string>
#include "ioflags.hpp"

Go to the source code of this file.

Classes

class  fixed< T, N >
 Implement a fixed-point number class template. Values have N places after the decimal point. All arithmetic follows the usual rules. More...

Functions

template<class T, int N, class Char, class Traits>
std::basic_istream
< Char, Traits > & 
operator>> (std::basic_istream< Char, Traits > &strm, fixed< T, N > &f)
 Read a fixed value.
template<class T, int N, class Char, class Traits>
std::basic_ostream
< Char, Traits > & 
operator<< (std::basic_ostream< Char, Traits > &strm, fixed< T, N > f)
 Write a fixed value.
template<class T, int N>
fixed< T, N > operator+ (fixed< T, N > a, fixed< T, N > b)
 Add fixed values.
template<class T, int N>
fixed< T, N > operator- (fixed< T, N > a, fixed< T, N > b)
 Subtract fixed values.
template<class T, int N>
fixed< T, N > operator * (fixed< T, N > a, fixed< T, N > b)
 Multiply fixed values.
template<class T, int N>
fixed< T, N > operator/ (fixed< T, N > a, fixed< T, N > b)
 Divide fixed values.
template<class T, int N>
fixed< T, N > operator- (fixed< T, N > a)
 Negate a fixed value.
template<class T, int N>
bool operator== (fixed< T, N > a, fixed< T, N > b)
 Compare fixed values for equality by comparing the underlying values.
template<class T, int N>
bool operator== (T a, fixed< T, N > b)
 Compare fixed values for equality by comparing the value wih an integer.
template<class T, int N>
bool operator== (fixed< T, N > a, T b)
 Compare fixed values for equality by comparing the value wih an integer.
template<class T, int N>
bool operator!= (fixed< T, N > a, fixed< T, N > b)
 Compare fixed values for inequality by comparing the underlying values.
template<class T, int N>
bool operator!= (T a, fixed< T, N > b)
 Compare fixed values for inequality by comparing the value wih an integer.
template<class T, int N>
bool operator!= (fixed< T, N > a, T b)
 Compare fixed values for inequality by comparing the value wih an integer.
template<class T, int N>
bool operator< (fixed< T, N > a, fixed< T, N > b)
 Compare fixed values for less-than by comparing the underlying values.
template<class T, int N>
bool operator< (T a, fixed< T, N > b)
 Compare fixed values for less-than by comparing the value wih an integer.
template<class T, int N>
bool operator< (fixed< T, N > a, T b)
 Compare fixed values for less-than by comparing the value wih an integer.
template<class T, int N>
bool operator> (fixed< T, N > a, fixed< T, N > b)
 Compare fixed values for greater-than by comparing the underlying values.
template<class T, int N>
bool operator> (T a, fixed< T, N > b)
 Compare fixed values for greater-than by comparing the value wih an integer.
template<class T, int N>
bool operator> (fixed< T, N > a, T b)
 Compare fixed values for greater-than by comparing the value wih an integer.
template<class T, int N>
bool operator<= (fixed< T, N > a, fixed< T, N > b)
 Compare fixed values for less-than-or-equal by comparing the underlying values.
template<class T, int N>
bool operator<= (T a, fixed< T, N > b)
 Compare fixed values for less-than-or-equal by comparing the value wih an integer.
template<class T, int N>
bool operator<= (fixed< T, N > a, T b)
 Compare fixed values for less-than-or-equal by comparing the value wih an integer.
template<class T, int N>
bool operator>= (fixed< T, N > a, fixed< T, N > b)
 Compare fixed values for greater-than-or-equal by comparing the underlying values.
template<class T, int N>
bool operator>= (T a, fixed< T, N > b)
 Compare fixed values for greater-than-or-equal by comparing the value wih an integer.
template<class T, int N>
bool operator>= (fixed< T, N > a, T b)
 Compare fixed values for greater-than-or-equal by comparing the value wih an integer.


Detailed Description

Definition in file fixed.hpp.


Generated on Sun Nov 30 10:03:13 2008 for Project 3 - Currency Type by  doxygen 1.5.3