All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Pages
EventDescriptor.hpp
Go to the documentation of this file.
1 /*
2 
3  This file is part of OpenFLUID software
4  Copyright(c) 2007, INRA - Montpellier SupAgro
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 /**
35  @file EventDescriptor.hpp
36 
37  @author Jean-Christophe FABRE <jean-christophe.fabre@supagro.inra.fr>
38  */
39 
40 
41 #ifndef __OPENFLUID_FLUIDX_EVENTDESCRIPTOR_HPP__
42 #define __OPENFLUID_FLUIDX_EVENTDESCRIPTOR_HPP__
43 
44 #include <openfluid/dllexport.hpp>
45 #include <openfluid/core/TypeDefs.hpp>
46 #include <openfluid/core/Event.hpp>
47 
48 
49 namespace openfluid { namespace fluidx {
50 
51 typedef unsigned long long EventID_t;
52 
54 {
55  private:
56 
57  EventID_t m_ID;
58 
59  openfluid::core::UnitsClass_t m_UnitsClass;
60 
62 
63  openfluid::core::Event m_Event;
64 
65  static EventID_t m_NextID;
66 
67  static EventID_t assignID();
68 
69 
70  public:
71 
73 
74  EventDescriptor(const EventDescriptor& EvDesc);
75 
76  ~EventDescriptor();
77 
79  { return m_UnitID; };
80 
82  { m_UnitID = ID; };
83 
85  { return m_UnitsClass; };
86 
87  /**
88  @deprecated Since version 2.1.0. Use openfluid::fluidx::EventDescriptor::getUnitsClass() const instead
89  */
91  { return m_UnitsClass; };
92 
93  inline void setUnitsClass(const openfluid::core::UnitsClass_t& UClass)
94  { m_UnitsClass = UClass; }
95 
96  /**
97  @deprecated Since version 2.1.0.
98  Use openfluid::fluidx::EventDescriptor::setUnitsClass(const openfluid::core::UnitsClass_t&) instead
99  */
101  { m_UnitsClass = UClass; };
102 
104  { return m_Event; };
105 
106  inline EventID_t getID() const
107  { return m_ID; };
108 
109 };
110 
111 
112 } } // namespaces
113 
114 #endif /* __OPENFLUID_FLUIDX_EVENTDESCRIPTOR_HPP__ */
unsigned int UnitID_t
Definition: TypeDefs.hpp:61
Definition: EventDescriptor.hpp:53
std::string UnitsClass_t
Definition: TypeDefs.hpp:71
Definition: Event.hpp:59
EventID_t getID() const
Definition: EventDescriptor.hpp:106
void setUnitsClass(const openfluid::core::UnitsClass_t &UClass)
Definition: EventDescriptor.hpp:93
void setUnitID(openfluid::core::UnitID_t ID)
Definition: EventDescriptor.hpp:81
const openfluid::core::UnitsClass_t getUnitClass() const OPENFLUID_DEPRECATED
Definition: EventDescriptor.hpp:90
void setUnitClass(const openfluid::core::UnitsClass_t &UClass) OPENFLUID_DEPRECATED
Definition: EventDescriptor.hpp:100
#define OPENFLUID_DEPRECATED
Definition: deprecation.hpp:54
unsigned long long EventID_t
Definition: EventDescriptor.hpp:51
openfluid::core::Event & event()
Definition: EventDescriptor.hpp:103
const openfluid::core::UnitsClass_t getUnitsClass() const
Definition: EventDescriptor.hpp:84
#define OPENFLUID_API
Definition: dllexport.hpp:87
openfluid::core::UnitID_t getUnitID() const
Definition: EventDescriptor.hpp:78