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

Defines the disease measures collection data type. More...

#include <disease_table.h>

Public Member Functions

 DiseaseMeasure ()=default
 Initialises a new instance of the DiseaseMeasure class. More...
 
 DiseaseMeasure (const std::map< int, double > &measures)
 Initialises a new instance of the DiseaseMeasure class. More...
 
std::size_t size () const noexcept
 Gets the size of the measure collection. More...
 
const double & at (int measure_id) const
 Gets the measure value by identifier. More...
 
const double & operator[] (int measure_id) const
 Gets the measure value by identifier. More...
 

Detailed Description

Defines the disease measures collection data type.

Indirectly lookup by integer instead of the string keys.

Constructor & Destructor Documentation

◆ DiseaseMeasure() [1/2]

hgps::DiseaseMeasure::DiseaseMeasure ( )
default

Initialises a new instance of the DiseaseMeasure class.

◆ DiseaseMeasure() [2/2]

hgps::DiseaseMeasure::DiseaseMeasure ( const std::map< int, double > &  measures)

Initialises a new instance of the DiseaseMeasure class.

Parameters
measuresThe disease measures value mapping

Member Function Documentation

◆ at()

const double & hgps::DiseaseMeasure::at ( int  measure_id) const

Gets the measure value by identifier.

Parameters
measure_idMeasure identifier
Returns
Measure value
Exceptions
std::out_of_rangefor unknown measure identifier

◆ operator[]()

const double & hgps::DiseaseMeasure::operator[] ( int  measure_id) const

Gets the measure value by identifier.

Parameters
measure_idMeasure identifier
Returns
Measure value
Exceptions
std::out_of_rangefor unknown measure identifier

◆ size()

std::size_t hgps::DiseaseMeasure::size ( ) const
noexcept

Gets the size of the measure collection.

Returns

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