Faro Engine 0.0.0.b519570 (main)
Loading...
Searching...
No Matches
Platform.hpp
Go to the documentation of this file.
1#pragma once
3#include <Window.hpp>
4#include <Monitor.hpp>
5#include <FileStream.hpp>
6#include <Containers/Path.hpp>
7
8namespace Faro
9{
11 {
12 public:
13 virtual void Init() = 0;
14 virtual void Destroy() = 0;
15 virtual String GetName() = 0;
16
17 virtual Window* CreateWindow() = 0;
18
20
22
23 virtual FileStream* OpenFile(Path file, EFileMode mode) = 0;
24
25 virtual Array<Path> FindSubPaths(Path rootPath, bool recursive, String filter) = 0;
26
27 Array<Path> FindFiles(Path rootPath, bool recursive = false, String filter = "*.*");
28
29 Array<Path> FindDirectories(Path rootPath, bool recursive = false, String filter = "*");
30 };
31
32 extern Platform* GPlatform;
33
35
37#define REGISTER_PLATFORM(TYPE) REGISTER_INSTANCE(Platform, TYPE)
38}
#define DEFINE_INSTANCE_REGISTRY(NAME, TYPE)
Definition ClassRegistry.hpp:6
Definition Array.hpp:11
Definition FileStream.hpp:15
Definition Path.hpp:14
Definition Platform.hpp:11
Monitor GetPrimaryMonitor()
Definition Platform.cpp:9
virtual Window * CreateWindow()=0
virtual FileStream * OpenFile(Path file, EFileMode mode)=0
Array< Path > FindFiles(Path rootPath, bool recursive=false, String filter="*.*")
Definition Platform.cpp:21
virtual Array< Path > FindSubPaths(Path rootPath, bool recursive, String filter)=0
virtual void Destroy()=0
Array< Path > FindDirectories(Path rootPath, bool recursive=false, String filter="*")
Definition Platform.cpp:35
virtual void Init()=0
virtual Array< Monitor > GetMonitors()=0
virtual String GetName()=0
Definition String.hpp:12
Definition Window.hpp:29
Definition Array.hpp:8
Array< Platform * > GetRegisteredPlatforms()
Definition Platform.cpp:49
Platform * GPlatform
Definition Platform.cpp:7
EFileMode
Mode in which to open a file.
Definition FileStream.hpp:8
Definition Monitor.hpp:8