System documentation of the GNU Image-Finding Tool

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

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 This program is free software; you can redistribute it and/or modify 00009 it under the terms of the GNU General Public License as published by 00010 the Free Software Foundation; either version 2 of the License, or 00011 (at your option) any later version. 00012 00013 This program is distributed in the hope that it will be useful, 00014 but WITHOUT ANY WARRANTY; without even the implied warranty of 00015 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 00016 GNU General Public License for more details. 00017 00018 You should have received a copy of the GNU General Public License 00019 along with this program; if not, write to the Free Software 00020 Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA 00021 00022 */ 00023 // -*- mode: c++ -*- 00024 00025 #ifndef _CALGORITHM 00026 #define _CALGORITHM 00027 #include "libMRML/include/uses-declarations.h" 00028 #include "libMRML/include/CXMLElement.h" 00029 #include "libMRML/include/CSelfDestroyPointer.h" 00030 #include <map> 00031 00032 class CQuery; 00033 class CAlgorithmCollection; 00041 class CAlgorithm:public CXMLElement{ 00042 protected: 00043 public: 00047 virtual void addChild(const string&, 00048 const char* const* const inAttributeList=0); 00052 virtual void addChild(CXMLElement* inChild); 00053 00054 // /** reading an attribute for strings 00055 00056 // here we extend the inheritance mechanism. We do not only look at 00057 // parents, but also at the default values provided by the configuration. 00058 00059 // this is virtual in order to plug in other methods of inheritance 00060 00061 // @see: CXMLElement.h#stringReadAttribute 00062 // */ 00063 // virtual pair<bool,string> stringReadAttribute(const string& inAttribute)const; 00075 bool configure(CAlgorithmCollection& inBaseConfiguration); 00088 void mergeAttributes(const CAlgorithm& inAlgorithm); 00101 void mergeChildLists(const CAlgorithm& inAlgorithm); 00104 string getCollectionID()const; 00107 double getWeight()const; 00110 string getAlgorithmName()const; 00113 pair<bool,string> getType()const; 00117 pair<bool,string> getInheritsFrom()const; 00120 string getBaseType()const; 00123 string getID()const; 00125 string toOldMRML()const; 00129 void setDefault(CAlgorithm& inDefault); 00131 CAlgorithm* clone()const; 00133 CAlgorithm(const char* , 00134 const char* const* const inAttributeList=0); 00136 CAlgorithm(const string& , 00137 const list< pair<string,string> >& inList); 00139 CAlgorithm(const CXMLElement& inAlgorithm); 00141 CAlgorithm(const CAlgorithm& inAlgorithm); 00142 }; 00143 00144 00145 //---------------------------------------- 00146 //probably obsolete 00147 //---------------------------------------- 00148 class CSortByID_CA:public binary_function<const CAlgorithm&,const CAlgorithm&,bool>{ 00149 public: 00150 bool operator()(const CAlgorithm& l, 00151 const CAlgorithm& t)const; 00152 }; 00153 //---------------------------------------- 00154 //probably obsolete 00155 //---------------------------------------- 00156 class CSortByBase_CA:public binary_function<const CAlgorithm&,const CAlgorithm&,bool>{ 00157 public: 00158 bool operator()(const CAlgorithm& l, 00159 const CAlgorithm& t)const; 00160 }; 00161 00162 #endif

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