taco-db  0.1.0
Public Member Functions | Private Attributes | Static Private Attributes | Friends | List of all members
taco::PageHeaderData Class Reference

PageHeaderData defines the header of every virtual file data page. More...

#include <storage/FileManager.h>

Public Member Functions

constexpr bool IsAllocated () const
 
constexpr bool IsMetaPage () const
 
constexpr bool IsVFilePage () const
 
constexpr bool IsFMMetaPage () const
 
constexpr bool IsVFileMetaPage () const
 
constexpr bool IsVFileDataPage () const
 
PageNumber GetNextPageNumber () const
 Returns the next page number. More...
 
PageNumber GetPrevPageNumber () const
 Returns the previous page number. More...
 
constexpr FileId GetFileId () const
 

Private Attributes

uint16_t m_flags
 
uint16_t m_reserved
 
FileId m_fid
 
atomic< PageNumberm_prev_pid
 
atomic< PageNumberm_next_pid
 

Static Private Attributes

static constexpr uint16_t FLAG_META_PAGE = 0x1
 
static constexpr uint16_t FLAG_VFILE_PAGE = 0x2
 

Friends

class FileManager
 
class File
 

Detailed Description

PageHeaderData defines the header of every virtual file data page.

Any class other than the FileManager shall NEVER modify the PageHeaderData but may inspect its content using the member functions.

Impl. note: currently sizeof(PageHeaderData) == 16, but do not assume that any place other than the FileManager.

Member Function Documentation

◆ GetFileId()

constexpr FileId taco::PageHeaderData::GetFileId ( ) const
inlineconstexpr

◆ GetNextPageNumber()

PageNumber taco::PageHeaderData::GetNextPageNumber ( ) const
inline

Returns the next page number.

You may ignore any concurrency control related description.

◆ GetPrevPageNumber()

PageNumber taco::PageHeaderData::GetPrevPageNumber ( ) const
inline

Returns the previous page number.

You may ignore any concurrency control related description.

◆ IsAllocated()

constexpr bool taco::PageHeaderData::IsAllocated ( ) const
inlineconstexpr

◆ IsFMMetaPage()

constexpr bool taco::PageHeaderData::IsFMMetaPage ( ) const
inlineconstexpr

◆ IsMetaPage()

constexpr bool taco::PageHeaderData::IsMetaPage ( ) const
inlineconstexpr

◆ IsVFileDataPage()

constexpr bool taco::PageHeaderData::IsVFileDataPage ( ) const
inlineconstexpr

◆ IsVFileMetaPage()

constexpr bool taco::PageHeaderData::IsVFileMetaPage ( ) const
inlineconstexpr

◆ IsVFilePage()

constexpr bool taco::PageHeaderData::IsVFilePage ( ) const
inlineconstexpr

Friends And Related Function Documentation

◆ File

friend class File
friend

◆ FileManager

friend class FileManager
friend

Member Data Documentation

◆ FLAG_META_PAGE

constexpr uint16_t taco::PageHeaderData::FLAG_META_PAGE = 0x1
staticconstexprprivate

◆ FLAG_VFILE_PAGE

constexpr uint16_t taco::PageHeaderData::FLAG_VFILE_PAGE = 0x2
staticconstexprprivate

◆ m_fid

FileId taco::PageHeaderData::m_fid
private

◆ m_flags

uint16_t taco::PageHeaderData::m_flags
private

◆ m_next_pid

atomic<PageNumber> taco::PageHeaderData::m_next_pid
private

◆ m_prev_pid

atomic<PageNumber> taco::PageHeaderData::m_prev_pid
private

◆ m_reserved

uint16_t taco::PageHeaderData::m_reserved
private

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