move utils to include. utils implimentations should be headers
This commit is contained in:
@@ -2,8 +2,7 @@
|
||||
#define APP_H
|
||||
|
||||
#include "pch.hpp"
|
||||
#include "Module.h"
|
||||
#include "GuiModule.h"
|
||||
#include "Module/Module.h"
|
||||
|
||||
namespace Archimedes {
|
||||
|
||||
|
||||
@@ -1,28 +0,0 @@
|
||||
#ifndef GUIMODULE_H
|
||||
#define GUIMODULE_H
|
||||
|
||||
#include "Module.h"
|
||||
#include "Window/Window.h"
|
||||
|
||||
namespace Archimedes {
|
||||
|
||||
class GuiModule : public Module {
|
||||
|
||||
public:
|
||||
typedef GuiModule* create_t(void*, App&);
|
||||
|
||||
GuiModule(void* h, App& a) : Module(h, a) {}
|
||||
virtual ~GuiModule() { if(window) delete window; }
|
||||
virtual void onLoad() = 0;
|
||||
virtual void run() = 0;
|
||||
|
||||
Window* getWindow() { return window; }
|
||||
void createWindow() { window = new Window(); }
|
||||
|
||||
protected:
|
||||
Window* window;
|
||||
};
|
||||
}
|
||||
|
||||
|
||||
#endif
|
||||
38
src/Module.h
38
src/Module.h
@@ -1,38 +0,0 @@
|
||||
#ifndef MODULE_H
|
||||
#define MODULE_H
|
||||
|
||||
#include "pch.hpp"
|
||||
|
||||
namespace Archimedes {
|
||||
|
||||
class App;
|
||||
|
||||
class Module {
|
||||
|
||||
friend class App;
|
||||
|
||||
public:
|
||||
typedef Module* create_t(void*, App&);
|
||||
|
||||
Module(void* h, App& a) : handle(h), app(a) {};
|
||||
virtual ~Module() {}
|
||||
virtual void run() = 0;
|
||||
virtual void onLoad() = 0;
|
||||
|
||||
std::string getName() const { return name; }
|
||||
void* getHandle() { return handle; }
|
||||
|
||||
void setSelf(std::list<Module*>::iterator s) { self = s; }
|
||||
|
||||
protected:
|
||||
std::string name;
|
||||
void* handle;
|
||||
std::list<Module*>::iterator self;
|
||||
|
||||
App& app;
|
||||
|
||||
std::unordered_map<std::string, std::string> deps;
|
||||
};
|
||||
}
|
||||
|
||||
#endif
|
||||
Reference in New Issue
Block a user