Emergency 20 Dokumentation  4.2.0
HistoricWellComponent.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 //[-------------------------------------------------------]
13 #include "em5/Export.h"
14 
16 
17 
18 //[-------------------------------------------------------]
19 //[ Namespace ]
20 //[-------------------------------------------------------]
21 namespace em5
22 {
23 
24 
25  //[-------------------------------------------------------]
26  //[ Classes ]
27  //[-------------------------------------------------------]
36  {
37 
38 
39  //[-------------------------------------------------------]
40  //[ Public definitions ]
41  //[-------------------------------------------------------]
42  public:
43  static const uint32 COMPONENT_ID;
44 
45 
46  //[-------------------------------------------------------]
47  //[ Public methods ]
48  //[-------------------------------------------------------]
49  public:
57  explicit HistoricWellComponent(qsf::Prototype* prototype);
58 
63  virtual ~HistoricWellComponent();
64 
65  void startPumpAnimation();
66  void stopPumpAnimation();
67 
68  QSF_DEFINE_SIMPLE_GETTER_AND_SETTER(PumpEntity, uint64, mPumpEntityId);
69 
70 
71  //[-------------------------------------------------------]
72  //[ Protected virtual qsf::Component methods ]
73  //[-------------------------------------------------------]
74  protected:
75  virtual void onSetSimulating(bool simulating);
76  virtual void onSetActive(bool active);
77 
78 
79  //[-------------------------------------------------------]
80  //[ Private methods ]
81  //[-------------------------------------------------------]
82  private:
83  void internalSetActive(bool active);
84 
85 
86  //[-------------------------------------------------------]
87  //[ Private data ]
88  //[-------------------------------------------------------]
89  private:
90  uint64 mPumpEntityId; // Id of the pump, used for animating
91  bool mInternalActive;
92 
93 
94  //[-------------------------------------------------------]
95  //[ CAMP reflection system ]
96  //[-------------------------------------------------------]
97  QSF_CAMP_RTTI() // Only adds the virtual method "campClassId()", nothing more
98 
99 
100  };
101 
102 
103 //[-------------------------------------------------------]
104 //[ Namespace ]
105 //[-------------------------------------------------------]
106 } // em5
107 
108 
109 //[-------------------------------------------------------]
110 //[ CAMP reflection system ]
111 //[-------------------------------------------------------]
Definition: ActionPriority.h:13
EMERGENCY 2017 Historic well Component.
Definition: HistoricWellComponent.h:35
Abstract component class.
Definition: Component.h:105
unsigned int uint32
Definition: PlatformTypes.h:181
#define EM5_API_EXPORT
Definition: Export.h:28
uint64_t uint64
Definition: PlatformTypes.h:184
static const uint32 COMPONENT_ID
"em5::HistoricWellComponent" unique component ID
Definition: HistoricWellComponent.h:43
#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
#define QSF_DEFINE_SIMPLE_GETTER_AND_SETTER(name, type, variable)
Definition: PropertyHelper.h:16
Prototype class.
Definition: Prototype.h:100