activemq-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From tab...@apache.org
Subject svn commit: r600582 - in /activemq/activemq-cpp/decaf/trunk/src/main/decaf/internal/nio: CharArrayBuffer.cpp CharArrayBuffer.h
Date Mon, 03 Dec 2007 16:15:30 GMT
Author: tabish
Date: Mon Dec  3 08:15:29 2007
New Revision: 600582

URL: http://svn.apache.org/viewvc?rev=600582&view=rev
Log:
http://issues.apache.org/activemq/browse/AMQCPP-153

Working on implementing the NIO package

Modified:
    activemq/activemq-cpp/decaf/trunk/src/main/decaf/internal/nio/CharArrayBuffer.cpp
    activemq/activemq-cpp/decaf/trunk/src/main/decaf/internal/nio/CharArrayBuffer.h

Modified: activemq/activemq-cpp/decaf/trunk/src/main/decaf/internal/nio/CharArrayBuffer.cpp
URL: http://svn.apache.org/viewvc/activemq/activemq-cpp/decaf/trunk/src/main/decaf/internal/nio/CharArrayBuffer.cpp?rev=600582&r1=600581&r2=600582&view=diff
==============================================================================
--- activemq/activemq-cpp/decaf/trunk/src/main/decaf/internal/nio/CharArrayBuffer.cpp (original)
+++ activemq/activemq-cpp/decaf/trunk/src/main/decaf/internal/nio/CharArrayBuffer.cpp Mon
Dec  3 08:15:29 2007
@@ -22,5 +22,20 @@
 using namespace decaf::internal::nio;
 
 ///////////////////////////////////////////////////////////////////////////////
-CharArrayBuffer::CharArrayBuffer() {
+CharArrayBuffer::CharArrayBuffer( std::size_t capactiy, bool readOnly )
+    : CharBuffer( capacity ){
+
+}
+
+///////////////////////////////////////////////////////////////////////////////
+CharArrayBuffer::CharArrayBuffer( unsigned char* array, std::size_t offset,
+                                  std::size_t capacity, bool readOnly )
+    throw( decaf::lang::exceptions::NullPointerException ) : CharBuffer( capacity ) {
+
+}
+
+///////////////////////////////////////////////////////////////////////////////
+CharArrayBuffer::CharArrayBuffer( const CharArrayBuffer& other )
+    : CharBuffer( capacity ) {
+
 }

Modified: activemq/activemq-cpp/decaf/trunk/src/main/decaf/internal/nio/CharArrayBuffer.h
URL: http://svn.apache.org/viewvc/activemq/activemq-cpp/decaf/trunk/src/main/decaf/internal/nio/CharArrayBuffer.h?rev=600582&r1=600581&r2=600582&view=diff
==============================================================================
--- activemq/activemq-cpp/decaf/trunk/src/main/decaf/internal/nio/CharArrayBuffer.h (original)
+++ activemq/activemq-cpp/decaf/trunk/src/main/decaf/internal/nio/CharArrayBuffer.h Mon Dec
 3 08:15:29 2007
@@ -25,9 +25,43 @@
 namespace nio{
 
     class CharArrayBuffer : public decaf::nio::CharBuffer {
+    protected:
+
+        // This is the store for all this objects char data
+
     public:
 
-        CharArrayBuffer();
+        /**
+         * Creates a CharArrayBuffer object that has its backing array allocated internally
+         * and is then owned and deleted when this object is deleted.  The array is
+         * initially created with all elements initialized to zero.
+         * @param capacity - size of the array, this is the limit we read and write to.
+         * @param readOnly - should this buffer be read-only, default as false
+         */
+        CharArrayBuffer( std::size_t capactiy, bool readOnly = false );
+
+        /**
+         * Creates a CharArrayBuffer object that wraps the given array.  If the own flag
+         * is set then it will delete this array when this object is deleted.
+         * @param array - array to wrap
+         * @param offset - the position that is this buffers start pos.
+         * @param capacity - size of the array, this is the limit we read and write to.
+         * @param readOnly - should this buffer be read-only, default as false
+         * @throws NullPointerException if buffer is NULL
+         */
+        CharArrayBuffer( unsigned char* array, std::size_t offset,
+                         std::size_t capacity, bool readOnly = false )
+            throw( decaf::lang::exceptions::NullPointerException );
+
+        /**
+         * Create a CharArrayBuffer that mirros this one, meaning it shares a
+         * reference to this buffers ByteArrayPerspective and when changes
+         * are made to that data it is reflected in both.
+         * @param other - the CharArrayBuffer this one is to mirror.
+         * @param readOnly - should this buffer be read-only, default as false
+         */
+        CharArrayBuffer( const CharArrayBuffer& other );
+
         virtual ~CharArrayBuffer() {}
 
     };



Mime
View raw message