Emergency 20 Dokumentation  4.2.0
UnloadRobotFromTransporterAction.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 
17 
18 //[-------------------------------------------------------]
19 //[ Forward declarations ]
20 //[-------------------------------------------------------]
21 namespace em5
22 {
23  class VehicleComponent;
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 
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 methods ]
86  //[-------------------------------------------------------]
87  private:
92  qsf::Entity* exitAndPlaceRobot(VehicleComponent& vehicleComponent);
93 
94 
95  //[-------------------------------------------------------]
96  //[ Private definitions ]
97  //[-------------------------------------------------------]
98  private:
99  enum State
100  {
101  STATE_INIT,
102  STATE_OPEN_DOOR,
103  STATE_EXIT,
104  STATE_CLOSE_DOOR,
105  STATE_DONE
106  };
107 
108 
109  //[-------------------------------------------------------]
110  //[ Private data ]
111  //[-------------------------------------------------------]
112  private:
113  // Configuration
114  State mCurrentState;
115  DoorComponent::DoorType mDoorType;
116 
117 
118  //[-------------------------------------------------------]
119  //[ CAMP reflection system ]
120  //[-------------------------------------------------------]
121  QSF_CAMP_RTTI() // Only adds the virtual method "campClassId()", nothing more
122 
123 
124  };
125 
126 
127 //[-------------------------------------------------------]
128 //[ Namespace ]
129 //[-------------------------------------------------------]
130 } // em5
131 
132 
133 //[-------------------------------------------------------]
134 //[ CAMP reflection system ]
135 //[-------------------------------------------------------]
Definition: ActionPriority.h:13
EMERGENCY 5 unload sek robot from transporter action.
Definition: UnloadRobotFromTransporterAction.h:41
Entity class.
Definition: Entity.h:46
Clock class.
Definition: Clock.h:33
#define EM5_API_EXPORT
Definition: Export.h:28
Vehicle component base class.
Definition: VehicleComponent.h:49
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
DoorType
Definition: DoorComponent.h:63
#define QSF_CAMP_TYPE_NONCOPYABLE(type)
See "CAMP_TYPE_NONCOPYABLE" for details.
Definition: CampClass.h:112
static const qsf::NamedIdentifier ACTION_ID
"em5::UnloadRobotFromTransporterAction" unique action identifier
Definition: UnloadRobotFromTransporterAction.h:49
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