Main Page | Class Hierarchy | Alphabetical List | Class List | File List | Class Members

ucolorImpl.hpp

00001 /* ==================================================== ======== ======= *
00002  *
00003  *  ucolorImpl.hpp
00004  *  Ubit Project [Elc][2003]
00005  *  Author: Eric Lecolinet
00006  *
00007  *  Part of the Ubit Toolkit: A Brick Construction Game Model for Creating GUIs
00008  *
00009  *  (C) 1999-2003 Eric Lecolinet @ ENST Paris
00010  *  WWW: http://www.enst.fr/~elc/ubit   Email: elc@enst.fr (subject: ubit)
00011  *
00012  * ***********************************************************************
00013  * COPYRIGHT NOTICE : 
00014  * THIS PROGRAM IS DISTRIBUTED WITHOUT ANY WARRANTY AND WITHOUT EVEN THE 
00015  * IMPLIED WARRANTY OF MERCHANTABILITY OR FITNESS FOR A PARTICULAR PURPOSE. 
00016  * YOU CAN REDISTRIBUTE IT AND/OR MODIFY IT UNDER THE TERMS OF THE GNU 
00017  * GENERAL PUBLIC LICENSE AS PUBLISHED BY THE FREE SOFTWARE FOUNDATION; 
00018  * EITHER VERSION 2 OF THE LICENSE, OR (AT YOUR OPTION) ANY LATER VERSION.
00019  * SEE FILES 'COPYRIGHT' AND 'COPYING' FOR MORE DETAILS.
00020  * ***********************************************************************
00021  *
00022  * ==================================================== [Elc:03] ======= *
00023  * ==================================================== ======== ======= */
00024 
00025 #ifndef _ucolorImpl_hpp_
00026 #define _ucolorImpl_hpp_
00027 //pragma ident  "@(#)ucolorImpl.hpp     ubit:03.06.04"
00028 
00029 
00030 class UColorImpl {
00031 public:
00032   /* !!ATT: cette implementation suppose que les pixels ne sont utilises
00033    * que sur les 24 bits de droite !
00034    * de plus, il faut:  valid pixels < UNDEF < NONE < INHERIT <= ULONG_MAX
00035    */
00036   static const UX_Color UNDEF, NONE, INHERIT;
00037 
00038   UColorImpl(const char* colspec); // error if arg is null!
00039   UColorImpl(const char* colspec, UX_Color);
00040   ~UColorImpl();
00041 
00042   bool equals(const UColorImpl& ci2) const;
00043 
00044   void addRef() {refcount++;}
00045   void removeRef();
00046   u_count getRefCount() const {return refcount;}
00047 
00048 private:
00049   friend class UColor;
00050   friend class UNatDisp;
00051 
00052   unsigned short refcount;
00053   char *natspec;          // native ascii color spec.
00054   std::vector<UX_Color> colors;
00055 };
00056 
00057 
00058 #endif
00059 /* ==================================================== [TheEnd] ======= */
00060 /* ==================================================== [Elc:03] ======= */
00061 

Generated on Thu Mar 3 04:56:50 2005 for Ubit[Eric.Lecolinet@enst.fr] by  doxygen 1.4.1