Main Page   Namespace List   Class Hierarchy   Alphabetical List   Compound List   File List   Namespace Members   Compound Members   File Members   Related Pages  

SFCPathFactory.h

Go to the documentation of this file.
00001 /*
00002  * @(#)include/SFCPathFactory.h  1.0  2002-08-27 16:20
00003  *
00004  * Copyright (C)  2002  Daniel Léonard
00005  *
00006  * This program is free software; you can redistribute it and/or
00007  * modify it under the terms of the GNU General Public License
00008  * as published by the Free Software Foundation; either version 2
00009  * of the License, or (at your option) any later version.
00010  *
00011  * This program 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 this program; if not, write to the Free Software
00018  * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA  02111-1307, USA.
00019  */
00020 
00027 #ifndef _SFC_PATH_FACTORY_H_
00028 #define _SFC_PATH_FACTORY_H_
00029 
00030 #include <stdexcept>
00031 
00032 namespace halftoner
00033 {
00034    class SFCPath;
00035 
00040    class SFCPathFactory
00041    {
00042       public:
00048          class SizeMnemonic
00049          {
00050             protected:
00054                SizeMnemonic() throw();
00055 
00056             public:
00060                virtual ~SizeMnemonic() throw();
00061 
00064 
00068                virtual SFCPath* operator()() const throw() = 0;
00070          };
00071 
00072       private:
00076          class SizeMnemonic32 : public SizeMnemonic
00077          {
00078             public:
00081 
00084                SFCPath* operator()() const throw();
00086          };
00087 
00091          class SizeMnemonic64 : public SizeMnemonic
00092          {
00093             public:
00096 
00099                SFCPath* operator()() const throw();
00101          };
00102 
00106          class SizeMnemonic128 : public SizeMnemonic
00107          {
00108             public:
00111 
00114                SFCPath* operator()() const throw();
00116          };
00117 
00121          class SizeMnemonic256 : public SizeMnemonic
00122          {
00123             public:
00126 
00129                SFCPath* operator()() const throw();
00131          };
00132 
00136          class SizeMnemonic512 : public SizeMnemonic
00137          {
00138             public:
00141 
00144                SFCPath* operator()() const throw();
00146          };
00147 
00150 
00151          static const SFCPathFactory::SizeMnemonic32 sfc32;
00153          static const SFCPathFactory::SizeMnemonic64 sfc64;
00155          static const SFCPathFactory::SizeMnemonic128 sfc128;
00157          static const SFCPathFactory::SizeMnemonic256 sfc256;
00159          static const SFCPathFactory::SizeMnemonic512 sfc512;
00160 
00161       public:
00163          static const SFCPathFactory::SizeMnemonic& SFC32;
00165          static const SFCPathFactory::SizeMnemonic& SFC64;
00167          static const SFCPathFactory::SizeMnemonic& SFC128;
00169          static const SFCPathFactory::SizeMnemonic& SFC256;
00171          static const SFCPathFactory::SizeMnemonic& SFC512;
00173 
00174       private:
00177 
00180          SFCPathFactory() throw();
00184          SFCPathFactory(const SFCPathFactory&) throw();
00188          SFCPathFactory operator=(const SFCPathFactory) throw();
00190 
00191       public:
00195          ~SFCPathFactory() throw();
00196 
00199 
00205          static SFCPath* getInstance(const SFCPathFactory::SizeMnemonic& mnemonic) throw();
00207    };
00208 
00209 }
00210 
00211 #endif   /* #ifndef _SFC_PATH_FACTORY_H_ */

Generated on Sat Sep 7 16:31:40 2002 for Halftoning Library by doxygen1.2.17