#include <RecordFileManager.h>
Public Member Functions | |
ReturnCode | createFile (const char *fileName, uint recordSize) |
Create a new record file. | |
ReturnCode | removeFile (const char *fileName) |
Removes (deletes) a record file. | |
ReturnCode | openFile (const char *fileName, RecordFileHandle **fileHandle) |
Opens an existing record file. | |
ReturnCode | closeFile (RecordFileHandle *fileHandle) |
Closes an open record file. | |
Static Public Member Functions | |
static RecordFileManager * | getInstance () |
Gets the singleton instance of this class. |
The main class for the record manager component of DavisDB. It handles creation, deletion, opening, and closing of record files. This is intended to be a singleton class. Use RecordFileManager::getInstance to obtain a pointer to the singleton instance.
ReturnCode RecordFileManager::createFile | ( | const char * | fileName, | |
uint | recordSize | |||
) |
Create a new record file.
fileName | The name of the file to create | |
recordSize | The size in bytes of the file's records |
ReturnCode RecordFileManager::removeFile | ( | const char * | fileName | ) |
Removes (deletes) a record file.
fileName | The name of the file to delete |
ReturnCode RecordFileManager::openFile | ( | const char * | fileName, | |
RecordFileHandle ** | fileHandle | |||
) |
Opens an existing record file.
fileName | The name of the file to open | |
fileHandle | Out parameter used to return the record file handle |
ReturnCode RecordFileManager::closeFile | ( | RecordFileHandle * | fileHandle | ) |
Closes an open record file.
fileHandle | The record file handle for the open file |
RecordFileManager * RecordFileManager::getInstance | ( | ) | [static] |
Gets the singleton instance of this class.
This method is already implemented for you.