Diana Software
QSequenceConfig.cc
Go to the documentation of this file.
1 #include "QSequenceConfig.hh"
2 
4 
5 
6 QError QSequenceConfig::GetModuleByLabel(const std::string& label, QModuleConfig& mod) const
7 {
8 
9  std::vector<QModuleConfig*>::const_iterator iter = fModules.begin();
10  while(iter!= fModules.end()) {
11  if((*iter)->fLabel == label) {
12  mod = *(*iter);
13  return QERR_SUCCESS;
14  }
15  iter++;
16  }
17  return QERR_OUT_OF_RANGE;
18 }
19 
20 void QSequenceConfig::Dump(std::ostream& o) const
21 {
22  for(size_t m = 0; m < fModules.size(); m++) {
23  o<<fModules[m]->fType<<" "<<fModules[m]->fName<<std::endl;
24  fModules[m]->Dump(o);
25  o<<"endmod"<<std::endl;
26  o<<std::endl;
27  }
28 }
@ QERR_OUT_OF_RANGE
Definition: QError.hh:28
@ QERR_SUCCESS
Definition: QError.hh:27
QObjectImp(QSequenceConfig)
error class with error type and description
Definition: QError.hh:115
QObject to store a QBaseModule configuration.
QObject storing a QSequence configuration, a set of QModuleConfigs.
std::vector< QModuleConfig * > fModules
ordered modules in this sequence
QError GetModuleByLabel(const std::string &label, QModuleConfig &mod) const
get QModuleConfig matching label
void Dump(std::ostream &o) const
dump on stream