LTI-Lib latest version v1.9 - last update 10 Apr 2010

ltiScalarValuedInterpolatorFactory.h

00001 /*
00002  * Copyright (C) 2002, 2003, 2004, 2005, 2006
00003  * Lehrstuhl fuer Technische Informatik, RWTH-Aachen, Germany
00004  *
00005  * This file is part of the LTI-Computer Vision Library (LTI-Lib)
00006  *
00007  * The LTI-Lib is free software; you can redistribute it and/or
00008  * modify it under the terms of the GNU Lesser General Public License (LGPL)
00009  * as published by the Free Software Foundation; either version 2.1 of
00010  * the License, or (at your option) any later version.
00011  *
00012  * The LTI-Lib is distributed in the hope that it will be
00013  * useful, but WITHOUT ANY WARRANTY; without even the implied warranty
00014  * of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
00015  * GNU Lesser General Public License for more details.
00016  *
00017  * You should have received a copy of the GNU Lesser General Public
00018  * License along with the LTI-Lib; see the file LICENSE.  If
00019  * not, write to the Free Software Foundation, Inc., 59 Temple Place -
00020  * Suite 330, Boston, MA 02111-1307, USA.
00021  */
00022 
00023 
00024 /*----------------------------------------------------------------
00025  * project ....: LTI Digital Image/Signal Processing Library
00026  * file .......: ltiScalarValuedInterpolatorFactory.h
00027  * authors ....: Pablo Alvarado
00028  * organization: LTI, RWTH Aachen
00029  * creation ...: 30.10.2002
00030  * revisions ..: $Id: ltiScalarValuedInterpolatorFactory.h,v 1.6 2006/02/08 11:47:27 ltilib Exp $
00031  */
00032 
00033 #ifndef _LTI_SCALAR_VALUED_INTERPOLATOR_FACTORY
00034 #define _LTI_SCALAR_VALUED_INTERPOLATOR_FACTORY
00035 
00036 #include <string>
00037 
00038 #include "ltiScalarValuedInterpolation.h"
00039 #include "ltiObjectFactory.h"
00040 
00041 namespace lti {
00042 
00043   /**
00044    * This class defines a factory for interpolator functors
00045    * derived from lti::scalarValuedInterpolation<T>.
00046    *
00047    * The factory is a template class, where the template parameter \c T
00048    * describes the lti::scalarValueInterpolator template type.
00049    *
00050    * @see lti::objectFactory
00051    */
00052   template<class T>
00053   class scalarValuedInterpolatorFactory: public object {
00054 
00055   public:
00056     /**
00057      * Constructor.
00058      */
00059     scalarValuedInterpolatorFactory();
00060 
00061     /**
00062      * Destructor.
00063      */
00064     virtual ~scalarValuedInterpolatorFactory();
00065 
00066     /**
00067      * returns the name of this type ("scalarValuedInterpolatorFactory")
00068      */
00069     virtual const char* getTypeName() const;
00070 
00071     /**
00072      * Creates a new instance of the class whose name is given
00073      * as parameter, if this class is known to the factory.
00074      * Otherwise, it returns null.
00075      * @param name name of the to-be instantiated class.
00076      * @return a new instance.
00077      */
00078     virtual scalarValuedInterpolation<T>* newInstance(const char *name) const {
00079       return newInstance(std::string(name));
00080     };
00081 
00082     /**
00083      * Creates a new instance of the class whose name is given
00084      * as parameter, if this class is known to the factory.
00085      * Otherwise, it returns null.
00086      * @param name name of the to-be instantiated class.
00087      * @return a new instance.
00088      */
00089     virtual scalarValuedInterpolation<T>* 
00090     newInstance(const std::string& name) const;
00091 
00092   private:
00093 
00094     /**
00095      * interpolators used in the factory
00096      */
00097     static const scalarValuedInterpolation<T> *const 
00098     scalarValuedInterpolators[];
00099 
00100     /**
00101      * the real object factory
00102      */
00103     static objectFactory< scalarValuedInterpolation<T> >* factory;
00104   };
00105 
00106 
00107 }
00108 
00109 #endif

Generated on Sat Apr 10 15:26:06 2010 for LTI-Lib by Doxygen 1.6.1