Apache Qpid - AMQP Messaging for Java JMS, C++, Python, Ruby, and .NET Apache Qpid Documentation
qpid/amqp_0_10/Codecs.h
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  * Licensed to the Apache Software Foundation (ASF) under one
00007  * or more contributor license agreements.  See the NOTICE file
00008  * distributed with this work for additional information
00009  * regarding copyright ownership.  The ASF licenses this file
00010  * to you under the Apache License, Version 2.0 (the
00011  * "License"); you may not use this file except in compliance
00012  * with the License.  You may obtain a copy of the License at
00013  * 
00014  *   http://www.apache.org/licenses/LICENSE-2.0
00015  * 
00016  * Unless required by applicable law or agreed to in writing,
00017  * software distributed under the License is distributed on an
00018  * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
00019  * KIND, either express or implied.  See the License for the
00020  * specific language governing permissions and limitations
00021  * under the License.
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 }} // namespace qpid::amqp_0_10
00085 
00086 #endif  

Qpid C++ API Reference
Generated on Fri Aug 23 2013 for Qpid C++ Client API by doxygen 1.7.5