Health-GPS  1.2.2.0
Global Health Policy Simulation model (Health-GPS)
hgps::MappingEntry Class Reference

Defines risk factor mapping entry data type. More...

#include <mapping.h>

Public Member Functions

 MappingEntry ()=delete
 
 MappingEntry (std::string name, short level, core::Identifier entity_key, FactorRange range, bool dynamic_factor)
 Initialises a new instance of the MappingEntry class. More...
 
 MappingEntry (std::string name, short level, core::Identifier entity_key, bool dynamic_factor)
 Initialises a new instance of the MappingEntry class. More...
 
 MappingEntry (std::string name, short level, core::Identifier entity_key, FactorRange range)
 Initialises a new instance of the MappingEntry class. More...
 
 MappingEntry (std::string name, short level, core::Identifier entity_key)
 Initialises a new instance of the MappingEntry class. More...
 
 MappingEntry (std::string name, short level)
 Initialises a new instance of the MappingEntry class. More...
 
const std::string & name () const noexcept
 Gets the factor name. More...
 
short level () const noexcept
 Gets the factor hierarchical level. More...
 
const core::Identifierkey () const noexcept
 Gets the factor unique identification. More...
 
const core::Identifierentity_key () const noexcept
 Gets the factor's associated Person property identifier. More...
 
bool is_entity () const noexcept
 Determine whether this factor has an associated Person property, e.g. age. More...
 
bool is_dynamic_factor () const noexcept
 Determine whether this instance is a dynamic factor. More...
 
const FactorRangerange () const noexcept
 Gets the factor allowed values range. More...
 
double get_bounded_value (const double &value) const noexcept
 Adjusts a value to the factor range, if provided. More...
 

Detailed Description

Defines risk factor mapping entry data type.

Single risk factor definition, the dynamic factor is included only in the dynamic risk factor model hierarchy, never in the static model.

Constructor & Destructor Documentation

◆ MappingEntry() [1/6]

hgps::MappingEntry::MappingEntry ( )
delete

◆ MappingEntry() [2/6]

hgps::MappingEntry::MappingEntry ( std::string  name,
short  level,
core::Identifier  entity_key,
FactorRange  range,
bool  dynamic_factor 
)

Initialises a new instance of the MappingEntry class.

Parameters
nameRisk factor name
levelThe hierarchical level
entity_keyThe associated Person property, if exists
rangeThe factor range
dynamic_factorindicates whether this is the dynamic factor

◆ MappingEntry() [3/6]

hgps::MappingEntry::MappingEntry ( std::string  name,
short  level,
core::Identifier  entity_key,
bool  dynamic_factor 
)

Initialises a new instance of the MappingEntry class.

Parameters
nameRisk factor name
levelThe hierarchical level
entity_keyThe associated Person property, if exists
dynamic_factorindicates whether this is the dynamic factor

◆ MappingEntry() [4/6]

hgps::MappingEntry::MappingEntry ( std::string  name,
short  level,
core::Identifier  entity_key,
FactorRange  range 
)

Initialises a new instance of the MappingEntry class.

Parameters
nameRisk factor name
levelThe hierarchical level
entity_keyThe associated Person property, if exists
rangeThe factor range

◆ MappingEntry() [5/6]

hgps::MappingEntry::MappingEntry ( std::string  name,
short  level,
core::Identifier  entity_key 
)

Initialises a new instance of the MappingEntry class.

Parameters
nameRisk factor name
levelThe hierarchical level
entity_keyThe associated Person property, if exists

◆ MappingEntry() [6/6]

hgps::MappingEntry::MappingEntry ( std::string  name,
short  level 
)

Initialises a new instance of the MappingEntry class.

Parameters
nameRisk factor name
levelThe hierarchical level

Member Function Documentation

◆ entity_key()

const core::Identifier & hgps::MappingEntry::entity_key ( ) const
noexcept

Gets the factor's associated Person property identifier.

Returns
Associated entry identifier
Here is the call graph for this function:

◆ get_bounded_value()

double hgps::MappingEntry::get_bounded_value ( const double &  value) const
noexcept

Adjusts a value to the factor range, if provided.

Parameters
valueThe value to adjust
Returns
The bounded value

◆ is_dynamic_factor()

bool hgps::MappingEntry::is_dynamic_factor ( ) const
noexcept

Determine whether this instance is a dynamic factor.

Returns
true, for the dynamic factor; otherwise, false.

◆ is_entity()

bool hgps::MappingEntry::is_entity ( ) const
noexcept

Determine whether this factor has an associated Person property, e.g. age.

Returns
true, if the factor has an associated property; otherwise, false.
Here is the call graph for this function:
Here is the caller graph for this function:

◆ key()

const core::Identifier & hgps::MappingEntry::key ( ) const
noexcept

Gets the factor unique identification.

Returns
Factor identification

◆ level()

short hgps::MappingEntry::level ( ) const
noexcept

Gets the factor hierarchical level.

Returns
Factor level
Here is the caller graph for this function:

◆ name()

const std::string & hgps::MappingEntry::name ( ) const
noexcept

Gets the factor name.

Returns
Factor name
Here is the caller graph for this function:

◆ range()

const FactorRange & hgps::MappingEntry::range ( ) const
noexcept

Gets the factor allowed values range.

Returns
Factor values range

The documentation for this class was generated from the following files: