OpenEnroth 73e68f7
Loading...
Searching...
No Matches
Public Member Functions | Private Member Functions | Private Attributes | List of all members
NullEventLoop Class Reference

#include <NullEventLoop.h>

Inheritance diagram for NullEventLoop:
PlatformEventLoop

Public Member Functions

 NullEventLoop (NullPlatformSharedState *state)
 
virtual ~NullEventLoop ()
 
virtual void exec (PlatformEventHandler *eventHandler) override
 
virtual void quit () override
 
virtual void processMessages (PlatformEventHandler *eventHandler, int count=-1) override
 
virtual void waitForMessages () override
 
- Public Member Functions inherited from PlatformEventLoop
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
 

Private Member Functions

void deadlock ()
 

Private Attributes

NullPlatformSharedState_state = nullptr
 

Constructor & Destructor Documentation

◆ NullEventLoop()

NullEventLoop::NullEventLoop ( NullPlatformSharedState state)
explicit

◆ ~NullEventLoop()

NullEventLoop::~NullEventLoop ( )
virtualdefault

Member Function Documentation

◆ deadlock()

void NullEventLoop::deadlock ( )
private

◆ exec()

void NullEventLoop::exec ( PlatformEventHandler eventHandler)
overridevirtual

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.

Implements PlatformEventLoop.

◆ processMessages()

void NullEventLoop::processMessages ( PlatformEventHandler eventHandler,
int  count = -1 
)
overridevirtual

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.

Implements PlatformEventLoop.

◆ quit()

void NullEventLoop::quit ( )
overridevirtual

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

Implements PlatformEventLoop.

◆ waitForMessages()

void NullEventLoop::waitForMessages ( )
overridevirtual

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

Implements PlatformEventLoop.

Member Data Documentation

◆ _state

NullPlatformSharedState* NullEventLoop::_state = nullptr
private

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