|
DisCostiC v2.0.0
Distributed Cost in Cluster: a cross-architecture simulator for massively parallel MPI programs
|
a wrapper class which contains functions for parsing the configuration file end class configParser More...
#include <NetworkConfigParser.hpp>
Public Member Functions | |
| NetworkConfigParser () | |
| a class to set the name of the configuration file and extracts and parses the data | |
| NetworkConfigParser (const std::string &fileName) | |
| void | readData (const std::string &fileName) |
| void | setData (const int numberOfConcurrentConnection, const int buffersize, DisCosTiC::Networktype &latency, DisCosTiC::Networktype &inverse_bandwidth, DisCosTiC::Networktype &o, DisCosTiC::Networktype &O, DisCosTiC::Networktype &g, DisCosTiC::Networktype &G, DisCosTiC_Datatype &eagerLimit, const int mode) |
| bool | getKey (const std::string &key) const |
| template<typename scalarT > | |
| scalarT | getValue (const std::string &key, scalarT const &defaultValue=scalarT()) const |
| a function that retrieves the value of a specific key | |
Private Member Functions | |
| void | removeComment (std::string &line) const |
| a function that removes everything from the semicolon (including it) to the end of the line. | |
| bool | whitespace (const std::string &line) const |
| a function that returns false if a non-space character was found, true otherwise. The function is "const" because it does not alter any class member variables. | |
| void | parseLine (const std::string &line, size_t const lineNum) |
| a function that parse the line by calling above mentioed functions | |
Private Attributes | |
| int | dataCounter = 0 |
| double | networkFileData [1000][8] = {0} |
| std::map< std::string, std::string > | data |
| which will hold pairs of key-value | |
| std::string | fileName |
| As member variables, we will only have a std::string, which will hold the name of the configuration file. | |
a wrapper class which contains functions for parsing the configuration file end class configParser
Definition at line 32 of file NetworkConfigParser.hpp.
|
inline |
a class to set the name of the configuration file and extracts and parses the data
Definition at line 95 of file NetworkConfigParser.hpp.
|
inline |
Definition at line 98 of file NetworkConfigParser.hpp.
References fileclose, fileName, fileopen, parseLine(), removeComment(), and whitespace().
Here is the call graph for this function:
|
inline |
Definition at line 209 of file NetworkConfigParser.hpp.
References data.
Referenced by getValue().
Here is the caller graph for this function:
|
inline |
a function that retrieves the value of a specific key
Definition at line 217 of file NetworkConfigParser.hpp.
References data, getKey(), and UserInterface::Conversion::stringTOScalarT().
Here is the call graph for this function:
|
inlineprivate |
a function that parse the line by calling above mentioed functions
Definition at line 60 of file NetworkConfigParser.hpp.
References dataCounter, and networkFileData.
Referenced by NetworkConfigParser(), and readData().
Here is the caller graph for this function:
|
inline |
Definition at line 124 of file NetworkConfigParser.hpp.
References fileclose, fileName, fileopen, parseLine(), removeComment(), and whitespace().
Referenced by main().
Here is the call graph for this function:
Here is the caller graph for this function:
|
inlineprivate |
a function that removes everything from the semicolon (including it) to the end of the line.
Definition at line 43 of file NetworkConfigParser.hpp.
Referenced by NetworkConfigParser(), and readData().
Here is the caller graph for this function:
|
inline |
Definition at line 150 of file NetworkConfigParser.hpp.
References dataCounter, and networkFileData.
Referenced by main().
Here is the caller graph for this function:
|
inlineprivate |
a function that returns false if a non-space character was found, true otherwise. The function is "const" because it does not alter any class member variables.
Definition at line 52 of file NetworkConfigParser.hpp.
Referenced by NetworkConfigParser(), and readData().
Here is the caller graph for this function:
|
private |
which will hold pairs of key-value
Definition at line 37 of file NetworkConfigParser.hpp.
Referenced by getKey(), and getValue().
|
private |
Definition at line 35 of file NetworkConfigParser.hpp.
Referenced by parseLine(), and setData().
|
private |
As member variables, we will only have a std::string, which will hold the name of the configuration file.
Definition at line 38 of file NetworkConfigParser.hpp.
Referenced by NetworkConfigParser(), and readData().
|
private |
Definition at line 36 of file NetworkConfigParser.hpp.
Referenced by parseLine(), and setData().