29 #include <rsc/misc/Registry.h>
36 const string StringConverter::WIRE_SCHEMA =
"utf-8-string";
38 StringConverter::StringConverter() :
46 assert(data.first == this->getDataType());
48 boost::shared_ptr<string> s = boost::static_pointer_cast<
string>(
59 return make_pair(
getDataType(), boost::shared_ptr<string>(
new string(wire)));
std::pair< std::string, boost::shared_ptr< void > > AnnotatedData
A combination of data type and the actual data.
static const std::string WIRE_SCHEMA
virtual ~StringConverter()
AnnotatedData deserialize(const std::string &wireSchema, const std::string &wire)
Deserializes a domain object from a wire type.
std::string serialize(const AnnotatedData &data, std::string &wire)
Serialized the given domain object to the wire.
virtual std::string getDataType() const
Returns the name of the data type this converter is applicable for.