Stride Reference Manual  - generated for commit 9643b11
AgeBrackets.h
Go to the documentation of this file.
1 #pragma once
2 /*
3  * This is free software: you can redistribute it and/or modify it
4  * under the terms of the GNU General Public License as published by
5  * the Free Software Foundation, either version 3 of the License, or
6  * any later version.
7  * The software is distributed in the hope that it will be useful,
8  * but WITHOUT ANY WARRANTY; without even the implied warranty of
9  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
10  * GNU General Public License for more details.
11  * You should have received a copy of the GNU General Public License
12  * along with the software. If not, see <http://www.gnu.org/licenses/>.
13  *
14  * Copyright 2019, Jan Broeckhove.
15  */
16 
17 namespace stride {
18 
22 namespace AgeBrackets {
23 
25 struct Daycare
26 {
27  constexpr static inline double m_lower = 0.0; // if changed, activate test in HasAge!
28  constexpr static inline double m_upper = 3.0;
29 
30  static bool HasAge(double age) { return /*age >= m_lower && */ age < m_upper; }
31 };
32 
34 struct PreSchool
35 {
36  constexpr static inline double m_lower = 3.0;
37  constexpr static inline double m_upper = 6.0;
38 
39  static bool HasAge(double age) { return age >= m_lower && age < m_upper; }
40 };
41 
43 struct K12School
44 {
45  constexpr static inline double m_lower = 6.0;
46  constexpr static inline double m_upper = 18.0;
47 
48  static bool HasAge(double age) { return age >= m_lower && age < m_upper; }
49 };
50 
52 struct College
53 {
54  constexpr static inline double m_lower = 18.0;
55  constexpr static inline double m_upper = 26.0;
56 
57  static bool HasAge(double age) { return age >= m_lower && age < m_upper; }
58 };
59 
61 struct Workplace
62 {
63  constexpr static inline double m_lower = 18U;
64  constexpr static inline double m_upper = 65u;
65 
66  static bool HasAge(double age) { return age >= m_lower && age < m_upper; }
67 };
68 
69 } // namespace AgeBrackets
70 } // namespace stride
static bool HasAge(double age)
Definition: AgeBrackets.h:48
K12school with lower (inclusive) and upper (exclusive) age bracket.
Definition: AgeBrackets.h:43
static bool HasAge(double age)
Definition: AgeBrackets.h:30
static bool HasAge(double age)
Definition: AgeBrackets.h:57
static constexpr double m_upper
Definition: AgeBrackets.h:28
DayCare with lower (inclusive) and upper (exclusive) age bracket..
Definition: AgeBrackets.h:25
College with lower (inclusive) and upper (exclusive) age bracket.
Definition: AgeBrackets.h:61
static bool HasAge(double age)
Definition: AgeBrackets.h:66
static constexpr double m_lower
Definition: AgeBrackets.h:27
static bool HasAge(double age)
Definition: AgeBrackets.h:39
Preschool with lower (inclusive) and upper (exclusive) age bracket.
Definition: AgeBrackets.h:34
Namespace for the simulator and related classes.
Definition: Calendar.cpp:28
College with lower (inclusive) and upper (exclusive) age bracket.
Definition: AgeBrackets.h:52