Class FunctionParameters

Class Documentation

class FunctionParameters

FunctionParameters holds a name and an associated list of Parameters.

Public Functions

FunctionParameters() = default

default constructor

inline FunctionParameters(const std::string &function_name)

construct empty, named FunctionParameter

Parameters

function_name[in] the function name

FunctionParameters(const std::string &function_name, const std::vector<std::map<std::string, std::string>> &parameters_list)

construct from a list of map

Parameters
  • function_name[in] the function name

  • parameters_list[in] list of parmater (map representation)

FunctionParameters(const OpenMS::DefaultParamHandler &param_handler)

construct from OpenMS ParameterHandler

Parameters

param_handler[in] the OpenMS ParameterHandler to convert

void setAsSchema(bool is_schema)

Mark all parameters as schema parameter.

Parameters

is_schema[in] set as schema (true) or not (false)

Parameter *findParameter(const std::string &parameter)

return a parameter by name (both const and non const versions)

const Parameter *findParameter(const std::string &parameter) const
inline const std::string &getFunctionName() const

get Function’s name

inline std::vector<Parameter> getParameters() const

return a vector of the currently loaded parameters

void addParameter(const Parameter &parameter)

Add a parameter. Doesn’t Replace if already exists

Parameters

parameter[in] the parameter to add

void removeParameter(const std::string &parameter_name)

Remove a parameter.

Parameters

parameter_name[in] the parameter name

void merge(const FunctionParameters &other)

Merge two FunctionsParameters.

  • If one parameter already exists in the other, use it as Schema for the other parameter.

  • If the parameter does not exists, just add.

Parameters

other[in] the FunctionParameter to merge with

bool operator==(const FunctionParameters &other) const
inline bool operator!=(const FunctionParameters &other) const
inline size_t size() const
inline std::vector<Parameter>::iterator begin()
inline std::vector<Parameter>::iterator end()
inline std::vector<Parameter>::const_iterator begin() const
inline std::vector<Parameter>::const_iterator end() const
inline bool empty() const
inline Parameter &front()
inline const Parameter &front() const
inline Parameter &operator[](size_t index)
inline const Parameter &operator[](size_t index) const
inline Parameter &at(size_t index)
inline const Parameter &at(size_t index) const

Protected Attributes

std::string function_name_
std::vector<Parameter> parameters_