diff 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
line wrap: on
line diff
--- a/Core/Lua/LuaFunctionCall.h	Thu Jul 03 16:27:16 2014 +0200
+++ b/Core/Lua/LuaFunctionCall.h	Thu Jul 03 18:12:50 2014 +0200
@@ -46,6 +46,8 @@
 
     void CheckAlreadyExecuted();
 
+    void ExecuteInternal(int numOutputs);
+
   public:
     LuaFunctionCall(LuaContext& context,
                     const char* functionName);
@@ -58,10 +60,15 @@
 
     void PushDouble(double value);
 
-    void PushJSON(const Json::Value& value);
+    void PushJson(const Json::Value& value);
 
-    void Execute(int numOutputs = 0);
+    void Execute()
+    {
+      ExecuteInternal(0);
+    }
 
     bool ExecutePredicate();
+
+    void ExecuteToJson(Json::Value& result);                    
   };
 }