System documentation of the GNU Image-Finding Tool
Main Page
Classes
Files
File List
libMRML
include
CAlgorithmCollection.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
// -*- mode: c++ -*-
26
#ifndef _CALGORITHMCOLLECTION
27
#define _CALGORITHMCOLLECTION
28
#include "libMRML/include/uses-declarations.h"
29
#include <string>
30
#include <map>
31
#include "libMRML/include/CAlgorithm.h"
32
#ifdef LINK_DYNAMICALLY
33
#include "libMRML/include/CStaticQueryFactory.h"
34
#else
35
#include "libMRML/include/CDynamicQueryFactory.h"
36
#endif
37
#include "libMRML/include/CXMLElement.h"
// for toXMLElement
38
39
class
CAccessorAdminCollection
;
40
41
58
class
CAlgorithmCollection
:
public
CStaticQueryFactory
{
59
protected
:
61
CAlgorithm
*
mAlgorithmInConstruction
;
65
protected
:
66
typedef
map<string,CAlgorithm*>
CContent
;
67
70
CContent
mContent
;
72
CContent::const_iterator
begin
()
const
;
74
CContent::const_iterator
end
()
const
;
75
public
:
76
//----------------------------------------
80
CAlgorithm
*
getAlgorithmInConstruction
();
81
//----------------------------------------
84
void
startAlgorithmConstruction
(
CAlgorithm
* inAlgorithm);
86
CAlgorithmCollection
(
string
inConfigFileName);
89
~CAlgorithmCollection
();
91
void
addAlgorithm
(
CAlgorithm
* inAlgorithm);
95
CAlgorithm
&
getAlgorithmByType
(
const
string
& inType)
const
;
99
bool
containsAlgorithmByType
(
const
string
& inType)
const
;
106
CAlgorithm
*
makeAlgorithmByType
(
const
string
& inType)
const
;
107
//----------------------------------------
112
CAlgorithm
*
getDefaultAlgorithm
()
const
;
113
//----------------------------------------
116
CAlgorithm
*
makeDefaultAlgorithm
()
const
;
117
//----------------------------------------
122
CXMLElement
*
getAlgorithmList
(
const
CXMLElement
& inGetAlgorithms)
const
;
123
//----------------------------------------
126
string
toXML
(
bool
inIsPrivate=
false
)
const
;
130
CXMLElement
*
toXMLElement
()
const
;
132
CQuery
*
makeQuery
(
const
string
& inBaseType,
133
CAccessorAdminCollection
& inAccessorAdminCollection,
134
CAlgorithm
& inAlgorithm,
135
CStaticQueryFactory
& inFactory);
136
137
};
138
#endif
Need for discussion? Want to contribute? Contact
help-gift@gnu.org
Generated using Doxygen