#include <configuration.h>
Inheritance diagram for Configuration:
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. |
|
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. |
|
Insert a distribution metric descriptor. The function allows a metric descriptor to be overriden. The what argument specifies what submetric is to updated. |
|
Insert an averaged metric descriptor. The function allows a metric descriptor to be overriden. |