OmniSciDB  a5dc49c757
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
File_Namespace::Page Struct Reference

A logical page (Page) belongs to a file on disk. More...

#include <Page.h>

Public Member Functions

 Page (int32_t fileId, size_t pageNum)
 page number More...
 
 Page ()
 
bool isValid ()
 
bool operator< (const Page other) const
 

Public Attributes

int32_t fileId
 
size_t pageNum
 unique identifier of the owning file More...
 

Detailed Description

A logical page (Page) belongs to a file on disk.

A Page struct stores the file id for the file it belongs to, and it stores its page number and number of used bytes within the page.

Note: the number of used bytes should not be greater than the page size. The page size is determined by the containing file.

Definition at line 46 of file Page.h.

Constructor & Destructor Documentation

File_Namespace::Page::Page ( int32_t  fileId,
size_t  pageNum 
)
inline

page number

Constructor

Definition at line 51 of file Page.h.

int32_t fileId
Definition: Page.h:47
size_t pageNum
unique identifier of the owning file
Definition: Page.h:48
File_Namespace::Page::Page ( )
inline

Definition at line 52 of file Page.h.

52 : fileId(-1), pageNum(0) {}
int32_t fileId
Definition: Page.h:47
size_t pageNum
unique identifier of the owning file
Definition: Page.h:48

Member Function Documentation

bool File_Namespace::Page::isValid ( )
inline

Definition at line 54 of file Page.h.

References fileId.

54 { return fileId >= 0; }
int32_t fileId
Definition: Page.h:47
bool File_Namespace::Page::operator< ( const Page  other) const
inline

Definition at line 56 of file Page.h.

References fileId, and pageNum.

56  {
57  if (fileId != other.fileId) {
58  return fileId < other.fileId;
59  }
60  return pageNum < other.pageNum;
61  }
int32_t fileId
Definition: Page.h:47
size_t pageNum
unique identifier of the owning file
Definition: Page.h:48

Member Data Documentation


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