From 655b3b5806bafdd784f6a9c242e26341bd6aeccc Mon Sep 17 00:00:00 2001 From: Andrew Stitcher Date: Fri, 31 Aug 2007 18:20:29 +0000 Subject: * Changes to make C++ client code use the asynchronous network IO * Fixed up the test for buffer changes * Removed unused buffer operations git-svn-id: https://svn.apache.org/repos/asf/incubator/qpid/trunk/qpid@571529 13f79535-47bb-0310-9956-ffa450edef68 --- cpp/src/qpid/framing/Buffer.cpp | 48 ++++++++++++++++++++--------------------- 1 file changed, 24 insertions(+), 24 deletions(-) (limited to 'cpp/src/qpid/framing/Buffer.cpp') diff --git a/cpp/src/qpid/framing/Buffer.cpp b/cpp/src/qpid/framing/Buffer.cpp index 6c6b2661bd..215102807e 100644 --- a/cpp/src/qpid/framing/Buffer.cpp +++ b/cpp/src/qpid/framing/Buffer.cpp @@ -22,9 +22,9 @@ #include "FramingContent.h" #include "FieldTable.h" -qpid::framing::Buffer::Buffer(uint32_t _size) : size(_size), owner(true), position(0), limit(_size){ - data = new char[size]; -} +//qpid::framing::Buffer::Buffer(uint32_t _size) : size(_size), owner(true), position(0), limit(_size){ +// data = new char[size]; +//} qpid::framing::Buffer::Buffer(char* _data, uint32_t _size) : size(_size), owner(false), data(_data), position(0), limit(_size){ } @@ -33,23 +33,23 @@ qpid::framing::Buffer::~Buffer(){ if(owner) delete[] data; } -void qpid::framing::Buffer::flip(){ - limit = position; - position = 0; -} +//void qpid::framing::Buffer::flip(){ +// limit = position; +// position = 0; +//} -void qpid::framing::Buffer::clear(){ - limit = size; - position = 0; -} +//void qpid::framing::Buffer::clear(){ +// limit = size; +// position = 0; +//} -void qpid::framing::Buffer::compact(){ - uint32_t p = limit - position; - //copy p chars from position to 0 - memmove(data, data + position, p); - limit = size; - position = p; -} +//void qpid::framing::Buffer::compact(){ +// uint32_t p = limit - position; +// //copy p chars from position to 0 +// memmove(data, data + position, p); +// limit = size; +// position = p; +//} void qpid::framing::Buffer::record(){ r_position = position; @@ -65,13 +65,13 @@ uint32_t qpid::framing::Buffer::available(){ return limit - position; } -char* qpid::framing::Buffer::start(){ - return data + position; -} +//char* qpid::framing::Buffer::start(){ +// return data + position; +//} -void qpid::framing::Buffer::move(uint32_t bytes){ - position += bytes; -} +//void qpid::framing::Buffer::move(uint32_t bytes){ +// position += bytes; +//} void qpid::framing::Buffer::putOctet(uint8_t i){ data[position++] = i; -- cgit v1.2.1