MySQL  8.0.12
Source Code Documentation
page_id_t Class Reference

Page identifier. More...

#include <buf0types.h>

Public Member Functions

 page_id_t ()
 Default constructor. More...
 
 page_id_t (space_id_t space, page_no_t page_no)
 Constructor from (space, page_no). More...
 
space_id_t space () const
 Retrieve the tablespace id. More...
 
page_no_t page_no () const
 Retrieve the page number. More...
 
ulint fold () const
 Retrieve the fold value. More...
 
void copy_from (const page_id_t &src)
 Copy the values from a given page_id_t object. More...
 
void reset (space_id_t space, page_no_t page_no)
 Reset the values from a (space, page_no). More...
 
void set_page_no (page_no_t page_no)
 Reset the page number only. More...
 
bool equals_to (const page_id_t &a) const
 Check if a given page_id_t object is equal to the current one. More...
 

Private Member Functions

void operator= (const page_id_t &)
 

Private Attributes

space_id_t m_space
 Tablespace id. More...
 
page_no_t m_page_no
 Page number. More...
 
ulint m_fold
 A fold value derived from m_space and m_page_no, used in hashing. More...
 

Friends

std::ostream & operator<< (std::ostream &out, const page_id_t &page_id)
 Declare the overloaded global operator<< as a friend of this class. More...
 

Detailed Description

Page identifier.

Constructor & Destructor Documentation

◆ page_id_t() [1/2]

page_id_t::page_id_t ( )
inline

Default constructor.

◆ page_id_t() [2/2]

page_id_t::page_id_t ( space_id_t  space,
page_no_t  page_no 
)
inline

Constructor from (space, page_no).

Parameters
[in]spacetablespace id
[in]page_nopage number

Member Function Documentation

◆ copy_from()

void page_id_t::copy_from ( const page_id_t src)
inline

Copy the values from a given page_id_t object.

Parameters
[in]srcpage id object whose values to fetch

◆ equals_to()

bool page_id_t::equals_to ( const page_id_t a) const
inline

Check if a given page_id_t object is equal to the current one.

Parameters
[in]apage_id_t object to compare
Returns
true if equal

◆ fold()

ulint page_id_t::fold ( ) const
inline

Retrieve the fold value.

Returns
fold value

◆ operator=()

void page_id_t::operator= ( const page_id_t )
private

◆ page_no()

page_no_t page_id_t::page_no ( ) const
inline

Retrieve the page number.

Returns
page number

◆ reset()

void page_id_t::reset ( space_id_t  space,
page_no_t  page_no 
)
inline

Reset the values from a (space, page_no).

Parameters
[in]spacetablespace id
[in]page_nopage number

◆ set_page_no()

void page_id_t::set_page_no ( page_no_t  page_no)
inline

Reset the page number only.

Parameters
[in]page_nopage number

◆ space()

space_id_t page_id_t::space ( ) const
inline

Retrieve the tablespace id.

Returns
tablespace id

Friends And Related Function Documentation

◆ operator<<

std::ostream& operator<< ( std::ostream &  out,
const page_id_t page_id 
)
friend

Declare the overloaded global operator<< as a friend of this class.

Refer to the global declaration for further details. Print the given page_id_t object.

Parameters
[in,out]outthe output stream
[in]page_idthe page_id_t object to be printed
Returns
the output stream
Parameters
[in,out]outthe output stream
[in]page_idthe page_id_t object to be printed
Returns
the output stream

Member Data Documentation

◆ m_fold

ulint page_id_t::m_fold
mutableprivate

A fold value derived from m_space and m_page_no, used in hashing.

◆ m_page_no

page_no_t page_id_t::m_page_no
private

Page number.

◆ m_space

space_id_t page_id_t::m_space
private

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