OpenEnroth 73e68f7
Loading...
Searching...
No Matches
Public Member Functions | List of all members
PlatformEventLoop Class Referenceabstract

#include <PlatformEventLoop.h>

Inheritance diagram for PlatformEventLoop:
ProxyBase< PlatformEventLoop > NullEventLoop SdlEventLoop ProxyEventLoop ApplicationProxy EngineControlComponent

Public Member Functions

virtual ~PlatformEventLoop ()=default
 
virtual void exec (PlatformEventHandler *eventHandler)=0
 
virtual void quit ()=0
 
virtual void processMessages (PlatformEventHandler *eventHandler, int count=-1)=0
 
virtual void waitForMessages ()=0
 

Detailed Description

Abstraction around a platform-specific event loop.

Constructor & Destructor Documentation

◆ ~PlatformEventLoop()

virtual PlatformEventLoop::~PlatformEventLoop ( )
virtualdefault

Member Function Documentation

◆ exec()

virtual void PlatformEventLoop::exec ( PlatformEventHandler eventHandler)
pure virtual

Starts this event loop.

This function blocks until either quit is called from inside the event handler code, or an application is closed by the user (e.g. after the last window is closed, or Command+Q is pressed on Mac).

Parameters
eventHandlerCallback for event processing.

Implemented in EngineControlComponent, NullEventLoop, ProxyEventLoop, and SdlEventLoop.

◆ processMessages()

virtual void PlatformEventLoop::processMessages ( PlatformEventHandler eventHandler,
int  count = -1 
)
pure virtual

Processes the messages that are currently in the message queue, and returns. Returns immediately if there are no messages in the message queue.

Parameters
eventHandlerCallback for event processing.
countMaximum number of messages to process, -1 means unlimited.

Implemented in EngineControlComponent, NullEventLoop, ProxyEventLoop, and SdlEventLoop.

◆ quit()

virtual void PlatformEventLoop::quit ( )
pure virtual

Tells this event loop to exit. Does nothing if the event loop is not running.

Implemented in NullEventLoop, ProxyEventLoop, and SdlEventLoop.

◆ waitForMessages()

virtual void PlatformEventLoop::waitForMessages ( )
pure virtual

Blocks until at least one message is delivered to the queue, and returns.

Implemented in EngineControlComponent, NullEventLoop, ProxyEventLoop, and SdlEventLoop.


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