29 #include <rsc/misc/Registry.h> 36 const string ByteArrayConverter::WIRE_SCHEMA =
".*";
38 ByteArrayConverter::ByteArrayConverter() :
39 Converter<string> (
"bytearray", WIRE_SCHEMA, true) {
46 throw runtime_error(
"This converter should only be used for *de*serialization.");
51 return make_pair(
getDataType(), boost::shared_ptr<string>(
new string(wire)));
std::string serialize(const AnnotatedData &data, std::string &wire)
Serialized the given domain object to the wire.
std::pair< std::string, boost::shared_ptr< void > > AnnotatedData
A combination of data type and the actual data.
virtual ~ByteArrayConverter()
AnnotatedData deserialize(const std::string &wireSchema, const std::string &wire)
Deserializes a domain object from a wire type.
virtual std::string getDataType() const
Returns the name of the data type this converter is applicable for.