RSB
0.7.0
|
Converts any string into any string serializing content to a string. More...
#include <StringConverter.h>
Public Member Functions | |
StringConverter () | |
virtual | ~StringConverter () |
std::string | serialize (const AnnotatedData &data, std::string &wire) |
Serialized the given domain object to the wire. | |
AnnotatedData | deserialize (const std::string &wireSchema, const std::string &wire) |
Deserializes a domain object from a wire type. | |
Public Member Functions inherited from rsb::converter::Converter< std::string > | |
virtual | ~Converter () |
virtual std::string | getDataType () const |
Returns the name of the data type this converter is applicable for. | |
virtual std::string | getWireSchema () const |
Returns the name of the wire schema this converter can (de)serialize from/to. |
Static Private Attributes | |
static const std::string | WIRE_SCHEMA = "utf-8-string" |
Additional Inherited Members | |
Public Types inherited from rsb::converter::Converter< std::string > | |
typedef boost::shared_ptr < Converter< std::string > > | Ptr |
Protected Member Functions inherited from rsb::converter::Converter< std::string > | |
Converter (const std::string &dataType, const std::string &wireSchema, bool dummy=true) | |
Creates a new instance of this class with automatic handling for types. | |
Converter (const std::string &wireSchema, const DataType *=0) | |
Creates a new instance of this class with a data type string that is inferred based on the template parameter DataType. |
Converts any string into any string serializing content to a string.
Definition at line 44 of file StringConverter.h.
rsb::converter::StringConverter::StringConverter | ( | ) |
Definition at line 38 of file StringConverter.cpp.
|
virtual |
Definition at line 42 of file StringConverter.cpp.
|
virtual |
Deserializes a domain object from a wire type.
wireSchema | type of the wire message |
wire | the wire containing the data |
SerializationException | if deserializing the message fails |
Implements rsb::converter::Converter< std::string >.
Definition at line 55 of file StringConverter.cpp.
References rsb::converter::Converter< std::string >::getDataType(), and WIRE_SCHEMA.
|
virtual |
Serialized the given domain object to the wire.
data | data to serialize |
wire | the wire to serialize on |
SerializationException | if the serialization failed |
Implements rsb::converter::Converter< std::string >.
Definition at line 45 of file StringConverter.cpp.
References WIRE_SCHEMA.
|
staticprivate |
Definition at line 55 of file StringConverter.h.
Referenced by deserialize(), and serialize().