System documentation of the GNU Image-Finding Tool

CAlgorithm.h
00001 /* -*- mode: c++ -*- 
00002 */
00003 /* 
00004 
00005     GIFT, a flexible content based image retrieval system.
00006     Copyright (C) 1998, 1999, 2000, 2001, 2002, CUI University of Geneva
00007 
00008      Copyright (C) 2003, 2004 Bayreuth University
00009       2005 Bamberg University
00010     This program is free software; you can redistribute it and/or modify
00011     it under the terms of the GNU General Public License as published by
00012     the Free Software Foundation; either version 2 of the License, or
00013     (at your option) any later version.
00014 
00015     This program is distributed in the hope that it will be useful,
00016     but WITHOUT ANY WARRANTY; without even the implied warranty of
00017     MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
00018     GNU General Public License for more details.
00019 
00020     You should have received a copy of the GNU General Public License
00021     along with this program; if not, write to the Free Software
00022     Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
00023 
00024 */
00025 // -*- mode: c++ -*-
00026 
00027 #ifndef _CALGORITHM
00028 #define _CALGORITHM
00029 #include "libMRML/include/uses-declarations.h"
00030 #include "libMRML/include/CXMLElement.h"
00031 #include "libMRML/include/CSelfDestroyPointer.h"
00032 #include <map>
00033 
00034 class CQuery;
00035 class CAlgorithmCollection;
00043 class CAlgorithm:public CXMLElement{
00044 protected:
00045 public:
00049   virtual void addChild(const string&,
00050                         const char* const* const inAttributeList=0);
00054   virtual void addChild(CXMLElement* inChild);
00055 
00056   //   /** reading an attribute for strings 
00057   
00058   //       here we extend the inheritance mechanism. We do not only look at
00059   //       parents, but also at the default values provided by the configuration.
00060   
00061   //       this is virtual in order to plug in other methods of inheritance
00062   
00063   //       @see: CXMLElement.h#stringReadAttribute
00064   //    */
00065   //   virtual pair<bool,string> stringReadAttribute(const string& inAttribute)const;
00077   bool configure(CAlgorithmCollection& inBaseConfiguration);
00090   void mergeAttributes(const CAlgorithm& inAlgorithm);
00103   void mergeChildLists(const CAlgorithm& inAlgorithm);
00106   string getCollectionID()const;
00109   double getWeight()const;
00112   string getAlgorithmName()const;
00115   pair<bool,string> getType()const;
00119   pair<bool,string> getInheritsFrom()const;
00122   string getBaseType()const;
00125   string getID()const;
00127   string toOldMRML()const;
00131   void setDefault(CAlgorithm& inDefault);
00133   CAlgorithm* clone()const;
00135   CAlgorithm(const char* ,
00136              const char* const* const inAttributeList=0);
00138   CAlgorithm(const string& ,
00139              const list< pair<string,string> >& inList);
00141   CAlgorithm(const CXMLElement& inAlgorithm);
00143   CAlgorithm(const CAlgorithm& inAlgorithm);
00144 };
00145 
00146 
00147 //----------------------------------------
00148 //probably obsolete
00149 //----------------------------------------
00150 class CSortByID_CA:public binary_function<const CAlgorithm&,const CAlgorithm&,bool>{
00151 public:
00152   bool operator()(const CAlgorithm& l,
00153                   const CAlgorithm& t)const;
00154 };
00155 //----------------------------------------
00156 //probably obsolete
00157 //----------------------------------------
00158 class CSortByBase_CA:public binary_function<const CAlgorithm&,const CAlgorithm&,bool>{
00159 public:
00160   bool operator()(const CAlgorithm& l,
00161                   const CAlgorithm& t)const;
00162 };
00163 
00164 #endif

Need for discussion? Want to contribute? Contact
help-gift@gnu.org Generated using Doxygen