00001 /* Copyright (C) 2002 Dominic Letourneau (dominic.letourneau@usherbrooke.ca) 00002 00003 This library is free software; you can redistribute it and/or 00004 modify it under the terms of the GNU Lesser General Public 00005 License as published by the Free Software Foundation; either 00006 version 2.1 of the License, or (at your option) any later version. 00007 00008 This library is distributed in the hope that it will be useful, 00009 but WITHOUT ANY WARRANTY; without even the implied warranty of 00010 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 00011 Lesser General Public License for more details. 00012 00013 You should have received a copy of the GNU Lesser General Public 00014 License along with this library; if not, write to the Free Software 00015 Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA 00016 */ 00017 #ifndef _COLOR_LOOKUP_H_ 00018 #define _COLOR_LOOKUP_H_ 00019 00020 #include "Object.h" 00021 00022 namespace RobotFlow { 00023 00024 class ColorLookup : public FD::Object { 00025 00026 public: 00027 00028 ColorLookup(); 00029 00030 ColorLookup(unsigned int* lookup); 00031 00032 ColorLookup(const ColorLookup &cpy); 00033 00034 unsigned int& operator[](int pos); 00035 00036 ColorLookup& operator= (const ColorLookup &cpy); 00037 00038 void printOn(std::ostream &out = std::cout) const; 00039 00040 void readFrom(std::istream &in); 00041 00042 unsigned *get_lookup() {return &m_color_lookup[0];} 00043 00044 private: 00045 00046 unsigned int m_color_lookup[32768]; 00047 00048 }; 00049 00050 }//namespace RobotFlow 00051 #endif