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

Configuration Class Reference

One instance of this class stores information from the configuration file. More...

#include <configuration.h>

Inheritance diagram for Configuration:

Object List of all members.

Public Member Functions

 Configuration ()
 Create an empty Configuration object.

 ~Configuration ()
 Do nothing.

void parse (std::string inputFileName)
 Parse the configuration file, and close it immediately after.

std::string getOutputFileName () const
 Get the output file name.

unsigned int getMinReplics () const
 Get the minimum number of replics.

unsigned int getMaxReplics () const
 Get the maximum number of replics.

std::string getHeaderName () const
 Get the header file name information.

std::string getTrailerName () const
 Get the trailer file name information.

void getDescAvg (bool &valid, MetricDescAvg &dsc, std::string s, unsigned int id)
 Get the descriptor of an averaged metric.

void getDescDst (bool &valid, MetricDescDst &dsc, std::string s, unsigned int id)
 Get the descriptor of a distribution metric.

void dump (std::ostream &os)
 Debug function to dump to an ostream the database content.


Private Member Functions

void insert (std::string s, unsigned int id, const MetricDescAvg &dsc)
 Insert an averaged metric descriptor.

void insert (std::string s, unsigned int id, std::string what, const MetricDescAvg &dsc)
 Insert a distribution metric descriptor.

std::string getNextWord (std::istream &is, bool required=false)
 Get the next word from configuration file.


Private Attributes

std::string outputFileName
 Output file name.

unsigned int minReplics
 Minimum number of replics. No minimum => 0.

unsigned int maxReplics
 Maximum number of replics. No maximum => 0.

std::string headerName
 Header file name.

std::string trailerName
 Trailer file name.

std::map< std::string, std::vector<
MetricDescAvg > > 
avg
 Descriptors for averaged metrics.

std::map< std::string, std::vector<
MetricDescDst > > 
dst
 Descriptors for distribution metrics.


Detailed Description

One instance of this class stores information from the configuration file.


Member Function Documentation

std::string Configuration::getNextWord std::istream &  is,
bool  required = false
[private]
 

Get the next word from configuration file.

If a comment character '#' is found, the entire line is skipped. If the end of file is reached, std::string::npos is returned. If the next word is required, the an exception is thown if the end of file is reached.

void Configuration::insert std::string  s,
unsigned int  id,
std::string  what,
const MetricDescAvg dsc
[private]
 

Insert a distribution metric descriptor.

The function allows a metric descriptor to be overriden. The what argument specifies what submetric is to updated.

void Configuration::insert std::string  s,
unsigned int  id,
const MetricDescAvg dsc
[private]
 

Insert an averaged metric descriptor.

The function allows a metric descriptor to be overriden.


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