make entryPoint a header

This commit is contained in:
2025-03-29 15:37:27 -05:00
parent 0d61a369fc
commit db9b8cc924
8 changed files with 40 additions and 29 deletions

View File

@@ -0,0 +1,41 @@
#include "MinimalApp.h"
namespace Archimedes {
MinimalApp::MinimalApp() : App() {
}
MinimalApp::~MinimalApp() {
}
void MinimalApp::run() {
std::cout << "\nTesting...\n";
for(auto* m : modules)
m->onLoad();
for(auto* s : Archimedes::Module::GetModules())
std::cout << "Module: " << (s ? *s : "nullptr") << std::endl;
// Main loop
while (!done && !modules.empty()) {
for(auto* m : modules) {
m->run();
}
for(auto it = toClose.begin(); it != toClose.end(); it++) {
unload(it);
}
toClose.clear();
for(std::string s : toOpen) {
load(s, getBlacklist());
}
toOpen.clear();
}
}
}

View File

@@ -0,0 +1,32 @@
#ifndef MINIMALAPP_H
#define MINIMALAPP_H
#include "pch.hpp"
#include "utils/App/App.h"
#include "utils/Module/Module.h"
namespace Archimedes {
class MinimalApp : public App {
private:
void handleArgs(const int&, char*[]) {};
void printHelp() {};
public:
MinimalApp();
~MinimalApp();
void run();
void stopModule(std::list<Module*>::iterator);
void startModule(std::string);
};
}
#endif