GraphLab: Distributed Graph-Parallel API
2.1
|
The serialization input archive object which, provided with a reference to an istream, will read from the istream, providing deserialization capabilities. More...
#include <graphlab/serialization/iarchive.hpp>
Public Member Functions | |
char | read_char () |
Directly reads a single character from the input stream. | |
void | read (char *c, size_t l) |
bool | fail () |
Returns true if the underlying stream is in a failure state. | |
iarchive (std::istream &instream) | |
iarchive (const char *buf, size_t len) |
Public Attributes | |
std::istream * | in |
const char * | buf |
size_t | off |
size_t | len |
The serialization input archive object which, provided with a reference to an istream, will read from the istream, providing deserialization capabilities.
Given a source of serialized bytes (written by an graphlab::oarchive), in the form of a standard input stream, you can construct an iarchive object by:
For instance, to deserialize from a file,
Once the iarc object is constructed, Serializable objects can be read from it using the >> stream operator.
Alternatively, data can be directly read from the stream using the iarchive::read() and iarchive::read_char() functions.
For more usage details, see Serialization
The iarchive object should not be used once the associated stream object is closed or is destroyed.
To use this class, include graphlab/serialization/serialization_includes.hpp
Definition at line 77 of file iarchive.hpp.
|
inline |
Constructs an iarchive 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 121 of file iarchive.hpp.
|
inline |
Directly reads a sequence of "len" bytes from the input stream into the location pointed to by "c"
Definition at line 100 of file iarchive.hpp.