System documentation of the GNU Image-Finding Tool
Main Page
Classes
Files
File List
libMRML
include
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"
45
class
CAccessorAdmin
{
46
protected
:
50
CAccessorFactoryContainer
&
mFactoryContainer
;
52
CSelfDestroyPointer<CXMLElement>
mCollectionElement;
58
class
CContentElement
{
59
public
:
61
CAccessor
*
mAccessor
;
63
CAccessorFactory
*
mFactory
;
65
int
mOpenCloseCounter
;
66
};
72
typedef
map<string,CContentElement>
CContent
;
74
CContent
mContent
;
75
public
:
76
//----------------------------------------
86
CAccessor
*
openAccessor
(
string
inType);
89
void
closeAccessor
(
string
inType);
90
//----------------------------------------
94
void
setCollectionElement
(
CXMLElement
*);
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
Need for discussion? Want to contribute? Contact
help-gift@gnu.org
Generated using Doxygen