Contains a large set of functions for parsing the configuration file. More...
Functions | |
Function * | ParseCombineFunction (const std::vector< std::string > ¶meters, unsigned int &parsed_parameters) |
Parses the given vector for a combined function starting at the given index. More... | |
SpecificFunction * | ParseCombineSpecificFunction (const std::vector< std::string > ¶meters, unsigned int &parsed_parameters) |
Parses the given vector for a combined specific function starting at the given index. More... | |
SpecificStatisticalEvaluation * | ParseCombineSpecificStatistic (const std::vector< std::string > ¶meters, unsigned int &parsed_parameters) |
Parses the given vector for a combined specific statistical evaluation starting at the given index. More... | |
Statistic * | ParseCombineStatistic (const std::vector< std::string > ¶meters, unsigned int &parsed_parameters) |
Parses the given vector for a combined statistic starting at the given index. More... | |
ConstantEvaluation * | ParseConstantEvaluation (const std::vector< std::string > ¶meters, unsigned int &parsed_parameters) |
Parses the given vector for a constant evaluation starting at the given index. More... | |
Function * | ParseFunction (const std::vector< std::string > ¶meters, unsigned int &parsed_parameters) |
Parses the given vector for a function starting at the given index. More... | |
Function * | ParseFunctionReduceOperator (const std::vector< std::string > ¶meters, unsigned int &parsed_parameters) |
Parses the given vector for a function reduce operator starting at the given index. More... | |
Operation * | ParseOperation (const std::vector< std::string > ¶meters, unsigned int &parsed_parameters) |
Parses the given vector for an operation starting at the given index. More... | |
PairReduceOperation * | ParsePairCombinationOperation (const std::vector< std::string > ¶meters, unsigned int &parsed_parameters) |
Parses the given vector for a pair combination operation starting at the given index. More... | |
Statistic * | ParseReduceOperator (const std::vector< std::string > ¶meters, unsigned int &parsed_parameters) |
Parses the given vector for a reduce operator starting at the given index. More... | |
SpecificFunction * | ParseSpecificFunction (const std::vector< std::string > ¶meters, unsigned int &parsed_parameters) |
Parses the given vector for a specific function starting at the given index. More... | |
SpecificStatisticalEvaluation * | ParseSpecificStatistic (const std::vector< std::string > ¶meters, unsigned int &parsed_parameters) |
Parses the given vector for a specific statistical evaluation starting at the given index. More... | |
Function * | ParseStandardFunction (const std::vector< std::string > ¶meters, unsigned int &parsed_parameters) |
Parses the given vector for a standard function starting at the given index. More... | |
Statistic * | ParseStatistic (const std::vector< std::string > ¶meters, unsigned int &parsed_parameters) |
Parses the given vector for a statistic starting at the given index. More... | |
VectorReduceOperation * | ParseVectorReduceOperation (const std::vector< std::string > ¶meters, unsigned int &parsed_parameters) |
Parses the given vector for a vector reduce operation 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
Function* highprecisionpso::parse::ParseCombineFunction | ( | const std::vector< std::string > & | parameters, |
unsigned int & | parsed_parameters | ||
) |
Parses the given vector for a combined function starting at the given index.
The parameter parsed_parameters will store the number of parsed parameters after successful parsing of a combined function. If nothing can be parsed as a combined function then the parameter parsed_parameters will store the initial number of parsed parameters at the time when the function is called. If a combined Function 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 combined Function if the parsing process was successful and NULL otherwise.
SpecificFunction* highprecisionpso::parse::ParseCombineSpecificFunction | ( | const std::vector< std::string > & | parameters, |
unsigned int & | parsed_parameters | ||
) |
Parses the given vector for a combined specific function starting at the given index.
The parameter parsed_parameters will store the number of parsed parameters after successful parsing of a combined specific function. If nothing can be parsed as a combined specific function then the parameter parsed_parameters will store the initial number of parsed parameters at the time when the function is called. If a combined specific function 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 combined specific function if the parsing process was successful and NULL otherwise.
SpecificStatisticalEvaluation* highprecisionpso::parse::ParseCombineSpecificStatistic | ( | const std::vector< std::string > & | parameters, |
unsigned int & | parsed_parameters | ||
) |
Parses the given vector for a combined specific statistical evaluation starting at the given index.
The parameter parsed_parameters will store the number of parsed parameters after successful parsing of a combined specific statistical evaluation. If nothing can be parsed as a combined specific statistical evaluation then the parameter parsed_parameters will store the initial number of parsed parameters at the time when the function is called. If a combined specific statistical evaluation 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 combined specific statistical evaluation if the parsing process was successful and NULL otherwise.
Statistic* highprecisionpso::parse::ParseCombineStatistic | ( | const std::vector< std::string > & | parameters, |
unsigned int & | parsed_parameters | ||
) |
Parses the given vector for a combined statistic starting at the given index.
The parameter parsed_parameters will store the number of parsed parameters after successful parsing of a combined statistic. If nothing can be parsed as a combined statistic then the parameter parsed_parameters will store the initial number of parsed parameters at the time when the function is called. If a combined statistic 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 combined statistic if the parsing process was successful and NULL otherwise.
ConstantEvaluation* highprecisionpso::parse::ParseConstantEvaluation | ( | const std::vector< std::string > & | parameters, |
unsigned int & | parsed_parameters | ||
) |
Parses the given vector for a constant evaluation starting at the given index.
The parameter parsed_parameters will store the number of parsed parameters after successful parsing of a constant evaluation. If nothing can be parsed as a constant evaluation then the parameter parsed_parameters will store the initial number of parsed parameters at the time when the function is called. If a constant evaluation 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 constant evaluation if the parsing process was successful and NULL otherwise.
Function* highprecisionpso::parse::ParseFunction | ( | const std::vector< std::string > & | parameters, |
unsigned int & | parsed_parameters | ||
) |
Parses the given vector for a function starting at the given index.
The parameter parsed_parameters will store the number of parsed parameters after successful parsing of a function. If nothing can be parsed as a function then the parameter parsed_parameters will store the initial number of parsed parameters at the time when the function is called. If a function 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 function if the parsing process was successful and NULL otherwise.
Function* highprecisionpso::parse::ParseFunctionReduceOperator | ( | const std::vector< std::string > & | parameters, |
unsigned int & | parsed_parameters | ||
) |
Parses the given vector for a function reduce operator starting at the given index.
The parameter parsed_parameters will store the number of parsed parameters after successful parsing of a function reduce operator. If nothing can be parsed as a function reduce operator then the parameter parsed_parameters will store the initial number of parsed parameters at the time when the function is called. If a function reduce operator 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 function reduce operator if the parsing process was successful and NULL otherwise.
Operation* highprecisionpso::parse::ParseOperation | ( | const std::vector< std::string > & | parameters, |
unsigned int & | parsed_parameters | ||
) |
Parses the given vector for an operation starting at the given index.
The parameter parsed_parameters will store the number of parsed parameters after successful parsing of an operation. If nothing can be parsed as an operation then the parameter parsed_parameters will store the initial number of parsed parameters at the time when the function is called. If an operation 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 operation if the parsing process was successful and NULL otherwise.
PairReduceOperation* highprecisionpso::parse::ParsePairCombinationOperation | ( | const std::vector< std::string > & | parameters, |
unsigned int & | parsed_parameters | ||
) |
Parses the given vector for a pair combination operation starting at the given index.
The parameter parsed_parameters will store the number of parsed parameters after successful parsing of a pair combination operation. If nothing can be parsed as a pair combination operation then the parameter parsed_parameters will store the initial number of parsed parameters at the time when the function is called. If a pair combination operation 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 pair combination operation if the parsing process was successful and NULL otherwise.
Statistic* highprecisionpso::parse::ParseReduceOperator | ( | const std::vector< std::string > & | parameters, |
unsigned int & | parsed_parameters | ||
) |
Parses the given vector for a reduce operator starting at the given index.
The parameter parsed_parameters will store the number of parsed parameters after successful parsing of a reduce operator. If nothing can be parsed as a reduce operator then the parameter parsed_parameters will store the initial number of parsed parameters at the time when the function is called. If a reduce operator 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 reduce operator if the parsing process was successful and NULL otherwise.
SpecificFunction* highprecisionpso::parse::ParseSpecificFunction | ( | const std::vector< std::string > & | parameters, |
unsigned int & | parsed_parameters | ||
) |
Parses the given vector for a specific function starting at the given index.
The parameter parsed_parameters will store the number of parsed parameters after successful parsing of a specific function. If nothing can be parsed as a specific function then the parameter parsed_parameters will store the initial number of parsed parameters at the time when the function is called. If a specific function 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 specific function if the parsing process was successful and NULL otherwise.
SpecificStatisticalEvaluation* highprecisionpso::parse::ParseSpecificStatistic | ( | const std::vector< std::string > & | parameters, |
unsigned int & | parsed_parameters | ||
) |
Parses the given vector for a specific statistical evaluation starting at the given index.
The parameter parsed_parameters will store the number of parsed parameters after successful parsing of a specific statistical evaluation. If nothing can be parsed as a specific statistical evaluation then the parameter parsed_parameters will store the initial number of parsed parameters at the time when the function is called. If a specific statistical evaluation 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 specific statistical evaluation if the parsing process was successful and NULL otherwise.
Function* highprecisionpso::parse::ParseStandardFunction | ( | const std::vector< std::string > & | parameters, |
unsigned int & | parsed_parameters | ||
) |
Parses the given vector for a standard function starting at the given index.
The parameter parsed_parameters will store the number of parsed parameters after successful parsing of a standard function. If nothing can be parsed as a standard function then the parameter parsed_parameters will store the initial number of parsed parameters at the time when the function is called. If a standard function 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 standard function if the parsing process was successful and NULL otherwise.
Statistic* highprecisionpso::parse::ParseStatistic | ( | const std::vector< std::string > & | parameters, |
unsigned int & | parsed_parameters | ||
) |
Parses the given vector for a statistic starting at the given index.
The parameter parsed_parameters will store the number of parsed parameters after successful parsing of a statistic. If nothing can be parsed as a statistic then the parameter parsed_parameters will store the initial number of parsed parameters at the time when the function is called. If a statistic 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 statistic if the parsing process was successful and NULL otherwise.
VectorReduceOperation* highprecisionpso::parse::ParseVectorReduceOperation | ( | const std::vector< std::string > & | parameters, |
unsigned int & | parsed_parameters | ||
) |
Parses the given vector for a vector reduce operation starting at the given index.
The parameter parsed_parameters will store the number of parsed parameters after successful parsing of a vector reduce operation. If nothing can be parsed as a vector reduce operation then the parameter parsed_parameters will store the initial number of parsed parameters at the time when the function is called. If a vector reduce operation 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 vector reduce operation if the parsing process was successful and NULL otherwise.
void highprecisionpso::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.