make apps customizable

This commit is contained in:
2025-03-29 15:02:27 -05:00
parent aff69960a0
commit 0d61a369fc
11 changed files with 49 additions and 241 deletions

View File

@@ -1,41 +1,23 @@
#ifndef APP_H
#define APP_H
#ifndef MINIMALAPP_H
#define MINIMALAPP_H
#include "pch.hpp"
#include "utils/App/App.h"
#include "utils/Module/Module.h"
namespace Archimedes {
class App {
class MinimalApp : public App {
private:
static App* instance;
bool done = false;
void handleArgs(const int&, char*[]) {};
std::list<Module*> modules;
std::list<Module*> toClose;
std::list<std::string> toOpen;
bool load(std::string, std::list<std::string>);
void unload(std::list<Module*>::iterator);
void handleArgs(const int&, char*[]);
void printHelp();
std::list<std::string> getBlacklist() {
std::list<std::string> l;
for(Module* m : modules)
l.push_back(m->getName());
return l;
}
void printHelp() {};
public:
App(const int&, char*[]);
~App();
static App& Get() { return *instance; }
MinimalApp();
~MinimalApp();
void run();
@@ -43,7 +25,6 @@ namespace Archimedes {
void startModule(std::string);
void end() { done = true; }
};
}