light/modules/app/public/application.hpp
light7734 2b96a85b62
Some checks reported errors
continuous-integration/drone/push Build was killed
feat: systems
feat: surface system

This commit puts the project in major jeopardy as it overhauls the
architecture such as removing the layer stack completely, etc.

I am filled with determination.
2025-07-26 18:01:27 +03:30

42 lines
854 B
C++

#pragma once
namespace lt::app {
class ISystem;
extern Scope<class Application> create_application();
/** The main application class.
* Think of this like an aggregate of systems, you register systems through this interface.
* Then they'll tick every "application frame".
*/
class Application
{
public:
Application(const Application &) = delete;
Application(Application &&) = delete;
auto operator=(const Application &) -> Application & = delete;
auto operator=(Application &&) -> Application & = delete;
virtual ~Application() = default;
void game_loop();
void register_system(Ref<app::ISystem> system);
void unregister_system(Ref<app::ISystem> system);
protected:
Application() = default;
private:
std::vector<Ref<app::ISystem>> m_systems;
std::vector<Ref<app::ISystem>> m_systems_to_be_removed;
};
} // namespace lt::app