Gaudi Framework, version v23r6
Home
Generated: Wed Jan 30 2013
Main Page
Related Pages
Modules
Namespaces
Classes
Files
File List
File Members
All
Classes
Namespaces
Files
Functions
Variables
Typedefs
Enumerations
Enumerator
Properties
Friends
Macros
Groups
Pages
GaudiCoreSvc
src
JobOptionsSvc
Catalog.h
Go to the documentation of this file.
1
// $Id:$
2
#ifndef JOBOPTIONSVC_CATALOG_H_
3
#define JOBOPTIONSVC_CATALOG_H_
4
// ============================================================================
5
// STD & STL:
6
// ============================================================================
7
#include <
iostream
>
8
#include <
string
>
9
#include <
vector
>
10
#include <
map
>
11
#include <
set
>
12
// ============================================================================
13
// Boost:
14
// ============================================================================
15
#include <boost/ptr_container/ptr_set.hpp>
16
// ============================================================================
17
// Local:
18
// ============================================================================
19
#include "
Property.h
"
20
#include "
PropertyName.h
"
21
#include "
PropertyValue.h
"
22
// ============================================================================
23
// Namespace aliases:
24
// ============================================================================
25
// ...
26
// ============================================================================
27
namespace
Gaudi
{
namespace
Parsers {
28
// ============================================================================
29
class
Catalog
{
30
public
:
31
typedef
boost::ptr_set<Property, Property::LessThen>
PropertySet
;
32
typedef
std::map<std::string, PropertySet>
CatalogSet
;
33
34
typedef
CatalogSet::value_type
value_type
;
35
typedef
CatalogSet::iterator
iterator
;
36
typedef
CatalogSet::const_iterator
const_iterator
;
37
38
iterator
begin
() {
return
catalog_
.
begin
();}
39
const_iterator
begin
()
const
{
return
catalog_
.
begin
();}
40
iterator
end
() {
return
catalog_
.
end
();}
41
const_iterator
end
()
const
{
return
catalog_
.
end
();}
42
43
std::vector<std::string>
ClientNames()
const
;
44
bool
Add(
Property
* property);
45
template
<
typename
Value>
bool
Add(
const
std::string
& client,
46
const
std::string
& property,
const
Value& value);
47
Property
* Find(
const
std::string
& client,
const
std::string
& name);
48
std::string
ToString()
const
;
50
std::ostream
& fillStream (
std::ostream
& out )
const
;
51
private
:
52
CatalogSet
catalog_
;
53
};
54
// ============================================================================
56
// ============================================================================
57
inline
std::ostream
&
operator<<
(
std::ostream
& o,
const
Catalog
&
c
){
58
return
c.
fillStream
(o);
59
}
60
// ============================================================================
61
}
/* Gaudi */
}
/* Parsers */
62
63
template
<
typename
Value>
inline
bool
Gaudi::Parsers::Catalog::Add
(
64
const
std::string
& client,
const
std::string
& property,
65
const
Value& value) {
66
return
Add(
new
Property
(
PropertyName
(client, property),
PropertyValue
(value)));
67
}
68
69
// ============================================================================
70
#endif // JOBOPTIONSVC_CATALOG_H_
Generated at Wed Jan 30 2013 17:13:38 for Gaudi Framework, version v23r6 by
Doxygen
version 1.8.2 written by
Dimitri van Heesch
, © 1997-2004