diff options
author | Alan Conway <aconway@apache.org> | 2006-09-27 19:50:23 +0000 |
---|---|---|
committer | Alan Conway <aconway@apache.org> | 2006-09-27 19:50:23 +0000 |
commit | caca23c5dc055d985fecfe188573104bc707ad9d (patch) | |
tree | 154c0bbd4c7bca70080de28116b5654491657906 /cpp/common/framing/src/AMQHeaderBody.cpp | |
parent | 9d718c2348708b0b27ce9fb9fcbf05c4b0a997cc (diff) | |
download | qpid-python-caca23c5dc055d985fecfe188573104bc707ad9d.tar.gz |
git-svn-id: https://svn.apache.org/repos/asf/incubator/qpid/trunk/qpid@450556 13f79535-47bb-0310-9956-ffa450edef68
Diffstat (limited to 'cpp/common/framing/src/AMQHeaderBody.cpp')
-rw-r--r-- | cpp/common/framing/src/AMQHeaderBody.cpp | 13 |
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(); +} |