Mercurial > hg > orthanc
comparison Core/Lua/LuaFunctionCall.h @ 997:1b1d51e9f1a2 lua-scripting
return Json from Lua
author | Sebastien Jodogne <s.jodogne@gmail.com> |
---|---|
date | Thu, 03 Jul 2014 18:12:50 +0200 |
parents | cf52f3bcb2b3 |
children | 6e7e5ed91c2d |
comparison
equal
deleted
inserted
replaced
996:cf52f3bcb2b3 | 997:1b1d51e9f1a2 |
---|---|
44 LuaContext& context_; | 44 LuaContext& context_; |
45 bool isExecuted_; | 45 bool isExecuted_; |
46 | 46 |
47 void CheckAlreadyExecuted(); | 47 void CheckAlreadyExecuted(); |
48 | 48 |
49 void ExecuteInternal(int numOutputs); | |
50 | |
49 public: | 51 public: |
50 LuaFunctionCall(LuaContext& context, | 52 LuaFunctionCall(LuaContext& context, |
51 const char* functionName); | 53 const char* functionName); |
52 | 54 |
53 void PushString(const std::string& value); | 55 void PushString(const std::string& value); |
56 | 58 |
57 void PushInteger(int value); | 59 void PushInteger(int value); |
58 | 60 |
59 void PushDouble(double value); | 61 void PushDouble(double value); |
60 | 62 |
61 void PushJSON(const Json::Value& value); | 63 void PushJson(const Json::Value& value); |
62 | 64 |
63 void Execute(int numOutputs = 0); | 65 void Execute() |
66 { | |
67 ExecuteInternal(0); | |
68 } | |
64 | 69 |
65 bool ExecutePredicate(); | 70 bool ExecutePredicate(); |
71 | |
72 void ExecuteToJson(Json::Value& result); | |
66 }; | 73 }; |
67 } | 74 } |