Apache Qpid - AMQP Messaging for Java JMS, C++, Python, Ruby, and .NET | Apache Qpid Documentation |
Using templates with framing::Buffer is difficultg becase of the many different put/get function names. More...
Go to the source code of this file.
Classes | |
struct | qpid::framing::BufferTypeTraits< ValueType > |
struct | qpid::framing::EncodeDecodeTemplate< ValueType, PutFn, GetFn > |
struct | qpid::framing::StringTypeTemplate< Size, PutFn, GetFn > |
Namespaces | |
namespace | qpid |
This file was automatically generated from the AMQP specification. | |
namespace | qpid::framing |
Typedefs | |
typedef StringTypeTemplate < 4,&Buffer::putLongString,&Buffer::getLongString > | qpid::framing::LongString |
typedef StringTypeTemplate < 2,&Buffer::putMediumString,&Buffer::getMediumString > | qpid::framing::MediumString |
typedef StringTypeTemplate < 1,&Buffer::putShortString,&Buffer::getShortString > | qpid::framing::ShortString |
Functions | |
template<class T > | |
std::string | qpid::framing::encodeStr (const T &value) |
Encode value as a string. | |
template<class T > | |
void | qpid::framing::decodeStr (const std::string &encoded, T &value) |
Decode value from a string. | |
template<class T > | |
T | qpid::framing::decodeStr (const std::string &encoded) |
Decode value from a string. |
Using templates with framing::Buffer is difficultg becase of the many different put/get function names.
Here we define a set of types corresponding the basic types of Buffer but presenting a uniform encode/decode/encodedSize interface.
It also provides some convenience templates for the common case of encoding a single encodable value as a string, e.g.
LongString ls("hello"); std::string encoded = encodeStr(ls); LongString ls2 = decodeStr<LongString>(encoded); LongString ls3; decodeStr(encoded, ls3);
Definition in file BufferTypes.h.