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

Function OpenFile

IO/VeraOut/vtkVeraOutReader.cxx:93–120  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

91 // --------------------------------------------------------------------------
92
93 bool OpenFile()
94 {
95 if (this->FileId > -1)
96 {
97 // Already open, skip...
98 return true;
99 }
100
101 hid_t fileAccessPropListID = H5Pcreate(H5P_FILE_ACCESS);
102 if (fileAccessPropListID < 0)
103 {
104 vtkErrorWithObjectMacro(this->Owner, "Couldn't H5Pcreate");
105 return false;
106 }
107 herr_t err = H5Pset_fclose_degree(fileAccessPropListID, H5F_CLOSE_SEMI);
108 if (err < 0)
109 {
110 vtkErrorWithObjectMacro(this->Owner, "Couldn't set file close access");
111 return false;
112 }
113 if ((this->FileId = H5Fopen(this->FileName.c_str(), H5F_ACC_RDONLY, fileAccessPropListID)) < 0)
114 {
115 vtkErrorWithObjectMacro(this->Owner, "Cannot be a VERA file (" << this->FileName << ")");
116 return false;
117 }
118 H5Pclose(fileAccessPropListID);
119 return true;
120 }
121
122 //----------------------------------------------------------------------------
123

Callers 4

vtkXMLWriter.hFile · 0.50
WriteDataMethod · 0.50
WriteCaseFileMethod · 0.50
WriteSOSCaseFileMethod · 0.50

Calls 3

H5Pset_fclose_degreeFunction · 0.85
H5FopenFunction · 0.85
c_strMethod · 0.45

Tested by

no test coverage detected