From 32df4fc8cdb72528c2ff718c821b7588ee87990c Mon Sep 17 00:00:00 2001 From: Alan Conway Date: Thu, 4 Jan 2007 22:05:53 +0000 Subject: Fixed compile errors, not all fixed yet: - Fix error in code generator for decoding timestamps. - Add dummy op<< for framing::Content git-svn-id: https://svn.apache.org/repos/asf/incubator/qpid/branches/qpid.0-9@492774 13f79535-47bb-0310-9956-ffa450edef68 --- cpp/lib/common/framing/AMQFrame.h | 47 ++++++++++++++++----------------- cpp/lib/common/framing/FramingContent.h | 6 ++--- cpp/lib/common/framing/amqp_types.h | 13 ++++----- 3 files changed, 30 insertions(+), 36 deletions(-) (limited to 'cpp') diff --git a/cpp/lib/common/framing/AMQFrame.h b/cpp/lib/common/framing/AMQFrame.h index eb230c740c..9962f85b62 100644 --- a/cpp/lib/common/framing/AMQFrame.h +++ b/cpp/lib/common/framing/AMQFrame.h @@ -33,37 +33,36 @@ #define _AMQFrame_ namespace qpid { - namespace framing { +namespace framing { - class AMQFrame : virtual public AMQDataBlock - { - static AMQP_MethodVersionMap versionMap; +class AMQFrame : virtual public AMQDataBlock +{ + static AMQP_MethodVersionMap versionMap; - u_int16_t channel; - u_int8_t type;//used if the body is decoded separately from the 'head' - AMQBody::shared_ptr body; - AMQBody::shared_ptr createMethodBody(Buffer& buffer); + u_int16_t channel; + u_int8_t type;//used if the body is decoded separately from the 'head' + AMQBody::shared_ptr body; + AMQBody::shared_ptr createMethodBody(Buffer& buffer); - public: - AMQFrame(); - AMQFrame(u_int16_t channel, AMQBody* body); - AMQFrame(u_int16_t channel, AMQBody::shared_ptr& body); - virtual ~AMQFrame(); - virtual void encode(Buffer& buffer); - virtual bool decode(Buffer& buffer); - virtual u_int32_t size() const; - u_int16_t getChannel(); - AMQBody::shared_ptr& getBody(); + public: + AMQFrame(); + AMQFrame(u_int16_t channel, AMQBody* body); + AMQFrame(u_int16_t channel, AMQBody::shared_ptr& body); + virtual ~AMQFrame(); + virtual void encode(Buffer& buffer); + virtual bool decode(Buffer& buffer); + virtual u_int32_t size() const; + u_int16_t getChannel(); + AMQBody::shared_ptr& getBody(); - u_int32_t decodeHead(Buffer& buffer); - void decodeBody(Buffer& buffer, uint32_t size); + u_int32_t decodeHead(Buffer& buffer); + void decodeBody(Buffer& buffer, uint32_t size); - friend std::ostream& operator<<(std::ostream& out, const AMQFrame& body); - }; + friend std::ostream& operator<<(std::ostream& out, const AMQFrame& body); +}; - } -} +}} // namespace qpid::framing #endif diff --git a/cpp/lib/common/framing/FramingContent.h b/cpp/lib/common/framing/FramingContent.h index e7dd6804d8..d9556e5188 100644 --- a/cpp/lib/common/framing/FramingContent.h +++ b/cpp/lib/common/framing/FramingContent.h @@ -38,11 +38,9 @@ class Content void encode(Buffer& buffer) const; void decode(Buffer& buffer); size_t size() const; -}; - -// TODO aconway 2007-01-04: operator << is undefined, just for compilation. -std::ostream& operator<<(std::ostream&, const Content&); + friend std::ostream& operator<<(std::ostream&, const Content&); +}; }} // namespace qpid::framing diff --git a/cpp/lib/common/framing/amqp_types.h b/cpp/lib/common/framing/amqp_types.h index 3d8e9632c0..56d2225e31 100644 --- a/cpp/lib/common/framing/amqp_types.h +++ b/cpp/lib/common/framing/amqp_types.h @@ -1,3 +1,5 @@ +#ifndef AMQP_TYPES_H +#define AMQP_TYPES_H /* * * Licensed to the Apache Software Foundation (ASF) under one @@ -30,16 +32,11 @@ typedef unsigned __int64 u_int64_t; #include "stdint.h" #endif -#ifndef AMQP_TYPES_H -#define AMQP_TYPES_H -namespace qpid -{ -namespace framing -{ +namespace qpid { +namespace framing { using std::string; -} -} +}} // namespace qpid::framing #endif -- cgit v1.2.1