|
CeresEngine 0.2.0
A game development framework
|
Abstracts a CoreFoundation CFRunLoop as an ASIO execution context.
More...
#include <CeresEngine/Platform/Win32/Win32RunLoop.hpp>
Classes | |
| class | Executor |
| An executor object that dispatches calls to the CoreFoundation CFRunLoop. More... | |
Public Types | |
| using | executor_type = Executor |
| An executor object that dispatches calls to the CoreFoundation CFRunLoop. | |
Public Types inherited from CeresEngine::ExecutionContext | |
| using | ID = id |
| using | executor_type = AnyExecutor |
Public Member Functions | |
| Win32RunLoop () noexcept | |
| Creates a new win32 run loop instance for the current thread. | |
| ~Win32RunLoop () noexcept override | |
| Destructor shuts down all threads in the system thread pool. | |
| AnyExecutor | getExecutor () noexcept final |
| Returns an executor that run execute scheduled commands on the context. | |
| void | stop () final |
| Stops the execution of the run loop. | |
| void | run () final |
| Starts running the run loop. | |
| executor_type | get_executor () noexcept |
| Returns an executor that run execute scheduled commands on the context. | |
Public Member Functions inherited from CeresEngine::RunLoop | |
| ~RunLoop () noexcept override=default | |
Destroys the RunLoop. | |
Public Member Functions inherited from CeresEngine::ExecutionContext | |
| virtual | ~ExecutionContext () noexcept=default |
| Virtual destructor for the execution context object. | |
| template<typename T > | |
| bool | hasService () noexcept |
Determine if the ExecutionContext contains the specified service type. | |
| template<typename T > | |
| T & | getService () noexcept |
| Obtain the service object corresponding to the given type. | |
| template<typename T > | |
| T * | getServiceIf () noexcept |
| Obtain the service object corresponding to the given type. | |
| executor_type | get_executor () noexcept |
| Returns an executor that run execute scheduled commands on the context. | |
| bool | isActive () const noexcept |
| Checks if the execution context is currently active. | |
Private Member Functions | |
| void | onWorkStarted () noexcept |
| Inform the executor that it has some outstanding work to do. | |
| void | onWorkFinished () noexcept |
| Inform the executor that some work is no longer outstanding. | |
| void | schedule (UniqueFunction< void()> function, ExecutorBlocking blockingProperty) |
| Schedules a new function to be run in the run loop. | |
Private Attributes | |
| DWORD | mThreadID |
| The Win32 thread ID. | |
Additional Inherited Members | |
Static Public Member Functions inherited from CeresEngine::ExecutionContext | |
| static ExecutionContext * | getCurrent () noexcept |
| Gets the current execution context, if any is active. | |
| static ExecutionContext & | get () noexcept |
| Gets the current execution context, if any is active. | |
Abstracts a CoreFoundation CFRunLoop as an ASIO execution context.
An executor object that dispatches calls to the CoreFoundation CFRunLoop.
|
explicitnoexcept |
Creates a new win32 run loop instance for the current thread.
|
overridenoexcept |
Destructor shuts down all threads in the system thread pool.
|
inlinenoexcept |
Returns an executor that run execute scheduled commands on the context.
|
finalvirtualnoexcept |
Returns an executor that run execute scheduled commands on the context.
Implements CeresEngine::ExecutionContext.
|
privatenoexcept |
Inform the executor that some work is no longer outstanding.
|
privatenoexcept |
Inform the executor that it has some outstanding work to do.
|
finalvirtual |
Starts running the run loop.
Implements CeresEngine::RunLoop.
|
private |
Schedules a new function to be run in the run loop.
| function | The function to be executed. |
|
finalvirtual |
Stops the execution of the run loop.
Implements CeresEngine::RunLoop.
|
private |
The Win32 thread ID.