Add current work

Former-commit-id: 06dd34f00951e334b330c067f61f69fc73dcc2d2
This commit is contained in:
Lynix
2016-03-15 23:00:03 +01:00
parent 3f9a4170f1
commit 83884015fc
3 changed files with 113 additions and 1 deletions

View File

@@ -8,6 +8,10 @@
#define NDK_APPLICATION_HPP
#include <NDK/Prerequesites.hpp>
#include <NDK/World.hpp>
#include <Nazara/Core/Clock.hpp>
#include <Nazara/Utility/Window.hpp>
#include <vector>
namespace Ndk
{
@@ -15,7 +19,35 @@ namespace Ndk
{
public:
inline Application();
Application(const Application&) = delete;
inline ~Application();
#ifndef NDK_SERVER
template<typename T, typename... Args> T& AddWindow(Args&&... args);
#endif
template<typename... Args> World& AddWorld(Args&&... args);
bool Run();
inline void Quit();
Application& operator=(const Application&) = delete;
inline static Application* Instance();
private:
#ifndef NDK_SERVER
std::vector<std::unique_ptr<Nz::Window>> m_windows;
#endif
std::vector<World> m_worlds;
Nz::Clock m_updateClock;
#ifndef NDK_SERVER
bool m_exitOnClosedWindows;
#endif
bool m_shouldQuit;
float m_updateTime;
static Application* s_application;
};
}