MCPcopy Create free account
hub / github.com/Kitware/ParaView / CallObjectMethod

Method CallObjectMethod

Remoting/ServerManager/vtkPVFilePathEncodingHelper.cxx:70–99  ·  view source on GitHub ↗

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

Source from the content-addressed store, hash-verified

68
69//-----------------------------------------------------------------------------
70bool vtkPVFilePathEncodingHelper::CallObjectMethod(const char* method, bool ignoreErrors)
71{
72 vtkPVSessionBase* session =
73 vtkPVSessionBase::SafeDownCast(vtkProcessModule::GetProcessModule()->GetActiveSession());
74
75 auto siProxy =
76 vtkSIProxy::SafeDownCast(session->GetSessionCore()->GetSIObject(this->ActiveGlobalId));
77 auto object = vtkObject::SafeDownCast(siProxy->GetVTKObject());
78 auto interpreter = siProxy->GetInterpreter();
79
80 // Build stream request
81 vtkClientServerStream stream;
82 stream << vtkClientServerStream::Invoke << object << method;
83 stream << this->Path;
84 if (this->SecondaryPath != nullptr)
85 {
86 stream << this->SecondaryPath;
87 }
88 stream << vtkClientServerStream::End;
89
90 // Process stream and get result
91 int temp = interpreter->GetGlobalWarningDisplay();
92 interpreter->SetGlobalWarningDisplay(ignoreErrors ? 0 : 1);
93 interpreter->ProcessStream(stream);
94 interpreter->SetGlobalWarningDisplay(temp);
95
96 int ret = 1;
97 interpreter->GetLastResult().GetArgument(0, 0, &ret);
98 return ret != 0;
99}
100
101//-----------------------------------------------------------------------------
102void vtkPVFilePathEncodingHelper::PrintSelf(ostream& os, vtkIndent indent)

Callers 6

MakeDirectoryMethod · 0.95
DeleteDirectoryMethod · 0.95
OpenDirectoryMethod · 0.95
RenameDirectoryMethod · 0.95
IsDirectoryMethod · 0.95

Calls 7

GetSessionCoreMethod · 0.80
GetInterpreterMethod · 0.80
ProcessStreamMethod · 0.80
GetArgumentMethod · 0.80
GetActiveSessionMethod · 0.45
GetSIObjectMethod · 0.45
GetVTKObjectMethod · 0.45

Tested by

no test coverage detected