diff options
author | Alan Conway <aconway@apache.org> | 2009-01-27 14:58:47 +0000 |
---|---|---|
committer | Alan Conway <aconway@apache.org> | 2009-01-27 14:58:47 +0000 |
commit | 5bec09eaeba0bfbe55d2649ba50801f3faae5642 (patch) | |
tree | 07cc1cfdc8e327669169bac7ea915e8e50a19b7c /cpp/src/qpid/cluster/EventFrame.h | |
parent | d849eff61801f3c5d5bdda74007c886a34f7a10b (diff) | |
download | qpid-python-5bec09eaeba0bfbe55d2649ba50801f3faae5642.tar.gz |
cluster/EventFrame.cpp: Add operator<< for EventFrame
git-svn-id: https://svn.apache.org/repos/asf/qpid/trunk/qpid@738107 13f79535-47bb-0310-9956-ffa450edef68
Diffstat (limited to 'cpp/src/qpid/cluster/EventFrame.h')
-rw-r--r-- | cpp/src/qpid/cluster/EventFrame.h | 15 |
1 files changed, 8 insertions, 7 deletions
diff --git a/cpp/src/qpid/cluster/EventFrame.h b/cpp/src/qpid/cluster/EventFrame.h index 2420a2b1e5..2ef33b9695 100644 --- a/cpp/src/qpid/cluster/EventFrame.h +++ b/cpp/src/qpid/cluster/EventFrame.h @@ -27,6 +27,7 @@ #include "qpid/framing/AMQFrame.h" #include "qpid/sys/LatencyMetric.h" #include <boost/intrusive_ptr.hpp> +#include <iosfwd> namespace qpid { namespace cluster { @@ -38,13 +39,10 @@ class Connection; */ struct EventFrame { - EventFrame() : sequence(0) {} - // Connection event frame - EventFrame(const boost::intrusive_ptr<Connection>& c, const Event& e, const framing::AMQFrame& f, int rc=0) - : connection(c), member(e.getMemberId()), frame(f), sequence(e.getSequence()), readCredit(rc) - { - QPID_LATENCY_INIT(frame); - } + EventFrame(); + + EventFrame(const boost::intrusive_ptr<Connection>& c, const Event& e, + const framing::AMQFrame& f, int rc=0); bool isCluster() const { return !connection; } bool isConnection() const { return connection; } @@ -63,6 +61,9 @@ struct EventFrame uint64_t sequence; int readCredit; // last frame in an event, give credit when processed. }; + +std::ostream& operator<<(std::ostream& o, const EventFrame& e); + }} // namespace qpid::cluster #endif /*!QPID_CLUSTER_EVENTFRAME_H*/ |