-----------------------------------------------------------------------------
| 68 | |
| 69 | //----------------------------------------------------------------------------- |
| 70 | bool 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 | //----------------------------------------------------------------------------- |
| 102 | void vtkPVFilePathEncodingHelper::PrintSelf(ostream& os, vtkIndent indent) |
no test coverage detected