diff options
author | Ted Ross <tross@apache.org> | 2010-02-26 20:07:36 +0000 |
---|---|---|
committer | Ted Ross <tross@apache.org> | 2010-02-26 20:07:36 +0000 |
commit | b462279113238af55b05b381e95e9f5371e28304 (patch) | |
tree | cee0f7e95049ad841d48b5eae6a33206f5338032 /cpp/src/qpid/messaging/MapContent.cpp | |
parent | 7480298d6d19ad3cd5db18e44e909d074bc2037a (diff) | |
download | qpid-python-b462279113238af55b05b381e95e9f5371e28304.tar.gz |
QPID-2423 - Add Constructors to set initial value of content for MapContent and ListContent
git-svn-id: https://svn.apache.org/repos/asf/qpid/trunk/qpid@916803 13f79535-47bb-0310-9956-ffa450edef68
Diffstat (limited to 'cpp/src/qpid/messaging/MapContent.cpp')
-rw-r--r-- | cpp/src/qpid/messaging/MapContent.cpp | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/cpp/src/qpid/messaging/MapContent.cpp b/cpp/src/qpid/messaging/MapContent.cpp index 6dba22be99..1f190b85aa 100644 --- a/cpp/src/qpid/messaging/MapContent.cpp +++ b/cpp/src/qpid/messaging/MapContent.cpp @@ -37,6 +37,11 @@ class MapContentImpl : public Variant } } + MapContentImpl(Message& m, const Variant::Map& i) : Variant(i), msg(&m) + { + msg->getContent().clear(); + } + void encode() { qpid::client::amqp0_10::MapCodec codec; @@ -46,6 +51,7 @@ class MapContentImpl : public Variant }; MapContent::MapContent(Message& m) : impl(new MapContentImpl(m)) {} +MapContent::MapContent(Message& m, const Variant::Map& i) : impl(new MapContentImpl(m, i)) {} MapContent::~MapContent() { delete impl; } MapContent& MapContent::operator=(const MapContent& m) { *impl = *m.impl; return *this; } |