pstore2
Public Types | Public Member Functions | Static Public Member Functions | Static Public Attributes | List of all members
pstore::address Struct Reference

Public Types

using offset_type = std::uint_least32_t
 
using segment_type = std::uint_least16_t
 
using value_type = std::uint64_t
 

Public Member Functions

constexpr address (value_type const absolute) noexcept
 
constexpr address (segment_type const segment, offset_type const offset) noexcept
 
constexpr value_type absolute () const noexcept
 
address operator++ () noexcept
 
address operator++ (int) noexcept
 
address operator-- () noexcept
 
address operator-- (int) noexcept
 
address operator+= (value_type const distance) noexcept
 
address operator-= (value_type const distance) noexcept
 
address operator|= (value_type const mask) noexcept
 
address operator &= (value_type const mask) noexcept
 
constexpr segment_type segment () const noexcept
 
constexpr offset_type offset () const noexcept
 

Static Public Member Functions

static constexpr address null () noexcept
 
static constexpr address max () noexcept
 The largest legal absolute address.
 

Static Public Attributes

static constexpr unsigned offset_number_bits = 22U
 An offset is 0-2^22 (4 megabytes)
 
static constexpr unsigned segment_number_bits = 16U
 A segment number is 0-2^16.
 
static constexpr unsigned total_bits = offset_number_bits + segment_number_bits
 
static constexpr offset_type const max_offset
 The largest legal offset value. More...
 
static constexpr segment_type const max_segment = (1U << segment_number_bits) - 1U
 The largest legal segment value.
 
static constexpr value_type const segment_size = value_type{max_offset} + UINT64_C (1)
 The number of bytes in a segment.
 

Member Data Documentation

◆ max_offset

constexpr address::offset_type const pstore::address::max_offset
static
Initial value:
=
(UINT64_C (1) << offset_number_bits) - UINT64_C (1)

The largest legal offset value.


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