pstore2
Public Member Functions | Public Attributes | List of all members
pstore::extent< T > Struct Template Reference

An extent is a contiguous area of storage reserved for a data BLOB, represented as a range. More...

#include <address.hpp>

Public Member Functions

constexpr extent (typed_address< T > const a, std::uint64_t const s) noexcept
 
 extent (extent const &rhs) noexcept=default
 
 extent (extent &&rhs) noexcept=default
 
extentoperator= (extent const &) noexcept=default
 
extentoperator= (extent &&) noexcept=default
 

Public Attributes

typed_address< T > addr = typed_address<T>::null ()
 The address of the data associated with this extent.
 
std::uint64_t size = UINT64_C (0)
 The size of the data associated with this extent. More...
 

Detailed Description

template<typename T>
struct pstore::extent< T >

An extent is a contiguous area of storage reserved for a data BLOB, represented as a range.

This type is used to represent a BLOB of data: be it either an index key or an associated value.

Constructor & Destructor Documentation

◆ extent()

template<typename T>
constexpr pstore::extent< T >::extent ( typed_address< T > const  a,
std::uint64_t const  s 
)
inlinenoexcept
Parameters
aThe address of the start of the data.
sThe number of bytes of data.

Member Data Documentation

◆ size

template<typename T>
std::uint64_t pstore::extent< T >::size = UINT64_C (0)

The size of the data associated with this extent.

Note
This value gives a number of bytes, not a number of instances of type T. This is because extents are often used to represent variable-length data structures where the actual size can't be statically determined from the size of T.

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