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

ltiSupervisedInstanceClassifierFactory.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 .......: ltiSupervisedInstanceClassifierFactory.h
00027  * authors ....: Jens Paustenbach
00028  * organization: LTI, RWTH Aachen
00029  * creation ...: 30.10.2002
00030  * revisions ..: $Id: ltiSupervisedInstanceClassifierFactory.h,v 1.3 2006/02/07 18:27:12 ltilib Exp $
00031  */
00032 
00033 #ifndef _LTI_SUPERVISED_INSTANCE_CLASSIFIER_FACTORY
00034 #define _LTI_SUPERVISED_INSTANCE_CLASSIFIER_FACTORY
00035 
00036 #include "ltiSupervisedInstanceClassifier.h"
00037 #include "ltiObjectFactory.h"
00038 
00039 namespace lti {
00040 
00041   /**
00042    * This class defines a factory for classifiers.
00043    *
00044    */
00045   class supervisedInstanceClassifierFactory: public object {
00046 
00047   public:
00048     /**
00049      * Constructor.
00050      */
00051     supervisedInstanceClassifierFactory();
00052 
00053     /**
00054      * Destructor.
00055      */
00056     virtual ~supervisedInstanceClassifierFactory();
00057 
00058     /**
00059      * returns the name of this type ("supervisedInstanceClassifierFactory")
00060      */
00061     virtual const char* getTypeName() const;
00062 
00063     /**
00064      * Creates a new instance of the class whose name is given
00065      * as parameter, if this class is known to the factory.
00066      * Otherwise, it returns null.
00067      * @param name name of the to-be instantiated class.
00068      * @return a new instance.
00069      */
00070     virtual supervisedInstanceClassifier* newInstance(const char *name) const;
00071 
00072     /**
00073      * Creates a new instance of the class whose name is given
00074      * as parameter, if this class is known to the factory.
00075      * Otherwise, it returns null.
00076      * @param name name of the to-be instantiated class.
00077      * @return a new instance.
00078      */
00079     virtual supervisedInstanceClassifier* newInstance(const std::string& name) const {
00080       return newInstance(name.c_str());
00081     }
00082 
00083   private:
00084 
00085     /**
00086      * supervisedInstanceClassifiers used in the factory
00087      */
00088     static const supervisedInstanceClassifier *const  classifiers[];
00089 
00090     /**
00091      * the real object factory
00092      */
00093     static objectFactory<supervisedInstanceClassifier> factory;
00094 
00095   };
00096 
00097 
00098 }
00099 
00100 #endif

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