highprecisionpso::parse Namespace Reference

Contains a large set of functions for parsing the configuration file. More...

Functions

FunctionParseCombineFunction (const std::vector< std::string > &parameters, unsigned int &parsed_parameters)
 Parses the given vector for a combined function starting at the given index. More...
 
SpecificFunctionParseCombineSpecificFunction (const std::vector< std::string > &parameters, unsigned int &parsed_parameters)
 Parses the given vector for a combined specific function starting at the given index. More...
 
SpecificStatisticalEvaluationParseCombineSpecificStatistic (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. More...
 
StatisticParseCombineStatistic (const std::vector< std::string > &parameters, unsigned int &parsed_parameters)
 Parses the given vector for a combined statistic starting at the given index. More...
 
ConstantEvaluationParseConstantEvaluation (const std::vector< std::string > &parameters, unsigned int &parsed_parameters)
 Parses the given vector for a constant evaluation starting at the given index. More...
 
FunctionParseFunction (const std::vector< std::string > &parameters, unsigned int &parsed_parameters)
 Parses the given vector for a function starting at the given index. More...
 
FunctionParseFunctionReduceOperator (const std::vector< std::string > &parameters, unsigned int &parsed_parameters)
 Parses the given vector for a function reduce operator starting at the given index. More...
 
OperationParseOperation (const std::vector< std::string > &parameters, unsigned int &parsed_parameters)
 Parses the given vector for an operation starting at the given index. More...
 
PairReduceOperationParsePairCombinationOperation (const std::vector< std::string > &parameters, unsigned int &parsed_parameters)
 Parses the given vector for a pair combination operation starting at the given index. More...
 
StatisticParseReduceOperator (const std::vector< std::string > &parameters, unsigned int &parsed_parameters)
 Parses the given vector for a reduce operator starting at the given index. More...
 
SpecificFunctionParseSpecificFunction (const std::vector< std::string > &parameters, unsigned int &parsed_parameters)
 Parses the given vector for a specific function starting at the given index. More...
 
SpecificStatisticalEvaluationParseSpecificStatistic (const std::vector< std::string > &parameters, unsigned int &parsed_parameters)
 Parses the given vector for a specific statistical evaluation starting at the given index. More...
 
FunctionParseStandardFunction (const std::vector< std::string > &parameters, unsigned int &parsed_parameters)
 Parses the given vector for a standard function starting at the given index. More...
 
StatisticParseStatistic (const std::vector< std::string > &parameters, unsigned int &parsed_parameters)
 Parses the given vector for a statistic starting at the given index. More...
 
VectorReduceOperationParseVectorReduceOperation (const std::vector< std::string > &parameters, 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 > &parameters)
 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
parametersThe vector containing the specification.
parsed_parametersThe 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
parametersThe vector containing the specification.
parsed_parametersThe 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
parametersThe vector containing the specification.
parsed_parametersThe 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
parametersThe vector containing the specification.
parsed_parametersThe 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
parametersThe vector containing the specification.
parsed_parametersThe 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
parametersThe vector containing the specification.
parsed_parametersThe 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
parametersThe vector containing the specification.
parsed_parametersThe 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
parametersThe vector containing the specification.
parsed_parametersThe 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
parametersThe vector containing the specification.
parsed_parametersThe 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
parametersThe vector containing the specification.
parsed_parametersThe 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
parametersThe vector containing the specification.
parsed_parametersThe 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
parametersThe vector containing the specification.
parsed_parametersThe 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
parametersThe vector containing the specification.
parsed_parametersThe 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
parametersThe vector containing the specification.
parsed_parametersThe 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
parametersThe vector containing the specification.
parsed_parametersThe 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
parametersThe command of the configuration file which can not be parsed.