Emergency 20 Dokumentation  4.2.0
PlaceBarrierTapeCommand.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 
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:
49  explicit PlaceBarrierTapeCommand(qsf::game::CommandManager* commandManager);
50 
52 
53 
54  //[-------------------------------------------------------]
55  //[ Public virtual em5::Command methods ]
56  //[-------------------------------------------------------]
57  public:
58  virtual bool checkAvailable() override;
59  virtual bool checkCaller(qsf::Entity& caller) override;
60  virtual bool checkContext(const qsf::game::CommandContext& context) override;
61  virtual void execute(const qsf::game::CommandContext& context) override;
62 
63 
64  //[-------------------------------------------------------]
65  //[ CAMP reflection system ]
66  //[-------------------------------------------------------]
67  QSF_CAMP_RTTI() // Only adds the virtual method "campClassId()", nothing more
68 
69 
70  };
71 
72 
73 //[-------------------------------------------------------]
74 //[ Namespace ]
75 //[-------------------------------------------------------]
76 } // em5
77 
78 
79 //[-------------------------------------------------------]
80 //[ CAMP reflection system ]
81 //[-------------------------------------------------------]
Command manager implementation.
Definition: CommandManager.h:49
Definition: ActionPriority.h:13
virtual bool checkAvailable() override
Check whether the command is currently available at all.
Entity class.
Definition: Entity.h:46
unsigned int uint32
Definition: PlatformTypes.h:181
static const uint32 PLUGINABLE_ID
"em5::PlaceBarrierTapeCommand" unique command pluginable ID
Definition: PlaceBarrierTapeCommand.h:38
PlaceBarrierTapeCommand(qsf::game::CommandManager *commandManager)
Constructor.
virtual void execute(const qsf::game::CommandContext &context) override
Execute command for given context.
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
virtual bool checkContext(const qsf::game::CommandContext &context) override
Check whether the command can be executed with the given context.
EMERGENCY 5 get equipment command.
Definition: GetEquipmentCommand.h:39
EMERGENCY 5 Place barrier tape command.
Definition: PlaceBarrierTapeCommand.h:30
bool checkCallerWithoutPriority(qsf::Entity &caller)
Command context base class.
Definition: CommandContext.h:48