#include <libBM.h>
Public Member Functions | |
logger () | |
Default constructor. | |
virtual int | add (const RV &rv, string name="") |
virtual void | logit (int id, const vec &v)=0 |
log this vector | |
virtual void | step ()=0 |
Shifts storage position for another time step. | |
virtual void | finalize () |
Finalize storing information. | |
virtual void | init () |
Initialize the storage. | |
Protected Attributes | |
Array< RV > | entries |
RVs of all logged variables. | |
Array< string > | names |
Names of logged quantities, e.g. names of algorithm variants. |
This class abstracts logging of results from implementation. This class replaces direct logging of results (e.g. to files or to global variables) by calling methods of a logger. Specializations of this abstract class for specific storage method are designed.
virtual int bdm::logger::add | ( | const RV & | rv, | |
string | name = "" | |||
) | [inline, virtual] |
returns an identifier which will be later needed for calling the logit()
function For empty RV it returns -1, this entry will be ignored by logit()
.
References bdm::RV::_dsize(), entries, and names.
Referenced by pmsmDS::log_add(), bdm::ArxDS::log_add(), bdm::BM::log_add(), and bdm::DS::log_add().