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

Method Open

IO/FDS/vtkFDSReader.cxx:2114–2135  ·  view source on GitHub ↗

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

Source from the content-addressed store, hash-verified

2112
2113//------------------------------------------------------------------------------
2114vtkSmartPointer<vtkResourceStream> vtkFDSReader::Open()
2115{
2116 if (this->Internals->Stream)
2117 {
2118 if (this->Internals->Stream->SupportSeek())
2119 {
2120 this->Internals->Stream->Seek(0, vtkResourceStream::SeekDirection::Begin);
2121 }
2122
2123 return this->Internals->Stream;
2124 }
2125
2126 auto fileStream = vtkSmartPointer<vtkFileResourceStream>::New();
2127 if (this->FileName.empty() || !fileStream->Open(this->FileName.c_str()))
2128 {
2129 vtkErrorMacro(<< "Failed to open file: "
2130 << (this->FileName.empty() ? "No file name set" : this->FileName));
2131 return nullptr;
2132 }
2133
2134 return fileStream;
2135}
2136
2137//------------------------------------------------------------------------------
2138std::string vtkFDSReader::SanitizeName(const std::string& name)

Callers 12

RequestInformationMethod · 0.95
ReadSliceFileFunction · 0.45
ReadBoundaryFileFunction · 0.45
RequestDataMethod · 0.45
NewDataAvailableMethod · 0.45
ResetReaderMethod · 0.45
OpenAndReadMetaDataMethod · 0.45
UpdateMethod · 0.45
slotOpenSQLiteDBMethod · 0.45
TryLoadGLTFModelFunction · 0.45

Calls 5

SupportSeekMethod · 0.80
NewFunction · 0.50
SeekMethod · 0.45
emptyMethod · 0.45
c_strMethod · 0.45

Tested by

no test coverage detected