aboutsummaryrefslogtreecommitdiff
path: root/src/lindafactory.h
diff options
context:
space:
mode:
Diffstat (limited to 'src/lindafactory.h')
-rw-r--r--src/lindafactory.h28
1 files changed, 28 insertions, 0 deletions
diff --git a/src/lindafactory.h b/src/lindafactory.h
new file mode 100644
index 0000000..d31af1f
--- /dev/null
+++ b/src/lindafactory.h
@@ -0,0 +1,28 @@
1#pragma once
2
3#include "deep.h"
4
5// #################################################################################################
6
7class LindaFactory
8: public DeepFactory
9{
10 public:
11
12 // I'm not totally happy with having a 'global' variable. Maybe it should be dynamically created and stored somewhere in the universe?
13 static LindaFactory Instance;
14
15 LindaFactory(luaL_Reg const lindaMT_[])
16 : mLindaMT{ lindaMT_ }
17 {
18 }
19
20 private:
21
22 luaL_Reg const* const mLindaMT{ nullptr };
23
24 void createMetatable(lua_State* L_) const override;
25 void deleteDeepObjectInternal(lua_State* L_, DeepPrelude* o_) const override;
26 char const* moduleName() const override;
27 DeepPrelude* newDeepObjectInternal(lua_State* L_) const override;
28};