Color.h

Go to the documentation of this file.
00001 /*
00002  * Copyright (C) 2009 Kamil Dudka <xdudka00@stud.fit.vutbr.cz>
00003  *
00004  * This file is part of nucad (Non-Uniform CA Designer).
00005  *
00006  * nucad is free software: you can redistribute it and/or modify
00007  * it under the terms of the GNU General Public License as published by
00008  * the Free Software Foundation, either version 3 of the License, or
00009  * any later version.
00010  *
00011  * nucad is distributed in the hope that it will be useful,
00012  * but WITHOUT ANY WARRANTY; without even the implied warranty of
00013  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
00014  * GNU General Public License for more details.
00015  *
00016  * You should have received a copy of the GNU General Public License
00017  * along with nucad.  If not, see <http://www.gnu.org/licenses/>.
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 /* COLOR_H */

Generated on Sat May 2 16:39:31 2009 for nucad by  doxygen 1.5.4