Beatmup
Beatmup::Context::EventListener Class Referenceabstract

An event listener (bunch of callbacks) More...

#include <context.h>

Inheritance diagram for Beatmup::Context::EventListener:
Beatmup::ContextEventListener

Public Member Functions

virtual ~EventListener ()
 
virtual void threadCreated (PoolIndex pool)=0
 Called when a new worker thread is created. More...
 
virtual void threadTerminating (PoolIndex pool)=0
 Called when a worker thread finished. More...
 
virtual bool taskDone (PoolIndex pool, AbstractTask &task, bool aborted)=0
 Called when a task is successfully finished. More...
 
virtual void taskFail (PoolIndex pool, AbstractTask &task, const std::exception &ex)=0
 Called when a task fails. More...
 
virtual void gpuInitFail (PoolIndex pool, const std::exception &ex)=0
 Called when GPU initialization failed. More...
 

Detailed Description

An event listener (bunch of callbacks)

Definition at line 72 of file context.h.

Constructor & Destructor Documentation

◆ ~EventListener()

virtual Beatmup::Context::EventListener::~EventListener ( )
inlinevirtual

Definition at line 74 of file context.h.

74 {}

Member Function Documentation

◆ threadCreated()

virtual void Beatmup::Context::EventListener::threadCreated ( PoolIndex  pool)
pure virtual

Called when a new worker thread is created.

Implemented in Beatmup::ContextEventListener.

◆ threadTerminating()

virtual void Beatmup::Context::EventListener::threadTerminating ( PoolIndex  pool)
pure virtual

Called when a worker thread finished.

Implemented in Beatmup::ContextEventListener.

◆ taskDone()

virtual bool Beatmup::Context::EventListener::taskDone ( PoolIndex  pool,
AbstractTask task,
bool  aborted 
)
pure virtual

Called when a task is successfully finished.

Parameters
[in]poolThe thread pool the task was run in
[in]taskThe task
[in]abortedIf true, the task was aborted from outside
Returns
true if the task is asked to be executed again. Note that even if false is returned, a repetition might be asked from outside.

Implemented in Beatmup::ContextEventListener.

◆ taskFail()

virtual void Beatmup::Context::EventListener::taskFail ( PoolIndex  pool,
AbstractTask task,
const std::exception &  ex 
)
pure virtual

Called when a task fails.

Parameters
[in]poolThe thread pool the task was run in
[in]taskThe task
[in]exException caught when the task is failed

Implemented in Beatmup::ContextEventListener.

◆ gpuInitFail()

virtual void Beatmup::Context::EventListener::gpuInitFail ( PoolIndex  pool,
const std::exception &  ex 
)
pure virtual

Called when GPU initialization failed.

Parameters
[in]poolThe thread pool the failure occurred in
[in]exException caught

Implemented in Beatmup::ContextEventListener.


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