System documentation of the GNU Image-Finding Tool

CAccessorImplementation.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 #ifndef _CACCESSORIMPLEMENTATION
00026 #define _CACCESSORIMPLEMENTATION
00027 #include "libMRML/include/uses-declarations.h"
00028 #include "libMRML/include/CMagic.h"
00029 #include <string>
00030 #include "libMRML/include/TID.h"
00031 #include <iostream>
00032 #include <fstream>
00033 #include <map>
00034 
00035 #ifdef HAS_HASH_MAP
00036 #include <hash_map>
00037 #else
00038 #define hash_map map
00039 #endif
00040 
00041 #include "libMRML/include/CAccessor.h"
00042 #include "libMRML/include/CAccessorElement.h"
00043 
00049 class string_string_map:public map<string,string>{
00050 };
00051 
00057 class string_TID_map:public map<string,TID>{
00058 };
00059 
00065 class TID_string_map:public map<TID,string>{
00066 };
00072 class TID_CAccessorElement_map:public map<TID,CAccessorElement>{
00073 };
00074 
00092 class CAccessorImplementation:public CAccessor{
00093 
00094 protected:
00095 
00099   string_TID_map mURLToID;
00100 
00102   TID_CAccessorElement_map mIDToAccessorElement;
00104 
00105 public:
00111   virtual operator bool()const=0;
00112 
00118   virtual string IDToURL(TID inID)const;
00124   virtual pair<bool,CAccessorElement> IDToAccessorElement(TID inID)const;
00125   
00131   virtual pair<bool,TID> URLToID(const string& inURL)const;
00132   
00141   void getAllIDs(list<TID>&)const;
00144   void getAllAccessorElements(list<CAccessorElement>&)const;
00149   void getRandomIDs(list<TID>&,
00150                     list<TID>::size_type)const;
00159   void getRandomAccessorElements(list<CAccessorElement>& outResult,
00160                                   list<CAccessorElement>::size_type inSize)const;
00162   int size()const;
00164 
00165 };
00166 
00167 #endif

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