From caca23c5dc055d985fecfe188573104bc707ad9d Mon Sep 17 00:00:00 2001 From: Alan Conway Date: Wed, 27 Sep 2006 19:50:23 +0000 Subject: git-svn-id: https://svn.apache.org/repos/asf/incubator/qpid/trunk/qpid@450556 13f79535-47bb-0310-9956-ffa450edef68 --- cpp/common/framing/src/AMQHeaderBody.cpp | 13 +++++++++++++ 1 file changed, 13 insertions(+) (limited to 'cpp/common/framing/src/AMQHeaderBody.cpp') diff --git a/cpp/common/framing/src/AMQHeaderBody.cpp b/cpp/common/framing/src/AMQHeaderBody.cpp index 4bf1626a8a..1fd387c5d5 100644 --- a/cpp/common/framing/src/AMQHeaderBody.cpp +++ b/cpp/common/framing/src/AMQHeaderBody.cpp @@ -58,3 +58,16 @@ void qpid::framing::AMQHeaderBody::createProperties(int classId){ THROW_QPID_ERROR(FRAMING_ERROR, "Unknown header class"); } } + +void qpid::framing::AMQHeaderBody::print(std::ostream& out) const +{ + out << "header, content_size=" << getContentSize() + << " (" << size() << " bytes)" << ", headers=" ; + // TODO aconway 2006-09-26: Hack to see headers. + // Should write proper op << for BasicHeaderProperties. + // + const BasicHeaderProperties* props = + dynamic_cast(getProperties()); + // TODO aconway 2006-09-26: Lose the static cast, fix BasicHeaderProperties + if (props) out << const_cast(props)->getHeaders(); +} -- cgit v1.2.1