| 66 | } |
| 67 | |
| 68 | FileDatastore::~FileDatastore() |
| 69 | { |
| 70 | if (dataBase != 0) |
| 71 | delete [] dataBase; |
| 72 | |
| 73 | if (data != 0) |
| 74 | delete [] data; |
| 75 | |
| 76 | |
| 77 | // while (theIDFilesIter != theIDFiles.end()) { |
| 78 | // theIDFilesIter++; |
| 79 | // } |
| 80 | |
| 81 | for (theIDFilesIter = theIDFiles.begin(); theIDFilesIter != theIDFiles.end(); theIDFilesIter++) { |
| 82 | FileDatastoreOutputFile *theFileStruct = theIDFilesIter->second; |
| 83 | fstream *theFile = theFileStruct->theFile; |
| 84 | if (theFile != 0) { |
| 85 | theFile->close(); |
| 86 | delete theFile; |
| 87 | } |
| 88 | delete theFileStruct; |
| 89 | } |
| 90 | |
| 91 | theIDFiles.clear(); |
| 92 | |
| 93 | for (theMatFilesIter = theMatFiles.begin(); theMatFilesIter != theMatFiles.end(); theMatFilesIter++) { |
| 94 | FileDatastoreOutputFile *theFileStruct = theMatFilesIter->second; |
| 95 | fstream *theFile = theFileStruct->theFile; |
| 96 | if (theFile != 0) { |
| 97 | theFile->close(); |
| 98 | delete theFile; |
| 99 | } |
| 100 | delete theFileStruct; |
| 101 | } |
| 102 | theMatFiles.clear(); |
| 103 | for (theVectFilesIter = theVectFiles.begin(); theVectFilesIter != theVectFiles.end(); theVectFilesIter++) { |
| 104 | FileDatastoreOutputFile *theFileStruct = theVectFilesIter->second; |
| 105 | fstream *theFile = theFileStruct->theFile; |
| 106 | if (theFile != 0) { |
| 107 | theFile->close(); |
| 108 | delete theFile; |
| 109 | } |
| 110 | delete theFileStruct; |
| 111 | } |
| 112 | theVectFiles.clear(); |
| 113 | } |
| 114 | |
| 115 | |
| 116 | int |