Emergency 20 Dokumentation  4.2.0
DeployRescueBusAction.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/audio/AudioProxy.h"
14 
16 
17 
18 //[-------------------------------------------------------]
19 //[ Forward declarations ]
20 //[-------------------------------------------------------]
21 namespace em5
22 {
23  class RescueBusComponent;
24 }
25 
26 
27 //[-------------------------------------------------------]
28 //[ Namespace ]
29 //[-------------------------------------------------------]
30 namespace em5
31 {
32 
33 
34  //[-------------------------------------------------------]
35  //[ Classes ]
36  //[-------------------------------------------------------]
42  {
43 
44 
45  //[-------------------------------------------------------]
46  //[ Public definitions ]
47  //[-------------------------------------------------------]
48  public:
50 
51 
52  //[-------------------------------------------------------]
53  //[ Public methods ]
54  //[-------------------------------------------------------]
55  public:
61 
66  virtual ~DeployRescueBusAction();
67 
68 
69  //[-------------------------------------------------------]
70  //[ Public virtual qsf::Actions methods ]
71  //[-------------------------------------------------------]
72  public:
73  virtual void serialize(qsf::BinarySerializer& serializer) override;
74 
75 
76  //[-------------------------------------------------------]
77  //[ Protected virtual qsf::Action methods ]
78  //[-------------------------------------------------------]
79  protected:
80  virtual bool onStartup() override;
81  virtual qsf::action::Result updateAction(const qsf::Clock& clock) override;
82 
83 
84  //[-------------------------------------------------------]
85  //[ Private definitions ]
86  //[-------------------------------------------------------]
87  private:
88  enum State
89  {
90  STATE_INIT,
91  STATE_DEPLOY,
92  STATE_END
93  };
94 
95 
96  //[-------------------------------------------------------]
97  //[ Private data ]
98  //[-------------------------------------------------------]
99  private:
100  qsf::WeakPtr<RescueBusComponent> mRescueBusComponent;
101  State mState;
102  AudioProxy mAudioProxy;
103 
104 
105  //[-------------------------------------------------------]
106  //[ CAMP reflection system ]
107  //[-------------------------------------------------------]
108  QSF_CAMP_RTTI() // Only adds the virtual method "campClassId()", nothing more
109 
110 
111  };
112 
113 
114 //[-------------------------------------------------------]
115 //[ Namespace ]
116 //[-------------------------------------------------------]
117 } // em5
118 
119 
120 //[-------------------------------------------------------]
121 //[ CAMP reflection system ]
122 //[-------------------------------------------------------]
Definition: ActionPriority.h:13
Clock class.
Definition: Clock.h:33
#define EM5_API_EXPORT
Definition: Export.h:28
Lightweight weak pointer implementation.
Definition: WeakPtr.h:133
void serialize(BinarySerializer &serializer, BitFlagSet< STORAGE, ENUM > &bitFlagSet)
Definition: BitFlagSet.h:359
State
Definition: ProcessState.h:20
#define QSF_CAMP_RTTI()
Only adds the virtual method "campClassId()", nothing more.
Definition: CampClass.h:75
Extended audio proxy for easier multiplay usage.
Definition: AudioProxy.h:47
#define QSF_CAMP_TYPE_NONCOPYABLE(type)
See "CAMP_TYPE_NONCOPYABLE" for details.
Definition: CampClass.h:112
static const qsf::NamedIdentifier ACTION_ID
"em5::DeployRescueBusAction" unique action identifier
Definition: DeployRescueBusAction.h:49
Abstract action base class.
Definition: Action.h:59
Class combining strings with their hashes.
Definition: NamedIdentifier.h:34
EMERGENCY 5 deploy rescue bus action.
Definition: DeployRescueBusAction.h:41
Binary serializer class.
Definition: BinarySerializer.h:35
Result
Definition: ActionResult.h:20