00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019
00025 #ifndef COLOR_H
00026 #define COLOR_H
00027
00028 #include <iostream>
00029
00031 enum EColor {
00032 C_NO_COLOR = 0,
00033 C_BLUE,
00034 C_GREEN,
00035 C_CYAN,
00036 C_RED,
00037 C_PURPLE,
00038 C_BROWN,
00039 C_LIGHT_GRAY,
00040 C_DARK_GRAY,
00041 C_LIGHT_BLUE,
00042 C_LIGHT_GREEN,
00043 C_LIGHT_CYAN,
00044 C_LIGHT_RED,
00045 C_LIGHT_PURPLE,
00046 C_YELLOW,
00047 C_WHITE
00048 };
00049
00054 class Color {
00055 public:
00060 Color(EColor color = C_NO_COLOR);
00061 Color(const Color &);
00062 ~Color();
00067 static void enable(bool);
00071 static bool isEnabled();
00072 private:
00073 Color& operator= (const Color &);
00074 static bool useColors;
00075 struct Private;
00076 Private *d;
00077 friend std::ostream& operator<< (std::ostream &, const Color &);
00078 };
00080 std::ostream& operator<< (std::ostream &, const Color &);
00081
00083 class FixedFloat {
00084 public:
00089 FixedFloat(int integral, int decimal);
00090 ~FixedFloat();
00091 private:
00092 struct Private;
00093 Private *d;
00094 friend std::ostream& operator<< (std::ostream &stream, const FixedFloat &);
00095 };
00097 std::ostream& operator<< (std::ostream &stream, const FixedFloat &);
00098
00099 #endif