pstore2
Public Member Functions | List of all members
pstore::serialize::archive::database_reader Class Reference

An archive-reader which reads data from a database. More...

#include <db_archive.hpp>

Public Member Functions

 database_reader (pstore::database const &db, pstore::address const addr) noexcept
 Constructs the reader using an input database and an address. More...
 
pstore::database const & get_db () const noexcept
 
pstore::address get_address () const noexcept
 
void skip (std::size_t const distance) noexcept
 
template<typename Ty , typename = typename std::enable_if< std::is_standard_layout<Ty>::value>::type>
void get (Ty &v)
 Reads a single instance of a standard-layout type Ty from the current store address. More...
 
template<typename SpanType , typename = typename std::enable_if<std::is_standard_layout< typename SpanType::element_type>::value>::type>
void getn (SpanType span)
 Reads a span of a trivial type from the current store address. More...
 

Detailed Description

An archive-reader which reads data from a database.

Constructor & Destructor Documentation

◆ database_reader()

pstore::serialize::archive::database_reader::database_reader ( pstore::database const &  db,
pstore::address const  addr 
)
inlinenoexcept

Constructs the reader using an input database and an address.

Parameters
dbThe database from which data is read.
addrThe start address from which data is read.

Member Function Documentation

◆ get()

template<typename Ty , typename >
void pstore::serialize::archive::database_reader::get ( Ty &  v)

Reads a single instance of a standard-layout type Ty from the current store address.

Parameters
vUninitialized memory into which the new instance of Ty should be placed.
Template Parameters
TyA standard-layout type.

◆ getn()

template<typename SpanType , typename >
void pstore::serialize::archive::database_reader::getn ( SpanType  span)

Reads a span of a trivial type from the current store address.

Parameters
spanA span of uninitialized memory into which the data will be placed.
Template Parameters
SpanTypeA GSL span which describes a range of uninitialized memory.

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