tobicore
7.0.0
|
TOBI iC serializer interface. More...
#include <tobiic/ICSerializer.hpp>
Public Member Functions | |
ICSerializer (void) | |
Constructor. | |
ICSerializer (ICMessage *const message) | |
Constructor. | |
virtual | ~ICSerializer (void) |
Destructor. | |
ICSerializer * | SetMessage (ICMessage *const message) |
Sets the associated ICMessage. | |
virtual std::string * | Serialize (std::string *buffer)=0 |
Serializes to std::string. | |
virtual std::string * | Deserialize (std::string *const buffer)=0 |
Deserializes from std::string. | |
virtual std::string | SerializeCp (void) |
Serializes to std::string. | |
virtual void | DeserializeCp (const std::string &buffer) |
Deserializes from std::string. | |
virtual char * | SerializeCh (char *buffer, const unsigned int bsize) |
Serializes to a char array. | |
virtual const char * | DeserializeCh (const char *buffer, const unsigned int bsize) |
Deserializes from a char array. |
Public Attributes | |
ICMessage * | message |
Pointer to the associated ICMessage. |
TOBI iC serializer interface.
An ICMessage object embeds a complex and recursive data structure. In order to transmit an ICMessage from one process to another, it is then necessary to serialize its data structure to a format that might be transferred, for examples, trough a socket.
The ICSerializer interface can then be derived to implement different flavors of serialization formats. Ad today only XML is supported by the concrete ICSerializerRapid class.
Definition at line 37 of file ICSerializer.hpp.
ICSerializer::ICSerializer | ( | ICMessage *const | message | ) |
Constructor.
Definition at line 30 of file ICSerializer.cpp.
|
pure virtual |
Deserializes from std::string.
Implemented in ICSerializerRapid.
|
virtual |
Deserializes from a char array.
Definition at line 68 of file ICSerializer.cpp.
|
virtual |
Deserializes from std::string.
Definition at line 49 of file ICSerializer.cpp.
|
pure virtual |
Serializes to std::string.
Implemented in ICSerializerRapid.
|
virtual |
Serializes to a char array.
Definition at line 54 of file ICSerializer.cpp.
|
virtual |
Serializes to std::string.
Definition at line 43 of file ICSerializer.cpp.
ICSerializer * ICSerializer::SetMessage | ( | ICMessage *const | message | ) |
Sets the associated ICMessage.
Definition at line 38 of file ICSerializer.cpp.
ICMessage* ICSerializer::message |
Pointer to the associated ICMessage.
Each ICSerializer has an associated ICMessage. Once an ICMessage is associated, its content can be serialized. It is also possible to deserialize a string into the associated ICMessage.
Definition at line 112 of file ICSerializer.hpp.