Mercurial > hg > orthanc
comparison Core/Lua/LuaContext.h @ 418:b79bf2f4ab2e
execution of lua through REST
author | Sebastien Jodogne <s.jodogne@gmail.com> |
---|---|
date | Tue, 07 May 2013 12:03:25 +0200 |
parents | 941ea46e9e26 |
children | 2d0a347e8cfc |
comparison
equal
deleted
inserted
replaced
417:7441037663cd | 418:b79bf2f4ab2e |
---|---|
51 private: | 51 private: |
52 friend class LuaFunctionCall; | 52 friend class LuaFunctionCall; |
53 | 53 |
54 lua_State *lua_; | 54 lua_State *lua_; |
55 boost::mutex mutex_; | 55 boost::mutex mutex_; |
56 std::string log_; | |
56 | 57 |
57 static int PrintToLog(lua_State *L); | 58 static int PrintToLog(lua_State *L); |
59 | |
60 void Execute(std::string* output, | |
61 const std::string& command); | |
58 | 62 |
59 public: | 63 public: |
60 LuaContext(); | 64 LuaContext(); |
61 | 65 |
62 ~LuaContext(); | 66 ~LuaContext(); |
63 | 67 |
64 void Execute(const std::string& command); | 68 void Execute(const std::string& command) |
69 { | |
70 Execute(NULL, command); | |
71 } | |
72 | |
73 void Execute(std::string& output, | |
74 const std::string& command) | |
75 { | |
76 Execute(&output, command); | |
77 } | |
65 | 78 |
66 void Execute(EmbeddedResources::FileResourceId resource); | 79 void Execute(EmbeddedResources::FileResourceId resource); |
67 | 80 |
68 bool IsExistingFunction(const char* name); | 81 bool IsExistingFunction(const char* name); |
69 }; | 82 }; |