5#include <Covellite/Events/Events.hpp>
6#include <Covellite/App/IApplication.hpp>
7#include <Covellite/App/IWindow.hpp>
49 using Run_t = ::std::function<void(
void)>;
50 using Windows_t = ::std::stack<::std::shared_ptr<::covellite::app::IWindow>>;
54 public ::alicorn::extension::testing::Proxy<Proxy>
57 MOCK_METHOD0(ContinuousConstructor, Id_t(
void));
58 MOCK_METHOD0(EventBasedConstructor, Id_t(
void));
59 MOCK_METHOD2(Main,
void(::std::string,
void *));
60 MOCK_METHOD1(Run,
void(Id_t));
61 MOCK_METHOD2(MakeWindow,
void(Id_t, ::std::string));
66 Application & operator= (
const Application &) =
delete;
67 bool operator== (
const Application & _Value)
const {
return (m_Id == _Value.m_Id); }
74 template<
class TApplication>
75 static void Main(
void * _pParams)
noexcept
77 Proxy::GetInstance()->Main(
typeid(TApplication).name(), _pParams);
83 operator Events_t (
void)
const final {
return m_Events; }
86 template<
class TWindow,
class ... TArgs>
87 TWindow & MakeWindow(TArgs && ... _Args)
89 Proxy::GetInstance()->MakeWindow(m_Id,
typeid(TWindow).name());
91 auto pWindow = ::std::make_shared<TWindow>(_Args ...);
92 m_Windows.push(pWindow);
101 explicit Application(Continuous) :
102 m_Id(Proxy::GetInstance()->ContinuousConstructor()),
103 Run([=](void) { Proxy::GetInstance()->Run(m_Id); })
108 explicit Application(EventBased) :
109 m_Id(Proxy::GetInstance()->EventBasedConstructor()),
110 Run([=](void) { Proxy::GetInstance()->Run(m_Id); })
115 virtual ~Application(
void) =
default;
Класс входит в проект Covellite.App Интерфейсный класс приложения.
Definition IApplication.hpp:28
Класс входит в проект Covellite.Events Класс для работы с событиями фреймворка.
Definition Events.hpp:36