#include <persist.h>
Public Types | |
enum | EngineMode { modeRead, modeWrite } |
These are the modes the Persistence::Engine can work in. | |
modeRead | |
modeWrite | |
Public Member Functions | |
PersistEngine (std::iostream &stream, EngineMode mode) throw (PersistException) | |
Constructs a Persistence::Engine with the specified stream in the given mode. | |
void | read (std::string &str) throw (PersistException) |
void | read (bool &i) throw (PersistException) |
void | read (double &i) throw (PersistException) |
void | read (float &i) throw (PersistException) |
void | read (uint32_t &i) throw (PersistException) |
void | read (int32_t &i) throw (PersistException) |
void | read (uint16_t &i) throw (PersistException) |
void | read (int16_t &i) throw (PersistException) |
void | read (uint8_t &i) throw (PersistException) |
void | read (int8_t &i) throw (PersistException) |
void | read (PersistObject *&object) throw (PersistException) |
reads a PersistObject into a pointer allocating memory for the object if necessary. | |
void | read (PersistObject &object) throw (PersistException) |
reads a PersistObject into a reference overwriting the object. | |
void | readBinary (uint8_t *data, uint32_t size) throw (PersistException) |
void | write (std::string &str) throw (PersistException) |
void | write (bool i) throw (PersistException) |
void | write (double i) throw (PersistException) |
void | write (float i) throw (PersistException) |
void | write (uint32_t i) throw (PersistException) |
void | write (int32_t i) throw (PersistException) |
void | write (uint16_t i) throw (PersistException) |
void | write (int16_t i) throw (PersistException) |
void | write (uint8_t i) throw (PersistException) |
void | write (int8_t i) throw (PersistException) |
void | write (PersistObject *object) throw (PersistException) |
writes a PersistObject from a pointer. | |
void | write (PersistObject &object) throw (PersistException) |
writes a PersistObject from a reference. | |
void | writeBinary (uint8_t *data, uint32_t size) throw (PersistException) |
Related Functions | |
(Note that these are not member functions.) | |
template<class x, class y> | |
PersistEngine & | operator<< (PersistEngine &ar, std::pair< x, y > &ob) throw(PersistException) |
template<class Key, class Value> | |
PersistEngine & | operator<< (PersistEngine &ar, typename std::map< Key, Value > &ob) throw(PersistException) |
template<class T> | |
PersistEngine & | operator<< (PersistEngine &ar, typename std::deque< T > &ob) throw(PersistException) |
template<class T> | |
PersistEngine & | operator<< (PersistEngine &ar, typename std::vector< T > &ob) throw(PersistException) |
PersistEngine & | operator<< (PersistEngine &ar, bool ob) throw(PersistException) |
PersistEngine & | operator<< (PersistEngine &ar, std::string ob) throw(PersistException) |
PersistEngine & | operator<< (PersistEngine &ar, double ob) throw(PersistException) |
PersistEngine & | operator<< (PersistEngine &ar, float ob) throw(PersistException) |
PersistEngine & | operator<< (PersistEngine &ar, uint32_t ob) throw(PersistException) |
PersistEngine & | operator<< (PersistEngine &ar, int32_t ob) throw(PersistException) |
PersistEngine & | operator<< (PersistEngine &ar, uint16_t ob) throw(PersistException) |
PersistEngine & | operator<< (PersistEngine &ar, int16_t ob) throw(PersistException) |
PersistEngine & | operator<< (PersistEngine &ar, uint8_t ob) throw(PersistException) |
PersistEngine & | operator<< (PersistEngine &ar, int8_t ob) throw(PersistException) |
PersistEngine & | operator<< (PersistEngine &ar, PersistObject *ob) throw(PersistException) |
PersistEngine & | operator<< (PersistEngine &ar, PersistObject &ob) throw(PersistException) |
template<class x, class y> | |
PersistEngine & | operator>> (PersistEngine &ar, std::pair< x, y > &ob) throw(PersistException) |
template<class Key, class Value> | |
PersistEngine & | operator>> (PersistEngine &ar, typename std::map< Key, Value > &ob) throw(PersistException) |
template<class T> | |
PersistEngine & | operator>> (PersistEngine &ar, typename std::deque< T > &ob) throw(PersistException) |
template<class T> | |
PersistEngine & | operator>> (PersistEngine &ar, typename std::vector< T > &ob) throw(PersistException) |
PersistEngine & | operator>> (PersistEngine &ar, bool &ob) throw(PersistException) |
PersistEngine & | operator>> (PersistEngine &ar, std::string &ob) throw(PersistException) |
PersistEngine & | operator>> (PersistEngine &ar, double &ob) throw(PersistException) |
PersistEngine & | operator>> (PersistEngine &ar, float &ob) throw(PersistException) |
PersistEngine & | operator>> (PersistEngine &ar, uint32_t &ob) throw(PersistException) |
PersistEngine & | operator>> (PersistEngine &ar, int32_t &ob) throw(PersistException) |
PersistEngine & | operator>> (PersistEngine &ar, uint16_t &ob) throw(PersistException) |
PersistEngine & | operator>> (PersistEngine &ar, int16_t &ob) throw(PersistException) |
PersistEngine & | operator>> (PersistEngine &ar, uint8_t &ob) throw(PersistException) |
PersistEngine & | operator>> (PersistEngine &ar, int8_t &ob) throw(PersistException) |
PersistEngine & | operator>> (PersistEngine &ar, PersistObject *&ob) throw(PersistException) |
PersistEngine & | operator>> (PersistEngine &ar, PersistObject &ob) throw(PersistException) |
This class constructs on a standard C++ STL stream and then operates in the mode specified. The stream passed into the constructor must be a binary mode to function properly.
Definition at line 190 of file persist.h.
ucommon::PersistEngine::PersistEngine | ( | std::iostream & | stream, | |
EngineMode | mode | |||
) | throw (PersistException) |
Constructs a Persistence::Engine with the specified stream in the given mode.
The stream must be initialized properly prior to this call or problems will ensue.
PersistEngine & operator<< | ( | PersistEngine & | ar, | |
std::pair< x, y > & | ob | |||
) | throw(PersistException) [related] |
PersistEngine & operator<< | ( | PersistEngine & | ar, | |
typename std::map< Key, Value > & | ob | |||
) | throw(PersistException) [related] |
PersistEngine & operator<< | ( | PersistEngine & | ar, | |
typename std::deque< T > & | ob | |||
) | throw(PersistException) [related] |
PersistEngine & operator<< | ( | PersistEngine & | ar, | |
typename std::vector< T > & | ob | |||
) | throw(PersistException) [related] |
PersistEngine & operator>> | ( | PersistEngine & | ar, | |
std::pair< x, y > & | ob | |||
) | throw(PersistException) [related] |
PersistEngine & operator>> | ( | PersistEngine & | ar, | |
typename std::map< Key, Value > & | ob | |||
) | throw(PersistException) [related] |
PersistEngine & operator>> | ( | PersistEngine & | ar, | |
typename std::deque< T > & | ob | |||
) | throw(PersistException) [related] |
PersistEngine & operator>> | ( | PersistEngine & | ar, | |
typename std::vector< T > & | ob | |||
) | throw(PersistException) [related] |