RSB  0.7.0
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Pages
rsb::converter::RosettaConverter< Mechanism, Type > Class Template Reference

#include <RosettaConverter.h>

Inheritance diagram for rsb::converter::RosettaConverter< Mechanism, Type >:
Inheritance graph
Collaboration diagram for rsb::converter::RosettaConverter< Mechanism, Type >:
Collaboration graph

Public Member Functions

 RosettaConverter ()
virtual ~RosettaConverter ()
std::string serialize (const AnnotatedData &data, std::string &wire)
 Serialized the given domain object to the wire.
AnnotatedData deserialize (const std::string &wireType, 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.

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.

Detailed Description

template<typename Mechanism, typename Type>
class rsb::converter::RosettaConverter< Mechanism, Type >

Template Parameters
Mechanism
Type
Author
jmoringe

Definition at line 48 of file RosettaConverter.h.

Constructor & Destructor Documentation

template<typename Mechanism , typename Type >
rsb::converter::RosettaConverter< Mechanism, Type >::RosettaConverter ( )

Definition at line 64 of file RosettaConverter.h.

template<typename Mechanism , typename Type >
rsb::converter::RosettaConverter< Mechanism, Type >::~RosettaConverter ( )
virtual

Definition at line 72 of file RosettaConverter.h.

Member Function Documentation

template<typename Mechanism , typename Type >
AnnotatedData rsb::converter::RosettaConverter< Mechanism, Type >::deserialize ( const std::string &  wireSchema,
const std::string &  wire 
)
virtual

Deserializes a domain object from a wire type.

Parameters
wireSchematype of the wire message
wirethe wire containing the data
Returns
the deserialized domain object annotated with its data type name
Exceptions
SerializationExceptionif deserializing the message fails

Implements rsb::converter::Converter< std::string >.

Definition at line 96 of file RosettaConverter.h.

template<typename Mechanism , typename Type >
std::string rsb::converter::RosettaConverter< Mechanism, Type >::serialize ( const AnnotatedData data,
std::string &  wire 
)
virtual

Serialized the given domain object to the wire.

Parameters
datadata to serialize
wirethe wire to serialize on
Returns
the wire schema the data is encoded with
Exceptions
SerializationExceptionif the serialization failed

Implements rsb::converter::Converter< std::string >.

Definition at line 78 of file RosettaConverter.h.


The documentation for this class was generated from the following file: