| OpenMS 2.5.0

Public Member Functions | Protected Attributes | List of all members
ModelDescription< D > Class Template Reference

Stores the name and parameters of a model. More...

`#include <OpenMS/TRANSFORMATIONS/FEATUREFINDER/ModelDescription.h>`

## Public Member Functions

| ModelDescription ()
| Default constructor. More...
| ModelDescription (const ModelDescription &source)
| copy constructor More...
| ModelDescription (const BaseModel< D > *model)
| constructor provided for convenience More...
virtual | ~ModelDescription ()
| destructor More...
virtual ModelDescription & | operator= (const ModelDescription &source)
| assignment operator More...
BaseModel< D > * | createModel ()
const String & | getName () const
| Non-mutable access to model name. More...
String & | getName ()
| Mutable access to the model name. More...
void | setName (const String &name)
| Set the model name. More...
const Param & | getParam () const
| Non-mutable access to model parameters. More...
Param & | getParam ()
| Mutable access to the model parameters. More...
void | setParam (const Param &param)
| Set the model parameters. More...
Predicates
virtual bool | operator== (const ModelDescription &rhs) const
virtual bool | operator!= (const ModelDescription &rhs) const

## Protected Attributes

String | name_
Param | parameters_

## Detailed Description

### template<UInt D>
class OpenMS::ModelDescription< D >

Stores the name and parameters of a model.

This class also allows reconstruction of the model.

See also
  BaseModel

## Constructor & Destructor Documentation

## ◆ ModelDescription() [1/3]

ModelDescription | ( |  | ) |

inline

Default constructor.

## ◆ ModelDescription() [2/3]

ModelDescription | ( | const ModelDescription< D > & | source | ) |

inline

copy constructor

## ◆ ModelDescription() [3/3]

ModelDescription | ( | const BaseModel< D > * | model | ) |

inline

constructor provided for convenience

## ◆ ~ModelDescription()

virtual ~ModelDescription | ( |  | ) |

inline virtual

destructor

## Member Function Documentation

## ◆ createModel()

BaseModel<D>* createModel | ( |  | ) |

inline

creates model from the parameters defined in this class returns 0 if no description is set.

References ModelDescription< D >::name_, ModelDescription< D >::parameters_, and DefaultParamHandler::setParameters().

Referenced by ProductModel< 2 >::operator=(), and ProductModel< 2 >::ProductModel().

## ◆ getName() [1/2]

const String& getName | ( |  | ) | const

inline

Non-mutable access to model name.

Accessors

## ◆ getName() [2/2]

String& getName | ( |  | ) |

inline

Mutable access to the model name.

References ModelDescription< D >::name_.

## ◆ getParam() [1/2]

const Param& getParam | ( |  | ) | const

inline

Non-mutable access to model parameters.

References ModelDescription< D >::parameters_.

## ◆ getParam() [2/2]

Param& getParam | ( |  | ) |

inline

Mutable access to the model parameters.

References ModelDescription< D >::parameters_.

## ◆ operator!=()

virtual bool operator!= | ( | const ModelDescription< D > & | rhs | ) | const

inline virtual

References ModelDescription< D >::operator==().

## ◆ operator=()

virtual ModelDescription& operator= | ( | const ModelDescription< D > & | source | ) |

inline virtual

assignment operator

References ModelDescription< D >::name_, and ModelDescription< D >::parameters_.

## ◆ operator==()

virtual bool operator== | ( | const ModelDescription< D > & | rhs | ) | const

inline virtual

References ModelDescription< D >::name_, and ModelDescription< D >::parameters_.

Referenced by ModelDescription< D >::operator!=().

## ◆ setName()

void setName | ( | const String & | name | ) |

inline

Set the model name.

References ModelDescription< D >::name_.

## ◆ setParam()

void setParam | ( | const Param & | param | ) |

inline

Set the model parameters.

References ModelDescription< D >::parameters_.

## Member Data Documentation

## ◆ name_

String name_

protected

Referenced by ModelDescription< D >::createModel(), ModelDescription< D >::getName(), ModelDescription< D >::operator=(), ModelDescription< D >::operator==(), and ModelDescription< D >::setName().

## ◆ parameters_

Param parameters_

protected

Referenced by ModelDescription< D >::createModel(), ModelDescription< D >::getParam(), ModelDescription< D >::operator=(), ModelDescription< D >::operator==(), and ModelDescription< D >::setParam().