BadgerDB
 All Classes Namespaces Functions Variables Typedefs Friends Pages
Public Member Functions | Public Attributes | List of all members
badgerdb::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 24 of file file.h.

Member Function Documentation

bool badgerdb::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 51 of file file.h.

51  {
52  return num_pages == rhs.num_pages &&
53  num_free_pages == rhs.num_free_pages &&
54  first_used_page == rhs.first_used_page &&
55  first_free_page == rhs.first_free_page;
56  }
PageId first_free_page
Definition: file.h:43
PageId num_pages
Definition: file.h:28
PageId num_free_pages
Definition: file.h:38
PageId first_used_page
Definition: file.h:33

Member Data Documentation

PageId badgerdb::FileHeader::first_free_page

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

Definition at line 43 of file file.h.

PageId badgerdb::FileHeader::first_used_page

Page number of the first used page in the file.

Definition at line 33 of file file.h.

PageId badgerdb::FileHeader::num_free_pages

Number of free pages (allocated but unused) in the file.

Definition at line 38 of file file.h.

PageId badgerdb::FileHeader::num_pages

Number of pages allocated in the file.

Definition at line 28 of file file.h.


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