src/ell/SC_Outstream.cc
Go to the documentation of this file.00001 #include "ell/StateCollector.hh" 00002 00003 namespace ell 00004 { 00005 00006 SC_Outstream::SC_Outstream( std::ostream& out_, 00007 const std::string& labelAdded) 00008 : SC_Counting(), out(out_), strAdded(labelAdded) 00009 { 00010 } 00011 00012 SC_Outstream::~SC_Outstream() 00013 { 00014 out.flush(); 00015 } 00016 00017 // This function is used to track all added intermediate States. 00018 // @param s the added State 00019 void 00020 SC_Outstream::add(const State& s) { 00021 // call handler of superclass 00022 SC_Counting::add(s); 00023 // print to stream 00024 out <<s.toString() 00025 <<strAdded; 00026 } 00027 00028 }