OrocosComponentLibrary  2.8.3
LuaStateHandle.hpp
1 #ifndef OCL_LUASTATEHANDLE_HPP
2 #define OCL_LUASTATEHANDLE_HPP
3 
4 #include <rtt/os/MutexLock.hpp>
5 
6 struct lua_State;
7 
8 namespace OCL
9 {
11  {
12  private:
13  lua_State *L;
14  mutable RTT::os::MutexInterface *m;
15 
16  public:
19  LuaStateHandle(lua_State *L, RTT::os::MutexInterface &mutex);
20  ~LuaStateHandle();
21 
22  LuaStateHandle &operator=(const LuaStateHandle &);
23 
24  lua_State *get() const;
25  operator lua_State *() const { return get(); }
26  lua_State *operator->() const { return get(); }
27 
28  };
29 
30 } // namespace OCL
31 
32 #endif // OCL_LUASTATEHANDLE_HPP
The Orocos Component Library.
Definition: Component.hpp:43