Mercurial > hg > orthanc
comparison Core/Lua/LuaContext.h @ 996:cf52f3bcb2b3 lua-scripting
clarification of Lua classes wrt multithreading
author | Sebastien Jodogne <s.jodogne@gmail.com> |
---|---|
date | Thu, 03 Jul 2014 16:27:16 +0200 |
parents | 2d0a347e8cfc |
children | 92f4bf2c5d73 |
comparison
equal
deleted
inserted
replaced
995:8c67382f44a7 | 996:cf52f3bcb2b3 |
---|---|
32 | 32 |
33 #pragma once | 33 #pragma once |
34 | 34 |
35 #include "LuaException.h" | 35 #include "LuaException.h" |
36 | 36 |
37 #include <boost/thread.hpp> | |
38 | |
39 extern "C" | 37 extern "C" |
40 { | 38 { |
41 #include <lua.h> | 39 #include <lua.h> |
42 } | 40 } |
43 | 41 |
44 #include <EmbeddedResources.h> | 42 #include <EmbeddedResources.h> |
45 | 43 |
44 #include <boost/noncopyable.hpp> | |
46 | 45 |
47 namespace Orthanc | 46 namespace Orthanc |
48 { | 47 { |
49 class LuaContext : public boost::noncopyable | 48 class LuaContext : public boost::noncopyable |
50 { | 49 { |
51 private: | 50 private: |
52 friend class LuaFunctionCall; | 51 friend class LuaFunctionCall; |
53 | 52 |
54 lua_State *lua_; | 53 lua_State *lua_; |
55 boost::mutex mutex_; | |
56 std::string log_; | 54 std::string log_; |
57 | 55 |
58 static int PrintToLog(lua_State *L); | 56 static int PrintToLog(lua_State *L); |
59 | 57 |
60 void Execute(std::string* output, | 58 void Execute(std::string* output, |