Main Page   Namespace List   Class Hierarchy   Alphabetical List   Compound List   File List   Namespace Members   Compound Members   File Members   Related Pages  

MODEL::Probe Class Reference

#include <probe.h>

Inheritance diagram for MODEL::Probe:

Inheritance graph
[legend]
Collaboration diagram for MODEL::Probe:

Collaboration graph
[legend]
List of all members.

Public Types

typedef vector<number> data_record
typedef vector< data_record > data_list

Public Methods

 Probe (TimeFrame &T, const string &fn)
 Probe (TimeFrame &T, ostream &os)
virtual ~Probe ()
virtual void tick ()
virtual void probe (void)=0
void add_data (const number &d)
 NO_COPY (Probe)

Private Attributes

string n
ostream* out
bool data_is_here
data_list* var_data
data_record* temp_data

Detailed Description

Class to probe variables and parameters. It writes out the collected data into a file upon destruction.

You just have to redefine probe() to write out the needed data using add_data(). You can add as many datapoints as you like at one time (and the number does not have to be constant).

Definition at line 77 of file probe.h.


Constructor & Destructor Documentation

Probe ( TimeFrame & T,
const string & fn )
 

Constructor if we don't have an ostream handy.

Parameters:
T   the timeframe to which the probe should be added.
fn   the name of the file to which the data is written. Oh, a probe has the same resolution as the timeframe...

Definition at line 58 of file probe.cpp.

Probe ( TimeFrame & T,
ostream & os )
 

Constructor with ostream

Parameters:
T   the timeframe to which the probe should be added.
os   the ostream (e.g. cout)

Definition at line 64 of file probe.cpp.


Member Function Documentation

NO_COPY ( Probe )
 

Don't copy or assign

void tick ( ) [virtual]
 

called to make things work, for each one

Reimplemented from MODEL::TickTock.

Definition at line 97 of file probe.cpp.


The documentation for this class was generated from the following files:
To get the sources or tarballs, please go to SourceForge or you can use the CVS repository.

More Info? Michael Peeters. Also, check our research website: www.alna.vub.ac.be

Last update: June 2002.


Looking for Open Source? Check out SourceForge Logo !