Emergency 20 Dokumentation  4.2.0
em5::Command Class Reference

Abstract EMERGENCY 5 command base class. More...

#include <Command.h>

Inheritance diagram for em5::Command:
qsf::game::Command qsf::Pluginable< CommandManager > qsf::PluginableBase qsf::Object em5::AreaExtinguishCommand em5::ArrestGangsterCommand em5::AttackBuildingCommand em5::BreakBuildingDoorOpenCommand em5::CallBackDroneCommand em5::CancelDogSearchCommand em5::CleanHomeCommand em5::CutRoadVehicleCommand em5::CutTreeCommand em5::DecontaminatePersonCommand em5::DefuseBombCommand em5::DeployRescueBusCommand em5::DisableMegaphoneCommand em5::DLKSafePersonCommand em5::EnableMegaphoneCommand em5::EnterBuildingCommand em5::EnterVehicleCommand em5::EvacuateBuildingCommand em5::ExitBuildingCommand em5::ExitRescueHeliCommand em5::ExitVehicleCommand em5::ExtinguishCoolBaseCommand em5::ExtinguishTargetAreaCommand em5::GetEquipmentCommand em5::GuardsmanArrestGangsterCommand em5::GuidePlagueVictimsCommand em5::HelicopterFollowCommand em5::LandHelicopterCommand em5::LiftUpByCraneCommand em5::LoadBoatToTransporterCommand em5::LoadBoatToTransporterFromBoatCommand em5::LoadRobotToTransporterCommand em5::MoveCommand em5::PerformPlacePersonByFlyingHeliCommand em5::PerformRopeDownFromHelicopterCommand em5::PickupContaminatedPersonCommand em5::PickupDiverByBoatCommand em5::PickupDrowningPersonByBoatCommand em5::PickupDrowningPersonWithDiverCommand em5::PickupPersonByFlyingHeliCommand em5::PickupPersonByParamedicCommand em5::PickupVehicleByTowcarCommand em5::PlaceBarrierTapePole1Command em5::PlaceBarrierTapePole2Command em5::PlaceGuidedPersonCommand em5::PlacePersonByFlyingHeliCommand em5::PlacePersonCommand em5::PlacePersonFromBoatCommand em5::PlacePersonInEvacBusCommand em5::PlacePersonWithDiverCommand em5::PlagueQuickTestCommand em5::PutPersonInBoatCommand em5::RedirectTrafficCommand em5::RemoveBarrierTapeCommand em5::RepairVehicleCommand em5::RescuePersonFromBuildingCommand em5::RescueWitchCommand em5::ReturnToBaseCommand em5::RobotScanCommand em5::RopingFromHelicopterCommand em5::SearchBombInBuildingCommand em5::SEKDroneSearchCommand em5::SendDogForSearchCommand em5::SendPlagueVictimHomeCommand em5::SpeakToHostageTakerCommand em5::SpeakToPersonCommand em5::StartDroneCommand em5::StartPullObjectCommand em5::StartPullPersonCommand em5::StopGuidePersonCommand em5::StopPullObjectCommand em5::StopPullPersonCommand em5::TreatPersonCommand em5::UnloadBoatFromTransporterCommand em5::UnloadBusCommand em5::UnloadRobotFromTransporterCommand em5::UseDivingSpotCommand em5::UsePepperSprayCommand em5::UsePistolCommand em5::UseSniperRifleCommand em5::UseStunGrenadeCommand em5::UseWithEngineerCommand

Classes

struct  IconSettings
 

Public Member Functions

virtual const IconSettingsgetIconSettings () const
 
virtual bool highlightTarget () const
 Indicates if target highlighting for this command is enabled/disabled. More...
 
const std::string & getHelpPageName () const
 Returns the help page name. More...
 
int32 getButtonPriority () const
 Returns the priority of the command buttons (Bigger priority comes first) More...
 
- Public Member Functions inherited from qsf::game::Command
 Command (CommandManager *commandManager, uint32 commandId)
 Constructor. More...
 
uint32 getId () const
 Get command ID, which is the command class's PLUGINABLE_ID. More...
 
uint32 getPriority () const
 Get command priority. More...
 
bool getIsScriptCommand () const
 Returns true if command is created via script. More...
 
virtual bool checkAvailable ()=0
 Check whether the command is currently available at all. More...
 
virtual bool checkCaller (Entity &caller)=0
 Check whether the command can be executed by the given caller entity. More...
 
virtual bool checkContext (const CommandContext &context)=0
 Check whether the command can be executed with the given context. More...
 
virtual void execute (const CommandContext &context)=0
 Execute command for given context. More...
 
virtual std::string getName () const
 Returns the name of the command. More...
 
- Public Member Functions inherited from qsf::Pluginable< CommandManager >
virtual ~Pluginable ()
 Destructor. More...
 
CommandManager & getManager () const
 Return the pluginable manager this pluginable is in. More...
 
- Public Member Functions inherited from qsf::PluginableBase
virtual ~PluginableBase ()
 Destructor. More...
 
template<typename T >
T & getPluginableManager () const
 Return the pluginable manager this pluginable is in. More...
 
- Public Member Functions inherited from qsf::Object
virtual ~Object ()
 Destructor. More...
 
const camp::Class & getCampClass () const
 Return the CAMP class. More...
 
int getPropertyIndexById (const StringHash &propertyId) const
 Return the CAMP property index by using the unique class property ID. More...
 
uint32 getPropertyIdByIndex (int index) const
 Return the unique class property ID with the given index. More...
 
std::string getPropertyNameById (const StringHash &propertyId) const
 Return the CAMP property name by using the unique class property ID. More...
 
const camp::Property * getCampPropertyById (const StringHash &propertyId) const
 Return the CAMP property by using the unique class property ID. More...
 
void setPropertyValuesByString (const std::string &values)
 Set CAMP reflection property values by using a given string. More...
 
void setPropertiesToDefaultValues ()
 Set all CAMP reflection system properties to their default values. More...
 
void serializeToBoostPTree (boost::property_tree::ptree &pTree, SerializationMethod serializationMethod=SERIALIZE_DIFFERENTIAL) const
 
void serializeToBoostPTree (boost::property_tree::ptree &pTree, const camp::Class &campClass, SerializationMethod serializationMethod=SERIALIZE_DIFFERENTIAL) const
 
bool deserializeFromBoostPTree (const boost::property_tree::ptree &pTree, SerializationMethod serializationMethod=SERIALIZE_DIFFERENTIAL)
 
bool deserializeFromBoostPTree (const boost::property_tree::ptree &pTree, const camp::Class &campClass, SerializationMethod serializationMethod=SERIALIZE_DIFFERENTIAL)
 
void serializeToBinarySerializer (BinarySerializer &serializer, SerializationMode mode=MODE_MINIMAL, SerializationMethod serializationMethod=SERIALIZE_DIFFERENTIAL) const
 
void deserializeFromBinarySerializer (BinarySerializer &serializer, SerializationMode mode=MODE_MINIMAL, SerializationMethod serializationMethod=SERIALIZE_DIFFERENTIAL, bool setOverrideState=true)
 
virtual camp::Value getPropertyDefaultValue (const StringHash &propertyId) const
 
virtual PropertyOverrideState getPropertyOverrideState (const StringHash &propertyId) const
 
virtual bool setPropertyOverrideState (const StringHash &propertyId, PropertyOverrideState overrideState)
 
virtual void onPreDeserialize ()
 Called right before the object is deserialized using any of the above methods. Default implementation is empty. More...
 
virtual void onPostDeserialize ()
 Called right after the object was deserialized using any of the above methods. Default implementation is empty. More...
 
virtual ScriptgetAssociatedScript () const
 Return the script instance associated with this object instance. More...
 

Protected Member Functions

 Command (qsf::game::CommandManager *commandManager, uint32 commandId)
 Constructor. More...
 
bool checkCallerActionPriorityNoBlocking (qsf::Entity &caller, uint32 maximumPriority) const
 Modification of the "checkCallerActionPriority" but return "false" if callers action is with blocking priority. More...
 
- Protected Member Functions inherited from qsf::game::Command
bool checkCallerActionPriority (Entity &caller, uint32 maximumPriority) const
 
ActionComponentgetActionComponent (Entity &caller) const
 
- Protected Member Functions inherited from qsf::Pluginable< CommandManager >
 Pluginable (CommandManager *pluginableManager)
 Constructor. More...
 
- Protected Member Functions inherited from qsf::PluginableBase
 PluginableBase (PluginableManager *pluginableManager)
 Constructor. More...
 
- Protected Member Functions inherited from qsf::Object
 Object ()
 Default constructor. More...
 

Protected Attributes

IconSettings mIconSettings
 The command's icon settings structure. More...
 
std::string mHelpPageName
 Holds the corresponding help page name. More...
 
int32 mButtonPriority
 Priority of command buttons on screen (Bigger priority comes first) More...
 
- Protected Attributes inherited from qsf::game::Command
uint32 mPriority
 Commands with higher priority get evaluated first; default value is 100. More...
 
bool mIsScriptCommand
 True if command is loaded via script. More...
 

Additional Inherited Members

- Public Types inherited from qsf::Object
enum  PropertyOverrideState { PROPERTY_INVALID, PROPERTY_DEFAULT, PROPERTY_OVERRIDE, PROPERTY_REMOVED }
 
enum  SerializationMethod { SERIALIZE_FLAT, SERIALIZE_COMPLETE, SERIALIZE_DIFFERENTIAL, SERIALIZE_IGNORE_UNKNOWN }
 
enum  SerializationMode { MODE_MINIMAL, MODE_COMPATIBLE }
 

Detailed Description

Abstract EMERGENCY 5 command base class.

Constructor & Destructor Documentation

em5::Command::Command ( qsf::game::CommandManager commandManager,
uint32  commandId 
)
protected

Constructor.

Note
  • Protected to hide an instancing of this class

Member Function Documentation

bool em5::Command::checkCallerActionPriorityNoBlocking ( qsf::Entity caller,
uint32  maximumPriority 
) const
protected

Modification of the "checkCallerActionPriority" but return "false" if callers action is with blocking priority.

int32 em5::Command::getButtonPriority ( ) const

Returns the priority of the command buttons (Bigger priority comes first)

const std::string& em5::Command::getHelpPageName ( ) const

Returns the help page name.

virtual const IconSettings& em5::Command::getIconSettings ( ) const
virtual
virtual bool em5::Command::highlightTarget ( ) const
virtual

Indicates if target highlighting for this command is enabled/disabled.

Reimplemented in em5::MoveCommand, em5::StopGuidePersonCommand, em5::StopPullObjectCommand, em5::PlacePersonWithDiverCommand, and em5::StopPullPersonCommand.

Member Data Documentation

int32 em5::Command::mButtonPriority
protected

Priority of command buttons on screen (Bigger priority comes first)

std::string em5::Command::mHelpPageName
protected

Holds the corresponding help page name.

IconSettings em5::Command::mIconSettings
protected

The command's icon settings structure.


The documentation for this class was generated from the following file: