diff options
author | Andrew Stitcher <astitcher@apache.org> | 2007-08-31 18:20:29 +0000 |
---|---|---|
committer | Andrew Stitcher <astitcher@apache.org> | 2007-08-31 18:20:29 +0000 |
commit | 655b3b5806bafdd784f6a9c242e26341bd6aeccc (patch) | |
tree | 01fe5108d9901b6c577a5930be6ca31a625300fd /cpp/src/qpid/framing/Buffer.cpp | |
parent | f5a1cf995f4956ec2dd83a60715b31ad065f7751 (diff) | |
download | qpid-python-655b3b5806bafdd784f6a9c242e26341bd6aeccc.tar.gz |
* 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
Diffstat (limited to 'cpp/src/qpid/framing/Buffer.cpp')
-rw-r--r-- | cpp/src/qpid/framing/Buffer.cpp | 48 |
1 files changed, 24 insertions, 24 deletions
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; |