Weight classification model polymorphic wrapper class.
More...
#include <weight_model.h>
Weight classification model polymorphic wrapper class.
◆ WeightModel() [1/3]
template<typename T>
| hgps::WeightModel::WeightModel |
( |
T && | value | ) |
|
|
inline |
Initialises a new instance of the WeightModel class.
- Template Parameters
-
- Parameters
-
| value | The weight model instance |
◆ WeightModel() [2/3]
| hgps::WeightModel::WeightModel |
( |
const WeightModel & | other | ) |
|
|
inline |
Constructs the WeightModel with the copy of the other's contents.
- Parameters
-
◆ WeightModel() [3/3]
| hgps::WeightModel::WeightModel |
( |
WeightModel && | other | ) |
|
|
default |
Constructs the WeightModel with the contents of other using move semantics.
- Parameters
-
◆ adjust_risk_factor_value()
| double hgps::WeightModel::adjust_risk_factor_value |
( |
const Person & | entity, |
|
|
const core::Identifier & | risk_factor_key, |
|
|
double | value ) const |
|
inline |
Adjust a Person risk factor value.
- Parameters
-
| entity | The Person instance to adjust |
| risk_factor_key | The risk factor identifier |
| value | The amount of adjustment value |
- Returns
- The adjusted risk factor value
- Exceptions
-
| std::out_of_range | for unknown weight category definition |
◆ child_cutoff_age()
| unsigned int hgps::WeightModel::child_cutoff_age |
( |
| ) |
const |
|
inlinenoexcept |
Gets the children cut-off age (before adult).
- Returns
- The cut-off age for children
◆ classify_weight()
Classify a person weight according with the predefined categories.
- Parameters
-
| person | The Person instance to classify |
- Returns
- The respective weight classification
◆ operator=() [1/2]
Replaces the WeightModel with a copy of the other's contents.
- Parameters
-
- Returns
- This instance
◆ operator=() [2/2]
Replaces the WeightModel contents with the other using move semantics.
- Parameters
-
- Returns
- This instance
The documentation for this class was generated from the following file: