diff options
| author | Ted Ross <tross@apache.org> | 2010-04-09 03:53:30 +0000 |
|---|---|---|
| committer | Ted Ross <tross@apache.org> | 2010-04-09 03:53:30 +0000 |
| commit | 7a0d795940c5c68383b0224740f085e8e6b4e60b (patch) | |
| tree | 1b4e316b939fcf69ed0627558be511a1a809d0cb /cpp/src/qpid/amqp_0_10/Codecs.cpp | |
| parent | 1e75ae89fd4dfbb99f62d510d2693565ec9b9028 (diff) | |
| download | qpid-python-7a0d795940c5c68383b0224740f085e8e6b4e60b.tar.gz | |
QPID-2489 - Remove references to boost:: and qpid::framing:: from QMF-generated cpp files
Added a wrapper class for framing::Buffer in the qpid::management namespace. This wrapper class
has no reference to framing or boost and is now used in the generated C++ code to encode
QMFv1 content.
git-svn-id: https://svn.apache.org/repos/asf/qpid/trunk/qpid@932236 13f79535-47bb-0310-9956-ffa450edef68
Diffstat (limited to 'cpp/src/qpid/amqp_0_10/Codecs.cpp')
| -rw-r--r-- | cpp/src/qpid/amqp_0_10/Codecs.cpp | 14 |
1 files changed, 14 insertions, 0 deletions
diff --git a/cpp/src/qpid/amqp_0_10/Codecs.cpp b/cpp/src/qpid/amqp_0_10/Codecs.cpp index 6325f9f664..abe6b2c7da 100644 --- a/cpp/src/qpid/amqp_0_10/Codecs.cpp +++ b/cpp/src/qpid/amqp_0_10/Codecs.cpp @@ -301,6 +301,13 @@ void MapCodec::decode(const std::string& data, Variant::Map& value) _decode<FieldTable>(data, value, &toVariantMapEntry); } +size_t MapCodec::encodedSize(const Variant::Map& value) +{ + std::string encoded; + encode(value, encoded); + return encoded.size(); +} + void ListCodec::encode(const Variant::List& value, std::string& data) { _encode<List>(value, data, &toFieldValue); @@ -311,6 +318,13 @@ void ListCodec::decode(const std::string& data, Variant::List& value) _decode<List>(data, value, &toVariant); } +size_t ListCodec::encodedSize(const Variant::List& value) +{ + std::string encoded; + encode(value, encoded); + return encoded.size(); +} + void translate(const Variant::Map& from, FieldTable& to) { convert(from, to, &toFieldTableEntry); |
