Emergency 20 Dokumentation  4.2.0
CityBlackoutEventFactory.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 //[-------------------------------------------------------]
14 
16 #include <qsf/time/Time.h>
17 
18 
19 //[-------------------------------------------------------]
20 //[ Forward declarations ]
21 //[-------------------------------------------------------]
22 namespace qsf
23 {
24  class Layer;
25 }
26 
27 
28 //[-------------------------------------------------------]
29 //[ Namespace ]
30 //[-------------------------------------------------------]
31 namespace em5
32 {
33 
34 
35  //[-------------------------------------------------------]
36  //[ Classes ]
37  //[-------------------------------------------------------]
43  {
44 
45 
46  //[-------------------------------------------------------]
47  //[ Public methods ]
48  //[-------------------------------------------------------]
49  public:
55 
60  virtual ~CityBlackoutEventFactory();
61 
62  QSF_DEFINE_SIMPLE_GETTER_AND_SETTER(EventLayer, const std::string&, mEventLayer)
63  QSF_DEFINE_SIMPLE_GETTER_AND_SETTER(BaseLayer, const std::string&, mBaseLayer)
64  QSF_DEFINE_SIMPLE_GETTER_AND_SETTER(MinTriggerTimeOfDay, qsf::Time, mMinTriggerTimeOfDay);
65  QSF_DEFINE_SIMPLE_GETTER_AND_SETTER(MaxTriggerTimeOfDay, qsf::Time, mMaxTriggerTimeOfDay);
66 
67 
68  //[-------------------------------------------------------]
69  //[ Public virtual em5::FreeplayEventFactory methods ]
70  //[-------------------------------------------------------]
71  public:
72  virtual FreeplayEvent* tryTriggerEvent() override;
73 
74 
75  //[-------------------------------------------------------]
76  //[ Private methods ]
77  //[-------------------------------------------------------]
78  private:
79  qsf::Layer* findCandidate() const;
80  bool checkCandidate(const qsf::Layer& entity) const;
81 
82 
83  //[-------------------------------------------------------]
84  //[ Private data ]
85  //[-------------------------------------------------------]
86  private:
87  std::string mEventLayer;
88  std::string mBaseLayer;
89  qsf::Time mMinTriggerTimeOfDay;
90  qsf::Time mMaxTriggerTimeOfDay;
91 
92 
93  //[-------------------------------------------------------]
94  //[ CAMP reflection system ]
95  //[-------------------------------------------------------]
96  QSF_CAMP_RTTI() // Only adds the virtual method "campClassId()", nothing more
97 
98 
99  };
100 
101 
102 //[-------------------------------------------------------]
103 //[ Namespace ]
104 //[-------------------------------------------------------]
105 } // em5
106 
107 
108 //[-------------------------------------------------------]
109 //[ CAMP reflection system ]
110 //[-------------------------------------------------------]
Definition: ActionPriority.h:13
Layer class.
Definition: Layer.h:56
#define EM5_API_EXPORT
Definition: Export.h:28
BaseLayer window.
Definition: BaseLayer.h:30
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 "City blackout event".
Definition: CityBlackoutEventFactory.h:42
Data type for encapsulating time information. It might represents points in time and time spans...
Definition: Time.h:32