tobicore
7.0.0
|
TOBI iD serializer interface. More...
#include <tobiid/IDSerializer.hpp>
Public Member Functions | |
IDSerializer (void) | |
Constructor. | |
IDSerializer (IDMessage *const message) | |
Constructor. | |
virtual | ~IDSerializer (void) |
Destructor. | |
IDSerializer * | SetMessage (IDMessage *const message) |
Sets the associated IDMessage. | |
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 | |
IDMessage * | message |
Pointer to the associated IDMessage. |
TOBI iD serializer interface.
An IDMessage object embeds a simple data structure with very few fields (specially if compared to the ICMessage recursive data structure). In order to transmit an IDMessage 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 IDSerializer interface can then be derived to implement different flavors of serialization formats. Ad today only XML is supported by the concrete IDSerializerRapid class.
Definition at line 38 of file IDSerializer.hpp.
IDSerializer::IDSerializer | ( | IDMessage *const | message | ) |
Constructor.
Definition at line 30 of file IDSerializer.cpp.
|
pure virtual |
Deserializes from std::string.
Implemented in IDSerializerRapid.
|
virtual |
Deserializes from a char array.
Definition at line 68 of file IDSerializer.cpp.
|
virtual |
Deserializes from std::string.
Definition at line 49 of file IDSerializer.cpp.
|
pure virtual |
Serializes to std::string.
Implemented in IDSerializerRapid.
|
virtual |
Serializes to a char array.
Definition at line 54 of file IDSerializer.cpp.
|
virtual |
Serializes to std::string.
Definition at line 43 of file IDSerializer.cpp.
IDSerializer * IDSerializer::SetMessage | ( | IDMessage *const | message | ) |
Sets the associated IDMessage.
Definition at line 38 of file IDSerializer.cpp.
IDMessage* IDSerializer::message |
Pointer to the associated IDMessage.
Each IDSerializer has an associated IDMessage. Once an IDMessage is associated, its content can be serialized. It is also possible to deserialize a string into the associated IDMessage.
Definition at line 113 of file IDSerializer.hpp.