Turi Create  4.0
turi::iarchive_soft_fail Class Reference

When this archive is used to deserialize an object, and the object does not support serialization, failure will only occur at runtime. Otherwise equivalent to turi::iarchive. More...

#include <core/storage/serialization/iarchive.hpp>

Public Member Functions

char read_char ()
 Directly reads a single character from the input stream.
 
void read (char *c, size_t len)
 
template<typename T >
void read_into (T &c)
 
bool fail ()
 Returns true if the underlying stream is in a failure state.
 
 iarchive_soft_fail (std::istream &instream)
 
 iarchive_soft_fail (iarchive &iarc)
 

Detailed Description

When this archive is used to deserialize an object, and the object does not support serialization, failure will only occur at runtime. Otherwise equivalent to turi::iarchive.

Definition at line 147 of file iarchive.hpp.

Constructor & Destructor Documentation

◆ iarchive_soft_fail() [1/2]

turi::iarchive_soft_fail::iarchive_soft_fail ( std::istream &  instream)
inline

Constructs an iarchive_soft_fail object. Takes a reference to a generic std::istream object and associates the archive with it. Reads from the archive will read from the assiciated input stream.

Definition at line 192 of file iarchive.hpp.

◆ iarchive_soft_fail() [2/2]

turi::iarchive_soft_fail::iarchive_soft_fail ( iarchive iarc)
inline

Constructs an iarchive_soft_fail object from an iarchive. Both will share the same input stream

Definition at line 199 of file iarchive.hpp.

Member Function Documentation

◆ read()

void turi::iarchive_soft_fail::read ( char *  c,
size_t  len 
)
inline

Directly reads a sequence of "len" bytes from the input stream into the location pointed to by "c"

Definition at line 162 of file iarchive.hpp.

◆ read_into()

template<typename T >
void turi::iarchive_soft_fail::read_into ( T &  c)
inline

Directly reads a sequence of "len" bytes from the input stream into the location pointed to by "c"

Definition at line 171 of file iarchive.hpp.


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