Mercurial > hg > orthanc
diff 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 |
line wrap: on
line diff
--- a/Core/Lua/LuaContext.h Tue May 07 10:31:32 2013 +0200 +++ b/Core/Lua/LuaContext.h Tue May 07 12:03:25 2013 +0200 @@ -53,15 +53,28 @@ lua_State *lua_; boost::mutex mutex_; + std::string log_; static int PrintToLog(lua_State *L); + void Execute(std::string* output, + const std::string& command); + public: LuaContext(); ~LuaContext(); - void Execute(const std::string& command); + void Execute(const std::string& command) + { + Execute(NULL, command); + } + + void Execute(std::string& output, + const std::string& command) + { + Execute(&output, command); + } void Execute(EmbeddedResources::FileResourceId resource);