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

Method SetFileName

IO/Geometry/vtkPTSReader.cxx:56–84  ·  view source on GitHub ↗

------------------------------------------------------------------------------ vtkSetStringMacro except we clear some variables if we update the value

Source from the content-addressed store, hash-verified

54//------------------------------------------------------------------------------
55// vtkSetStringMacro except we clear some variables if we update the value
56void vtkPTSReader::SetFileName(const char* filename)
57{
58 vtkDebugMacro(<< this->GetClassName() << " (" << this << "): setting FileName to " << filename);
59 if (this->FileName == nullptr && filename == nullptr)
60 {
61 return;
62 }
63 if (this->FileName && filename && !strcmp(this->FileName, filename))
64 {
65 return;
66 }
67 delete[] this->FileName;
68 if (filename)
69 {
70 size_t n = strlen(filename) + 1;
71 char* cp1 = new char[n];
72 const char* cp2 = (filename);
73 this->FileName = cp1;
74 do
75 {
76 *cp1++ = *cp2++;
77 } while (--n);
78 }
79 else
80 {
81 this->FileName = nullptr;
82 }
83 this->Modified();
84}
85
86//------------------------------------------------------------------------------
87int vtkPTSReader::RequestInformation(vtkInformation* vtkNotUsed(request),

Callers 15

~vtkGLTFWriterMethod · 0.45
SetupTextureReaderFunction · 0.45
~vtkFacetWriterMethod · 0.45
~vtkOBJWriterMethod · 0.45
WriteDataMethod · 0.45
~vtkGLTFReaderMethod · 0.45
RequestInformationMethod · 0.45
~vtkSTLWriterMethod · 0.45
~vtkOpenFOAMReaderMethod · 0.45
testReader3DMethod · 0.45

Calls 2

GetClassNameMethod · 0.45
ModifiedMethod · 0.45

Tested by 15

TestOBJReaderDoubleFunction · 0.36
TestPTSReaderFunction · 0.36
TestTecplotReaderFunction · 0.36
TestGLTFReaderMalformedFunction · 0.36
TestOpenFOAMReaderFunction · 0.36
CheckOBJGroupsFunction · 0.36
TestMFIXReaderFunction · 0.36
CreateTestAMRFunction · 0.36
TestAMRReadWriteFunction · 0.36