summaryrefslogtreecommitdiff
path: root/cpp/common/framing/src/AMQHeaderBody.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'cpp/common/framing/src/AMQHeaderBody.cpp')
-rw-r--r--cpp/common/framing/src/AMQHeaderBody.cpp13
1 files changed, 13 insertions, 0 deletions
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<const BasicHeaderProperties*>(getProperties());
+ // TODO aconway 2006-09-26: Lose the static cast, fix BasicHeaderProperties
+ if (props) out << const_cast<BasicHeaderProperties*>(props)->getHeaders();
+}