System documentation of the GNU Image-Finding Tool

CAcPerl.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 #include "../../gift-config.h"
00026 #ifdef __GIFT_WITH_PERL__
00027 // -*- mode: c++ -*-
00028 #ifndef _CACPERL
00029 #define _CACPERL
00030 #include "libGIFTAcPerl/include/uses-declarations.h"
00047 #include <string>
00048 #include "libMRML/include/TID.h"
00049 #include <iostream>
00050 #include <fstream>
00051 #include <list>
00052 #include <map>
00053 #ifdef HAS_HASH_MAP
00054 #include <hash_map>
00055 #else
00056 #define hash_map map
00057 #endif
00058 #include "libMRML/include/CAccessor.h"
00059 #include "libMRML/include/CSelfDestroyPointer.h"
00060 
00061 class CXMLElement;//constructor
00062 
00072 class CAcPerl:public CAccessor{
00073  private:
00078   CSelfDestroyPointer<CXMLElement> mCollectionElement;
00079 
00080 public:
00081   
00094   CAcPerl(const CXMLElement& inContentElement);
00098   ~CAcPerl();
00099   
00105   virtual operator bool()const;
00106 
00113   CXMLElement* cloneCollectionElement()const;
00117   string IDToURL(long int) const;
00121   struct pair<bool,CAccessorElement> IDToAccessorElement(long int) const;
00125   struct pair<bool,long int> URLToID(const string &) const;
00129   void getAllIDs(list<TID> &) const;
00133   void getAllAccessorElements(list<CAccessorElement> &) const;
00137   void getRandomIDs(list<long int > &, unsigned int) const;
00141   void getRandomAccessorElements(list<CAccessorElement > &, unsigned int) const;
00145   int size() const;
00146 
00147 
00148 };
00149 
00150 #endif
00151 #endif

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