Changeset 2860 in Sophya for trunk/SophyaExt/FitsIOServer/fitsinoutfile.cc
- Timestamp:
- Dec 20, 2005, 7:25:51 PM (20 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/SophyaExt/FitsIOServer/fitsinoutfile.cc
r2844 r2860 111 111 // cout << " DBG - FitsInOutFile(string name= " << name << ")" << endl; 112 112 fptr_ = NULL; 113 ownfptr = true; 113 114 SetDef_BinTable(); 114 115 SetDef_StrColWidth(); … … 122 123 // cout << " DBG - FitsInOutFile(char* name= " << name << ")" << endl; 123 124 fptr_ = NULL; 125 ownfptr = true; 124 126 SetDef_BinTable(); 125 127 SetDef_StrColWidth(); 126 128 Open(name, mode); 129 } 130 131 /*! \brief Copy constructor 132 The fits file pointer is owned by the original object and should not be closed 133 as long as the new object is being used. 134 */ 135 FitsInOutFile::FitsInOutFile(FitsInOutFile const& fios) 136 { 137 fptr_ = fios.fptr_; 138 fname_ = fios.fname_; 139 mode_ = fios.mode_; 140 ownfptr = false; 141 SetDef_BinTable(); 142 SetDef_StrColWidth(); 127 143 } 128 144 … … 177 193 fname_ = name; 178 194 mode_ = mode; 195 ownfptr = true; 179 196 return; 180 197 } … … 184 201 void FitsInOutFile::Close() 185 202 { 203 if (ownfptr == false) return; 186 204 if (fptr_ == NULL) return; 187 205 int status = 0;
Note:
See TracChangeset
for help on using the changeset viewer.