Documentation for OpenFLUID 2.2.2
Loading...
Searching...
No Matches
EventDescriptor.hpp
Go to the documentation of this file.
1/*
2
3 This file is part of OpenFLUID software
4 Copyright(c) 2021-2026, INRAE
5
6
7 == GNU General Public License Usage ==
8
9 OpenFLUID is free software: you can redistribute it and/or modify
10 it under the terms of the GNU General Public License as published by
11 the Free Software Foundation, either version 3 of the License, or
12 (at your option) any later version.
13
14 OpenFLUID is distributed in the hope that it will be useful,
15 but WITHOUT ANY WARRANTY; without even the implied warranty of
16 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
17 GNU General Public License for more details.
18
19 You should have received a copy of the GNU General Public License
20 along with OpenFLUID. If not, see <http://www.gnu.org/licenses/>.
21
22
23 == Other Usage ==
24
25 Other Usage means a use of OpenFLUID that is inconsistent with the GPL
26 license, and requires a written agreement between You and INRA.
27 Licensees for Other Usage of OpenFLUID may use this file in accordance
28 with the terms contained in the written agreement between You and INRA.
29
30*/
31
32
33/**
34 @file EventDescriptor.hpp
35
36 @author Jean-Christophe FABRE <jean-christophe.fabre@inra.fr>
37 */
38
39
40#ifndef __OPENFLUID_FLUIDX_EVENTDESCRIPTOR_HPP__
41#define __OPENFLUID_FLUIDX_EVENTDESCRIPTOR_HPP__
42
43
45#include <openfluid/core/TypeDefs.hpp>
47
48
49namespace openfluid { namespace fluidx {
50
51
52typedef unsigned long long EventID_t;
53
54
56{
57 private:
58
59 EventID_t m_ID;
60
62
64
66
67 static EventID_t m_NextID;
68
69 static EventID_t assignID();
70
71
72 public:
73
75
77
80
82 {
83 return m_UnitID;
84 };
85
87 {
88 m_UnitID = ID;
89 };
90
92 {
93 return m_UnitsClass;
94 };
95
96 /**
97 @deprecated Since version 2.1.0. Use openfluid::fluidx::EventDescriptor::getUnitsClass() const instead
98 */
99 [[deprecated]] inline const openfluid::core::UnitsClass_t getUnitClass() const
100 {
101 return m_UnitsClass;
102 };
103
105 {
106 m_UnitsClass = UClass;
107 }
108
109 /**
110 @deprecated Since version 2.1.0.
111 Use openfluid::fluidx::EventDescriptor::setUnitsClass(const openfluid::core::UnitsClass_t&) instead
112 */
113 [[deprecated]] inline void setUnitClass(const openfluid::core::UnitsClass_t& UClass)
114 {
115 m_UnitsClass = UClass;
116 };
117
118 inline const openfluid::core::Event& event() const
119 {
120 return m_Event;
121 };
122
124 {
125 return m_Event;
126 };
127
128 inline void setEvent(const openfluid::core::Event& Ev)
129 {
130 m_Event = Ev;
131 };
132
133 inline EventID_t getID() const
134 {
135 return m_ID;
136 };
137
138};
139
140
141} } // namespaces
142
143
144#endif /* __OPENFLUID_FLUIDX_EVENTDESCRIPTOR_HPP__ */
Definition Event.hpp:69
Definition EventDescriptor.hpp:56
const openfluid::core::UnitsClass_t getUnitsClass() const
Definition EventDescriptor.hpp:91
openfluid::core::UnitID_t getUnitID() const
Definition EventDescriptor.hpp:81
void setUnitClass(const openfluid::core::UnitsClass_t &UClass)
Definition EventDescriptor.hpp:113
void setUnitID(openfluid::core::UnitID_t ID)
Definition EventDescriptor.hpp:86
const openfluid::core::UnitsClass_t getUnitClass() const
Definition EventDescriptor.hpp:99
void setEvent(const openfluid::core::Event &Ev)
Definition EventDescriptor.hpp:128
openfluid::core::Event & event()
Definition EventDescriptor.hpp:123
~EventDescriptor()
Definition EventDescriptor.hpp:78
EventDescriptor(const EventDescriptor &EvDesc)
const openfluid::core::Event & event() const
Definition EventDescriptor.hpp:118
void setUnitsClass(const openfluid::core::UnitsClass_t &UClass)
Definition EventDescriptor.hpp:104
EventID_t getID() const
Definition EventDescriptor.hpp:133
#define OPENFLUID_API
Definition dllexport.hpp:86
unsigned int UnitID_t
Definition TypeDefs.hpp:70
std::string UnitsClass_t
Definition TypeDefs.hpp:98
unsigned long long EventID_t
Definition EventDescriptor.hpp:52
Definition ApplicationException.hpp:47