Go to the documentation of this file.00001 #ifndef QPID_AMQP_0_10_CODECS_H
00002 #define QPID_AMQP_0_10_CODECS_H
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019
00020
00021
00022
00023
00024
00025 #include "qpid/CommonImportExport.h"
00026 #include "qpid/types/Variant.h"
00027 #include "boost/shared_ptr.hpp"
00028
00029 namespace qpid {
00030 namespace framing {
00031 class FieldTable;
00032 class FieldValue;
00033 }
00034 namespace amqp_0_10 {
00039 class QPID_COMMON_CLASS_EXTERN MapCodec
00040 {
00041 public:
00042 typedef qpid::types::Variant::Map ObjectType;
00043 static void QPID_COMMON_EXTERN encode(const ObjectType&, std::string&);
00044 static void QPID_COMMON_EXTERN decode(const std::string&, ObjectType&);
00045 static size_t QPID_COMMON_EXTERN encodedSize(const ObjectType&);
00046 static const QPID_COMMON_EXTERN std::string contentType;
00047 private:
00048 };
00049
00054 class QPID_COMMON_CLASS_EXTERN ListCodec
00055 {
00056 public:
00057 typedef qpid::types::Variant::List ObjectType;
00058 static void QPID_COMMON_EXTERN encode(const ObjectType&, std::string&);
00059 static void QPID_COMMON_EXTERN decode(const std::string&, ObjectType&);
00060 static size_t QPID_COMMON_EXTERN encodedSize(const ObjectType&);
00061 static const QPID_COMMON_EXTERN std::string contentType;
00062 private:
00063 };
00064
00072 QPID_COMMON_EXTERN void translate(const qpid::types::Variant::Map& from,
00073 qpid::framing::FieldTable& to);
00074 QPID_COMMON_EXTERN void translate(const qpid::types::Variant::Map& from, const std::string& efield, const qpid::types::Variant& evalue,
00075 qpid::framing::FieldTable& to);
00076 QPID_COMMON_EXTERN void translate(const qpid::framing::FieldTable& from,
00077 qpid::types::Variant::Map& to);
00078
00079 QPID_COMMON_EXTERN void translate(const boost::shared_ptr<qpid::framing::FieldValue> from,
00080 qpid::types::Variant& to);
00081 QPID_COMMON_EXTERN void translate(const types::Variant& from,
00082 boost::shared_ptr<qpid::framing::FieldValue> to);
00083
00084 }}
00085
00086 #endif