summaryrefslogtreecommitdiff
path: root/cpp/lib/common/framing/AMQFrame.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'cpp/lib/common/framing/AMQFrame.cpp')
-rw-r--r--cpp/lib/common/framing/AMQFrame.cpp12
1 files changed, 8 insertions, 4 deletions
diff --git a/cpp/lib/common/framing/AMQFrame.cpp b/cpp/lib/common/framing/AMQFrame.cpp
index 6fa5b9ae51..0530dc805c 100644
--- a/cpp/lib/common/framing/AMQFrame.cpp
+++ b/cpp/lib/common/framing/AMQFrame.cpp
@@ -119,14 +119,18 @@ void AMQFrame::decodeBody(Buffer& buffer, uint32_t bufSize)
body->decode(buffer, bufSize);
}
-std::ostream& qpid::framing::operator<<(std::ostream& out, const AMQFrame& t)
+void AMQFrame::print(std::ostream& out) const
{
- out << "Frame[channel=" << t.channel << "; ";
- if (t.body.get() == 0)
+ out << "Frame[channel=" << channel << "; ";
+ if (body.get() == 0)
out << "empty";
else
- out << *t.body;
+ out << *body;
out << "]";
+}
+std::ostream& qpid::framing::operator<<(std::ostream& out, const AMQFrame& t)
+{
+ t.print(out);
return out;
}