|
CeresEngine 0.2.0
A game development framework
|
#include <CeresEngine/Platform/Platform.hpp>
Public Member Functions | |
| Platform (Engine &engine) | |
| virtual | ~Platform () noexcept |
| virtual void | run ()=0 |
| Starts running the main application run loop. | |
| virtual void | stop ()=0 |
| Requests the application to stop running. | |
| virtual UPtr< PlatformWindow > | createWindow (const PlatformWindowDescriptor &descriptor)=0 |
| Creates a new platform window. | |
| virtual UPtr< DispatchQueue > | createDispatchQueue (DispatchQueueType type, StringView name="")=0 |
| Creates a new queue to which you can submit blocks. | |
| virtual IFileSystem * | getLocalFileSystem () const |
| Gets the underlying platform local file system implementation. | |
| virtual FileHandle | openFile (const FilePath &path) const |
| Opens a file on the local file system. | |
Static Public Member Functions | |
| static Platform & | get () noexcept |
| Gets the current platform. Assets if no platform was initialized. | |
|
explicit |
|
virtualnoexcept |
|
pure virtual |
Creates a new queue to which you can submit blocks.
Implemented in CeresEngine::ApplePlatform, CeresEngine::EmscriptenPlatform, and CeresEngine::Win32Platform.
|
pure virtual |
Creates a new platform window.
| descriptor | A descriptor structure that describes the window to be created. |
Implemented in CeresEngine::EmscriptenPlatform, CeresEngine::iOSPlatform, CeresEngine::LinuxPlatform, CeresEngine::MacOSPlatform, and CeresEngine::Win32Platform.
Gets the current platform. Assets if no platform was initialized.
|
virtual |
Gets the underlying platform local file system implementation.
nullptr. Platform implementors should override this method and return the local file system implementation of their platform.Reimplemented in CeresEngine::ApplePlatform, CeresEngine::LinuxPlatform, CeresEngine::POSIXPlatform, and CeresEngine::Win32Platform.
|
virtual |
Opens a file on the local file system.
| path | The path of the file to be opened. |
FileHandle::exists(). Starts running the main application run loop.
Implemented in CeresEngine::EmscriptenPlatform, CeresEngine::MacOSPlatform, CeresEngine::ApplePlatform, CeresEngine::iOSPlatform, and CeresEngine::Win32Platform.
Requests the application to stop running.
Implemented in CeresEngine::EmscriptenPlatform, CeresEngine::MacOSPlatform, CeresEngine::ApplePlatform, CeresEngine::iOSPlatform, and CeresEngine::Win32Platform.