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/AMQFrame.cpp | 18 +++--------------- 1 file changed, 3 insertions(+), 15 deletions(-) (limited to 'cpp/common/framing/src/AMQFrame.cpp') diff --git a/cpp/common/framing/src/AMQFrame.cpp b/cpp/common/framing/src/AMQFrame.cpp index 70f71010ff..5686c9ac81 100644 --- a/cpp/common/framing/src/AMQFrame.cpp +++ b/cpp/common/framing/src/AMQFrame.cpp @@ -1,3 +1,4 @@ + /* * * Copyright (c) 2006 The Apache Software Foundation @@ -126,21 +127,8 @@ void AMQFrame::decodeBody(Buffer& buffer, uint32_t size) std::ostream& qpid::framing::operator<<(std::ostream& out, const AMQFrame& t){ out << "Frame[channel=" << t.channel << "; "; - if(t.body.get() == 0){ - out << "empty"; - }else if(t.body->type() == METHOD_BODY){ - (dynamic_cast(t.body.get()))->print(out); - }else if(t.body->type() == HEADER_BODY){ - out << "header, content_size=" << - (dynamic_cast(t.body.get()))->getContentSize() - << " (" << t.body->size() << " bytes)"; - }else if(t.body->type() == CONTENT_BODY){ - out << "content (" << t.body->size() << " bytes)"; - }else if(t.body->type() == HEARTBEAT_BODY){ - out << "heartbeat"; - }else{ - out << "unknown type, " << t.body->type(); - } + if (t.body.get() == 0) out << "empty"; + else out << *t.body; out << "]"; return out; } -- cgit v1.2.1