add ending headers
This commit is contained in:
10
include/endApp.h
Normal file
10
include/endApp.h
Normal file
@@ -0,0 +1,10 @@
|
||||
#include "Archimedes.h"
|
||||
|
||||
#ifdef APP_TYPE
|
||||
|
||||
inline Archimedes::App* MakeApp() {
|
||||
return new APP_TYPE();
|
||||
}
|
||||
|
||||
#undef APP_TYPE
|
||||
#endif
|
||||
12
include/endModule.h
Normal file
12
include/endModule.h
Normal file
@@ -0,0 +1,12 @@
|
||||
#include "Archimedes.h"
|
||||
|
||||
#ifdef MODULE_TYPE
|
||||
|
||||
extern "C" {
|
||||
Archimedes::Module* create(void* handle, Archimedes::App* app) {
|
||||
return new MODULE_TYPE(handle, app);
|
||||
}
|
||||
}
|
||||
|
||||
#undef MODULE_TYPE
|
||||
#endif
|
||||
@@ -10,8 +10,7 @@ class DependsOnPrint : public Archimedes::Module {
|
||||
|
||||
};
|
||||
|
||||
extern "C" {
|
||||
Archimedes::Module* create(void* handle, Archimedes::App* app) {
|
||||
return new DependsOnPrint(handle, app);
|
||||
}
|
||||
}
|
||||
#ifndef DEPENDSONPRINT_STATIC
|
||||
#define MODULE_TYPE DependsOnPrint
|
||||
#include "endModule.h"
|
||||
#endif
|
||||
|
||||
@@ -11,11 +11,6 @@ class DependsOnPrintStatic : public Archimedes::Module {
|
||||
};
|
||||
|
||||
#ifndef DEPENDSONPRINTSTATIC_STATIC
|
||||
|
||||
extern "C" {
|
||||
Archimedes::Module* create(void* handle, Archimedes::App* app) {
|
||||
return new DependsOnPrintStatic(handle, app);
|
||||
}
|
||||
}
|
||||
|
||||
#define MODULE_TYPE DependsOnPrintStatic
|
||||
#include "endModule.h"
|
||||
#endif
|
||||
|
||||
@@ -22,11 +22,6 @@ class TestImgui : public Archimedes::GuiModule {
|
||||
};
|
||||
|
||||
#ifndef TESTIMGUI_STATIC
|
||||
|
||||
extern "C" {
|
||||
Archimedes::Module* create(void* handle, Archimedes::App* app) {
|
||||
return (Archimedes::Module*) new TestImgui(handle, app);
|
||||
}
|
||||
}
|
||||
|
||||
#define MODULE_TYPE TestImgui
|
||||
#include "endModule.h"
|
||||
#endif
|
||||
|
||||
@@ -11,11 +11,6 @@ class Print : public Archimedes::Module {
|
||||
};
|
||||
|
||||
#ifndef PRINT_STATIC
|
||||
|
||||
extern "C" {
|
||||
Archimedes::Module* create(void* handle, Archimedes::App* app) {
|
||||
return new Print(handle, app);
|
||||
}
|
||||
}
|
||||
|
||||
#define MODULE_TYPE Print
|
||||
#include "endModule.h"
|
||||
#endif
|
||||
|
||||
@@ -27,4 +27,5 @@ class ImguiEmbed : public Archimedes::App {
|
||||
|
||||
};
|
||||
|
||||
Archimedes::App* MakeApp() { return (Archimedes::App*) new ImguiEmbed(); }
|
||||
#define APP_TYPE ImguiEmbed
|
||||
#include "endApp.h"
|
||||
|
||||
@@ -29,4 +29,5 @@ class MinimalApp : public Archimedes::App {
|
||||
|
||||
};
|
||||
|
||||
Archimedes::App* MakeApp() { return new MinimalApp(); }
|
||||
#define APP_TYPE MinimalApp
|
||||
#include "endApp.h"
|
||||
|
||||
Reference in New Issue
Block a user