diff options
| author | Alan Conway <aconway@apache.org> | 2007-01-04 22:05:53 +0000 |
|---|---|---|
| committer | Alan Conway <aconway@apache.org> | 2007-01-04 22:05:53 +0000 |
| commit | 32df4fc8cdb72528c2ff718c821b7588ee87990c (patch) | |
| tree | 136da6988e391866a8488f91439e8e3e7127ab71 /cpp/lib | |
| parent | 135e339d6c1b751ff8ae93e7d1dfa43a9c7a1323 (diff) | |
| download | qpid-python-32df4fc8cdb72528c2ff718c821b7588ee87990c.tar.gz | |
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
Diffstat (limited to 'cpp/lib')
| -rw-r--r-- | cpp/lib/common/framing/AMQFrame.h | 47 | ||||
| -rw-r--r-- | cpp/lib/common/framing/FramingContent.h | 6 | ||||
| -rw-r--r-- | cpp/lib/common/framing/amqp_types.h | 13 |
3 files changed, 30 insertions, 36 deletions
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 |
