| 125 | |
| 126 | |
| 127 | void |
| 128 | FileDatastore::resetFilePointers(void) { |
| 129 | |
| 130 | for (theIDFilesIter = theIDFiles.begin(); theIDFilesIter != theIDFiles.end(); theIDFilesIter++) { |
| 131 | FileDatastoreOutputFile *theFileStruct = theIDFilesIter->second; |
| 132 | fstream *theFile = theFileStruct->theFile; |
| 133 | if (theFile != 0) { |
| 134 | theFile->seekp(0, ios::beg); |
| 135 | *(theIntData.dbTag) = theFileStruct->maxDbTag; |
| 136 | theFile->write(data, sizeof(int)); |
| 137 | theFile->close(); |
| 138 | delete theFile; |
| 139 | theFileStruct->theFile = 0; |
| 140 | } |
| 141 | } |
| 142 | |
| 143 | for (theMatFilesIter = theMatFiles.begin(); theMatFilesIter != theMatFiles.end(); theMatFilesIter++) { |
| 144 | FileDatastoreOutputFile *theFileStruct = theMatFilesIter->second; |
| 145 | fstream *theFile = theFileStruct->theFile; |
| 146 | if (theFile != 0) { |
| 147 | theFile->seekp(0, ios::beg); |
| 148 | *(theIntData.dbTag) = theFileStruct->maxDbTag; |
| 149 | theFile->write(data, sizeof(int)); |
| 150 | theFile->close(); |
| 151 | delete theFile; |
| 152 | theFileStruct->theFile = 0; |
| 153 | } |
| 154 | } |
| 155 | |
| 156 | for (theVectFilesIter = theVectFiles.begin(); theVectFilesIter != theVectFiles.end(); theVectFilesIter++) { |
| 157 | FileDatastoreOutputFile *theFileStruct = theVectFilesIter->second; |
| 158 | fstream *theFile = theFileStruct->theFile; |
| 159 | if (theFile != 0) { |
| 160 | theFile->seekp(0, ios::beg); |
| 161 | *(theIntData.dbTag) = theFileStruct->maxDbTag; |
| 162 | theFile->write(data, sizeof(int)); |
| 163 | theFile->close(); |
| 164 | delete theFile; |
| 165 | theFileStruct->theFile = 0; |
| 166 | } |
| 167 | } |
| 168 | currentCommitTag = -1; |
| 169 | } |
| 170 | |
| 171 | |
| 172 | int |
no test coverage detected