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" {
|
#ifndef DEPENDSONPRINT_STATIC
|
||||||
Archimedes::Module* create(void* handle, Archimedes::App* app) {
|
#define MODULE_TYPE DependsOnPrint
|
||||||
return new DependsOnPrint(handle, app);
|
#include "endModule.h"
|
||||||
}
|
#endif
|
||||||
}
|
|
||||||
|
|||||||
@@ -11,11 +11,6 @@ class DependsOnPrintStatic : public Archimedes::Module {
|
|||||||
};
|
};
|
||||||
|
|
||||||
#ifndef DEPENDSONPRINTSTATIC_STATIC
|
#ifndef DEPENDSONPRINTSTATIC_STATIC
|
||||||
|
#define MODULE_TYPE DependsOnPrintStatic
|
||||||
extern "C" {
|
#include "endModule.h"
|
||||||
Archimedes::Module* create(void* handle, Archimedes::App* app) {
|
|
||||||
return new DependsOnPrintStatic(handle, app);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
#endif
|
#endif
|
||||||
|
|||||||
@@ -22,11 +22,6 @@ class TestImgui : public Archimedes::GuiModule {
|
|||||||
};
|
};
|
||||||
|
|
||||||
#ifndef TESTIMGUI_STATIC
|
#ifndef TESTIMGUI_STATIC
|
||||||
|
#define MODULE_TYPE TestImgui
|
||||||
extern "C" {
|
#include "endModule.h"
|
||||||
Archimedes::Module* create(void* handle, Archimedes::App* app) {
|
|
||||||
return (Archimedes::Module*) new TestImgui(handle, app);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
#endif
|
#endif
|
||||||
|
|||||||
@@ -11,11 +11,6 @@ class Print : public Archimedes::Module {
|
|||||||
};
|
};
|
||||||
|
|
||||||
#ifndef PRINT_STATIC
|
#ifndef PRINT_STATIC
|
||||||
|
#define MODULE_TYPE Print
|
||||||
extern "C" {
|
#include "endModule.h"
|
||||||
Archimedes::Module* create(void* handle, Archimedes::App* app) {
|
|
||||||
return new Print(handle, app);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
#endif
|
#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