00001 #ifndef _FTWO_H_
00002 #define _FTWO_H_
00003
00004 #include <iostream>
00005 #include <fstream>
00006 using namespace std;
00007
00008
00009
00010 class F_2 {
00011 private:
00012 bool value;
00013
00014 public:
00015
00016 F_2();
00017 F_2(long n);
00018
00019 F_2& operator+=(const F_2& that);
00020 F_2 operator+(const F_2& that) const;
00021 F_2& operator-=(const F_2& that);
00022 F_2 operator-(const F_2& that) const;
00023 F_2& operator*=(const F_2& that);
00024 F_2 operator*(const F_2& that) const;
00025 F_2& operator/=(const F_2& that);
00026 F_2 operator/(const F_2& that) const;
00027
00028 F_2& operator-();
00029 F_2 operator-() const;
00030
00031 bool operator<(const F_2& that) const;
00032 bool operator==(const F_2& that) const;
00033 bool operator!=(const F_2& that) const;
00034
00035
00036
00037 friend ostream& operator<<(ostream& os, const F_2& x);
00038 friend ofstream& operator<<(ofstream& file, F_2& x);
00039 friend void operator>>(ifstream& file, F_2& x);
00040
00041
00042 friend F_2 operator+(long n, const F_2& x);
00043 friend F_2 operator-(long n, const F_2& x);
00044 friend F_2 operator*(long n, const F_2& x);
00045 friend F_2 operator/(long n, const F_2& x);
00046
00047
00048
00049
00050
00051
00052
00053 };
00054
00055
00056
00057
00058
00059
00060
00061
00062
00063
00064
00065
00066
00067 #endif