#include <src/JobOptionsSvc/Catalog.h>
Definition at line 29 of file Catalog.h.
typedef std::map<std::string, PropertySet> Gaudi::Parsers::Catalog::CatalogSet |
typedef CatalogSet::const_iterator Gaudi::Parsers::Catalog::const_iterator |
typedef CatalogSet::iterator Gaudi::Parsers::Catalog::iterator |
typedef CatalogSet::value_type Gaudi::Parsers::Catalog::value_type |
bool Gaudi::Parsers::Catalog::Add |
( |
Property * |
property | ) |
|
Definition at line 21 of file Catalog.cpp.
22 assert( property != NULL);
23 CatalogSet::iterator it =
catalog_.find(property->ClientName());
25 CatalogSet::mapped_type properties;
26 properties.insert(property);
27 catalog_.insert(CatalogSet::value_type(property->ClientName(), properties));
30 it->second.erase(*property);
31 it->second.insert(property);
template<typename Value >
bool Gaudi::Parsers::Catalog::Add |
( |
const std::string & |
client, |
|
|
const std::string & |
property, |
|
|
const Value & |
value |
|
) |
| |
|
inline |
Definition at line 63 of file Catalog.h.
66 return Add(
new Property(PropertyName(client, property), PropertyValue(
value)));
Property base class allowing Property* collections to be "homogeneous".
bool Add(Property *property)
iterator Gaudi::Parsers::Catalog::begin |
( |
| ) |
|
|
inline |
std::vector< std::string > Gaudi::Parsers::Catalog::ClientNames |
( |
| ) |
const |
Definition at line 13 of file Catalog.cpp.
14 std::vector<std::string> result;
15 BOOST_FOREACH(
const CatalogSet::value_type& prop,
catalog_) {
16 result.push_back(prop.first);
iterator Gaudi::Parsers::Catalog::end |
( |
| ) |
|
|
inline |
std::ostream & Gaudi::Parsers::Catalog::fillStream |
( |
std::ostream & |
out | ) |
const |
print the content of the catalogue to std::ostream
Definition at line 61 of file Catalog.cpp.
63 o <<
"// " << std::string(82,
'=') << std::endl
64 <<
"// Parser catalog " << std::endl
65 <<
"// " << std::string(82,
'=') << std::endl ;
67 size_t nComponents = 0 ;
68 size_t nProperties = 0 ;
70 BOOST_FOREACH(
const CatalogSet::value_type& client,
catalog_) {
72 % client.first % client.second.size() << std::endl ;
74 nProperties += client.second.size() ;
75 for (CatalogSet::mapped_type::const_iterator current = client.second.begin();
76 current != client.second.end(); ++current) {
79 % current->ValueAsString()
83 o <<
"// " << std::string(82,
'=') << std::endl
84 <<
boost::format(
"// End parser catalog #Components=%1% #Properties=%2%")
85 % nComponents % nProperties << std::endl
86 <<
"// " << std::string(82,
'=') << std::endl ;
GAUDI_API std::string format(const char *,...)
MsgStream format utility "a la sprintf(...)".
gp::Property * Gaudi::Parsers::Catalog::Find |
( |
const std::string & |
client, |
|
|
const std::string & |
name |
|
) |
| |
Definition at line 36 of file Catalog.cpp.
38 CatalogSet::iterator it =
catalog_.find(client);
39 if (it ==
catalog_.end())
return NULL;
41 CatalogSet::mapped_type::iterator pit = std::find_if(it->second.begin(),
42 it->second.end(), Property::Equal(name));
43 if (pit == it->second.end())
return NULL;
std::string Gaudi::Parsers::Catalog::ToString |
( |
| ) |
const |
Definition at line 48 of file Catalog.cpp.
50 BOOST_FOREACH(
const CatalogSet::value_type& client,
catalog_) {
51 for (CatalogSet::mapped_type::const_iterator current = client.second.begin();
52 current != client.second.end(); ++current) {
53 result += current->ToString()+
"\n";
The documentation for this class was generated from the following files: