From 3bb33734a92e86024488adf88dc2a368c8c952b2 Mon Sep 17 00:00:00 2001 From: Jon Bergli Heier Date: Fri, 20 May 2011 14:11:40 +0200 Subject: Basic lua implementation. --- scripting.h | 30 ++++++++++++++++++++++++++++++ 1 file changed, 30 insertions(+) create mode 100644 scripting.h (limited to 'scripting.h') diff --git a/scripting.h b/scripting.h new file mode 100644 index 0000000..d14aa3c --- /dev/null +++ b/scripting.h @@ -0,0 +1,30 @@ +#ifndef SCRIPTING_H +#define SCRIPTING_H + +#include +#include + +#include +#include + +class LuaError : public std::runtime_error { + public: + LuaError(const std::string& s) : std::runtime_error(s) {}; +}; + +class Lua { + protected: + lua_State *L; + boost::function log_func; + + public: + Lua(); + virtual ~Lua(); + + void set_log_func(boost::function log_func); + void print(const char *s); + + void dostring(std::string s); +}; + +#endif -- cgit v1.2.3