System documentation of the GNU Image-Finding Tool

CAccessorAdmin.h
1 /* -*- mode: c++ -*-
2 */
3 /*
4 
5  GIFT, a flexible content based image retrieval system.
6  Copyright (C) 1998, 1999, 2000, 2001, 2002, CUI University of Geneva
7 
8  Copyright (C) 2003, 2004 Bayreuth University
9  2005 Bamberg University
10  This program is free software; you can redistribute it and/or modify
11  it under the terms of the GNU General Public License as published by
12  the Free Software Foundation; either version 2 of the License, or
13  (at your option) any later version.
14 
15  This program is distributed in the hope that it will be useful,
16  but WITHOUT ANY WARRANTY; without even the implied warranty of
17  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
18  GNU General Public License for more details.
19 
20  You should have received a copy of the GNU General Public License
21  along with this program; if not, write to the Free Software
22  Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
23 
24 */
25 #ifndef _CACCESSORPROXY
26 #define _CACCESSORPROXY
27 #include "libMRML/include/uses-declarations.h"
28 #include "libMRML/include/CSelfDestroyPointer.h"
29 #include <string>
30 #include <functional>
31 #include "libMRML/include/CAccessor.h"
32 #include "libMRML/include/CAccessorFactory.h"
33 #include "libMRML/include/CAccessorFactoryContainer.h"
46 protected:
52  CSelfDestroyPointer<CXMLElement> mCollectionElement;
59  public:
66  };
72  typedef map<string,CContentElement> CContent;
74  CContent mContent;
75 public:
76  //----------------------------------------
86  CAccessor* openAccessor(string inType);
89  void closeAccessor(string inType);
90  //----------------------------------------
96  const CXMLElement* getCollectionElement()const;
98  const CXMLElement* getQueryParadigmList()const;
100  list<string>* getAvailableIndices()const;
101  //----------------------------------------
103  string toXML(bool isPrivate=false)const;
107  CXMLElement* toXMLElement()const;
108  //----------------------------------------
110  CAccessorAdmin(CAccessorFactoryContainer& inFactoryContainer);
112  ~CAccessorAdmin();
114  string getAlgorithmIDListID()const;
116  string getName()const;
118  string getID()const;
119 
121  friend class CSortByName_pAP;
122 };
123 
124 
125 /* Sort pointers to Accessor Proxies by the name of what they point to */
126 class CSortByName_pAP:public binary_function<const CAccessorAdmin*,const CAccessorAdmin*,bool>{
127 public:
129  bool operator()(const CAccessorAdmin* l,
130  const CAccessorAdmin* t);
131 };
132 
133 
134 #endif
CAccessorAdmin(CAccessorFactoryContainer &inFactoryContainer)
Constructor.
This is a common abstract base class for all specialised CAccessorFactories.
Definition: CAccessorFactory.h:42
void setCollectionElement(CXMLElement *)
Once this is working this will replace about every set/get function which follows.
This class captures the structure of an XML element.
Definition: CXMLElement.h:51
CAccessorFactory * mFactory
The factory to make an accessor, if this is needed.
Definition: CAccessorAdmin.h:63
~CAccessorAdmin()
destructor
CAccessor * mAccessor
Contains a pointer to the accessor, if already opened.
Definition: CAccessorAdmin.h:61
CAccessor * openAccessor(string inType)
open an accessor.
Definition: CAccessorAdmin.h:126
CXMLElement * toXMLElement() const
pack the content of this into an CXMLElement with elementname "collection"
CAccessorAdmin: The goal of this is to make it possible to have a list containing accessors to all po...
Definition: CAccessorAdmin.h:45
void closeAccessor(string inType)
closing an accessor.
string toXML(bool isPrivate=false) const
generate out put for shandshake message
Content is pointer to a factory, a pointer to the actual Accessor (if already made) and the open-clos...
Definition: CAccessorAdmin.h:58
CAccessor - an abstract base class for everything accessing a GIFT database.
Definition: CAccessor.h:55
CAccessorFactoryContainer & mFactoryContainer
Factory for making all kinds of accessors.
Definition: CAccessorAdmin.h:50
int mOpenCloseCounter
Counts how often the accessor has been opened or closed.
Definition: CAccessorAdmin.h:65
This is destined to hold a number of CAccessorFactories.
Definition: CAccessorFactoryContainer.h:44
CContent mContent
The content is a map of string to content element.
Definition: CAccessorAdmin.h:74
map< string, CContentElement > CContent
Typedef: The content is a map of string to content element In this map is noted, which accessors are ...
Definition: CAccessorAdmin.h:72

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