Contains a large set of functions for parsing the configuration file. More...
Functions | |
RandomNumberGenerator * | ParseRandomNumberGenerator (const std::vector< std::string > ¶meters, unsigned int &parsed_parameters) |
Parses the given vector for a random number generator starting at the given index. More... | |
void | SignalInvalidCommand (const std::vector< std::string > ¶meters) |
Prints the supplied parameters to stderr and let the program terminate with exit code 1. More... | |
Detailed Description
Contains a large set of functions for parsing the configuration file.
Function Documentation
RandomNumberGenerator* arbitraryprecisioncalculation::parse::ParseRandomNumberGenerator | ( | const std::vector< std::string > & | parameters, |
unsigned int & | parsed_parameters | ||
) |
Parses the given vector for a random number generator starting at the given index.
The parameter parsed_parameters will store the number of parsed parameters after successful parsing of a random number generator. If nothing can be parsed as a random number generator then the parameter parsed_parameters will store the initial number of parsed parameters at the time when the function is called. If a random number generator can be parsed partially but without success then the parameter parsed_parameters will store the number of elements of the specification vector.
- Parameters
-
parameters The vector containing the specification. parsed_parameters The number of already parsed parameters by previous functions.
- Returns
- A pointer to the parsed random number generator if the parsing process was successful and NULL otherwise.
void arbitraryprecisioncalculation::parse::SignalInvalidCommand | ( | const std::vector< std::string > & | parameters | ) |
Prints the supplied parameters to stderr and let the program terminate with exit code 1.
This function is called if a command in the configuration file can not be parsed. The supplied command will be printed to stderr with an error message. Finally the function let the program terminate with exit code 1.
- Parameters
-
parameters The command of the configuration file which can not be parsed.