blob: d14aa3cc05db92a7219941501a6151c13cdaf47b (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
|
#ifndef SCRIPTING_H
#define SCRIPTING_H
#include <lua.hpp>
#include <boost/function.hpp>
#include <string>
#include <stdexcept>
class LuaError : public std::runtime_error {
public:
LuaError(const std::string& s) : std::runtime_error(s) {};
};
class Lua {
protected:
lua_State *L;
boost::function<void (const char*)> log_func;
public:
Lua();
virtual ~Lua();
void set_log_func(boost::function<void (const char*)> log_func);
void print(const char *s);
void dostring(std::string s);
};
#endif
|