activemq-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From tab...@apache.org
Subject svn commit: r474108 [3/10] - in /incubator/activemq/activemq-cpp/trunk/activemq-cpp/src/main: ./ activemq/connector/openwire/commands/ activemq/connector/openwire/marshal/ activemq/connector/openwire/marshal/v2/
Date Mon, 13 Nov 2006 00:46:30 GMT
Modified: incubator/activemq/activemq-cpp/trunk/activemq-cpp/src/main/activemq/connector/openwire/commands/MessagePull.h
URL: http://svn.apache.org/viewvc/incubator/activemq/activemq-cpp/trunk/activemq-cpp/src/main/activemq/connector/openwire/commands/MessagePull.h?view=diff&rev=474108&r1=474107&r2=474108
==============================================================================
--- incubator/activemq/activemq-cpp/trunk/activemq-cpp/src/main/activemq/connector/openwire/commands/MessagePull.h (original)
+++ incubator/activemq/activemq-cpp/trunk/activemq-cpp/src/main/activemq/connector/openwire/commands/MessagePull.h Sun Nov 12 16:46:23 2006
@@ -73,14 +73,14 @@
          * caller now owns, this will be an exact copy of this one
          * @returns new copy of this object.
          */
-        virtual MessagePull* clone() const;
+        virtual DataStructure* cloneDataStructure() const;
 
         /**
-         * Copy the contents of this object and place them into the
-         * instance of this object type that was passed in.
-         * @return dest - Destination Object
+         * Copy the contents of the passed object into this objects
+         * members, overwriting any existing data.
+         * @return src - Source Object
          */
-        virtual void clone( MessagePull* dest ) const;
+        virtual void copyDataStructure( const DataStructure* src );
 
         virtual const ConsumerId* getConsumerId() const;
         virtual ConsumerId* getConsumerId();

Modified: incubator/activemq/activemq-cpp/trunk/activemq-cpp/src/main/activemq/connector/openwire/commands/NetworkBridgeFilter.cpp
URL: http://svn.apache.org/viewvc/incubator/activemq/activemq-cpp/trunk/activemq-cpp/src/main/activemq/connector/openwire/commands/NetworkBridgeFilter.cpp?view=diff&rev=474108&r1=474107&r2=474108
==============================================================================
--- incubator/activemq/activemq-cpp/trunk/activemq-cpp/src/main/activemq/connector/openwire/commands/NetworkBridgeFilter.cpp (original)
+++ incubator/activemq/activemq-cpp/trunk/activemq-cpp/src/main/activemq/connector/openwire/commands/NetworkBridgeFilter.cpp Sun Nov 12 16:46:23 2006
@@ -15,9 +15,11 @@
  * limitations under the License.
  */
 #include <activemq/connector/openwire/commands/NetworkBridgeFilter.h>
+#include <activemq/exceptions/NullPointerException.h>
 
 using namespace std;
 using namespace activemq;
+using namespace activemq::exceptions;
 using namespace activemq::connector;
 using namespace activemq::connector::openwire;
 using namespace activemq::connector::openwire::commands;
@@ -46,26 +48,33 @@
 }
 
 ////////////////////////////////////////////////////////////////////////////////
-NetworkBridgeFilter* NetworkBridgeFilter::clone() const {
+DataStructure* NetworkBridgeFilter::cloneDataStructure() const {
     NetworkBridgeFilter* networkBridgeFilter = new NetworkBridgeFilter();
 
     // Copy the data from the base class or classes
-    BaseDataStructure::copy( networkBridgeFilter );
+    networkBridgeFilter->copyDataStructure( this );
 
-    networkBridgeFilter->networkTTL = this->getNetworkTTL()->clone();
-    networkBridgeFilter->networkBrokerId = this->getNetworkBrokerId();
-
-    return networkBridgeFilter
+    return networkBridgeFilter;
 }
 
 ////////////////////////////////////////////////////////////////////////////////
-void NetworkBridgeFilter::copy( NetworkBridgeFilter* dest ) const {
+void NetworkBridgeFilter::copyDataStructure( const DataStructure* src ) {
 
-    // Copy the data from the base class or classes
-    BaseDataStructure::copy( networkBridgeFilter );
+    // Copy the data of the base class or classes
+    BaseDataStructure::copyDataStructure( src );
+
+    const NetworkBridgeFilter* srcPtr = dynamic_cast<const NetworkBridgeFilter*>( src );
 
-    dest->setNetworkTTL( this->getNetworkTTL()->clone() );
-    dest->setNetworkBrokerId( this->getNetworkBrokerId() );
+    if( srcPtr == NULL || src == NULL ) {
+    
+        throw exceptions::NullPointerException(
+            __FILE__, __LINE__,
+            "NetworkBridgeFilter::copyDataStructure - src is NULL or invalid" );
+    }
+    this->setNetworkTTL( srcPtr->getNetworkTTL() );
+    this->setNetworkBrokerId( 
+        dynamic_cast<BrokerId*>( 
+            srcPtr->getNetworkBrokerId()->cloneDataStructure() ) );
 }
 
 ////////////////////////////////////////////////////////////////////////////////

Modified: incubator/activemq/activemq-cpp/trunk/activemq-cpp/src/main/activemq/connector/openwire/commands/NetworkBridgeFilter.h
URL: http://svn.apache.org/viewvc/incubator/activemq/activemq-cpp/trunk/activemq-cpp/src/main/activemq/connector/openwire/commands/NetworkBridgeFilter.h?view=diff&rev=474108&r1=474107&r2=474108
==============================================================================
--- incubator/activemq/activemq-cpp/trunk/activemq-cpp/src/main/activemq/connector/openwire/commands/NetworkBridgeFilter.h (original)
+++ incubator/activemq/activemq-cpp/trunk/activemq-cpp/src/main/activemq/connector/openwire/commands/NetworkBridgeFilter.h Sun Nov 12 16:46:23 2006
@@ -71,14 +71,14 @@
          * caller now owns, this will be an exact copy of this one
          * @returns new copy of this object.
          */
-        virtual NetworkBridgeFilter* clone() const;
+        virtual DataStructure* cloneDataStructure() const;
 
         /**
-         * Copy the contents of this object and place them into the
-         * instance of this object type that was passed in.
-         * @return dest - Destination Object
+         * Copy the contents of the passed object into this objects
+         * members, overwriting any existing data.
+         * @return src - Source Object
          */
-        virtual void clone( NetworkBridgeFilter* dest ) const;
+        virtual void copyDataStructure( const DataStructure* src );
 
         virtual const int getNetworkTTL() const;
         virtual int getNetworkTTL();

Modified: incubator/activemq/activemq-cpp/trunk/activemq-cpp/src/main/activemq/connector/openwire/commands/PartialCommand.cpp
URL: http://svn.apache.org/viewvc/incubator/activemq/activemq-cpp/trunk/activemq-cpp/src/main/activemq/connector/openwire/commands/PartialCommand.cpp?view=diff&rev=474108&r1=474107&r2=474108
==============================================================================
--- incubator/activemq/activemq-cpp/trunk/activemq-cpp/src/main/activemq/connector/openwire/commands/PartialCommand.cpp (original)
+++ incubator/activemq/activemq-cpp/trunk/activemq-cpp/src/main/activemq/connector/openwire/commands/PartialCommand.cpp Sun Nov 12 16:46:23 2006
@@ -15,9 +15,11 @@
  * limitations under the License.
  */
 #include <activemq/connector/openwire/commands/PartialCommand.h>
+#include <activemq/exceptions/NullPointerException.h>
 
 using namespace std;
 using namespace activemq;
+using namespace activemq::exceptions;
 using namespace activemq::connector;
 using namespace activemq::connector::openwire;
 using namespace activemq::connector::openwire::commands;
@@ -44,26 +46,31 @@
 }
 
 ////////////////////////////////////////////////////////////////////////////////
-PartialCommand* PartialCommand::clone() const {
+DataStructure* PartialCommand::cloneDataStructure() const {
     PartialCommand* partialCommand = new PartialCommand();
 
     // Copy the data from the base class or classes
-    BaseDataStructure::copy( partialCommand );
+    partialCommand->copyDataStructure( this );
 
-    partialCommand->commandId = this->getCommandId()->clone();
-    partialCommand->data = this->getData()->clone();
-
-    return partialCommand
+    return partialCommand;
 }
 
 ////////////////////////////////////////////////////////////////////////////////
-void PartialCommand::copy( PartialCommand* dest ) const {
+void PartialCommand::copyDataStructure( const DataStructure* src ) {
 
-    // Copy the data from the base class or classes
-    BaseDataStructure::copy( partialCommand );
+    // Copy the data of the base class or classes
+    BaseDataStructure::copyDataStructure( src );
+
+    const PartialCommand* srcPtr = dynamic_cast<const PartialCommand*>( src );
 
-    dest->setCommandId( this->getCommandId()->clone() );
-    dest->setData( this->getData()->clone() );
+    if( srcPtr == NULL || src == NULL ) {
+    
+        throw exceptions::NullPointerException(
+            __FILE__, __LINE__,
+            "PartialCommand::copyDataStructure - src is NULL or invalid" );
+    }
+    this->setCommandId( srcPtr->getCommandId() );
+    this->setData( srcPtr->getData() );
 }
 
 ////////////////////////////////////////////////////////////////////////////////

Modified: incubator/activemq/activemq-cpp/trunk/activemq-cpp/src/main/activemq/connector/openwire/commands/PartialCommand.h
URL: http://svn.apache.org/viewvc/incubator/activemq/activemq-cpp/trunk/activemq-cpp/src/main/activemq/connector/openwire/commands/PartialCommand.h?view=diff&rev=474108&r1=474107&r2=474108
==============================================================================
--- incubator/activemq/activemq-cpp/trunk/activemq-cpp/src/main/activemq/connector/openwire/commands/PartialCommand.h (original)
+++ incubator/activemq/activemq-cpp/trunk/activemq-cpp/src/main/activemq/connector/openwire/commands/PartialCommand.h Sun Nov 12 16:46:23 2006
@@ -70,14 +70,14 @@
          * caller now owns, this will be an exact copy of this one
          * @returns new copy of this object.
          */
-        virtual PartialCommand* clone() const;
+        virtual DataStructure* cloneDataStructure() const;
 
         /**
-         * Copy the contents of this object and place them into the
-         * instance of this object type that was passed in.
-         * @return dest - Destination Object
+         * Copy the contents of the passed object into this objects
+         * members, overwriting any existing data.
+         * @return src - Source Object
          */
-        virtual void clone( PartialCommand* dest ) const;
+        virtual void copyDataStructure( const DataStructure* src );
 
         virtual const int getCommandId() const;
         virtual int getCommandId();

Modified: incubator/activemq/activemq-cpp/trunk/activemq-cpp/src/main/activemq/connector/openwire/commands/ProducerId.cpp
URL: http://svn.apache.org/viewvc/incubator/activemq/activemq-cpp/trunk/activemq-cpp/src/main/activemq/connector/openwire/commands/ProducerId.cpp?view=diff&rev=474108&r1=474107&r2=474108
==============================================================================
--- incubator/activemq/activemq-cpp/trunk/activemq-cpp/src/main/activemq/connector/openwire/commands/ProducerId.cpp (original)
+++ incubator/activemq/activemq-cpp/trunk/activemq-cpp/src/main/activemq/connector/openwire/commands/ProducerId.cpp Sun Nov 12 16:46:23 2006
@@ -15,9 +15,11 @@
  * limitations under the License.
  */
 #include <activemq/connector/openwire/commands/ProducerId.h>
+#include <activemq/exceptions/NullPointerException.h>
 
 using namespace std;
 using namespace activemq;
+using namespace activemq::exceptions;
 using namespace activemq::connector;
 using namespace activemq::connector::openwire;
 using namespace activemq::connector::openwire::commands;
@@ -46,28 +48,32 @@
 }
 
 ////////////////////////////////////////////////////////////////////////////////
-ProducerId* ProducerId::clone() const {
+DataStructure* ProducerId::cloneDataStructure() const {
     ProducerId* producerId = new ProducerId();
 
     // Copy the data from the base class or classes
-    BaseDataStructure::copy( producerId );
+    producerId->copyDataStructure( this );
 
-    producerId->connectionId = this->getConnectionId();
-    producerId->value = this->getValue()->clone();
-    producerId->sessionId = this->getSessionId()->clone();
-
-    return producerId
+    return producerId;
 }
 
 ////////////////////////////////////////////////////////////////////////////////
-void ProducerId::copy( ProducerId* dest ) const {
+void ProducerId::copyDataStructure( const DataStructure* src ) {
 
-    // Copy the data from the base class or classes
-    BaseDataStructure::copy( producerId );
+    // Copy the data of the base class or classes
+    BaseDataStructure::copyDataStructure( src );
+
+    const ProducerId* srcPtr = dynamic_cast<const ProducerId*>( src );
 
-    dest->setConnectionId( this->getConnectionId() );
-    dest->setValue( this->getValue()->clone() );
-    dest->setSessionId( this->getSessionId()->clone() );
+    if( srcPtr == NULL || src == NULL ) {
+    
+        throw exceptions::NullPointerException(
+            __FILE__, __LINE__,
+            "ProducerId::copyDataStructure - src is NULL or invalid" );
+    }
+    this->setConnectionId( srcPtr->getConnectionId() );
+    this->setValue( srcPtr->getValue() );
+    this->setSessionId( srcPtr->getSessionId() );
 }
 
 ////////////////////////////////////////////////////////////////////////////////

Modified: incubator/activemq/activemq-cpp/trunk/activemq-cpp/src/main/activemq/connector/openwire/commands/ProducerId.h
URL: http://svn.apache.org/viewvc/incubator/activemq/activemq-cpp/trunk/activemq-cpp/src/main/activemq/connector/openwire/commands/ProducerId.h?view=diff&rev=474108&r1=474107&r2=474108
==============================================================================
--- incubator/activemq/activemq-cpp/trunk/activemq-cpp/src/main/activemq/connector/openwire/commands/ProducerId.h (original)
+++ incubator/activemq/activemq-cpp/trunk/activemq-cpp/src/main/activemq/connector/openwire/commands/ProducerId.h Sun Nov 12 16:46:23 2006
@@ -71,14 +71,14 @@
          * caller now owns, this will be an exact copy of this one
          * @returns new copy of this object.
          */
-        virtual ProducerId* clone() const;
+        virtual DataStructure* cloneDataStructure() const;
 
         /**
-         * Copy the contents of this object and place them into the
-         * instance of this object type that was passed in.
-         * @return dest - Destination Object
+         * Copy the contents of the passed object into this objects
+         * members, overwriting any existing data.
+         * @return src - Source Object
          */
-        virtual void clone( ProducerId* dest ) const;
+        virtual void copyDataStructure( const DataStructure* src );
 
         virtual const std::string& getConnectionId() const;
         virtual std::string& getConnectionId();

Modified: incubator/activemq/activemq-cpp/trunk/activemq-cpp/src/main/activemq/connector/openwire/commands/ProducerInfo.cpp
URL: http://svn.apache.org/viewvc/incubator/activemq/activemq-cpp/trunk/activemq-cpp/src/main/activemq/connector/openwire/commands/ProducerInfo.cpp?view=diff&rev=474108&r1=474107&r2=474108
==============================================================================
--- incubator/activemq/activemq-cpp/trunk/activemq-cpp/src/main/activemq/connector/openwire/commands/ProducerInfo.cpp (original)
+++ incubator/activemq/activemq-cpp/trunk/activemq-cpp/src/main/activemq/connector/openwire/commands/ProducerInfo.cpp Sun Nov 12 16:46:23 2006
@@ -15,9 +15,11 @@
  * limitations under the License.
  */
 #include <activemq/connector/openwire/commands/ProducerInfo.h>
+#include <activemq/exceptions/NullPointerException.h>
 
 using namespace std;
 using namespace activemq;
+using namespace activemq::exceptions;
 using namespace activemq::connector;
 using namespace activemq::connector::openwire;
 using namespace activemq::connector::openwire::commands;
@@ -51,36 +53,40 @@
 }
 
 ////////////////////////////////////////////////////////////////////////////////
-ProducerInfo* ProducerInfo::clone() const {
+DataStructure* ProducerInfo::cloneDataStructure() const {
     ProducerInfo* producerInfo = new ProducerInfo();
 
     // Copy the data from the base class or classes
-    BaseCommand::copy( producerInfo );
+    producerInfo->copyDataStructure( this );
 
-    producerInfo->producerId = this->getProducerId();
-    producerInfo->destination = this->getDestination();
-    for( size_t ibrokerPath = 0; ibrokerPath < brokerPath.size(); ++ibrokerPath ) {
-        producerInfo->getBrokerPath().push_back( 
-            this->brokerPath[ibrokerPath]->clone();
-    }
-    producerInfo->dispatchAsync = this->getDispatchAsync()->clone();
-
-    return producerInfo
+    return producerInfo;
 }
 
 ////////////////////////////////////////////////////////////////////////////////
-void ProducerInfo::copy( ProducerInfo* dest ) const {
+void ProducerInfo::copyDataStructure( const DataStructure* src ) {
 
-    // Copy the data from the base class or classes
-    BaseCommand::copy( producerInfo );
+    // Copy the data of the base class or classes
+    BaseCommand::copyDataStructure( src );
 
-    dest->setProducerId( this->getProducerId() );
-    dest->setDestination( this->getDestination() );
-    for( size_t ibrokerPath = 0; ibrokerPath < brokerPath.size(); ++ibrokerPath ) {
-        dest->getBrokerPath().push_back( 
-            this->brokerPath[ibrokerPath]->clone() );
+    const ProducerInfo* srcPtr = dynamic_cast<const ProducerInfo*>( src );
+
+    if( srcPtr == NULL || src == NULL ) {
+    
+        throw exceptions::NullPointerException(
+            __FILE__, __LINE__,
+            "ProducerInfo::copyDataStructure - src is NULL or invalid" );
+    }
+    this->setProducerId( 
+        dynamic_cast<ProducerId*>( 
+            srcPtr->getProducerId()->cloneDataStructure() ) );
+    this->setDestination( 
+        dynamic_cast<ActiveMQDestination*>( 
+            srcPtr->getDestination()->cloneDataStructure() ) );
+    for( size_t ibrokerPath = 0; ibrokerPath < srcPtr->getBrokerPath().size(); ++ibrokerPath ) {
+        this->getBrokerPath().push_back( 
+            srcPtr->getBrokerPath()[ibrokerPath]->cloneDataStructure() );
     }
-    dest->setDispatchAsync( this->getDispatchAsync()->clone() );
+    this->setDispatchAsync( srcPtr->getDispatchAsync() );
 }
 
 ////////////////////////////////////////////////////////////////////////////////

Modified: incubator/activemq/activemq-cpp/trunk/activemq-cpp/src/main/activemq/connector/openwire/commands/ProducerInfo.h
URL: http://svn.apache.org/viewvc/incubator/activemq/activemq-cpp/trunk/activemq-cpp/src/main/activemq/connector/openwire/commands/ProducerInfo.h?view=diff&rev=474108&r1=474107&r2=474108
==============================================================================
--- incubator/activemq/activemq-cpp/trunk/activemq-cpp/src/main/activemq/connector/openwire/commands/ProducerInfo.h (original)
+++ incubator/activemq/activemq-cpp/trunk/activemq-cpp/src/main/activemq/connector/openwire/commands/ProducerInfo.h Sun Nov 12 16:46:23 2006
@@ -75,14 +75,14 @@
          * caller now owns, this will be an exact copy of this one
          * @returns new copy of this object.
          */
-        virtual ProducerInfo* clone() const;
+        virtual DataStructure* cloneDataStructure() const;
 
         /**
-         * Copy the contents of this object and place them into the
-         * instance of this object type that was passed in.
-         * @return dest - Destination Object
+         * Copy the contents of the passed object into this objects
+         * members, overwriting any existing data.
+         * @return src - Source Object
          */
-        virtual void clone( ProducerInfo* dest ) const;
+        virtual void copyDataStructure( const DataStructure* src );
 
         virtual const ProducerId* getProducerId() const;
         virtual ProducerId* getProducerId();

Modified: incubator/activemq/activemq-cpp/trunk/activemq-cpp/src/main/activemq/connector/openwire/commands/RemoveInfo.cpp
URL: http://svn.apache.org/viewvc/incubator/activemq/activemq-cpp/trunk/activemq-cpp/src/main/activemq/connector/openwire/commands/RemoveInfo.cpp?view=diff&rev=474108&r1=474107&r2=474108
==============================================================================
--- incubator/activemq/activemq-cpp/trunk/activemq-cpp/src/main/activemq/connector/openwire/commands/RemoveInfo.cpp (original)
+++ incubator/activemq/activemq-cpp/trunk/activemq-cpp/src/main/activemq/connector/openwire/commands/RemoveInfo.cpp Sun Nov 12 16:46:23 2006
@@ -15,9 +15,11 @@
  * limitations under the License.
  */
 #include <activemq/connector/openwire/commands/RemoveInfo.h>
+#include <activemq/exceptions/NullPointerException.h>
 
 using namespace std;
 using namespace activemq;
+using namespace activemq::exceptions;
 using namespace activemq::connector;
 using namespace activemq::connector::openwire;
 using namespace activemq::connector::openwire::commands;
@@ -45,24 +47,32 @@
 }
 
 ////////////////////////////////////////////////////////////////////////////////
-RemoveInfo* RemoveInfo::clone() const {
+DataStructure* RemoveInfo::cloneDataStructure() const {
     RemoveInfo* removeInfo = new RemoveInfo();
 
     // Copy the data from the base class or classes
-    BaseCommand::copy( removeInfo );
+    removeInfo->copyDataStructure( this );
 
-    removeInfo->objectId = this->getObjectId();
-
-    return removeInfo
+    return removeInfo;
 }
 
 ////////////////////////////////////////////////////////////////////////////////
-void RemoveInfo::copy( RemoveInfo* dest ) const {
+void RemoveInfo::copyDataStructure( const DataStructure* src ) {
 
-    // Copy the data from the base class or classes
-    BaseCommand::copy( removeInfo );
+    // Copy the data of the base class or classes
+    BaseCommand::copyDataStructure( src );
+
+    const RemoveInfo* srcPtr = dynamic_cast<const RemoveInfo*>( src );
 
-    dest->setObjectId( this->getObjectId() );
+    if( srcPtr == NULL || src == NULL ) {
+    
+        throw exceptions::NullPointerException(
+            __FILE__, __LINE__,
+            "RemoveInfo::copyDataStructure - src is NULL or invalid" );
+    }
+    this->setObjectId( 
+        dynamic_cast<DataStructure*>( 
+            srcPtr->getObjectId()->cloneDataStructure() ) );
 }
 
 ////////////////////////////////////////////////////////////////////////////////

Modified: incubator/activemq/activemq-cpp/trunk/activemq-cpp/src/main/activemq/connector/openwire/commands/RemoveInfo.h
URL: http://svn.apache.org/viewvc/incubator/activemq/activemq-cpp/trunk/activemq-cpp/src/main/activemq/connector/openwire/commands/RemoveInfo.h?view=diff&rev=474108&r1=474107&r2=474108
==============================================================================
--- incubator/activemq/activemq-cpp/trunk/activemq-cpp/src/main/activemq/connector/openwire/commands/RemoveInfo.h (original)
+++ incubator/activemq/activemq-cpp/trunk/activemq-cpp/src/main/activemq/connector/openwire/commands/RemoveInfo.h Sun Nov 12 16:46:23 2006
@@ -70,14 +70,14 @@
          * caller now owns, this will be an exact copy of this one
          * @returns new copy of this object.
          */
-        virtual RemoveInfo* clone() const;
+        virtual DataStructure* cloneDataStructure() const;
 
         /**
-         * Copy the contents of this object and place them into the
-         * instance of this object type that was passed in.
-         * @return dest - Destination Object
+         * Copy the contents of the passed object into this objects
+         * members, overwriting any existing data.
+         * @return src - Source Object
          */
-        virtual void clone( RemoveInfo* dest ) const;
+        virtual void copyDataStructure( const DataStructure* src );
 
         virtual const DataStructure* getObjectId() const;
         virtual DataStructure* getObjectId();

Modified: incubator/activemq/activemq-cpp/trunk/activemq-cpp/src/main/activemq/connector/openwire/commands/RemoveSubscriptionInfo.cpp
URL: http://svn.apache.org/viewvc/incubator/activemq/activemq-cpp/trunk/activemq-cpp/src/main/activemq/connector/openwire/commands/RemoveSubscriptionInfo.cpp?view=diff&rev=474108&r1=474107&r2=474108
==============================================================================
--- incubator/activemq/activemq-cpp/trunk/activemq-cpp/src/main/activemq/connector/openwire/commands/RemoveSubscriptionInfo.cpp (original)
+++ incubator/activemq/activemq-cpp/trunk/activemq-cpp/src/main/activemq/connector/openwire/commands/RemoveSubscriptionInfo.cpp Sun Nov 12 16:46:23 2006
@@ -15,9 +15,11 @@
  * limitations under the License.
  */
 #include <activemq/connector/openwire/commands/RemoveSubscriptionInfo.h>
+#include <activemq/exceptions/NullPointerException.h>
 
 using namespace std;
 using namespace activemq;
+using namespace activemq::exceptions;
 using namespace activemq::connector;
 using namespace activemq::connector::openwire;
 using namespace activemq::connector::openwire::commands;
@@ -47,28 +49,34 @@
 }
 
 ////////////////////////////////////////////////////////////////////////////////
-RemoveSubscriptionInfo* RemoveSubscriptionInfo::clone() const {
+DataStructure* RemoveSubscriptionInfo::cloneDataStructure() const {
     RemoveSubscriptionInfo* removeSubscriptionInfo = new RemoveSubscriptionInfo();
 
     // Copy the data from the base class or classes
-    BaseCommand::copy( removeSubscriptionInfo );
+    removeSubscriptionInfo->copyDataStructure( this );
 
-    removeSubscriptionInfo->connectionId = this->getConnectionId();
-    removeSubscriptionInfo->subcriptionName = this->getSubcriptionName();
-    removeSubscriptionInfo->clientId = this->getClientId();
-
-    return removeSubscriptionInfo
+    return removeSubscriptionInfo;
 }
 
 ////////////////////////////////////////////////////////////////////////////////
-void RemoveSubscriptionInfo::copy( RemoveSubscriptionInfo* dest ) const {
+void RemoveSubscriptionInfo::copyDataStructure( const DataStructure* src ) {
 
-    // Copy the data from the base class or classes
-    BaseCommand::copy( removeSubscriptionInfo );
+    // Copy the data of the base class or classes
+    BaseCommand::copyDataStructure( src );
+
+    const RemoveSubscriptionInfo* srcPtr = dynamic_cast<const RemoveSubscriptionInfo*>( src );
 
-    dest->setConnectionId( this->getConnectionId() );
-    dest->setSubcriptionName( this->getSubcriptionName() );
-    dest->setClientId( this->getClientId() );
+    if( srcPtr == NULL || src == NULL ) {
+    
+        throw exceptions::NullPointerException(
+            __FILE__, __LINE__,
+            "RemoveSubscriptionInfo::copyDataStructure - src is NULL or invalid" );
+    }
+    this->setConnectionId( 
+        dynamic_cast<ConnectionId*>( 
+            srcPtr->getConnectionId()->cloneDataStructure() ) );
+    this->setSubcriptionName( srcPtr->getSubcriptionName() );
+    this->setClientId( srcPtr->getClientId() );
 }
 
 ////////////////////////////////////////////////////////////////////////////////

Modified: incubator/activemq/activemq-cpp/trunk/activemq-cpp/src/main/activemq/connector/openwire/commands/RemoveSubscriptionInfo.h
URL: http://svn.apache.org/viewvc/incubator/activemq/activemq-cpp/trunk/activemq-cpp/src/main/activemq/connector/openwire/commands/RemoveSubscriptionInfo.h?view=diff&rev=474108&r1=474107&r2=474108
==============================================================================
--- incubator/activemq/activemq-cpp/trunk/activemq-cpp/src/main/activemq/connector/openwire/commands/RemoveSubscriptionInfo.h (original)
+++ incubator/activemq/activemq-cpp/trunk/activemq-cpp/src/main/activemq/connector/openwire/commands/RemoveSubscriptionInfo.h Sun Nov 12 16:46:23 2006
@@ -72,14 +72,14 @@
          * caller now owns, this will be an exact copy of this one
          * @returns new copy of this object.
          */
-        virtual RemoveSubscriptionInfo* clone() const;
+        virtual DataStructure* cloneDataStructure() const;
 
         /**
-         * Copy the contents of this object and place them into the
-         * instance of this object type that was passed in.
-         * @return dest - Destination Object
+         * Copy the contents of the passed object into this objects
+         * members, overwriting any existing data.
+         * @return src - Source Object
          */
-        virtual void clone( RemoveSubscriptionInfo* dest ) const;
+        virtual void copyDataStructure( const DataStructure* src );
 
         virtual const ConnectionId* getConnectionId() const;
         virtual ConnectionId* getConnectionId();

Modified: incubator/activemq/activemq-cpp/trunk/activemq-cpp/src/main/activemq/connector/openwire/commands/ReplayCommand.cpp
URL: http://svn.apache.org/viewvc/incubator/activemq/activemq-cpp/trunk/activemq-cpp/src/main/activemq/connector/openwire/commands/ReplayCommand.cpp?view=diff&rev=474108&r1=474107&r2=474108
==============================================================================
--- incubator/activemq/activemq-cpp/trunk/activemq-cpp/src/main/activemq/connector/openwire/commands/ReplayCommand.cpp (original)
+++ incubator/activemq/activemq-cpp/trunk/activemq-cpp/src/main/activemq/connector/openwire/commands/ReplayCommand.cpp Sun Nov 12 16:46:23 2006
@@ -15,9 +15,11 @@
  * limitations under the License.
  */
 #include <activemq/connector/openwire/commands/ReplayCommand.h>
+#include <activemq/exceptions/NullPointerException.h>
 
 using namespace std;
 using namespace activemq;
+using namespace activemq::exceptions;
 using namespace activemq::connector;
 using namespace activemq::connector::openwire;
 using namespace activemq::connector::openwire::commands;
@@ -45,26 +47,31 @@
 }
 
 ////////////////////////////////////////////////////////////////////////////////
-ReplayCommand* ReplayCommand::clone() const {
+DataStructure* ReplayCommand::cloneDataStructure() const {
     ReplayCommand* replayCommand = new ReplayCommand();
 
     // Copy the data from the base class or classes
-    BaseCommand::copy( replayCommand );
+    replayCommand->copyDataStructure( this );
 
-    replayCommand->firstNakNumber = this->getFirstNakNumber()->clone();
-    replayCommand->lastNakNumber = this->getLastNakNumber()->clone();
-
-    return replayCommand
+    return replayCommand;
 }
 
 ////////////////////////////////////////////////////////////////////////////////
-void ReplayCommand::copy( ReplayCommand* dest ) const {
+void ReplayCommand::copyDataStructure( const DataStructure* src ) {
 
-    // Copy the data from the base class or classes
-    BaseCommand::copy( replayCommand );
+    // Copy the data of the base class or classes
+    BaseCommand::copyDataStructure( src );
+
+    const ReplayCommand* srcPtr = dynamic_cast<const ReplayCommand*>( src );
 
-    dest->setFirstNakNumber( this->getFirstNakNumber()->clone() );
-    dest->setLastNakNumber( this->getLastNakNumber()->clone() );
+    if( srcPtr == NULL || src == NULL ) {
+    
+        throw exceptions::NullPointerException(
+            __FILE__, __LINE__,
+            "ReplayCommand::copyDataStructure - src is NULL or invalid" );
+    }
+    this->setFirstNakNumber( srcPtr->getFirstNakNumber() );
+    this->setLastNakNumber( srcPtr->getLastNakNumber() );
 }
 
 ////////////////////////////////////////////////////////////////////////////////

Modified: incubator/activemq/activemq-cpp/trunk/activemq-cpp/src/main/activemq/connector/openwire/commands/ReplayCommand.h
URL: http://svn.apache.org/viewvc/incubator/activemq/activemq-cpp/trunk/activemq-cpp/src/main/activemq/connector/openwire/commands/ReplayCommand.h?view=diff&rev=474108&r1=474107&r2=474108
==============================================================================
--- incubator/activemq/activemq-cpp/trunk/activemq-cpp/src/main/activemq/connector/openwire/commands/ReplayCommand.h (original)
+++ incubator/activemq/activemq-cpp/trunk/activemq-cpp/src/main/activemq/connector/openwire/commands/ReplayCommand.h Sun Nov 12 16:46:23 2006
@@ -70,14 +70,14 @@
          * caller now owns, this will be an exact copy of this one
          * @returns new copy of this object.
          */
-        virtual ReplayCommand* clone() const;
+        virtual DataStructure* cloneDataStructure() const;
 
         /**
-         * Copy the contents of this object and place them into the
-         * instance of this object type that was passed in.
-         * @return dest - Destination Object
+         * Copy the contents of the passed object into this objects
+         * members, overwriting any existing data.
+         * @return src - Source Object
          */
-        virtual void clone( ReplayCommand* dest ) const;
+        virtual void copyDataStructure( const DataStructure* src );
 
         virtual const int getFirstNakNumber() const;
         virtual int getFirstNakNumber();

Modified: incubator/activemq/activemq-cpp/trunk/activemq-cpp/src/main/activemq/connector/openwire/commands/Response.cpp
URL: http://svn.apache.org/viewvc/incubator/activemq/activemq-cpp/trunk/activemq-cpp/src/main/activemq/connector/openwire/commands/Response.cpp?view=diff&rev=474108&r1=474107&r2=474108
==============================================================================
--- incubator/activemq/activemq-cpp/trunk/activemq-cpp/src/main/activemq/connector/openwire/commands/Response.cpp (original)
+++ incubator/activemq/activemq-cpp/trunk/activemq-cpp/src/main/activemq/connector/openwire/commands/Response.cpp Sun Nov 12 16:46:23 2006
@@ -15,9 +15,11 @@
  * limitations under the License.
  */
 #include <activemq/connector/openwire/commands/Response.h>
+#include <activemq/exceptions/NullPointerException.h>
 
 using namespace std;
 using namespace activemq;
+using namespace activemq::exceptions;
 using namespace activemq::connector;
 using namespace activemq::connector::openwire;
 using namespace activemq::connector::openwire::commands;
@@ -44,24 +46,30 @@
 }
 
 ////////////////////////////////////////////////////////////////////////////////
-Response* Response::clone() const {
+DataStructure* Response::cloneDataStructure() const {
     Response* response = new Response();
 
     // Copy the data from the base class or classes
-    BaseCommand::copy( response );
+    response->copyDataStructure( this );
 
-    response->correlationId = this->getCorrelationId()->clone();
-
-    return response
+    return response;
 }
 
 ////////////////////////////////////////////////////////////////////////////////
-void Response::copy( Response* dest ) const {
+void Response::copyDataStructure( const DataStructure* src ) {
 
-    // Copy the data from the base class or classes
-    BaseCommand::copy( response );
+    // Copy the data of the base class or classes
+    BaseCommand::copyDataStructure( src );
+
+    const Response* srcPtr = dynamic_cast<const Response*>( src );
 
-    dest->setCorrelationId( this->getCorrelationId()->clone() );
+    if( srcPtr == NULL || src == NULL ) {
+    
+        throw exceptions::NullPointerException(
+            __FILE__, __LINE__,
+            "Response::copyDataStructure - src is NULL or invalid" );
+    }
+    this->setCorrelationId( srcPtr->getCorrelationId() );
 }
 
 ////////////////////////////////////////////////////////////////////////////////

Modified: incubator/activemq/activemq-cpp/trunk/activemq-cpp/src/main/activemq/connector/openwire/commands/Response.h
URL: http://svn.apache.org/viewvc/incubator/activemq/activemq-cpp/trunk/activemq-cpp/src/main/activemq/connector/openwire/commands/Response.h?view=diff&rev=474108&r1=474107&r2=474108
==============================================================================
--- incubator/activemq/activemq-cpp/trunk/activemq-cpp/src/main/activemq/connector/openwire/commands/Response.h (original)
+++ incubator/activemq/activemq-cpp/trunk/activemq-cpp/src/main/activemq/connector/openwire/commands/Response.h Sun Nov 12 16:46:23 2006
@@ -69,14 +69,14 @@
          * caller now owns, this will be an exact copy of this one
          * @returns new copy of this object.
          */
-        virtual Response* clone() const;
+        virtual DataStructure* cloneDataStructure() const;
 
         /**
-         * Copy the contents of this object and place them into the
-         * instance of this object type that was passed in.
-         * @return dest - Destination Object
+         * Copy the contents of the passed object into this objects
+         * members, overwriting any existing data.
+         * @return src - Source Object
          */
-        virtual void clone( Response* dest ) const;
+        virtual void copyDataStructure( const DataStructure* src );
 
         virtual const int getCorrelationId() const;
         virtual int getCorrelationId();

Modified: incubator/activemq/activemq-cpp/trunk/activemq-cpp/src/main/activemq/connector/openwire/commands/SessionId.cpp
URL: http://svn.apache.org/viewvc/incubator/activemq/activemq-cpp/trunk/activemq-cpp/src/main/activemq/connector/openwire/commands/SessionId.cpp?view=diff&rev=474108&r1=474107&r2=474108
==============================================================================
--- incubator/activemq/activemq-cpp/trunk/activemq-cpp/src/main/activemq/connector/openwire/commands/SessionId.cpp (original)
+++ incubator/activemq/activemq-cpp/trunk/activemq-cpp/src/main/activemq/connector/openwire/commands/SessionId.cpp Sun Nov 12 16:46:23 2006
@@ -15,9 +15,11 @@
  * limitations under the License.
  */
 #include <activemq/connector/openwire/commands/SessionId.h>
+#include <activemq/exceptions/NullPointerException.h>
 
 using namespace std;
 using namespace activemq;
+using namespace activemq::exceptions;
 using namespace activemq::connector;
 using namespace activemq::connector::openwire;
 using namespace activemq::connector::openwire::commands;
@@ -45,26 +47,31 @@
 }
 
 ////////////////////////////////////////////////////////////////////////////////
-SessionId* SessionId::clone() const {
+DataStructure* SessionId::cloneDataStructure() const {
     SessionId* sessionId = new SessionId();
 
     // Copy the data from the base class or classes
-    BaseDataStructure::copy( sessionId );
+    sessionId->copyDataStructure( this );
 
-    sessionId->connectionId = this->getConnectionId();
-    sessionId->value = this->getValue()->clone();
-
-    return sessionId
+    return sessionId;
 }
 
 ////////////////////////////////////////////////////////////////////////////////
-void SessionId::copy( SessionId* dest ) const {
+void SessionId::copyDataStructure( const DataStructure* src ) {
 
-    // Copy the data from the base class or classes
-    BaseDataStructure::copy( sessionId );
+    // Copy the data of the base class or classes
+    BaseDataStructure::copyDataStructure( src );
+
+    const SessionId* srcPtr = dynamic_cast<const SessionId*>( src );
 
-    dest->setConnectionId( this->getConnectionId() );
-    dest->setValue( this->getValue()->clone() );
+    if( srcPtr == NULL || src == NULL ) {
+    
+        throw exceptions::NullPointerException(
+            __FILE__, __LINE__,
+            "SessionId::copyDataStructure - src is NULL or invalid" );
+    }
+    this->setConnectionId( srcPtr->getConnectionId() );
+    this->setValue( srcPtr->getValue() );
 }
 
 ////////////////////////////////////////////////////////////////////////////////

Modified: incubator/activemq/activemq-cpp/trunk/activemq-cpp/src/main/activemq/connector/openwire/commands/SessionId.h
URL: http://svn.apache.org/viewvc/incubator/activemq/activemq-cpp/trunk/activemq-cpp/src/main/activemq/connector/openwire/commands/SessionId.h?view=diff&rev=474108&r1=474107&r2=474108
==============================================================================
--- incubator/activemq/activemq-cpp/trunk/activemq-cpp/src/main/activemq/connector/openwire/commands/SessionId.h (original)
+++ incubator/activemq/activemq-cpp/trunk/activemq-cpp/src/main/activemq/connector/openwire/commands/SessionId.h Sun Nov 12 16:46:23 2006
@@ -70,14 +70,14 @@
          * caller now owns, this will be an exact copy of this one
          * @returns new copy of this object.
          */
-        virtual SessionId* clone() const;
+        virtual DataStructure* cloneDataStructure() const;
 
         /**
-         * Copy the contents of this object and place them into the
-         * instance of this object type that was passed in.
-         * @return dest - Destination Object
+         * Copy the contents of the passed object into this objects
+         * members, overwriting any existing data.
+         * @return src - Source Object
          */
-        virtual void clone( SessionId* dest ) const;
+        virtual void copyDataStructure( const DataStructure* src );
 
         virtual const std::string& getConnectionId() const;
         virtual std::string& getConnectionId();

Modified: incubator/activemq/activemq-cpp/trunk/activemq-cpp/src/main/activemq/connector/openwire/commands/SessionInfo.cpp
URL: http://svn.apache.org/viewvc/incubator/activemq/activemq-cpp/trunk/activemq-cpp/src/main/activemq/connector/openwire/commands/SessionInfo.cpp?view=diff&rev=474108&r1=474107&r2=474108
==============================================================================
--- incubator/activemq/activemq-cpp/trunk/activemq-cpp/src/main/activemq/connector/openwire/commands/SessionInfo.cpp (original)
+++ incubator/activemq/activemq-cpp/trunk/activemq-cpp/src/main/activemq/connector/openwire/commands/SessionInfo.cpp Sun Nov 12 16:46:23 2006
@@ -15,9 +15,11 @@
  * limitations under the License.
  */
 #include <activemq/connector/openwire/commands/SessionInfo.h>
+#include <activemq/exceptions/NullPointerException.h>
 
 using namespace std;
 using namespace activemq;
+using namespace activemq::exceptions;
 using namespace activemq::connector;
 using namespace activemq::connector::openwire;
 using namespace activemq::connector::openwire::commands;
@@ -45,24 +47,32 @@
 }
 
 ////////////////////////////////////////////////////////////////////////////////
-SessionInfo* SessionInfo::clone() const {
+DataStructure* SessionInfo::cloneDataStructure() const {
     SessionInfo* sessionInfo = new SessionInfo();
 
     // Copy the data from the base class or classes
-    BaseCommand::copy( sessionInfo );
+    sessionInfo->copyDataStructure( this );
 
-    sessionInfo->sessionId = this->getSessionId();
-
-    return sessionInfo
+    return sessionInfo;
 }
 
 ////////////////////////////////////////////////////////////////////////////////
-void SessionInfo::copy( SessionInfo* dest ) const {
+void SessionInfo::copyDataStructure( const DataStructure* src ) {
 
-    // Copy the data from the base class or classes
-    BaseCommand::copy( sessionInfo );
+    // Copy the data of the base class or classes
+    BaseCommand::copyDataStructure( src );
+
+    const SessionInfo* srcPtr = dynamic_cast<const SessionInfo*>( src );
 
-    dest->setSessionId( this->getSessionId() );
+    if( srcPtr == NULL || src == NULL ) {
+    
+        throw exceptions::NullPointerException(
+            __FILE__, __LINE__,
+            "SessionInfo::copyDataStructure - src is NULL or invalid" );
+    }
+    this->setSessionId( 
+        dynamic_cast<SessionId*>( 
+            srcPtr->getSessionId()->cloneDataStructure() ) );
 }
 
 ////////////////////////////////////////////////////////////////////////////////

Modified: incubator/activemq/activemq-cpp/trunk/activemq-cpp/src/main/activemq/connector/openwire/commands/SessionInfo.h
URL: http://svn.apache.org/viewvc/incubator/activemq/activemq-cpp/trunk/activemq-cpp/src/main/activemq/connector/openwire/commands/SessionInfo.h?view=diff&rev=474108&r1=474107&r2=474108
==============================================================================
--- incubator/activemq/activemq-cpp/trunk/activemq-cpp/src/main/activemq/connector/openwire/commands/SessionInfo.h (original)
+++ incubator/activemq/activemq-cpp/trunk/activemq-cpp/src/main/activemq/connector/openwire/commands/SessionInfo.h Sun Nov 12 16:46:23 2006
@@ -70,14 +70,14 @@
          * caller now owns, this will be an exact copy of this one
          * @returns new copy of this object.
          */
-        virtual SessionInfo* clone() const;
+        virtual DataStructure* cloneDataStructure() const;
 
         /**
-         * Copy the contents of this object and place them into the
-         * instance of this object type that was passed in.
-         * @return dest - Destination Object
+         * Copy the contents of the passed object into this objects
+         * members, overwriting any existing data.
+         * @return src - Source Object
          */
-        virtual void clone( SessionInfo* dest ) const;
+        virtual void copyDataStructure( const DataStructure* src );
 
         virtual const SessionId* getSessionId() const;
         virtual SessionId* getSessionId();

Modified: incubator/activemq/activemq-cpp/trunk/activemq-cpp/src/main/activemq/connector/openwire/commands/ShutdownInfo.cpp
URL: http://svn.apache.org/viewvc/incubator/activemq/activemq-cpp/trunk/activemq-cpp/src/main/activemq/connector/openwire/commands/ShutdownInfo.cpp?view=diff&rev=474108&r1=474107&r2=474108
==============================================================================
--- incubator/activemq/activemq-cpp/trunk/activemq-cpp/src/main/activemq/connector/openwire/commands/ShutdownInfo.cpp (original)
+++ incubator/activemq/activemq-cpp/trunk/activemq-cpp/src/main/activemq/connector/openwire/commands/ShutdownInfo.cpp Sun Nov 12 16:46:23 2006
@@ -15,9 +15,11 @@
  * limitations under the License.
  */
 #include <activemq/connector/openwire/commands/ShutdownInfo.h>
+#include <activemq/exceptions/NullPointerException.h>
 
 using namespace std;
 using namespace activemq;
+using namespace activemq::exceptions;
 using namespace activemq::connector;
 using namespace activemq::connector::openwire;
 using namespace activemq::connector::openwire::commands;
@@ -43,22 +45,29 @@
 }
 
 ////////////////////////////////////////////////////////////////////////////////
-ShutdownInfo* ShutdownInfo::clone() const {
+DataStructure* ShutdownInfo::cloneDataStructure() const {
     ShutdownInfo* shutdownInfo = new ShutdownInfo();
 
     // Copy the data from the base class or classes
-    BaseCommand::copy( shutdownInfo );
+    shutdownInfo->copyDataStructure( this );
 
-
-    return shutdownInfo
+    return shutdownInfo;
 }
 
 ////////////////////////////////////////////////////////////////////////////////
-void ShutdownInfo::copy( ShutdownInfo* dest ) const {
+void ShutdownInfo::copyDataStructure( const DataStructure* src ) {
 
-    // Copy the data from the base class or classes
-    BaseCommand::copy( shutdownInfo );
+    // Copy the data of the base class or classes
+    BaseCommand::copyDataStructure( src );
+
+    const ShutdownInfo* srcPtr = dynamic_cast<const ShutdownInfo*>( src );
 
+    if( srcPtr == NULL || src == NULL ) {
+    
+        throw exceptions::NullPointerException(
+            __FILE__, __LINE__,
+            "ShutdownInfo::copyDataStructure - src is NULL or invalid" );
+    }
 }
 
 ////////////////////////////////////////////////////////////////////////////////

Modified: incubator/activemq/activemq-cpp/trunk/activemq-cpp/src/main/activemq/connector/openwire/commands/ShutdownInfo.h
URL: http://svn.apache.org/viewvc/incubator/activemq/activemq-cpp/trunk/activemq-cpp/src/main/activemq/connector/openwire/commands/ShutdownInfo.h?view=diff&rev=474108&r1=474107&r2=474108
==============================================================================
--- incubator/activemq/activemq-cpp/trunk/activemq-cpp/src/main/activemq/connector/openwire/commands/ShutdownInfo.h (original)
+++ incubator/activemq/activemq-cpp/trunk/activemq-cpp/src/main/activemq/connector/openwire/commands/ShutdownInfo.h Sun Nov 12 16:46:23 2006
@@ -68,14 +68,14 @@
          * caller now owns, this will be an exact copy of this one
          * @returns new copy of this object.
          */
-        virtual ShutdownInfo* clone() const;
+        virtual DataStructure* cloneDataStructure() const;
 
         /**
-         * Copy the contents of this object and place them into the
-         * instance of this object type that was passed in.
-         * @return dest - Destination Object
+         * Copy the contents of the passed object into this objects
+         * members, overwriting any existing data.
+         * @return src - Source Object
          */
-        virtual void clone( ShutdownInfo* dest ) const;
+        virtual void copyDataStructure( const DataStructure* src );
 
     };
 

Modified: incubator/activemq/activemq-cpp/trunk/activemq-cpp/src/main/activemq/connector/openwire/commands/SubscriptionInfo.cpp
URL: http://svn.apache.org/viewvc/incubator/activemq/activemq-cpp/trunk/activemq-cpp/src/main/activemq/connector/openwire/commands/SubscriptionInfo.cpp?view=diff&rev=474108&r1=474107&r2=474108
==============================================================================
--- incubator/activemq/activemq-cpp/trunk/activemq-cpp/src/main/activemq/connector/openwire/commands/SubscriptionInfo.cpp (original)
+++ incubator/activemq/activemq-cpp/trunk/activemq-cpp/src/main/activemq/connector/openwire/commands/SubscriptionInfo.cpp Sun Nov 12 16:46:23 2006
@@ -15,9 +15,11 @@
  * limitations under the License.
  */
 #include <activemq/connector/openwire/commands/SubscriptionInfo.h>
+#include <activemq/exceptions/NullPointerException.h>
 
 using namespace std;
 using namespace activemq;
+using namespace activemq::exceptions;
 using namespace activemq::connector;
 using namespace activemq::connector::openwire;
 using namespace activemq::connector::openwire::commands;
@@ -48,30 +50,35 @@
 }
 
 ////////////////////////////////////////////////////////////////////////////////
-SubscriptionInfo* SubscriptionInfo::clone() const {
+DataStructure* SubscriptionInfo::cloneDataStructure() const {
     SubscriptionInfo* subscriptionInfo = new SubscriptionInfo();
 
     // Copy the data from the base class or classes
-    BaseDataStructure::copy( subscriptionInfo );
+    subscriptionInfo->copyDataStructure( this );
 
-    subscriptionInfo->clientId = this->getClientId();
-    subscriptionInfo->destination = this->getDestination();
-    subscriptionInfo->selector = this->getSelector();
-    subscriptionInfo->subcriptionName = this->getSubcriptionName();
-
-    return subscriptionInfo
+    return subscriptionInfo;
 }
 
 ////////////////////////////////////////////////////////////////////////////////
-void SubscriptionInfo::copy( SubscriptionInfo* dest ) const {
+void SubscriptionInfo::copyDataStructure( const DataStructure* src ) {
 
-    // Copy the data from the base class or classes
-    BaseDataStructure::copy( subscriptionInfo );
+    // Copy the data of the base class or classes
+    BaseDataStructure::copyDataStructure( src );
+
+    const SubscriptionInfo* srcPtr = dynamic_cast<const SubscriptionInfo*>( src );
 
-    dest->setClientId( this->getClientId() );
-    dest->setDestination( this->getDestination() );
-    dest->setSelector( this->getSelector() );
-    dest->setSubcriptionName( this->getSubcriptionName() );
+    if( srcPtr == NULL || src == NULL ) {
+    
+        throw exceptions::NullPointerException(
+            __FILE__, __LINE__,
+            "SubscriptionInfo::copyDataStructure - src is NULL or invalid" );
+    }
+    this->setClientId( srcPtr->getClientId() );
+    this->setDestination( 
+        dynamic_cast<ActiveMQDestination*>( 
+            srcPtr->getDestination()->cloneDataStructure() ) );
+    this->setSelector( srcPtr->getSelector() );
+    this->setSubcriptionName( srcPtr->getSubcriptionName() );
 }
 
 ////////////////////////////////////////////////////////////////////////////////

Modified: incubator/activemq/activemq-cpp/trunk/activemq-cpp/src/main/activemq/connector/openwire/commands/SubscriptionInfo.h
URL: http://svn.apache.org/viewvc/incubator/activemq/activemq-cpp/trunk/activemq-cpp/src/main/activemq/connector/openwire/commands/SubscriptionInfo.h?view=diff&rev=474108&r1=474107&r2=474108
==============================================================================
--- incubator/activemq/activemq-cpp/trunk/activemq-cpp/src/main/activemq/connector/openwire/commands/SubscriptionInfo.h (original)
+++ incubator/activemq/activemq-cpp/trunk/activemq-cpp/src/main/activemq/connector/openwire/commands/SubscriptionInfo.h Sun Nov 12 16:46:23 2006
@@ -73,14 +73,14 @@
          * caller now owns, this will be an exact copy of this one
          * @returns new copy of this object.
          */
-        virtual SubscriptionInfo* clone() const;
+        virtual DataStructure* cloneDataStructure() const;
 
         /**
-         * Copy the contents of this object and place them into the
-         * instance of this object type that was passed in.
-         * @return dest - Destination Object
+         * Copy the contents of the passed object into this objects
+         * members, overwriting any existing data.
+         * @return src - Source Object
          */
-        virtual void clone( SubscriptionInfo* dest ) const;
+        virtual void copyDataStructure( const DataStructure* src );
 
         virtual const std::string& getClientId() const;
         virtual std::string& getClientId();

Modified: incubator/activemq/activemq-cpp/trunk/activemq-cpp/src/main/activemq/connector/openwire/commands/TransactionId.cpp
URL: http://svn.apache.org/viewvc/incubator/activemq/activemq-cpp/trunk/activemq-cpp/src/main/activemq/connector/openwire/commands/TransactionId.cpp?view=diff&rev=474108&r1=474107&r2=474108
==============================================================================
--- incubator/activemq/activemq-cpp/trunk/activemq-cpp/src/main/activemq/connector/openwire/commands/TransactionId.cpp (original)
+++ incubator/activemq/activemq-cpp/trunk/activemq-cpp/src/main/activemq/connector/openwire/commands/TransactionId.cpp Sun Nov 12 16:46:23 2006
@@ -15,9 +15,11 @@
  * limitations under the License.
  */
 #include <activemq/connector/openwire/commands/TransactionId.h>
+#include <activemq/exceptions/NullPointerException.h>
 
 using namespace std;
 using namespace activemq;
+using namespace activemq::exceptions;
 using namespace activemq::connector;
 using namespace activemq::connector::openwire;
 using namespace activemq::connector::openwire::commands;
@@ -43,22 +45,29 @@
 }
 
 ////////////////////////////////////////////////////////////////////////////////
-TransactionId* TransactionId::clone() const {
+DataStructure* TransactionId::cloneDataStructure() const {
     TransactionId* transactionId = new TransactionId();
 
     // Copy the data from the base class or classes
-    BaseDataStructure::copy( transactionId );
+    transactionId->copyDataStructure( this );
 
-
-    return transactionId
+    return transactionId;
 }
 
 ////////////////////////////////////////////////////////////////////////////////
-void TransactionId::copy( TransactionId* dest ) const {
+void TransactionId::copyDataStructure( const DataStructure* src ) {
 
-    // Copy the data from the base class or classes
-    BaseDataStructure::copy( transactionId );
+    // Copy the data of the base class or classes
+    BaseDataStructure::copyDataStructure( src );
+
+    const TransactionId* srcPtr = dynamic_cast<const TransactionId*>( src );
 
+    if( srcPtr == NULL || src == NULL ) {
+    
+        throw exceptions::NullPointerException(
+            __FILE__, __LINE__,
+            "TransactionId::copyDataStructure - src is NULL or invalid" );
+    }
 }
 
 ////////////////////////////////////////////////////////////////////////////////

Modified: incubator/activemq/activemq-cpp/trunk/activemq-cpp/src/main/activemq/connector/openwire/commands/TransactionId.h
URL: http://svn.apache.org/viewvc/incubator/activemq/activemq-cpp/trunk/activemq-cpp/src/main/activemq/connector/openwire/commands/TransactionId.h?view=diff&rev=474108&r1=474107&r2=474108
==============================================================================
--- incubator/activemq/activemq-cpp/trunk/activemq-cpp/src/main/activemq/connector/openwire/commands/TransactionId.h (original)
+++ incubator/activemq/activemq-cpp/trunk/activemq-cpp/src/main/activemq/connector/openwire/commands/TransactionId.h Sun Nov 12 16:46:23 2006
@@ -68,14 +68,14 @@
          * caller now owns, this will be an exact copy of this one
          * @returns new copy of this object.
          */
-        virtual TransactionId* clone() const;
+        virtual DataStructure* cloneDataStructure() const;
 
         /**
-         * Copy the contents of this object and place them into the
-         * instance of this object type that was passed in.
-         * @return dest - Destination Object
+         * Copy the contents of the passed object into this objects
+         * members, overwriting any existing data.
+         * @return src - Source Object
          */
-        virtual void clone( TransactionId* dest ) const;
+        virtual void copyDataStructure( const DataStructure* src );
 
     };
 

Modified: incubator/activemq/activemq-cpp/trunk/activemq-cpp/src/main/activemq/connector/openwire/commands/TransactionInfo.cpp
URL: http://svn.apache.org/viewvc/incubator/activemq/activemq-cpp/trunk/activemq-cpp/src/main/activemq/connector/openwire/commands/TransactionInfo.cpp?view=diff&rev=474108&r1=474107&r2=474108
==============================================================================
--- incubator/activemq/activemq-cpp/trunk/activemq-cpp/src/main/activemq/connector/openwire/commands/TransactionInfo.cpp (original)
+++ incubator/activemq/activemq-cpp/trunk/activemq-cpp/src/main/activemq/connector/openwire/commands/TransactionInfo.cpp Sun Nov 12 16:46:23 2006
@@ -15,9 +15,11 @@
  * limitations under the License.
  */
 #include <activemq/connector/openwire/commands/TransactionInfo.h>
+#include <activemq/exceptions/NullPointerException.h>
 
 using namespace std;
 using namespace activemq;
+using namespace activemq::exceptions;
 using namespace activemq::connector;
 using namespace activemq::connector::openwire;
 using namespace activemq::connector::openwire::commands;
@@ -48,28 +50,36 @@
 }
 
 ////////////////////////////////////////////////////////////////////////////////
-TransactionInfo* TransactionInfo::clone() const {
+DataStructure* TransactionInfo::cloneDataStructure() const {
     TransactionInfo* transactionInfo = new TransactionInfo();
 
     // Copy the data from the base class or classes
-    BaseCommand::copy( transactionInfo );
+    transactionInfo->copyDataStructure( this );
 
-    transactionInfo->connectionId = this->getConnectionId();
-    transactionInfo->transactionId = this->getTransactionId();
-    transactionInfo->type = this->getType()->clone();
-
-    return transactionInfo
+    return transactionInfo;
 }
 
 ////////////////////////////////////////////////////////////////////////////////
-void TransactionInfo::copy( TransactionInfo* dest ) const {
+void TransactionInfo::copyDataStructure( const DataStructure* src ) {
 
-    // Copy the data from the base class or classes
-    BaseCommand::copy( transactionInfo );
+    // Copy the data of the base class or classes
+    BaseCommand::copyDataStructure( src );
+
+    const TransactionInfo* srcPtr = dynamic_cast<const TransactionInfo*>( src );
 
-    dest->setConnectionId( this->getConnectionId() );
-    dest->setTransactionId( this->getTransactionId() );
-    dest->setType( this->getType()->clone() );
+    if( srcPtr == NULL || src == NULL ) {
+    
+        throw exceptions::NullPointerException(
+            __FILE__, __LINE__,
+            "TransactionInfo::copyDataStructure - src is NULL or invalid" );
+    }
+    this->setConnectionId( 
+        dynamic_cast<ConnectionId*>( 
+            srcPtr->getConnectionId()->cloneDataStructure() ) );
+    this->setTransactionId( 
+        dynamic_cast<TransactionId*>( 
+            srcPtr->getTransactionId()->cloneDataStructure() ) );
+    this->setType( srcPtr->getType() );
 }
 
 ////////////////////////////////////////////////////////////////////////////////

Modified: incubator/activemq/activemq-cpp/trunk/activemq-cpp/src/main/activemq/connector/openwire/commands/TransactionInfo.h
URL: http://svn.apache.org/viewvc/incubator/activemq/activemq-cpp/trunk/activemq-cpp/src/main/activemq/connector/openwire/commands/TransactionInfo.h?view=diff&rev=474108&r1=474107&r2=474108
==============================================================================
--- incubator/activemq/activemq-cpp/trunk/activemq-cpp/src/main/activemq/connector/openwire/commands/TransactionInfo.h (original)
+++ incubator/activemq/activemq-cpp/trunk/activemq-cpp/src/main/activemq/connector/openwire/commands/TransactionInfo.h Sun Nov 12 16:46:23 2006
@@ -73,14 +73,14 @@
          * caller now owns, this will be an exact copy of this one
          * @returns new copy of this object.
          */
-        virtual TransactionInfo* clone() const;
+        virtual DataStructure* cloneDataStructure() const;
 
         /**
-         * Copy the contents of this object and place them into the
-         * instance of this object type that was passed in.
-         * @return dest - Destination Object
+         * Copy the contents of the passed object into this objects
+         * members, overwriting any existing data.
+         * @return src - Source Object
          */
-        virtual void clone( TransactionInfo* dest ) const;
+        virtual void copyDataStructure( const DataStructure* src );
 
         virtual const ConnectionId* getConnectionId() const;
         virtual ConnectionId* getConnectionId();

Modified: incubator/activemq/activemq-cpp/trunk/activemq-cpp/src/main/activemq/connector/openwire/commands/XATransactionId.cpp
URL: http://svn.apache.org/viewvc/incubator/activemq/activemq-cpp/trunk/activemq-cpp/src/main/activemq/connector/openwire/commands/XATransactionId.cpp?view=diff&rev=474108&r1=474107&r2=474108
==============================================================================
--- incubator/activemq/activemq-cpp/trunk/activemq-cpp/src/main/activemq/connector/openwire/commands/XATransactionId.cpp (original)
+++ incubator/activemq/activemq-cpp/trunk/activemq-cpp/src/main/activemq/connector/openwire/commands/XATransactionId.cpp Sun Nov 12 16:46:23 2006
@@ -15,9 +15,11 @@
  * limitations under the License.
  */
 #include <activemq/connector/openwire/commands/XATransactionId.h>
+#include <activemq/exceptions/NullPointerException.h>
 
 using namespace std;
 using namespace activemq;
+using namespace activemq::exceptions;
 using namespace activemq::connector;
 using namespace activemq::connector::openwire;
 using namespace activemq::connector::openwire::commands;
@@ -44,28 +46,32 @@
 }
 
 ////////////////////////////////////////////////////////////////////////////////
-XATransactionId* XATransactionId::clone() const {
+DataStructure* XATransactionId::cloneDataStructure() const {
     XATransactionId* xATransactionId = new XATransactionId();
 
     // Copy the data from the base class or classes
-    TransactionId::copy( xATransactionId );
+    xATransactionId->copyDataStructure( this );
 
-    xATransactionId->formatId = this->getFormatId()->clone();
-    xATransactionId->globalTransactionId = this->getGlobalTransactionId()->clone();
-    xATransactionId->branchQualifier = this->getBranchQualifier()->clone();
-
-    return xATransactionId
+    return xATransactionId;
 }
 
 ////////////////////////////////////////////////////////////////////////////////
-void XATransactionId::copy( XATransactionId* dest ) const {
+void XATransactionId::copyDataStructure( const DataStructure* src ) {
 
-    // Copy the data from the base class or classes
-    TransactionId::copy( xATransactionId );
+    // Copy the data of the base class or classes
+    TransactionId::copyDataStructure( src );
+
+    const XATransactionId* srcPtr = dynamic_cast<const XATransactionId*>( src );
 
-    dest->setFormatId( this->getFormatId()->clone() );
-    dest->setGlobalTransactionId( this->getGlobalTransactionId()->clone() );
-    dest->setBranchQualifier( this->getBranchQualifier()->clone() );
+    if( srcPtr == NULL || src == NULL ) {
+    
+        throw exceptions::NullPointerException(
+            __FILE__, __LINE__,
+            "XATransactionId::copyDataStructure - src is NULL or invalid" );
+    }
+    this->setFormatId( srcPtr->getFormatId() );
+    this->setGlobalTransactionId( srcPtr->getGlobalTransactionId() );
+    this->setBranchQualifier( srcPtr->getBranchQualifier() );
 }
 
 ////////////////////////////////////////////////////////////////////////////////

Modified: incubator/activemq/activemq-cpp/trunk/activemq-cpp/src/main/activemq/connector/openwire/commands/XATransactionId.h
URL: http://svn.apache.org/viewvc/incubator/activemq/activemq-cpp/trunk/activemq-cpp/src/main/activemq/connector/openwire/commands/XATransactionId.h?view=diff&rev=474108&r1=474107&r2=474108
==============================================================================
--- incubator/activemq/activemq-cpp/trunk/activemq-cpp/src/main/activemq/connector/openwire/commands/XATransactionId.h (original)
+++ incubator/activemq/activemq-cpp/trunk/activemq-cpp/src/main/activemq/connector/openwire/commands/XATransactionId.h Sun Nov 12 16:46:23 2006
@@ -71,14 +71,14 @@
          * caller now owns, this will be an exact copy of this one
          * @returns new copy of this object.
          */
-        virtual XATransactionId* clone() const;
+        virtual DataStructure* cloneDataStructure() const;
 
         /**
-         * Copy the contents of this object and place them into the
-         * instance of this object type that was passed in.
-         * @return dest - Destination Object
+         * Copy the contents of the passed object into this objects
+         * members, overwriting any existing data.
+         * @return src - Source Object
          */
-        virtual void clone( XATransactionId* dest ) const;
+        virtual void copyDataStructure( const DataStructure* src );
 
         virtual const int getFormatId() const;
         virtual int getFormatId();

Modified: incubator/activemq/activemq-cpp/trunk/activemq-cpp/src/main/activemq/connector/openwire/marshal/BaseDataStreamMarshaller.h
URL: http://svn.apache.org/viewvc/incubator/activemq/activemq-cpp/trunk/activemq-cpp/src/main/activemq/connector/openwire/marshal/BaseDataStreamMarshaller.h?view=diff&rev=474108&r1=474107&r2=474108
==============================================================================
--- incubator/activemq/activemq-cpp/trunk/activemq-cpp/src/main/activemq/connector/openwire/marshal/BaseDataStreamMarshaller.h (original)
+++ incubator/activemq/activemq-cpp/trunk/activemq-cpp/src/main/activemq/connector/openwire/marshal/BaseDataStreamMarshaller.h Sun Nov 12 16:46:23 2006
@@ -96,6 +96,299 @@
                                      io::DataInputStream* dis ) 
                                         throw ( io::IOException ) {};
 
+    protected:
+
+        /**
+         * Tight Unmarshal an array of char
+         * @param dataIn - the DataInputStream to Un-Marshal from
+         * @param bs - boolean stream to unmarshal from.
+         * @returns the unmarshalled vector of chars.
+         */
+        virtual std::vector<char> tightUnmarshalByteArray( 
+            io::DataInputStream* dataIn, 
+            utils::BooleanStream* bs ) 
+                { return std::vector<char>(); }
+
+        /**
+         * Loose Unmarshal an array of char
+         * @param dataIn - the DataInputStream to Un-Marshal from
+         * @returns the unmarshalled vector of chars.
+         */
+        virtual std::vector<char> looseUnmarshalByteArray( 
+            io::DataInputStream* dataIn )    
+            { return std::vector<char>(); }
+
+        /**
+         * Performs Tight Unmarshalling of String Objects
+         * @param dataIn - the DataInputStream to Un-Marshal from
+         * @param bs - boolean stream to unmarshal from.
+         * @returns the unmarshalled string.
+         */
+        virtual std::string tightUnmarshalString( io::DataInputStream* dataIn, 
+                                                  utils::BooleanStream* bs ) {}
+
+
+        /**
+         * Tight Marshals the String to a Booleans Stream Object, returns
+         * the marshalled size.
+         * @param value - string to marshal
+         * @param bs - BooleanStream to use.
+         * @returns size of marshalled string. 
+         */
+        virtual int tightMarshalString1( const std::string& value, 
+                                         utils::BooleanStream* bs ) {}
+
+        /**
+         * Tight Marshals the passed string to the streams passed
+         * @param value - string to marshal
+         * @param dataOut - the DataOutputStream to Marshal to
+         * @param bs - boolean stream to marshal to.
+         */ 
+        virtual void tightMarshalString2( const std::string& value, 
+                                          io::DataOutputStream* dataOut, 
+                                          utils::BooleanStream* bs ) {}
+
+        /**
+         * Loose Marshal the String to the DataOuputStream passed
+         * @param value - string to marshal
+         * @param dataOut - stream to write marshalled form to
+         */
+        virtual void looseMarshalString( const std::string value, 
+                                         io::DataOutputStream* dataOut ) {}
+                                         
+        /**
+         * Loose Un-Marshal the String to the DataOuputStream passed
+         * @param dataIn - stream to read marshalled form from
+         * @return the unmarshalled string
+         */
+        virtual std::string looseUnmarshalString( io::DataInputStream* dataIn ) {}
+
+        /**
+         * Tightly marshal the long long to the BooleanStream passed.
+         * @param wireFormat - The OpenwireFormat properties 
+         * @param value - long long to marshal
+         * @param bs - boolean stream to marshal to.
+         * @returns size of data written.
+         */ 
+        virtual int tightMarshalLong1( OpenWireFormat* wireFormat, 
+                                       long long value,
+                                       utils::BooleanStream* bs ) {}
+
+        /**
+         * Tightly marshal the long long to the Streams passed.
+         * @param wireFormat - The OpenwireFormat properties 
+         * @param value - long long to marshal
+         * @param dataOut - stream to write marshalled form to
+         * @param bs - boolean stream to marshal to.
+         */ 
+        virtual void tightMarshalLong2( OpenWireFormat* wireFormat, 
+                                        long long value, 
+                                        io::DataOutputStream* dataOut, 
+                                        utils::BooleanStream* bs ) {}
+
+        /**
+         * Tight marshal the long long type.  
+         * @param wireFormat - The OpenwireFormat properties 
+         * @param dataIn - stream to read marshalled form from
+         * @param bs - boolean stream to marshal to.
+         * @returns the unmarshalled long long 
+         */
+        virtual long long tightUnmarshalLong( OpenWireFormat* wireFormat, 
+                                              io::DataInputStream* dataIn, 
+                                              utils::BooleanStream* bs ) {}
+
+        
+        /**
+         * Tightly marshal the long long to the BooleanStream passed.
+         * @param wireFormat - The OpenwireFormat properties 
+         * @param value - long long to marshal
+         * @param dataOut - DataOutputStream to marshal to.
+         */ 
+        virtual void looseMarshalLong( OpenWireFormat* wireFormat, 
+                                       long long value, 
+                                       io::DataOutputStream* dataOut ) {}
+        
+        /**
+         * Loose marshal the long long type.  
+         * @param wireFormat - The OpenwireFormat properties 
+         * @param dataIn - stream to read marshalled form from
+         * @returns the unmarshalled long long 
+         */
+        virtual long long looseUnmarshalLong( OpenWireFormat* wireFormat, 
+                                              io::DataInputStream* dataIn ) { return 0; }
+        
+        /**
+         * Tight Unmarshall the cached object
+         * @param wireFormat - The OpenwireFormat properties 
+         * @param dataIn - stream to read marshalled form from
+         * @param bs - boolean stream to marshal to.
+         * @returns pointer to a new DataStructure Object
+         */
+        virtual commands::DataStructure* tightUnmarshalCachedObject(
+            OpenWireFormat* wireFormat, 
+            io::DataInputStream* dataIn,
+            utils::BooleanStream* bs ) {}
+
+        /**
+         * Tightly marshalls the passed DataStructure based object to the passed
+         * BooleanStream returning the size of the data marshalled
+         * @param wireFormat - The OpenwireFormat properties
+         * @param data - DataStructure Object Pointer to marshal 
+         * @param bs - boolean stream to marshal to.
+         * @returns size of data written.
+         */
+        virtual int tightMarshalCachedObject1( OpenWireFormat* wireFormat, 
+                                               commands::DataStructure* data, 
+                                               utils::BooleanStream* bs ) { return 0; }
+
+        /**
+         * Tightly marshalls the passed DataStructure based object to the passed
+         * streams returning nothing
+         * @param wireFormat - The OpenwireFormat properties
+         * @param data - DataStructure Object Pointer to marshal 
+         * @param bs - boolean stream to marshal to.
+         * @param dataOut - stream to write marshalled data to
+         */
+        virtual void tightMarshalCachedObject2( OpenWireFormat* wireFormat, 
+                                                commands::DataStructure* data, 
+                                                io::DataOutputStream* dataOut, 
+                                                utils::BooleanStream* bs ) {}
+
+
+        /**
+         * Loosely marshalls the passed DataStructure based object to the passed
+         * stream returning nothing
+         * @param wireFormat - The OpenwireFormat properties
+         * @param data - DataStructure Object Pointer to marshal 
+         * @param bs - boolean stream to marshal to.
+         * @param dataOut - stream to write marshalled data to
+         */
+        virtual void looseMarshalCachedObject( OpenWireFormat* wireFormat, 
+                                               commands::DataStructure* data, 
+                                               io::DataOutputStream* dataOut ) {}
+        
+        /**
+         * Loose Unmarshall the cached object
+         * @param wireFormat - The OpenwireFormat properties 
+         * @param dataIn - stream to read marshalled form from
+         * @returns pointer to a new DataStructure Object
+         */
+        virtual commands::DataStructure* looseUnmarshalCachedObject( 
+            OpenWireFormat* wireFormat, 
+            io::DataInputStream* dataIn ) { return NULL; }
+
+        /**
+         * Tightly marshalls the passed DataStructure based object to the passed
+         * BooleanStream returning the size of the data marshalled
+         * @param wireFormat - The OpenwireFormat properties
+         * @param object - DataStructure Object Pointer to marshal 
+         * @param bs - boolean stream to marshal to.
+         * @returns size of data written.
+         */
+        virtual int tightMarshalNestedObject1( OpenWireFormat* wireFormat, 
+                                               commands::DataStructure* object, 
+                                               utils::BooleanStream* bs ) { return 0; } 
+
+        /**
+         * Tightly marshalls the passed DataStructure based object to the passed
+         * streams returning nothing
+         * @param wireFormat - The OpenwireFormat properties
+         * @param object - DataStructure Object Pointer to marshal 
+         * @param bs - boolean stream to marshal to.
+         * @param dataOut - stream to write marshalled data to
+         */
+        virtual void tightMarshalNestedObject2( OpenWireFormat* wireFormat, 
+                                                commands::DataStructure* object, 
+                                                io::DataOutputStream* dataOut, 
+                                                utils::BooleanStream* bs ) {}
+
+        /**
+         * Tight Unmarshall the nested object
+         * @param wireFormat - The OpenwireFormat properties 
+         * @param dataIn - stream to read marshalled form from
+         * @param bs - boolean stream to marshal to.
+         * @returns pointer to a new DataStructure Object
+         */
+        virtual commands::DataStructure* tightUnmarshalNestedObject(
+            OpenWireFormat* wireFormat,
+            io::DataInputStream* dataIn,
+            utils::BooleanStream* bs ) { return NULL; }
+
+        /**
+         * Loose Unmarshall the nested object
+         * @param wireFormat - The OpenwireFormat properties 
+         * @param dataIn - stream to read marshalled form from
+         * @returns pointer to a new DataStructure Object
+         */
+        virtual commands::DataStructure* looseUnmarshalNestedObject( 
+            OpenWireFormat* wireFormat,
+            io::DataInputStream* dataIn ) { return NULL; }
+
+        /**
+         * Loose marshall the nested object
+         * @param wireFormat - The OpenwireFormat properties 
+         * @param object - DataStructure Object Pointer to marshal 
+         * @param dataOut - stream to write marshalled data to
+         */
+        virtual void looseMarshalNestedObject( OpenWireFormat* wireFormat, 
+                                               commands::DataStructure* object, 
+                                               io::DataOutputStream* dataOut ) {}
+
+        /**
+         * Tight Unarshall the Error object
+         * @param wireFormat - The OpenwireFormat properties 
+         * @param dataIn - stream to read marshalled form from
+         * @param bs - boolean stream to marshal to.
+         * @returns pointer to a new DataStructure Object
+         */
+        virtual commands::DataStructure* tightUnmarshalBrokerError( 
+            OpenWireFormat* wireFormat, 
+            io::DataInputStream* dataIn, 
+            utils::BooleanStream* bs ) { return NULL; }
+            
+        /**
+         * Tight Marshall the Error object
+         * @param wireFormat - The OpenwireFormat properties 
+         * @param error - Error to Marshal
+         * @param bs - boolean stream to marshal to.
+         * @returns size of the marshalled data
+         */
+        virtual int tightMarshalBrokerError1( OpenWireFormat* wireFormat, 
+                                              commands::DataStructure* error, 
+                                              utils::BooleanStream* bs ) { return 0; }
+                                              
+        /**
+         * Tight Marshall the Error object
+         * @param wireFormat - The OpenwireFormat properties 
+         * @param error - Error to Marshal
+         * @param dataOut - stream to write marshalled data to
+         * @param bs - boolean stream to marshal to.
+         */
+        virtual void tightMarshalBrokerError2( OpenWireFormat* wireFormat, 
+                                               commands::DataStructure* error, 
+                                               io::DataOutputStream* dataOut, 
+                                               utils::BooleanStream* bs ) {}
+                                               
+        /**
+         * Loose Unarshall the Error object
+         * @param wireFormat - The OpenwireFormat properties 
+         * @param dataIn - stream to read marshalled form from
+         * @returns pointer to a new DataStructure Object
+         */
+        virtual commands::DataStructure* looseUnmarshalBrokerError( 
+            OpenWireFormat* wireFormat, 
+            io::DataInputStream* dataIn ) { return NULL; }
+            
+        /**
+         * Tight Marshall the Error object
+         * @param wireFormat - The OpenwireFormat properties 
+         * @param error - Error to Marshal
+         * @param dataOut - stream to write marshalled data to
+         */
+        virtual void looseMarshalBrokerError( OpenWireFormat* wireFormat, 
+                                              commands::DataStructure* error, 
+                                              io::DataOutputStream* dataOut ) {}
+        
     };
 
 }}}}

Modified: incubator/activemq/activemq-cpp/trunk/activemq-cpp/src/main/activemq/connector/openwire/marshal/v2/ActiveMQBytesMessageMarshaller.cpp
URL: http://svn.apache.org/viewvc/incubator/activemq/activemq-cpp/trunk/activemq-cpp/src/main/activemq/connector/openwire/marshal/v2/ActiveMQBytesMessageMarshaller.cpp?view=diff&rev=474108&r1=474107&r2=474108
==============================================================================
--- incubator/activemq/activemq-cpp/trunk/activemq-cpp/src/main/activemq/connector/openwire/marshal/v2/ActiveMQBytesMessageMarshaller.cpp (original)
+++ incubator/activemq/activemq-cpp/trunk/activemq-cpp/src/main/activemq/connector/openwire/marshal/v2/ActiveMQBytesMessageMarshaller.cpp Sun Nov 12 16:46:23 2006
@@ -32,7 +32,7 @@
 using namespace activemq::connector::openwire;
 using namespace activemq::connector::openwire::commands;
 using namespace activemq::connector::openwire::marshal;
-using namespace activemq::connector::openwire::util;
+using namespace activemq::connector::openwire::utils;
 using namespace activemq::connector::openwire::marshal::v2;
 
 ///////////////////////////////////////////////////////////////////////////////
@@ -46,13 +46,13 @@
 }
 
 ///////////////////////////////////////////////////////////////////////////////
-void ActiveMQBytesMessageMarshaller::tightUnmarshal( OpenWireFormat* wireFormat, DataStructure* dataStructure, DataInputStream* dataIn, BooleanStream* bs ) {
+void ActiveMQBytesMessageMarshaller::tightUnmarshal( OpenWireFormat* wireFormat, DataStructure* dataStructure, DataInputStream* dataIn, BooleanStream* bs ) throw( io::IOException ){
    ActiveMQMessageMarshaller::tightUnmarshal( wireFormat, dataStructure, dataIn, bs );
 
 }
 
 ///////////////////////////////////////////////////////////////////////////////
-int ActiveMQBytesMessageMarshaller::tightMarshal1( OpenWireFormat& wireFormat, DataStructure* dataStructure, BooleanStream& bs ) {
+int ActiveMQBytesMessageMarshaller::tightMarshal1( OpenWireFormat* wireFormat, DataStructure* dataStructure, BooleanStream* bs ) throw( io::IOException ){
 
     int rc = ActiveMQMessageMarshaller::tightMarshal1( wireFormat, dataStructure, bs );
 
@@ -60,19 +60,19 @@
 }
 
 ///////////////////////////////////////////////////////////////////////////////
-void ActiveMQBytesMessageMarshaller::tightMarshal2( OpenWireFormat& wireFormat, DataStructure* dataStructure, DataOutputStream& dataOut, BooleanStream& bs ) {
+void ActiveMQBytesMessageMarshaller::tightMarshal2( OpenWireFormat* wireFormat, DataStructure* dataStructure, DataOutputStream* dataOut, BooleanStream* bs ) throw( io::IOException ){
 
     ActiveMQMessageMarshaller::tightMarshal2( wireFormat, dataStructure, dataOut, bs );
 
 }
 
 ///////////////////////////////////////////////////////////////////////////////
-void ActiveMQBytesMessageMarshaller::looseUnmarshal( OpenWireFormat& wireFormat, DataStructure* dataStructure, DataInputStream& dataIn ) {
+void ActiveMQBytesMessageMarshaller::looseUnmarshal( OpenWireFormat* wireFormat, DataStructure* dataStructure, DataInputStream* dataIn ) throw( io::IOException ){
     ActiveMQMessageMarshaller::looseUnmarshal( wireFormat, dataStructure, dataIn );
 }
 
 ///////////////////////////////////////////////////////////////////////////////
-void ActiveMQBytesMessageMarshaller::looseMarshal( OpenWireFormat& wireFormat, DataStructure* dataStructure, DataOutputStream& dataOut ) {
+void ActiveMQBytesMessageMarshaller::looseMarshal( OpenWireFormat* wireFormat, DataStructure* dataStructure, DataOutputStream* dataOut ) throw( io::IOException ){
     ActiveMQMessageMarshaller::looseMarshal( wireFormat, dataStructure, dataOut );
 
 }

Modified: incubator/activemq/activemq-cpp/trunk/activemq-cpp/src/main/activemq/connector/openwire/marshal/v2/ActiveMQBytesMessageMarshaller.h
URL: http://svn.apache.org/viewvc/incubator/activemq/activemq-cpp/trunk/activemq-cpp/src/main/activemq/connector/openwire/marshal/v2/ActiveMQBytesMessageMarshaller.h?view=diff&rev=474108&r1=474107&r2=474108
==============================================================================
--- incubator/activemq/activemq-cpp/trunk/activemq-cpp/src/main/activemq/connector/openwire/marshal/v2/ActiveMQBytesMessageMarshaller.h (original)
+++ incubator/activemq/activemq-cpp/trunk/activemq-cpp/src/main/activemq/connector/openwire/marshal/v2/ActiveMQBytesMessageMarshaller.h Sun Nov 12 16:46:23 2006
@@ -23,13 +23,14 @@
 #pragma warning( disable : 4290 )
 #endif
 
-#include <activemq/connector/openwire/marshal/V2/ActiveMQMessageMarshaller.h>
+#include <activemq/connector/openwire/marshal/v2/ActiveMQMessageMarshaller.h>
 
 #include <activemq/io/DataInputStream.h>
 #include <activemq/io/DataOutputStream.h>
 #include <activemq/io/IOException.h>
+#include <activemq/connector/openwire/OpenWireFormat.h>
 #include <activemq/connector/openwire/commands/DataStructure.h>
-#include <activemq/connector/openwire/util/BooleanStream.h>
+#include <activemq/connector/openwire/utils/BooleanStream.h>
 
 namespace activemq{
 namespace connector{
@@ -55,7 +56,7 @@
          * Creates a new instance of this marshalable type.
          * @return new DataStructure object pointer caller owns it.
          */
-        virtual DataStructure* createObject() const;
+        virtual commands::DataStructure* createObject() const;
 
         /**
          * Get the Data Structure Type that identifies this Marshaller
@@ -73,7 +74,7 @@
         virtual void tightUnmarshal( OpenWireFormat* wireFormat,
                                      commands::DataStructure* dataStructure,
                                      io::DataInputStream* dataIn,
-                                     util::BooleanStream* bs ) throws( io::IOException );
+                                     utils::BooleanStream* bs ) throw( io::IOException );
 
         /**
          * Write the booleans that this object uses to a BooleanStream
@@ -84,7 +85,7 @@
          */
         virtual int tightMarshal1( OpenWireFormat* wireFormat,
                                    commands::DataStructure* dataStructure,
-                                   BooleanStream* bs ) throws( io::IOException );
+                                   utils::BooleanStream* bs ) throw( io::IOException );
 
         /**
          * Write a object instance to data output stream
@@ -96,7 +97,7 @@
         virtual void tightMarshal2( OpenWireFormat* wireFormat,
                                     commands::DataStructure* dataStructure,
                                     io::DataOutputStream* dataOut,
-                                    BooleanStream* bs ) throws( io::IOException );
+                                    utils::BooleanStream* bs ) throw( io::IOException );
 
         /**
          * Un-marshal an object instance from the data input stream
@@ -106,7 +107,7 @@
          */
         virtual void looseUnmarshal( OpenWireFormat* wireFormat,
                                      commands::DataStructure* dataStructure,
-                                     io::DataInputStream* dataIn ) throws( io::IOException );
+                                     io::DataInputStream* dataIn ) throw( io::IOException );
 
         /**
          * Write a object instance to data output stream
@@ -116,7 +117,7 @@
          */
         virtual void looseMarshal( OpenWireFormat* wireFormat,
                                    commands::DataStructure* dataStructure,
-                                   io::DataOutputStream* dataOut ) throws( io::IOException );
+                                   io::DataOutputStream* dataOut ) throw( io::IOException );
 
     };
 



Mime
View raw message