Implementation of the STELLA Savepoint. More...
#include <Savepoint.h>
Public Member Functions | |
Savepoint () | |
Construct empty savepoint with name name | |
void | Init (const std::string &name) |
Initialize the savepoint. More... | |
Savepoint (const boost::shared_ptr< SavepointImpl > &savepointImpl) | |
Construct with SavepointImpl. | |
Savepoint (const Savepoint &other) | |
Copy constructor. | |
Savepoint & | operator= (const Savepoint &other) |
Copy assignment. | |
const std::string & | name () const |
Access to the name. | |
const MetainfoSet & | metainfo () const |
Access to the metainfo. More... | |
bool | operator== (const Savepoint &other) const |
Compare equal. | |
bool | operator!= (const Savepoint &other) const |
Compare unequal. | |
std::string | ToString () const |
Convert to string. | |
void | setImpl (const boost::shared_ptr< SavepointImpl > &savepointImpl) |
Set implementation pointer. | |
boost::shared_ptr< SavepointImpl > & | getImpl () |
Get implementation pointer. | |
const boost::shared_ptr< SavepointImpl > & | getImpl () const |
void | AddMetainfo (const std::string &key, const bool &value) |
Add metainformation to the savepoint. More... | |
void | AddMetainfo (const std::string &key, const int &value) |
void | AddMetainfo (const std::string &key, const float &value) |
void | AddMetainfo (const std::string &key, const double &value) |
void | AddMetainfo (const std::string &key, const std::string &value) |
void | AddMetainfo (const std::string &key, const char *value) |
Friends | |
std::ostream & | operator<< (std::ostream &out, const Savepoint &sp) |
Convert to stream. | |
Implementation of the STELLA Savepoint.
Definition at line 30 of file Savepoint.h.
void serialbox::stella::Savepoint::AddMetainfo | ( | const std::string & | key, |
const bool & | value | ||
) |
Add metainformation to the savepoint.
After this call a new key-value pair is registered as metainformation in the savepoint. The order in which the metainformation is added is irrelevant.
key | The key of the new metainformation |
value | The value of the new metainformaiton |
SerializationException | The key exists already |
Definition at line 65 of file Savepoint.cpp.
void serialbox::stella::Savepoint::Init | ( | const std::string & | name | ) |
Initialize the savepoint.
This method prepares the savepoint for usage and gives a name, which is the only required information for the savepoint to be usable. Metainformation can be added after the initialization has been performed.
A savepoint can be initialized multiple times. In this case, every initialization removes all metainformation and sets a new name.
name | The name of the savepoint |
Definition at line 40 of file Savepoint.cpp.
|
inline |
Access to the metainfo.
The meta-information is constructed from the underlying MetainfoMapImpl of the SavepointImpl.
Definition at line 82 of file Savepoint.h.