Added the allClassName method to print the name of all
classes that have been added to the checkpoint
This commit is contained in:
parent
4cfe47a8e5
commit
6e650914cc
1 changed files with 39 additions and 1 deletions
|
|
@ -60,7 +60,8 @@ public :
|
||||||
void add(eoMonitor& _mon) { monitors.push_back(&_mon); }
|
void add(eoMonitor& _mon) { monitors.push_back(&_mon); }
|
||||||
void add(eoUpdater& _upd) { updaters.push_back(&_upd); }
|
void add(eoUpdater& _upd) { updaters.push_back(&_upd); }
|
||||||
|
|
||||||
std::string className(void) const { return "eoCheckPoint"; }
|
virtual std::string className(void) const { return "eoCheckPoint"; }
|
||||||
|
std::string allClassNames() const ;
|
||||||
|
|
||||||
private :
|
private :
|
||||||
|
|
||||||
|
|
@ -122,4 +123,41 @@ bool eoCheckPoint<EOT>::operator()(const eoPop<EOT>& _pop)
|
||||||
return bContinue;
|
return bContinue;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/** returns a string with all className()
|
||||||
|
* of data separated with "\n" (for debugging)
|
||||||
|
*/
|
||||||
|
template <class EOT>
|
||||||
|
std::string eoCheckPoint<EOT>::allClassNames() const
|
||||||
|
{
|
||||||
|
unsigned i;
|
||||||
|
std::string s = "\n" + className() + "\n";
|
||||||
|
|
||||||
|
s += "Sorted Stats\n";
|
||||||
|
for (i = 0; i < sorted.size(); ++i)
|
||||||
|
s += sorted[i]->className() + "\n";
|
||||||
|
s += "\n";
|
||||||
|
|
||||||
|
s += "Stats\n";
|
||||||
|
for (i = 0; i < stats.size(); ++i)
|
||||||
|
s += stats[i]->className() + "\n";
|
||||||
|
s += "\n";
|
||||||
|
|
||||||
|
s += "Updaters\n";
|
||||||
|
for (i = 0; i < updaters.size(); ++i)
|
||||||
|
s += updaters[i]->className() + "\n";
|
||||||
|
s += "\n";
|
||||||
|
|
||||||
|
s += "Monitors\n";
|
||||||
|
for (i = 0; i < monitors.size(); ++i)
|
||||||
|
s += monitors[i]->className() + "\n";
|
||||||
|
s += "\n";
|
||||||
|
|
||||||
|
s += "Continuators\n";
|
||||||
|
for (i = 0; i < continuators.size(); ++i)
|
||||||
|
s += continuators[i]->className() + "\n";
|
||||||
|
s += "\n";
|
||||||
|
|
||||||
|
return s;
|
||||||
|
}
|
||||||
|
|
||||||
#endif
|
#endif
|
||||||
|
|
|
||||||
Reference in a new issue