Class FunctionParameters

Class Documentation

class SmartPeak::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
  • [in] function_name: 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
  • [in] function_name: the function name

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

FunctionParameters(const OpenMS::DefaultParamHandler &param_handler)

construct from OpenMS ParameterHandler

Parameters
  • [in] param_handler: the OpenMS ParameterHandler to convert

void setAsSchema(bool is_schema)

Mark all parameters as schema parameter.

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

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

Add a parameter. Doesn’t Replace if already exists

Parameters
  • [in] parameter: the parameter to add

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
  • [in] other: 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_