Emergency 20 Dokumentation  4.2.0
em5::LayerCleanup Class Reference

Cleanup for layers They are de-activated when all entities in there are not visible. More...

#include <LayerCleanup.h>

Inheritance diagram for em5::LayerCleanup:
em5::Cleanup qsf::GameLogic qsf::WeakPtrTarget

Public Member Functions

 LayerCleanup ()
 
void init (qsf::Layer &layer, qsf::Layer *replacementLayer=nullptr)
 
- Public Member Functions inherited from em5::Cleanup
void executeCleanup ()
 Clean up the entity. More...
 
virtual bool onStartup () override
 Startup the game logic. More...
 
virtual void onShutdown () override
 Shutdown the game logic. More...
 
virtual void serialize (qsf::BinarySerializer &serializer) override
 Serialize or deserialize the game logic using a binary serializer. 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 Member Functions

static void createLayerCleanup (qsf::Layer &layer, qsf::Layer *replacementLayer=nullptr)
 

Static Public Attributes

static const uint32 GAMELOGIC_TYPE_ID
 

Protected Member Functions

virtual CleanupResult readyForCleanupCheap () const override
 Check if the cleanup can be done cheap. More...
 
virtual Cleanup::CleanupResult onReadyForCleanupCheap () const override
 React to the ready for cleanup cheap. More...
 
virtual ExecuteResult onExecuteCleanup () override
 React to execute cleanup method. More...
 
- Protected Member Functions inherited from em5::Cleanup
 Cleanup (uint32 typeId, const qsf::Time &startWaitTime=qsf::Time::fromSeconds(300.0f), const qsf::Time &resetWaitTime=qsf::Time::fromSeconds(20.0f))
 Constructor with default values. More...
 
virtual CleanupResult readyForCleanupExpensive () const
 Check if the cleanup can be done expensive. More...
 
virtual CleanupResult onReadyForCleanupExpensive () const
 React to the ready for cleanup expansive. 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...
 

Additional Inherited Members

- Public Types inherited from em5::Cleanup
enum  CleanupResult { RESULT_OK, RESULT_FAILED, RESULT_RESETTIMER }
 
enum  ExecuteResult { EXECUTE_OK, EXECUTE_DELETEOWNER }
 

Detailed Description

Cleanup for layers They are de-activated when all entities in there are not visible.

Constructor & Destructor Documentation

em5::LayerCleanup::LayerCleanup ( )

Member Function Documentation

static void em5::LayerCleanup::createLayerCleanup ( qsf::Layer layer,
qsf::Layer replacementLayer = nullptr 
)
static
void em5::LayerCleanup::init ( qsf::Layer layer,
qsf::Layer replacementLayer = nullptr 
)
virtual ExecuteResult em5::LayerCleanup::onExecuteCleanup ( )
overrideprotectedvirtual

React to execute cleanup method.

Reimplemented from em5::Cleanup.

virtual Cleanup::CleanupResult em5::LayerCleanup::onReadyForCleanupCheap ( ) const
overrideprotectedvirtual

React to the ready for cleanup cheap.

Reimplemented from em5::Cleanup.

virtual CleanupResult em5::LayerCleanup::readyForCleanupCheap ( ) const
overrideprotectedvirtual

Check if the cleanup can be done cheap.

Reimplemented from em5::Cleanup.

Member Data Documentation

const uint32 em5::LayerCleanup::GAMELOGIC_TYPE_ID
static

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