From 830fe14355decd19accff0b4a53a47afd617084d Mon Sep 17 00:00:00 2001 From: Nathan Date: Mon, 17 Mar 2025 12:55:01 -0500 Subject: [PATCH] test dependency loading --- modules/DependsOnPrint/src/DependsOnPrint.cpp | 16 ++++++++++++++++ modules/DependsOnPrint/src/DependsOnPrint.h | 17 +++++++++++++++++ 2 files changed, 33 insertions(+) create mode 100644 modules/DependsOnPrint/src/DependsOnPrint.cpp create mode 100644 modules/DependsOnPrint/src/DependsOnPrint.h diff --git a/modules/DependsOnPrint/src/DependsOnPrint.cpp b/modules/DependsOnPrint/src/DependsOnPrint.cpp new file mode 100644 index 0000000..ffd9270 --- /dev/null +++ b/modules/DependsOnPrint/src/DependsOnPrint.cpp @@ -0,0 +1,16 @@ +#include "DependsOnPrint.h" + +DependsOnPrint::DependsOnPrint(void* h, App& a) : Module(h, a) { + name = "DependsOnPrint"; + + deps["Print"] = "/home/nathan/Projects/Archimedes/result-2/bin/Print"; +} + +DependsOnPrint::~DependsOnPrint() { + std::cout << "DependsOnPrint Destroyed!\n"; +} + +void DependsOnPrint::run() { + std::cout << "DependsOnPrint lib loaded and run!\n"; + app.stopModule(self); +} diff --git a/modules/DependsOnPrint/src/DependsOnPrint.h b/modules/DependsOnPrint/src/DependsOnPrint.h new file mode 100644 index 0000000..1dbd66b --- /dev/null +++ b/modules/DependsOnPrint/src/DependsOnPrint.h @@ -0,0 +1,17 @@ +#include "Archimedes.h" + +class DependsOnPrint : public Module { + + public: + DependsOnPrint(void*, App&); + ~DependsOnPrint(); + void run(); + void onLoad() {} + +}; + +extern "C" { + Module* create(void* handle, App& app) { + return new DependsOnPrint(handle, app); + } +}