Engine.
More...
#include <persist.h>
Collaboration diagram for Engine:
Public Types
These are the modes the Persistence::Engine can work in.
More...
Public Member Functions
Engine (std::iostream &stream,
EngineMode mode, bool compress=true) THROWS(PersistException)
Constructs a Persistence::Engine with the specified stream in the given mode.
More...
This Flushes the buffers and closes the Persistence::Engine this must happen before the underlying stream is shut down.
More...
This says there are more objects to deserialize.
More...
void
write (int8 i) THROWS(PersistException)
void
write (uint8 i) THROWS(PersistException)
void
write (int16 i) THROWS(PersistException)
void
write (uint16 i) THROWS(PersistException)
void
write (int32 i) THROWS(PersistException)
void
write (uint32 i) THROWS(PersistException)
void
write (float i) THROWS(PersistException)
void
write (double i) THROWS(PersistException)
void
write (const
String &str) THROWS(PersistException)
void
write (const std::string &str) THROWS(PersistException)
void
writeBinary (const uint8 *data, const uint32 size) THROWS(PersistException)
reads a
BaseObject into a pointer allocating memory for the object if necessary.
More...
void
read (int8 &i) THROWS(PersistException)
void
read (uint8 &i) THROWS(PersistException)
void
read (int16 &i) THROWS(PersistException)
void
read (uint16 &i) THROWS(PersistException)
void
read (int32 &i) THROWS(PersistException)
void
read (uint32 &i) THROWS(PersistException)
void
read (float &i) THROWS(PersistException)
void
read (double &i) THROWS(PersistException)
void
read (std::string &str) THROWS(PersistException)
void
readBinary (uint8 *data, uint32 size) THROWS(PersistException)
Private Types
Typedefs for the Persistence::BaseObject support.
More...
Private Member Functions
reads the actual object data into a pre-instantiated object pointer by calling the read function of the derived class.
More...
reads in a class name, and caches it into the ClassMap.
More...
Private Attributes
Related Functions
(Note that these are not member functions.)
template<class T >
The following are templated classes.
More...
template<class T >
template<class T >
template<class T >
template<class Key , class Value >
template<class Key , class Value >
template<class x , class y >
template<class x , class y >
Detailed Description
Engine.
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.
- Author
- Daniel Silverstone stream serialization of persistent classes.
Definition at line 252 of file persist.h.
Member Typedef Documentation
Typedefs for the Persistence::BaseObject support.
Definition at line 383 of file persist.h.
Member Enumeration Documentation
These are the modes the Persistence::Engine can work in.
Enumerator |
---|
modeRead |
modeWrite |
Definition at line 258 of file persist.h.
Constructor & Destructor Documentation
Engine::Engine
(
std::iostream &
stream,
bool
compress = true
)
Constructs a Persistence::Engine with the specified stream in the given mode.
The stream must be initialised properly prior to this call or problems will ensue. If built using zlib compress can be used to enable compression
virtual Engine::~Engine
(
)
virtual |
Member Function Documentation
This says there are more objects to deserialize.
reads a BaseObject into a reference overwriting the object.
reads a BaseObject into a pointer allocating memory for the object if necessary.
void Engine::read
(
int8 &
i )
inline |
void Engine::read
(
uint8 &
i )
inline |
void Engine::read
(
int16 &
i )
inline |
void Engine::read
(
uint16 &
i )
inline |
void Engine::read
(
int32 &
i )
inline |
void Engine::read
(
uint32 &
i )
inline |
void Engine::read
(
float &
i )
inline |
void Engine::read
(
double &
i )
inline |
void Engine::read
(
String &
str )
void Engine::read
(
std::string &
str )
void Engine::readBinary
(
uint8 *
data,
uint32
size
)
const
String Engine::readClass
(
)
private |
reads in a class name, and caches it into the ClassMap.
reads the actual object data into a pre-instantiated object pointer by calling the read function of the derived class.
This Flushes the buffers and closes the Persistence::Engine this must happen before the underlying stream is shut down.
void Engine::write
(
int8
i )
inline |
void Engine::write
(
uint8
i )
inline |
void Engine::write
(
int16
i )
inline |
void Engine::write
(
uint16
i )
inline |
void Engine::write
(
int32
i )
inline |
void Engine::write
(
uint32
i )
inline |
void Engine::write
(
float
i )
inline |
void Engine::write
(
double
i )
inline |
void Engine::write
(
const
String &
str )
void Engine::write
(
const std::string &
str )
void Engine::writeBinary
(
const uint8 *
data,
const uint32
size
)
Friends And Related Function Documentation
template<class T >
typename std::vector< T > const &
ob
)
related |
The following are templated classes.
serialize a vector of some serializable content to the engine
Definition at line 490 of file persist.h.
template<class T >
typename std::deque< T > const &
ob
)
related |
serialize a deque of some serializable content to the engine
Definition at line 521 of file persist.h.
template<class Key , class Value >
typename std::map< Key, Value > const &
ob
)
related |
serialize a map with keys/values which both are serializeable to an engine.
Definition at line 556 of file persist.h.
template<class x , class y >
std::pair< x, y > &
ob
)
related |
serialize a pair of some serializable content to the engine.
Definition at line 588 of file persist.h.
std::string &
ob
)
related |
template<class T >
typename std::vector< T > &
ob
)
related |
deserialize a vector of deserializable content from an engine.
Definition at line 504 of file persist.h.
template<class T >
typename std::deque< T > &
ob
)
related |
deserialize a deque of deserializable content from an engine.
Definition at line 535 of file persist.h.
template<class Key , class Value >
typename std::map< Key, Value > &
ob
)
related |
deserialize a map with keys/values which both are serializeable from an engine.
Definition at line 570 of file persist.h.
template<class x , class y >
std::pair< x, y > &
ob
)
related |
deserialize a pair of some serializable content to the engine.
Definition at line 599 of file persist.h.
Field Documentation
The mode of the engine.
read or write
Definition at line 378 of file persist.h.
std::iostream& Engine::myUnderlyingStream
private |
The underlying stream.
Definition at line 373 of file persist.h.
bool Engine::use_compression
private |
The documentation for this class was generated from the following file:
Generated on Dec 21, 2017 for
commoncpp2-1.8.1,
ccrtp-1.7.2,
libzrtpcpp-2.3.4,
ccscript3-1.1.7,
ccaudio2-1.0.0 and
bayonne2-2.3.2
(after installation in /usr/local/)
by
doxygen 1.8.6