OSDN Git Service

fix cmake/Macros.cmake
[moflib/moflib.git] / moflib-1.0 / src / mof / script / lua_state.hpp
1 #include <lua.hpp>
2 #include "luabind/luabind.hpp"
3 #include <memory>
4 #include <boost/utility.hpp>
5
6 // LuaInterpreter.cppからのみインクルードする
7
8 namespace mof
9 {
10 namespace script
11 {
12         class CommandSet;
13
14         class lua_state : boost::noncopyable
15         {
16         public:
17                 ~lua_state();
18                 void bind(std::shared_ptr<mof::script::CommandSet> commands);
19                 lua_State* raw_lua() const;
20                 std::shared_ptr<mof::script::CommandSet>& const command_set() const;
21                 static lua_state& instance(); 
22         private:
23                 lua_state();// singleton
24                 static lua_state singleton_lua;
25                 struct Impl;
26                 std::unique_ptr<Impl> impl_;
27         };
28
29 }// script
30 }// mof