CeresEngine 0.2.0
A game development framework
Loading...
Searching...
No Matches
RunLoop.hpp
Go to the documentation of this file.
1//
2// CeresEngine - A game development framework
3//
4// Created by Rogiel Sulzbach.
5// Copyright (c) 2018-2022 Rogiel Sulzbach. All rights reserved.
6//
7
8#pragma once
9
11
12#include <asio/execution_context.hpp>
13
14namespace CeresEngine {
15
17 class RunLoop : public ExecutionContext {
18 public:
21
22 public:
27 virtual void run() = 0;
28
32 virtual void stop() = 0;
33 };
34
35} // namespace CeresEngine
A context for function object execution.
Definition ExecutionContext.hpp:90
An ASIO execution context that wraps the operating system run loop.
Definition RunLoop.hpp:17
virtual void run()=0
Starts running the run loop.
virtual void stop()=0
Stops the execution of the run loop.
~RunLoop() noexcept override=default
Destroys the RunLoop.
Definition Application.hpp:19
constexpr size_t hash(const T &v)
Generates a hash for the provided type.
Definition Hash.hpp:25