JustEnoughMod
Loading...
Searching...
No Matches
AppModule.hpp
1#ifndef CORE_APPMODULE_HPP
2#define CORE_APPMODULE_HPP
3
4#include <memory>
5
6namespace JEM {
7 class Application;
8
9 class AppModule {
10 public:
11 explicit AppModule(std::shared_ptr<Application> &app) : m_app(app){};
12
13 protected:
14 [[nodiscard]] auto getApp() const -> std::shared_ptr<Application> {
15 return m_app.lock();
16 }
17
18 private:
19 std::weak_ptr<Application> m_app;
20 };
21} // namespace JEM
22
23#endif
Definition AppModule.hpp:9