Emergency 20 Dokumentation  4.2.0
em5::TreatPersonObserver Class Reference

EMERGENCY 5 logic observer person was treated. More...

#include <TreatPersonObserver.h>

Inheritance diagram for em5::TreatPersonObserver:
em5::MessageObjectiveObserver em5::Observer qsf::GameLogic qsf::WeakPtrTarget

Public Member Functions

 TreatPersonObserver ()
 Default constructor. More...
 
void connectToObjective (Objective &objective)
 Connect this observer to an objective to be informed when an infected person was healed. More...
 
- Public Member Functions inherited from em5::MessageObjectiveObserver
 MessageObjectiveObserver ()
 Default constructor. More...
 
void initWithObjective (const qsf::MessageConfiguration &messageConfiguration, Objective &objective, Reaction reaction, bool removeAfterTrigger=true)
 Initialize this observer with a message to listen to and an objective to manipulate. More...
 
void addMessage (const qsf::MessageConfiguration &messageConfiguration)
 
virtual bool onStartup () override
 Start up the game logic. More...
 
virtual void onShutdown () override
 Shut down the game logic. More...
 
virtual void serialize (qsf::BinarySerializer &serializer) override
 Serialize or deserialize the game logic using a binary serializer. More...
 
virtual bool checkIncomingMessage (const qsf::MessageParameters &parameters)
 Callback for sub-class implementations: return "false" to ignore this incoming message. More...
 
- Public Member Functions inherited from em5::Observer
virtual ~Observer ()
 Destructor. More...
 
const std::string & getName () const
 Get the observer's name. More...
 
void setName (const std::string &name)
 Set the observer's name; the name has no special meaning internally, use it as you like, e.g. to identify a single observer. More...
 
- Public Member Functions inherited from qsf::GameLogic
virtual ~GameLogic ()
 Destructor. More...
 
uint32 getId () const
 Get the game logic's unique ID. More...
 
uint32 getTypeId () const
 Get the game logic's type ID. More...
 
uint64 getEntityId () const
 Get the owning entity's ID or zero if there is none. More...
 
EntitygetEntity () const
 Get the owning entity or a null pointer if there is none. More...
 
EntitygetEntitySafe () const
 Get the owning entity or a null pointer if there is none. More...
 
MapgetMap () const
 Get the associated map of the game logic. More...
 
bool startup ()
 Startup the game logic. More...
 
bool isRunning () const
 Return whether or not the game logic is up-and-running. More...
 
void shutdown ()
 Shutdown the game logic. More...
 
bool isDebug () const
 Return whether or not the logic is considered to be in debug mode. More...
 
void setDebug (bool debugMode)
 Set whether or not the logic is considered to be in debug mode. More...
 

Static Public Attributes

static const uint32 GAMELOGIC_TYPE_ID
 
- Static Public Attributes inherited from em5::MessageObjectiveObserver
static const uint32 GAMELOGIC_TYPE_ID
 

Additional Inherited Members

- Public Types inherited from em5::MessageObjectiveObserver
enum  Reaction {
  Reaction::NONE = 0, Reaction::OBJECTIVE_DEC_CURRENT, Reaction::OBJECTIVE_INC_CURRENT, Reaction::OBJECTIVE_DEC_NEEDED,
  Reaction::OBJECTIVE_INC_NEEDED
}
 
- Protected Member Functions inherited from em5::MessageObjectiveObserver
 MessageObjectiveObserver (uint32 gameLogicTypeId)
 Constructor for sub-classes. More...
 
- Protected Member Functions inherited from em5::Observer
 Observer (uint32 typeId)
 Constructor. More...
 
FreeplayEventgetParentEvent () const
 Get parent event. More...
 
template<typename T >
T & createObserver (uint64 entityId)
 Create observer. More...
 
template<typename T >
T * getObserver (uint64 entityId)
 Get observer. More...
 
- Protected Member Functions inherited from qsf::GameLogic
virtual void onSetDebug (bool debug)
 Set whether or not the logic is considered to be in debug mode. More...
 
void removeThis ()
 
 GameLogic (uint32 typeId)
 Constructor. More...
 
void registrationAtManager (GameLogicManager &manager, uint32 id)
 Registering call from manager. More...
 
- Protected Member Functions inherited from qsf::WeakPtrTarget
 WeakPtrTarget ()
 Default constructor. More...
 
 WeakPtrTarget (const WeakPtrTarget &other)
 Copy constructor. More...
 
 WeakPtrTarget (WeakPtrTarget &&)=delete
 Delete the move constructor, as WeakPtrTarget would need a proper move constructor-implementation that ensures that its pointer gets updated in the WeakPtrBase as well. More...
 
 ~WeakPtrTarget ()
 Destructor. More...
 
void invalidateAllWeakPtr ()
 Invalidate all weak pointers to this object. More...
 
void operator= (const WeakPtrTarget &other)
 Copy operator. More...
 

Detailed Description

EMERGENCY 5 logic observer person was treated.

Note
  • This observer observes listens to the person treated message
  • If the person was treated, the observer increases the objective and dies

Constructor & Destructor Documentation

em5::TreatPersonObserver::TreatPersonObserver ( )

Default constructor.

Member Function Documentation

void em5::TreatPersonObserver::connectToObjective ( Objective objective)

Connect this observer to an objective to be informed when an infected person was healed.

Parameters
[in]objectiveThe objective instance to connect to

Member Data Documentation

const uint32 em5::TreatPersonObserver::GAMELOGIC_TYPE_ID
static

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