Annwvyn::AnnUserSubSystem Class Reference

User defined subsystem base class. More...

#include <AnnUserSpaceSubSystem.hpp>

Inheritance diagram for Annwvyn::AnnUserSubSystem:
Collaboration diagram for Annwvyn::AnnUserSubSystem:

Public Member Functions

 AnnUserSubSystem (const std::string &systemName)
 
- Public Member Functions inherited from Annwvyn::AnnSubSystem
 AnnSubSystem (const std::string &systemName)
 Construct a SubSystem. More...
 
virtual ~AnnSubSystem ()
 Destruct a SubSystem. More...
 

Protected Member Functions

void update () override
 Called at each refresh if this->needUpdate() returns true. More...
 
bool needUpdate () override
 Marker if the system wants it's "update" method to be called by the engine. this is tested each frames. More...
 
void dispatchEvent (AnnUserSpaceEventPtr e) override
 Give an event to be dispatched to listeners via the event manager. More...
 
template<class UserSpaceEventType , class... Args>
void dispatchEvent (Args &&... args)
 Consruct+distpatch user defined event. More...
 

Friends

class AnnEngine
 

Additional Inherited Members

- Protected Attributes inherited from Annwvyn::AnnSubSystem
std::string name
 Name of the subsystem. More...
 
- Private Member Functions inherited from Annwvyn::AnnUserSpaceEventLauncher
virtual ~AnnUserSpaceEventLauncher ()=default
 Destruct the event launcher. More...
 
 AnnUserSpaceEventLauncher ()=default
 Construct the event launcher. More...
 

Detailed Description

User defined subsystem base class.

Definition at line 34 of file AnnUserSpaceSubSystem.hpp.

Constructor & Destructor Documentation

◆ AnnUserSubSystem()

AnnUserSubSystem::AnnUserSubSystem ( const std::string systemName)

Construct the user subsystem. The systemName is mandatory

Parameters
systemNameThe name of the subsystem. Should be unique.

Definition at line 9 of file AnnUserSpaceSubSystem.cpp.

Member Function Documentation

◆ dispatchEvent() [1/2]

void AnnUserSubSystem::dispatchEvent ( AnnUserSpaceEventPtr  e)
overrideprotectedvirtual

Give an event to be dispatched to listeners via the event manager.

Reimplemented from Annwvyn::AnnUserSpaceEventLauncher.

Definition at line 25 of file AnnUserSpaceSubSystem.cpp.

Here is the call graph for this function:

◆ dispatchEvent() [2/2]

template<class UserSpaceEventType , class... Args>
void Annwvyn::AnnUserSubSystem::dispatchEvent ( Args &&...  args)
inlineprotected

Consruct+distpatch user defined event.

Definition at line 55 of file AnnUserSpaceSubSystem.hpp.

◆ needUpdate()

bool AnnUserSubSystem::needUpdate ( )
overrideprotectedvirtual

Marker if the system wants it's "update" method to be called by the engine. this is tested each frames.

Reimplemented from Annwvyn::AnnSubSystem.

Definition at line 20 of file AnnUserSpaceSubSystem.cpp.

◆ update()

void AnnUserSubSystem::update ( )
overrideprotectedvirtual

Called at each refresh if this->needUpdate() returns true.

Reimplemented from Annwvyn::AnnSubSystem.

Definition at line 15 of file AnnUserSpaceSubSystem.cpp.

Friends And Related Function Documentation

◆ AnnEngine

friend class AnnEngine
friend

Definition at line 42 of file AnnUserSpaceSubSystem.hpp.


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