PagedArray.cpp
/**
 * Prepares to exit the program by writing all pages to disk
 * @param filename The final output filename
 */
Prepares to exit the program by writing all pages to disk
@param filename The final output filename
Prepares to exit the program by writing all pages to disk @param filename The final output filename
void PagedArray::cleanup(std::string filename) {
    int i;
    for (i = 0; i < NUMPAGES; i++) {
        if (loadedPages[i] != -1)
            FileHandler::writeNumbers(file, pageContainer[i], loadedPages[i]);
    }
    FileHandler::createFinalFile(file, filename);
}
void PagedArray :: cleanup ( std :: string filename ) { int i ; for ( i = 0 ; i < NUMPAGES ; i ++ ) { if ( loadedPages [ i ] != -1 ) FileHandler :: writeNumbers ( file , pageContainer [ i ] , loadedPages [ i ] ) ; } FileHandler :: createFinalFile ( file , filename ) ; }
Prepares to exit the program by writing all pages to disk
 @param filename The final output filename
Prepares to exit the program by writing all pages to disk @param filename The final output filename