You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@activemq.apache.org by ta...@apache.org on 2007/11/14 15:09:48 UTC
svn commit: r594891 - in
/activemq/activemq-cpp/decaf/trunk/src/main/decaf/nio: ByteBuffer.cpp
ByteBuffer.h
Author: tabish
Date: Wed Nov 14 06:09:46 2007
New Revision: 594891
URL: http://svn.apache.org/viewvc?rev=594891&view=rev
Log:
http://issues.apache.org/activemq/browse/AMQCPP-103
Starting the NIO implementation
Modified:
activemq/activemq-cpp/decaf/trunk/src/main/decaf/nio/ByteBuffer.cpp
activemq/activemq-cpp/decaf/trunk/src/main/decaf/nio/ByteBuffer.h
Modified: activemq/activemq-cpp/decaf/trunk/src/main/decaf/nio/ByteBuffer.cpp
URL: http://svn.apache.org/viewvc/activemq/activemq-cpp/decaf/trunk/src/main/decaf/nio/ByteBuffer.cpp?rev=594891&r1=594890&r2=594891&view=diff
==============================================================================
--- activemq/activemq-cpp/decaf/trunk/src/main/decaf/nio/ByteBuffer.cpp (original)
+++ activemq/activemq-cpp/decaf/trunk/src/main/decaf/nio/ByteBuffer.cpp Wed Nov 14 06:09:46 2007
@@ -311,3 +311,14 @@
bool ByteBuffer::operator<( const ByteBuffer& value ) const {
return this->compareTo( value ) == -1;
}
+
+////////////////////////////////////////////////////////////////////////////////
+std::string ByteBuffer::toString() const {
+
+ std::ostringstream stream;
+ stream << "ByteBuffer";
+ stream << ", status: capacity=" << this->capacity();
+ stream << " position=" << this->position();
+ stream << " limit=" << this->limit();
+ return stream.str();
+}
Modified: activemq/activemq-cpp/decaf/trunk/src/main/decaf/nio/ByteBuffer.h
URL: http://svn.apache.org/viewvc/activemq/activemq-cpp/decaf/trunk/src/main/decaf/nio/ByteBuffer.h?rev=594891&r1=594890&r2=594891&view=diff
==============================================================================
--- activemq/activemq-cpp/decaf/trunk/src/main/decaf/nio/ByteBuffer.h (original)
+++ activemq/activemq-cpp/decaf/trunk/src/main/decaf/nio/ByteBuffer.h Wed Nov 14 06:09:46 2007
@@ -105,6 +105,11 @@
ByteBuffer();
virtual ~ByteBuffer();
+ /**
+ * @returns a std::string describing this object
+ */
+ virtual std::string toString() const;
+
public:
/**