![]() |
fpmas 1.6
|
#include <breakpoint.h>
Public Member Functions | |
virtual void | dump (std::ostream &stream, const T &object)=0 |
virtual void | load (std::istream &stream, T &object)=0 |
Breakpoint API.
A breakpoint offers features to save and load the state of any instance of type T
to and from C++ standard I/O streams (std::fstream and std::stringstream can notably be useful).
T | type of data to save |
|
pure virtual |
Dumps data
to the specified stream
.
stream | output stream |
object | object to save |
Implemented in fpmas::io::Breakpoint< T >.
|
pure virtual |
Loads data from the specified stream
, and loads it "into" the specified object
instance.
So for example, if std::vector<int>
is used for T
, there is no guarantee that the specified data
will be effectively cleared before data is loaded into it. Such details are implementation defined, potentially depending on the type T
.
stream | input stream |
object | T instance in which read data will be loaded |
Implemented in fpmas::io::Breakpoint< T >.