![]() |
![]() |
#include <ParameterCollector.h>
Public Member Functions | |
const_iterator () | |
Protected Member Functions | |
const_iterator (const ParameterCollector *collector, std::vector< std::string >::const_iterator begin, std::vector< std::string >::const_iterator end, bool special=false, std::ostream *dump=0) | |
Private Types | |
typedef std::pair< std::vector < std::string > ::const_iterator, std::vector < std::string > ::const_iterator > | IterPair |
Private Member Functions | |
const std::string & | dereference () const |
bool | equal (const const_iterator &other) const |
void | increment () |
void | next () |
Private Attributes | |
std::string | cache_ |
const ParameterCollector * | collector_ |
std::ostream * | dump_ |
std::vector< IterPair > | iter_ |
bool | special_ |
Friends | |
class | boost::iterator_core_access |
class | ParameterCollector |
Definition at line 35 of file ParameterCollector.h.
typedef std::pair<std::vector<std::string>::const_iterator, std::vector<std::string>::const_iterator> gen::ParameterCollector::const_iterator::IterPair [private] |
Definition at line 60 of file ParameterCollector.h.
gen::ParameterCollector::const_iterator::const_iterator | ( | ) | [inline] |
Definition at line 39 of file ParameterCollector.h.
: collector_(0), dump_(0) {}
ParameterCollector::const_iterator::const_iterator | ( | const ParameterCollector * | collector, |
std::vector< std::string >::const_iterator | begin, | ||
std::vector< std::string >::const_iterator | end, | ||
bool | special = false , |
||
std::ostream * | dump = 0 |
||
) | [inline, protected] |
const std::string& gen::ParameterCollector::const_iterator::dereference | ( | ) | const [inline, private] |
bool gen::ParameterCollector::const_iterator::equal | ( | const const_iterator & | other | ) | const [inline, private] |
Definition at line 54 of file ParameterCollector.h.
References iter_.
{ return iter_ == other.iter_; }
void ParameterCollector::const_iterator::increment | ( | ) | [private] |
void ParameterCollector::const_iterator::next | ( | void | ) | [private] |
Definition at line 53 of file ParameterCollector.cc.
References createPayload::block, edm::errors::Configuration, geometryCSVtoXML::line, and pos.
Referenced by const_iterator().
{ if (iter_.empty()) { cache_.clear(); return; } for(;;) { const std::string &line = *iter_.back().first; bool special = special_ && iter_.size() == 1; if ( (!line.empty() && line[0] == '+') || special) { if (++iter_.back().first == iter_.back().second) { iter_.pop_back(); if (iter_.empty()) special_ = false; } std::string block = special ? line : line.substr(1); std::map<std::string, std::vector<std::string> >::const_iterator pos = collector_->contents_.find(block); if (pos == collector_->contents_.end()) throw edm::Exception(edm::errors::Configuration) << "ParameterCollector could not find configuration lines " "block \"" << block << "\", included via plus sign."; if (dump_) *dump_ << "\n####### " << block << " #######" << std::endl; if (!pos->second.empty()) iter_.push_back(IterPair(pos->second.begin(), pos->second.end())); } else { cache_ = collector_->resolve(line); if (dump_) *dump_ << cache_ << std::endl; break; } } }
friend class boost::iterator_core_access [friend] |
Definition at line 50 of file ParameterCollector.h.
friend class ParameterCollector [friend] |
Definition at line 42 of file ParameterCollector.h.
std::string gen::ParameterCollector::const_iterator::cache_ [private] |
Definition at line 66 of file ParameterCollector.h.
Referenced by dereference().
const ParameterCollector* gen::ParameterCollector::const_iterator::collector_ [private] |
Definition at line 62 of file ParameterCollector.h.
std::ostream* gen::ParameterCollector::const_iterator::dump_ [private] |
Definition at line 63 of file ParameterCollector.h.
std::vector<IterPair> gen::ParameterCollector::const_iterator::iter_ [private] |
Definition at line 65 of file ParameterCollector.h.
Referenced by const_iterator(), and equal().
bool gen::ParameterCollector::const_iterator::special_ [private] |
Definition at line 64 of file ParameterCollector.h.