activemq-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From tab...@apache.org
Subject svn commit: r594298 - in /activemq/activemq-cpp/decaf/trunk/src/main/decaf/nio: BufferOverlflowException.h BufferUnderflowException.h ReadOnlyBufferException.h
Date Mon, 12 Nov 2007 21:04:02 GMT
Author: tabish
Date: Mon Nov 12 13:04:01 2007
New Revision: 594298

URL: http://svn.apache.org/viewvc?rev=594298&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/BufferOverlflowException.h
    activemq/activemq-cpp/decaf/trunk/src/main/decaf/nio/BufferUnderflowException.h
    activemq/activemq-cpp/decaf/trunk/src/main/decaf/nio/ReadOnlyBufferException.h

Modified: activemq/activemq-cpp/decaf/trunk/src/main/decaf/nio/BufferOverlflowException.h
URL: http://svn.apache.org/viewvc/activemq/activemq-cpp/decaf/trunk/src/main/decaf/nio/BufferOverlflowException.h?rev=594298&r1=594297&r2=594298&view=diff
==============================================================================
--- activemq/activemq-cpp/decaf/trunk/src/main/decaf/nio/BufferOverlflowException.h (original)
+++ activemq/activemq-cpp/decaf/trunk/src/main/decaf/nio/BufferOverlflowException.h Mon Nov
12 13:04:01 2007
@@ -24,10 +24,61 @@
 namespace decaf{
 namespace nio{
 
-    class BufferOverlflowException {
+    class DECAF_API BufferOverlflowException : public lang::Exception {
     public:
-        BufferOverlflowException() {}
-        virtual ~BufferOverlflowException() {}
+
+        /**
+         * Default Constructor
+         */
+        BufferOverlflowException() throw() {}
+
+        /**
+         * Copy Constructor
+         * @param ex the exception to copy
+         */
+        BufferOverlflowException( const lang::Exception& ex ) throw()
+        : lang::Exception() {
+            *(lang::Exception*)this = ex;
+        }
+
+        /**
+         * Copy Constructor
+         * @param ex the exception to copy, which is an instance of this type
+         */
+        BufferOverlflowException( const BufferOverlflowException& ex ) throw()
+        : lang::Exception() {
+            *(lang::Exception*)this = ex;
+        }
+
+        /**
+         * Consturctor
+         * @param file name of the file were the exception occured.
+         * @param lineNumber line where the exception occured
+         * @param msg the message that was generated
+         */
+        BufferOverlflowException( const char* file, const int lineNumber,
+                                  const char* msg, ... ) throw()
+        : lang::Exception() {
+
+            va_list vargs;
+            va_start( vargs, msg );
+            buildMessage( msg, vargs );
+
+            // Set the first mark for this exception.
+            setMark( file, lineNumber );
+        }
+
+        /**
+         * Clones this exception.  This is useful for cases where you need
+         * to preserve the type of the original exception as well as the message.
+         * All subclasses should override.
+         */
+        virtual BufferOverlflowException* clone() const {
+            return new BufferOverlflowException( *this );
+        }
+
+        virtual ~BufferOverlflowException() throw() {}
+
     };
 
 }}

Modified: activemq/activemq-cpp/decaf/trunk/src/main/decaf/nio/BufferUnderflowException.h
URL: http://svn.apache.org/viewvc/activemq/activemq-cpp/decaf/trunk/src/main/decaf/nio/BufferUnderflowException.h?rev=594298&r1=594297&r2=594298&view=diff
==============================================================================
--- activemq/activemq-cpp/decaf/trunk/src/main/decaf/nio/BufferUnderflowException.h (original)
+++ activemq/activemq-cpp/decaf/trunk/src/main/decaf/nio/BufferUnderflowException.h Mon Nov
12 13:04:01 2007
@@ -24,11 +24,59 @@
 namespace decaf{
 namespace nio{
 
-    class BufferUnderflowException {
+    class DECAF_API BufferUnderflowException : public lang::Exception {
     public:
 
-        BufferUnderflowException() {}
-        virtual ~BufferUnderflowException() {}
+        /**
+         * Default Constructor
+         */
+        BufferUnderflowException() throw() {}
+
+        /**
+         * Copy Constructor
+         * @param ex the exception to copy
+         */
+        BufferUnderflowException( const lang::Exception& ex ) throw()
+        : lang::Exception() {
+            *(lang::Exception*)this = ex;
+        }
+
+        /**
+         * Copy Constructor
+         * @param ex the exception to copy, which is an instance of this type
+         */
+        BufferUnderflowException( const BufferUnderflowException& ex ) throw()
+        : lang::Exception() {
+            *(lang::Exception*)this = ex;
+        }
+
+        /**
+         * Consturctor
+         * @param file name of the file were the exception occured.
+         * @param lineNumber line where the exception occured
+         * @param msg the message that was generated
+         */
+        BufferUnderflowException( const char* file, const int lineNumber,
+                                  const char* msg, ... ) throw()
+        : lang::Exception() {
+            va_list vargs;
+            va_start( vargs, msg );
+            buildMessage( msg, vargs );
+
+            // Set the first mark for this exception.
+            setMark( file, lineNumber );
+        }
+
+        /**
+         * Clones this exception.  This is useful for cases where you need
+         * to preserve the type of the original exception as well as the message.
+         * All subclasses should override.
+         */
+        virtual BufferUnderflowException* clone() const {
+            return new BufferUnderflowException( *this );
+        }
+
+        virtual ~BufferUnderflowException() throw() {}
 
     };
 

Modified: activemq/activemq-cpp/decaf/trunk/src/main/decaf/nio/ReadOnlyBufferException.h
URL: http://svn.apache.org/viewvc/activemq/activemq-cpp/decaf/trunk/src/main/decaf/nio/ReadOnlyBufferException.h?rev=594298&r1=594297&r2=594298&view=diff
==============================================================================
--- activemq/activemq-cpp/decaf/trunk/src/main/decaf/nio/ReadOnlyBufferException.h (original)
+++ activemq/activemq-cpp/decaf/trunk/src/main/decaf/nio/ReadOnlyBufferException.h Mon Nov
12 13:04:01 2007
@@ -18,14 +18,68 @@
 #ifndef _DECAF_NIO_READONLYBUFFEREXCEPTION_H_
 #define _DECAF_NIO_READONLYBUFFEREXCEPTION_H_
 
+#include <decaf/util/Config.h>
+#include <decaf/lang/exceptions/UnsupportedOperationException.h>
+
 namespace decaf{
 namespace nio{
 
-    class ReadOnlyBufferException {
+    class DECAF_API ReadOnlyBufferException :
+        public lang::exceptions::UnsupportedOperationException {
     public:
 
-        ReadOnlyBufferException() {}
-        virtual ~ReadOnlyBufferException() {}
+        /**
+         * Default Constructor
+         */
+        ReadOnlyBufferException() throw() {}
+
+        /**
+         * Copy Constructor
+         * @param ex the exception to copy
+         */
+        ReadOnlyBufferException( const lang::Exception& ex ) throw()
+        : lang::exceptions::UnsupportedOperationException() {
+            *(lang::Exception*)this = ex;
+        }
+
+        /**
+         * Copy Constructor
+         * @param ex the exception to copy, which is an instance of this type
+         */
+        ReadOnlyBufferException( const ReadOnlyBufferException& ex ) throw()
+        : lang::exceptions::UnsupportedOperationException() {
+            *(lang::Exception*)this = ex;
+        }
+
+        /**
+         * Consturctor
+         * @param file name of the file were the exception occured.
+         * @param lineNumber line where the exception occured
+         * @param msg the message that was generated
+         */
+        ReadOnlyBufferException( const char* file, const int lineNumber,
+                                  const char* msg, ... ) throw()
+        : lang::exceptions::UnsupportedOperationException() {
+
+            va_list vargs;
+            va_start( vargs, msg );
+            buildMessage( msg, vargs );
+
+            // Set the first mark for this exception.
+            setMark( file, lineNumber );
+        }
+
+        /**
+         * Clones this exception.  This is useful for cases where you need
+         * to preserve the type of the original exception as well as the message.
+         * All subclasses should override.
+         */
+        virtual ReadOnlyBufferException* clone() const {
+            return new ReadOnlyBufferException( *this );
+        }
+
+        virtual ~ReadOnlyBufferException() throw() {}
+
     };
 
 }}



Mime
View raw message