| SwatDB
    | 
#include <file.h>


| Public Member Functions | |
| File (Catalog *catalog, BufferManager *buf_mgr, Schema *schema) | |
| Constructor. Initializes common state associated with every file, including catalog, buf_mgr, and schema.  More... | |
| virtual | ~File () | 
| Destructor. Data members are cleaned up, but none of the dynamically allocated data members are not deleted. The underlying Unix file is not deleted. | |
| virtual void | createHeader ()=0 | 
| Allocates and initializes the header. Is a virtual method to be overridden at each derived class. | |
| virtual void | flushHeader ()=0 | 
| Flushes Header Page to disk. Is a virtual method to be overridden at each derived class. | |
| FileId | getMyFid () | 
| Returns the FileId of the File.  More... | |
| Schema * | getSchema () | 
| Returns the schema of the File.  More... | |
| PageId | getHeaderId () | 
| Returns Header PageId.  More... | |
| Protected Member Functions | |
| void | _setMyFid (FileId file_id) | 
| Sets the file_id and the schema fields of this File.  More... | |
| Protected Attributes | |
| FileId | file_id | 
| Catalog * | catalog | 
| BufferManager * | buf_mgr | 
| Schema * | schema | 
| PageId | header_id | 
| Friends | |
| class | Catalog | 
| class | FileManager | 
SwatDB File Class. The base class for all file-type objects in the system. A File is used to represent a relation or index in the system. This base class inludes state and methods that are common to every type of file in the system.
| File::File | ( | Catalog * | catalog, | 
| BufferManager * | buf_mgr, | ||
| Schema * | schema | ||
| ) | 
Constructor. Initializes common state associated with every file, including catalog, buf_mgr, and schema.
| catalog | Pointer to the SwatDB Catalog. Needed for getting file and idex relation files and schema. | 
| buf_mgr | Pointer to the SwatDB Buffer Manager. Needed for de/allocating Pages, for getting and flushing Pages. | 
| schema. | Pointer to Schema for the File. | 
| 
 | protected | 
Sets the file_id and the schema fields of this File.
NOTE: this is called by
| file_id | The File's FileId. | 
| PageId File::getHeaderId | ( | ) | 
| 
 | protected | 
Pointer to the SwatDB BufferManager
| 
 | protected | 
 1.8.13
 1.8.13