Emergency 20 Dokumentation  4.2.0
HeatWaveEventFactory.h
Go to the documentation of this file.
1 // Copyright (C) 2012-2018 Promotion Software GmbH
2 
3 
4 //[-------------------------------------------------------]
5 //[ Header guard ]
6 //[-------------------------------------------------------]
7 #pragma once
8 
9 
10 //[-------------------------------------------------------]
11 //[ Includes ]
12 //[-------------------------------------------------------]
16 
18 #include <qsf/time/Time.h>
19 
20 
21 //[-------------------------------------------------------]
22 //[ Forward declarations ]
23 //[-------------------------------------------------------]
24 namespace qsf
25 {
26  class Entity;
27 }
28 
29 
30 //[-------------------------------------------------------]
31 //[ Namespace ]
32 //[-------------------------------------------------------]
33 namespace em5
34 {
35 
36 
37  //[-------------------------------------------------------]
38  //[ Classes ]
39  //[-------------------------------------------------------]
45  {
46 
47 
48  //[-------------------------------------------------------]
49  //[ Public methods ]
50  //[-------------------------------------------------------]
51  public:
57 
62  virtual ~HeatWaveEventFactory();
63 
71  std::string getWeatherAsString() const;
72 
80  void setWeatherAsString(const std::string& weather);
81 
86  WeatherComponent::WeatherBitmask getWeather() const;
87 
92  void setWeather(WeatherComponent::WeatherBitmask weather);
93 
94  QSF_DEFINE_SIMPLE_GETTER_AND_SETTER(DeadPersonsToFail, uint32, mEventConfiguration.deadPersonsToFail);
95  QSF_DEFINE_SIMPLE_GETTER_AND_SETTER(HeatwaveFadeInTime, qsf::Time, mEventConfiguration.heatwaveFadeInTime);
96  QSF_DEFINE_SIMPLE_GETTER_AND_SETTER(HeatwaveFadeOutTime, qsf::Time, mEventConfiguration.heatwaveFadeOutTime);
97  QSF_DEFINE_SIMPLE_GETTER_AND_SETTER(HeatwavePersistInflameObjectWaitTime, qsf::Time, mEventConfiguration.heatwavePersistInflameObjectWaitTime);
98  QSF_DEFINE_SIMPLE_GETTER_AND_SETTER(HeatwavePersistInflameVehicleWaitTime, qsf::Time, mEventConfiguration.heatwavePersistInflameVehicleWaitTime);
99  QSF_DEFINE_SIMPLE_GETTER_AND_SETTER(HeatwavePersistInjurePersonWaitTime, qsf::Time, mEventConfiguration.heatwavePersistInjurePersonWaitTime);
100  QSF_DEFINE_SIMPLE_GETTER_AND_SETTER(NumberOfPersonsToInjure, uint32, mEventConfiguration.numberOfPersonsToInjure);
101  QSF_DEFINE_SIMPLE_GETTER_AND_SETTER(NumberOfVegetationToInflame, uint32, mEventConfiguration.numberOfVegetationToInflame);
102  QSF_DEFINE_SIMPLE_GETTER_AND_SETTER(NumberOfVehiclesToInflame, uint32, mEventConfiguration.numberOfVehiclesToInflame);
103 
104 
105  //[-------------------------------------------------------]
106  //[ Public virtual em5::FreeplayEventFactory methods ]
107  //[-------------------------------------------------------]
108  public:
109  virtual FreeplayEvent* tryTriggerEvent() override;
110 
111 
112  //[-------------------------------------------------------]
113  //[ Private methods ]
114  //[-------------------------------------------------------]
115  private:
116  bool checkWeatherConditions() const;
117  bool checkTime() const;
118 
119 
120  //[-------------------------------------------------------]
121  //[ Private data ]
122  //[-------------------------------------------------------]
123  private:
124  WeatherComponent::WeatherBitmask mWeatherBitmask;
125  uint32 mHourMin;
126  uint32 mHourMax;
127  HeatWaveEvent::Configuration mEventConfiguration;
128 
129 
130  //[-------------------------------------------------------]
131  //[ CAMP reflection system ]
132  //[-------------------------------------------------------]
133  QSF_CAMP_RTTI() // Only adds the virtual method "campClassId()", nothing more
134 
135 
136  };
137 
138 
139 //[-------------------------------------------------------]
140 //[ Namespace ]
141 //[-------------------------------------------------------]
142 } // em5
143 
144 
145 //[-------------------------------------------------------]
146 //[ CAMP reflection system ]
147 //[-------------------------------------------------------]
Definition: ActionPriority.h:13
unsigned int uint32
Definition: PlatformTypes.h:181
#define EM5_API_EXPORT
Definition: Export.h:28
Definition: PickupPersonByParamedicAction.h:21
#define QSF_CAMP_RTTI()
Only adds the virtual method "campClassId()", nothing more.
Definition: CampClass.h:75
#define QSF_CAMP_TYPE_NONCOPYABLE(type)
See "CAMP_TYPE_NONCOPYABLE" for details.
Definition: CampClass.h:112
EMERGENCY 5 freeplay event factory base class.
Definition: FreeplayEventFactory.h:56
#define QSF_DEFINE_SIMPLE_GETTER_AND_SETTER(name, type, variable)
Definition: PropertyHelper.h:16
Abstract EMERGENCY 5 freeplay event base class.
Definition: FreeplayEvent.h:66
Emergency 5 freeplay event factory for "heatwave" 11.9.
Definition: HeatWaveEventFactory.h:44
Definition: HeatWaveEvent.h:44
Data type for encapsulating time information. It might represents points in time and time spans...
Definition: Time.h:32