Emergency 20 Dokumentation  4.2.0
SignalAction.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 
17 
18 
19 //[-------------------------------------------------------]
20 //[ Namespace ]
21 //[-------------------------------------------------------]
22 namespace em5
23 {
24 
25 
26  //[-------------------------------------------------------]
27  //[ Classes ]
28  //[-------------------------------------------------------]
34  {
35 
36 
37  //[-------------------------------------------------------]
38  //[ Public definitions ]
39  //[-------------------------------------------------------]
40  public:
42 
43 
44  //[-------------------------------------------------------]
45  //[ Public methods ]
46  //[-------------------------------------------------------]
47  public:
52  SignalAction();
53 
58  virtual ~SignalAction();
59 
68  void init(const qsf::MessageConfiguration& message, const qsf::MessageParameters& messageParameters = qsf::MessageParameters(), bool emitMessageOnAbort = true);
69 
74  void init(const qsf::MessageConfiguration& messageAtUpdate, const qsf::MessageConfiguration& messageAtAbort,
75  const qsf::MessageParameters& messageParametersAtUpdate = qsf::MessageParameters(), const qsf::MessageParameters& messageParametersAtAbort = qsf::MessageParameters());
76 
77 
78  //[-------------------------------------------------------]
79  //[ Public virtual qsf::Action methods ]
80  //[-------------------------------------------------------]
81  public:
82  virtual void serialize(qsf::BinarySerializer& serializer) override;
83 
84 
85  //[-------------------------------------------------------]
86  //[ Protected virtual qsf::Action methods ]
87  //[-------------------------------------------------------]
88  protected:
89  virtual qsf::action::Result updateAction(const qsf::Clock& clock) override;
90  virtual void onAbort() override;
91 
92 
93  //[-------------------------------------------------------]
94  //[ Private data ]
95  //[-------------------------------------------------------]
96  private:
97  bool mSignalOnAbort;
98  qsf::MessageConfiguration mMessageAtUpdate;
99  qsf::MessageParameters mMessageParametersAtUpdate;
100  qsf::MessageConfiguration mMessageAtAbort;
101  qsf::MessageParameters mMessageParametersAtAbort;
102 
103 
104  //[-------------------------------------------------------]
105  //[ CAMP reflection system ]
106  //[-------------------------------------------------------]
107  QSF_CAMP_RTTI() // Only adds the virtual method "campClassId()", nothing more
108 
109 
110  };
111 
112 
113 //[-------------------------------------------------------]
114 //[ Namespace ]
115 //[-------------------------------------------------------]
116 } // em5
117 
118 
119 //[-------------------------------------------------------]
120 //[ CAMP reflection system ]
121 //[-------------------------------------------------------]
Definition: ActionPriority.h:13
static const qsf::NamedIdentifier ACTION_ID
"em5::SignalAction" unique action identifier
Definition: SignalAction.h:41
Message parameters class.
Definition: MessageParameters.h:34
Clock class.
Definition: Clock.h:33
#define EM5_API_EXPORT
Definition: Export.h:28
void serialize(BinarySerializer &serializer, BitFlagSet< STORAGE, ENUM > &bitFlagSet)
Definition: BitFlagSet.h:359
#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
Message configuration class.
Definition: MessageConfiguration.h:44
Abstract action base class.
Definition: Action.h:59
Class combining strings with their hashes.
Definition: NamedIdentifier.h:34
Binary serializer class.
Definition: BinarySerializer.h:35
Result
Definition: ActionResult.h:20
EMERGENCY 5 signal action.
Definition: SignalAction.h:33