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

Method LoadString

Remoting/ServerManager/vtkSMSessionProxyManager.cxx:1269–1293  ·  view source on GitHub ↗

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

Source from the content-addressed store, hash-verified

1267
1268//---------------------------------------------------------------------------
1269std::string vtkSMSessionProxyManager::LoadString(const char* filename, vtkTypeUInt32 location)
1270{
1271 if (filename == nullptr)
1272 {
1273 vtkErrorMacro("Invalid arguments");
1274 return std::string();
1275 }
1276
1277 auto proxy = vtkSMSourceProxy::SafeDownCast(this->NewProxy("internal_sources", "StringReader"));
1278 if (!proxy)
1279 {
1280 vtkErrorMacro("Failed to create string proxy reader");
1281 return std::string();
1282 }
1283 proxy->SetLocation(location);
1284 vtkSMPropertyHelper(proxy, "FileName").Set(filename);
1285 proxy->UpdateVTKObjects();
1286 proxy->UpdatePipeline();
1287
1288 auto stringProp = vtkSMStringVectorProperty::SafeDownCast(proxy->GetProperty("String"));
1289 proxy->UpdatePropertyInformation(stringProp);
1290 const std::string contents = stringProp->GetElement(0);
1291 proxy->Delete();
1292 return contents;
1293}
1294
1295//---------------------------------------------------------------------------
1296bool vtkSMSessionProxyManager::SaveXMLState(const char* filename, vtkTypeUInt32 location)

Callers 9

LoadXMLStateMethod · 0.95
ImportPresetsMethod · 0.80
PrepareToLoadMethod · 0.80
importFromFileMethod · 0.80
runScriptMethod · 0.80
executeScriptMethod · 0.80
addMacroMethod · 0.80
ReadFunction · 0.80
loadConversionFileMethod · 0.80

Calls 9

NewProxyMethod · 0.95
SetLocationMethod · 0.80
SetMethod · 0.45
UpdateVTKObjectsMethod · 0.45
UpdatePipelineMethod · 0.45
GetPropertyMethod · 0.45
GetElementMethod · 0.45
DeleteMethod · 0.45

Tested by

no test coverage detected