Main Page | Class Hierarchy | Class List | File List | Class Members

Input Class Reference

Class for reading the input file according to the configuration. More...

#include <input.h>

Inheritance diagram for Input:

Object List of all members.

Public Member Functions

void readSingleRun (std::istream &fileIn, std::ostream *fileOut=0, bool recover=false)
 Read a single run from an input file.

 Input (Configuration &c, Metrics &m)
 Create an empty Input object.

 ~Input ()
 Do nothing.

void loadData (std::string fileIn, std::string fileOut)
 Reads data from a client.

bool recoverData (std::string saveFile)
 Recover a (possibly damaged) save data file.

bool checkConfidence ()
 Check whether the confidence level is reached. If so, return true.

bool check ()
 Check if no more simulations are needed. If so, return true.

const std::set< unsigned int > & getRunIdentifiers () const
 Get the set of run identifiers.


Private Attributes

Configurationconfiguration
 Configuration object used to parse input data.

Metricsmetrics
 Metrics database.

std::set< unsigned int > runIdentifiers
 Set of run identifiers.


Detailed Description

Class for reading the input file according to the configuration.

project: measure filename: input.h author: C. Cicconetti <c.cicconetti@iet.unipi.it> year: 2006 affiliation: Dipartimento di Ingegneria dell'Informazione University of Pisa, Italy description: definition of input classes and functions


Member Function Documentation

void Input::loadData std::string  fileIn,
std::string  fileOut
 

Reads data from a client.

fileIn and fileOut are the unix descriptors of the input and ouput files, respectively, which must have been already opened for reading and writing, respectively.

This function returns when one of the following conditions becomes true:

  • the maximum number of replics has been reached
  • all the relevant metrics with check == true have a confidence interval below the threshold

Provided that:

  • the minimum number of replics has been reached

This function also appends data read from fileIn to the outputfile specified in the configuration file.

void Input::readSingleRun std::istream &  fileIn,
std::ostream *  fileOut = 0,
bool  recover = false
 

Read a single run from an input file.

If fileOut != 0, the input is copied to fileOut. The recover flag is set to true if you want to gather all metrics for debugging or recovering purposes.


The documentation for this class was generated from the following files:
Generated on Tue May 30 08:09:56 2006 for ns2measure by doxygen 1.3.7