wisc_db
Public Member Functions | Public Attributes | List of all members
wiscdb::FileHeader Struct Reference

Header metadata for files on disk which contain pages. More...

#include <file.h>

Public Member Functions

bool operator== (const FileHeader &rhs) const
 

Public Attributes

PageId num_pages
 
PageId first_used_page
 
PageId num_free_pages
 
PageId first_free_page
 

Detailed Description

Header metadata for files on disk which contain pages.

Definition at line 22 of file file.h.

Member Function Documentation

bool wiscdb::FileHeader::operator== ( const FileHeader rhs) const
inline

Returns true if this file header is equal to the other.

Parameters
rhsOther file header to compare against.
Returns
True if the other header is equal to this one.

Definition at line 49 of file file.h.

49  {
50  return num_pages == rhs.num_pages &&
51  num_free_pages == rhs.num_free_pages &&
52  first_used_page == rhs.first_used_page &&
53  first_free_page == rhs.first_free_page;
54  }
PageId num_pages
Definition: file.h:26
PageId first_used_page
Definition: file.h:31
PageId first_free_page
Definition: file.h:41
PageId num_free_pages
Definition: file.h:36

Member Data Documentation

PageId wiscdb::FileHeader::first_free_page

Page number of the first free (allocated but unused) page in the file.

Definition at line 41 of file file.h.

PageId wiscdb::FileHeader::first_used_page

Page number of the first used page in the file.

Definition at line 31 of file file.h.

PageId wiscdb::FileHeader::num_free_pages

Number of free pages (allocated but not completely used) in the file.

Definition at line 36 of file file.h.

PageId wiscdb::FileHeader::num_pages

Number of pages allocated in the file.

Definition at line 26 of file file.h.


The documentation for this struct was generated from the following file: