MCPcopy Create free account
hub / github.com/Kitware/VTK / vtkSessionInvoke

Function vtkSessionInvoke

Serialization/Manager/vtkSession.cxx:197–211  ·  view source on GitHub ↗

-------------------------------------------------------------------------------

Source from the content-addressed store, hash-verified

195
196 //-------------------------------------------------------------------------------
197 vtkSessionJson vtkSessionInvoke(
198 vtkSession session, vtkObjectHandle object, const char* methodName, vtkSessionJson args)
199 {
200 if (session->Manager->GetObjectAtId(object) == nullptr)
201 {
202 vtkLog(ERROR, << "Cannot invoke " << methodName << " on object with ID: " << object
203 << " because the object does not exist.");
204 return session->ParseJson("{}");
205 }
206 char* argsJsonCString = session->StringifyJson(args);
207 auto argsJsonString = std::string(argsJsonCString);
208 free(argsJsonCString);
209 auto resultJsonString = session->Manager->Invoke(object, methodName, argsJsonString);
210 return session->ParseJson(resultJsonString.c_str());
211 }
212
213 //-------------------------------------------------------------------------------
214 uint32_t* vtkSessionGetAllDependencies(vtkSession session, vtkObjectHandle object, size_t* length)

Callers 3

InvokeMethod · 0.85
InvokeMethod · 0.85
TestSessionFunction · 0.85

Calls 4

stringClass · 0.50
GetObjectAtIdMethod · 0.45
InvokeMethod · 0.45
c_strMethod · 0.45

Tested by 1

TestSessionFunction · 0.68