Emergency 20 Dokumentation  4.2.0
SearchBombInBuildingCommand.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  //[-------------------------------------------------------]
31  {
32 
33 
34  //[-------------------------------------------------------]
35  //[ Public definitions ]
36  //[-------------------------------------------------------]
37  public:
38  static const uint32 PLUGINABLE_ID;
39 
40 
41  //[-------------------------------------------------------]
42  //[ Public methods ]
43  //[-------------------------------------------------------]
44  public:
50 
56 
57 
58  //[-------------------------------------------------------]
59  //[ Public virtual em5::Command methods ]
60  //[-------------------------------------------------------]
61  public:
62  virtual bool checkAvailable() override;
63  virtual bool checkCaller(qsf::Entity& caller) override;
64  virtual bool checkContext(const qsf::game::CommandContext& context) override;
65  virtual void execute(const qsf::game::CommandContext& context) override;
66 
67 
68  //[-------------------------------------------------------]
69  //[ Private definitions ]
70  //[-------------------------------------------------------]
71  private:
72  static const uint32 ACTION_PRIORITY;
73 
74 
75  //[-------------------------------------------------------]
76  //[ CAMP reflection system ]
77  //[-------------------------------------------------------]
78  QSF_CAMP_RTTI() // Only adds the virtual method "campClassId()", nothing more
79 
80 
81  };
82 
83 
84 //[-------------------------------------------------------]
85 //[ Namespace ]
86 //[-------------------------------------------------------]
87 } // em5
88 
89 
90 //[-------------------------------------------------------]
91 //[ CAMP reflection system ]
92 //[-------------------------------------------------------]
Command manager implementation.
Definition: CommandManager.h:49
virtual bool checkContext(const qsf::game::CommandContext &context) override
Check whether the command can be executed with the given context.
Definition: ActionPriority.h:13
Entity class.
Definition: Entity.h:46
virtual void execute(const qsf::game::CommandContext &context) override
Execute command for given context.
unsigned int uint32
Definition: PlatformTypes.h:181
bool checkCallerWithoutPriority(qsf::Entity &caller)
Perform the caller check, but skips the priority check. Useful for the check if an action...
Abstract EMERGENCY 5 command base class.
Definition: Command.h:44
virtual bool checkCaller(qsf::Entity &caller) override
Check whether the command can be executed by the given caller entity.
#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
static const uint32 PLUGINABLE_ID
"em5::SendPoliceDogAttackCommand" unique command pluginable ID
Definition: SearchBombInBuildingCommand.h:38
EMERGENCY 5 enter and search a building for searching bombs.
Definition: SearchBombInBuildingCommand.h:30
SearchBombInBuildingCommand(qsf::game::CommandManager *commandManager)
Constructor.
Command context base class.
Definition: CommandContext.h:48
virtual bool checkAvailable() override
Check whether the command is currently available at all.