diff options
author | Nicolas "Pixel" Noble <pixel@nobis-crew.org> | 2013-08-07 06:31:41 +0200 |
---|---|---|
committer | Nicolas "Pixel" Noble <pixel@nobis-crew.org> | 2013-08-07 06:31:41 +0200 |
commit | 24dbb15bf6f2b513e2fb75345345b7b646ff1a81 (patch) | |
tree | e2e81d6960cc81e8bd0b0b4de69455f603ad9aa6 /includes | |
parent | a010c6c9e789df00bdaba3ab5e5b52e263d2776b (diff) |
Adding skeleton LuaHandle.
Diffstat (limited to 'includes')
-rw-r--r-- | includes/LuaHandle.h | 33 |
1 files changed, 33 insertions, 0 deletions
diff --git a/includes/LuaHandle.h b/includes/LuaHandle.h new file mode 100644 index 0000000..ab165ee --- /dev/null +++ b/includes/LuaHandle.h @@ -0,0 +1,33 @@ +#pragma once + +#include <BLua.h> +#include <Handle.h> +#include <Input.h> + +namespace Balau { + +typedef IO<Handle> IOHandle; +typedef IOHandle IOInput; + +class LuaHandleFactory : public LuaObjectFactory { + public: + LuaHandleFactory(IO<Handle> h) : m_obj(new IO<Handle>(h)) { } + static void pushStatics(Lua & L); + protected: + LuaHandleFactory(IO<Handle> * h) : m_obj(h) { } + void pushObjectAndMembers(Lua & L); + private: + IO<Handle> * m_obj; +}; + +class LuaInputFactory : public LuaHandleFactory { + public: + LuaInputFactory(IO<Input> h) : LuaHandleFactory(new IO<Handle>(h)) { } + static void pushStatics(Lua & L); + private: + void pushObjectAndMembers(Lua & L); +}; + +void registerLuaHandle(Lua &); + +}; |