protection_event.h Source File

CPP API: protection_event.h Source File
protection_event.h
Go to the documentation of this file.
1 /*
2 * Copyright (C) 2020-2026 MEmilio
3 *
4 * Authors: David Kerkmann, Khoa Nguyen
5 *
6 * Contact: Martin J. Kuehn <Martin.Kuehn@DLR.de>
7 *
8 * Licensed under the Apache License, Version 2.0 (the "License");
9 * you may not use this file except in compliance with the License.
10 * You may obtain a copy of the License at
11 *
12 * http://www.apache.org/licenses/LICENSE-2.0
13 *
14 * Unless required by applicable law or agreed to in writing, software
15 * distributed under the License is distributed on an "AS IS" BASIS,
16 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
17 * See the License for the specific language governing permissions and
18 * limitations under the License.
19 */
20 #ifndef MIO_ABM_VACCINE_H
21 #define MIO_ABM_VACCINE_H
22 
24 #include "abm/time.h"
25 
26 #include <cstdint>
27 
28 namespace mio
29 {
30 namespace abm
31 {
32 
37 enum class ProtectionType : std::uint32_t
38 {
42  Count //last!!
43 };
44 
51  : type(exposure)
52  , time(t)
53  {
54  }
55 
58  {
59  return Members("ProtectionEvent").add("type", type).add("time", time);
60  }
61 
64 };
65 
66 } // namespace abm
67 
69 template <>
72  {
74  }
75 };
76 
77 } // namespace mio
78 
79 #endif
Represents a point in time.
Definition: time.h:175
ProtectionType
ProtectionType in ABM.
Definition: protection_event.h:38
A collection of classes to simplify handling of matrix shapes in meta programming.
Definition: models/abm/analyze_result.h:30
static abm::ProtectionEvent create()
Definition: protection_event.h:71
Creates an instance of T for later initialization.
Definition: default_serialize.h:173
List of a class's members.
Definition: default_serialize.h:113
Members< ValueTypes..., T > add(const char *member_name, T &member)
Add a class member.
Definition: default_serialize.h:139
A tuple of ProtectionType and #TimePoint.
Definition: protection_event.h:49
ProtectionEvent(ProtectionType exposure, TimePoint t)
Definition: protection_event.h:50
ProtectionType type
Definition: protection_event.h:62
TimePoint time
Definition: protection_event.h:63
auto default_serialize()
This method is used by the default serialization feature.
Definition: protection_event.h:57