ADS
Algorithms and Data Structures
Loading...
Searching...
No Matches
ADS::PersistReader Class Reference

the archive that reads the members of a structure [see restore()] More...

#include <ADS/external/Persistence.h>

Public member functions

 PersistReader (std::istream &s, std::string w)
 the reader of the stream \( s \), named \( w \) in the errors
 PersistReader (std::span< const std::byte > b, std::string w, MappedFile m=MappedFile())
 the reader of the bytes \( b \), named \( w \) in the errors, which make its arrays views over them if they lie in the mapping \( m \)
template<class... X>
void operator() (X &... x)
 the members \( x \) read in order
void require (bool c, const char *what) const
 the file rejected, as corrupted in what, unless \( c \)
std::uint32_t version (void) const
 the version in the file of the structure being read, between its persistOldestVersion and its persistVersion

Static public attributes

static constexpr bool loading = true
 a reader, never a writer

Detailed description

the archive that reads the members of a structure [see restore()]

Constructor and destructor documentation

◆ PersistReader() [1/2]

ADS::PersistReader::PersistReader ( std::istream & s,
std::string w )

the reader of the stream \( s \), named \( w \) in the errors

◆ PersistReader() [2/2]

ADS::PersistReader::PersistReader ( std::span< const std::byte > b,
std::string w,
MappedFile m = MappedFile() )

the reader of the bytes \( b \), named \( w \) in the errors, which make its arrays views over them if they lie in the mapping \( m \)

Member function documentation

◆ operator()()

template<class... X>
void ADS::PersistReader::operator() ( X &... x)
inline

the members \( x \) read in order

◆ require()

void ADS::PersistReader::require ( bool c,
const char * what ) const
inline

the file rejected, as corrupted in what, unless \( c \)

◆ version()

std::uint32_t ADS::PersistReader::version ( void ) const
inlinenodiscard

the version in the file of the structure being read, between its persistOldestVersion and its persistVersion

Member data documentation

◆ loading

bool ADS::PersistReader::loading = true
staticconstexpr

a reader, never a writer


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