Emergency 20 Dokumentation  4.2.0
LandHelicopterCommand.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/command/Command.h"
14 
15 
16 //[-------------------------------------------------------]
17 //[ Namespace ]
18 //[-------------------------------------------------------]
19 namespace em5
20 {
21 
22 
23  //[-------------------------------------------------------]
24  //[ Classes ]
25  //[-------------------------------------------------------]
37  {
38 
39 
40  //[-------------------------------------------------------]
41  //[ Public definitions ]
42  //[-------------------------------------------------------]
43  public:
44  static const uint32 PLUGINABLE_ID;
45 
46 
47  //[-------------------------------------------------------]
48  //[ Public static methods ]
49  //[-------------------------------------------------------]
50  public:
51  static bool allowLanding(qsf::Entity& helicopterEntity);
52 
53 
54  //[-------------------------------------------------------]
55  //[ Public methods ]
56  //[-------------------------------------------------------]
57  public:
62  explicit LandHelicopterCommand(qsf::game::CommandManager* commandManager);
63 
64 
65  //[-------------------------------------------------------]
66  //[ Public virtual em5::Command methods ]
67  //[-------------------------------------------------------]
68  public:
69  virtual bool checkAvailable() override;
70  virtual bool checkCaller(qsf::Entity& caller) override;
71  virtual bool checkContext(const qsf::game::CommandContext& context) override;
72  virtual void execute(const qsf::game::CommandContext& context) override;
73 
74 
75  //[-------------------------------------------------------]
76  //[ Private definitions ]
77  //[-------------------------------------------------------]
78  private:
79  static const uint32 ACTION_PRIORITY;
80 
81 
82  //[-------------------------------------------------------]
83  //[ CAMP reflection system ]
84  //[-------------------------------------------------------]
85  QSF_CAMP_RTTI() // Only adds the virtual method "campClassId()", nothing more
86 
87 
88  };
89 
90 
91 //[-------------------------------------------------------]
92 //[ Namespace ]
93 //[-------------------------------------------------------]
94 } // em5
95 
96 
97 //[-------------------------------------------------------]
98 //[ CAMP reflection system ]
99 //[-------------------------------------------------------]
Command manager implementation.
Definition: CommandManager.h:49
Definition: ActionPriority.h:13
Entity class.
Definition: Entity.h:46
unsigned int uint32
Definition: PlatformTypes.h:181
static bool allowLanding(qsf::Entity &helicopterEntity)
Abstract EMERGENCY 5 command base class.
Definition: Command.h:44
static const uint32 PLUGINABLE_ID
"em5::LandHelicopterCommand" unique command pluginable ID
Definition: LandHelicopterCommand.h:44
virtual bool checkContext(const qsf::game::CommandContext &context) override
Check whether the command can be executed with the given context.
#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
virtual bool checkCaller(qsf::Entity &caller) override
Check whether the command can be executed by the given caller entity.
EMERGENCY 5 land helicopter command.
Definition: LandHelicopterCommand.h:36
virtual void execute(const qsf::game::CommandContext &context) override
Execute command for given context.
virtual bool checkAvailable() override
Check whether the command is currently available at all.
LandHelicopterCommand(qsf::game::CommandManager *commandManager)
Constructor.
Command context base class.
Definition: CommandContext.h:48