GCBM
ageclasshelper.h
Go to the documentation of this file.
1 #ifndef MOJA_MODULES_CBM_AGECLASSHELPER_H_
2 #define MOJA_MODULES_CBM_AGECLASSHELPER_H_
3 
4 #include "moja/modules/cbm/_modules.cbm_exports.h"
5 #include "moja/flint/modulebase.h"
6 
7 namespace moja {
8 namespace modules {
9 namespace cbm {
10 
11  class CBM_API AgeClassHelper {
12 
13  public:
14  AgeClassHelper(int ageClassSize = 20, int maximumAge = 300);
15  int toAgeClass(int standAge);
16  std::tuple<int, int> getAgeClass(int ageClass);
17  std::string getAgeClassString(int ageClass);
18  std::map<int, std::tuple<int, int>> getAgeClasses();
19 
20  private:
24 
25  std::map<int, std::tuple<int, int>> _ageClasses;
26  std::map<int, int> _ageClassLookup;
27 
28  void generateAgeClasses(int ageClassSize, int maximumAge);
29  };
30 
31 }}}
32 #endif
moja::modules::cbm
Definition: ageclasshelper.cpp:12
moja::modules::cbm::AgeClassHelper::_ageClassLookup
std::map< int, int > _ageClassLookup
Definition: ageclasshelper.h:26
moja::modules::cbm::AgeClassHelper::_ageClasses
std::map< int, std::tuple< int, int > > _ageClasses
Definition: ageclasshelper.h:25
moja::modules::cbm::AgeClassHelper::_ageClassSize
int _ageClassSize
Definition: ageclasshelper.h:21
moja::modules::cbm::AgeClassHelper::_numAgeClasses
int _numAgeClasses
Definition: ageclasshelper.h:23
moja::modules::cbm::AgeClassHelper
Definition: ageclasshelper.h:11
moja::modules::cbm::AgeClassHelper::_maximumAge
int _maximumAge
Definition: ageclasshelper.h:22
moja
Definition: ageclasshelper.cpp:10