fpmas 1.6
Public Member Functions | List of all members
fpmas::api::io::Breakpoint< T > Class Template Referenceabstract

#include <breakpoint.h>

Inheritance diagram for fpmas::api::io::Breakpoint< T >:
Inheritance graph
[legend]

Public Member Functions

virtual void dump (std::ostream &stream, const T &object)=0
 
virtual void load (std::istream &stream, T &object)=0
 

Detailed Description

template<typename T>
class fpmas::api::io::Breakpoint< T >

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).

Template Parameters
Ttype of data to save

Member Function Documentation

◆ dump()

template<typename T >
virtual void fpmas::api::io::Breakpoint< T >::dump ( std::ostream &  stream,
const T &  object 
)
pure virtual

Dumps data to the specified stream.

Parameters
streamoutput stream
objectobject to save

Implemented in fpmas::io::Breakpoint< T >.

◆ load()

template<typename T >
virtual void fpmas::api::io::Breakpoint< T >::load ( std::istream &  stream,
T &  object 
)
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.

Parameters
streaminput stream
objectT instance in which read data will be loaded

Implemented in fpmas::io::Breakpoint< T >.


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