activemq-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From tab...@apache.org
Subject svn commit: r465088 [2/2] - /incubator/activemq/activemq-cpp/trunk/activemq-cpp/src/main/activemq/connector/openwire/commands/
Date Tue, 17 Oct 2006 22:39:09 GMT
Modified: incubator/activemq/activemq-cpp/trunk/activemq-cpp/src/main/activemq/connector/openwire/commands/KeepAliveInfo.h
URL: http://svn.apache.org/viewvc/incubator/activemq/activemq-cpp/trunk/activemq-cpp/src/main/activemq/connector/openwire/commands/KeepAliveInfo.h?view=diff&rev=465088&r1=465087&r2=465088
==============================================================================
--- incubator/activemq/activemq-cpp/trunk/activemq-cpp/src/main/activemq/connector/openwire/commands/KeepAliveInfo.h (original)
+++ incubator/activemq/activemq-cpp/trunk/activemq-cpp/src/main/activemq/connector/openwire/commands/KeepAliveInfo.h Tue Oct 17 15:39:06 2006
@@ -56,7 +56,27 @@
         KeepAliveInfo();
         virtual ~KeepAliveInfo();
 
+        /**
+         * Get the unique identifier that this object and its own
+         * Marshaller share.
+         * @returns new DataStructure type copy.
+         */
         virtual unsigned char getDataStructureType() const;
+
+        /**
+         * Clone this obbject and return a new instance that the
+         * caller now owns, this will be an exact copy of this one
+         * @returns new copy of this object.
+         */
+        virtual KeepAliveInfo* clone() 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
+         */
+        virtual void clone( KeepAliveInfo* dest ) const;
+
     };
 
 }}}}

Modified: incubator/activemq/activemq-cpp/trunk/activemq-cpp/src/main/activemq/connector/openwire/commands/LastPartialCommand.cpp
URL: http://svn.apache.org/viewvc/incubator/activemq/activemq-cpp/trunk/activemq-cpp/src/main/activemq/connector/openwire/commands/LastPartialCommand.cpp?view=diff&rev=465088&r1=465087&r2=465088
==============================================================================
--- incubator/activemq/activemq-cpp/trunk/activemq-cpp/src/main/activemq/connector/openwire/commands/LastPartialCommand.cpp (original)
+++ incubator/activemq/activemq-cpp/trunk/activemq-cpp/src/main/activemq/connector/openwire/commands/LastPartialCommand.cpp Tue Oct 17 15:39:06 2006
@@ -43,8 +43,26 @@
 }
 
 ////////////////////////////////////////////////////////////////////////////////
-unsigned char LastPartialCommand::getDataStructureType() const
-{
+LastPartialCommand* LastPartialCommand::clone() const {
+    LastPartialCommand* lastPartialCommand = new LastPartialCommand();
+
+    // Copy the data from the base class or classes
+    PartialCommand::copy( lastPartialCommand );
+
+
+    return lastPartialCommand
+}
+
+////////////////////////////////////////////////////////////////////////////////
+void LastPartialCommand::copy( LastPartialCommand* dest ) const {
+
+    // Copy the data from the base class or classes
+    PartialCommand::copy( lastPartialCommand );
+
+}
+
+////////////////////////////////////////////////////////////////////////////////
+unsigned char LastPartialCommand::getDataStructureType() const {
     return LastPartialCommand::ID_LASTPARTIALCOMMAND; 
 }
 

Modified: incubator/activemq/activemq-cpp/trunk/activemq-cpp/src/main/activemq/connector/openwire/commands/LastPartialCommand.h
URL: http://svn.apache.org/viewvc/incubator/activemq/activemq-cpp/trunk/activemq-cpp/src/main/activemq/connector/openwire/commands/LastPartialCommand.h?view=diff&rev=465088&r1=465087&r2=465088
==============================================================================
--- incubator/activemq/activemq-cpp/trunk/activemq-cpp/src/main/activemq/connector/openwire/commands/LastPartialCommand.h (original)
+++ incubator/activemq/activemq-cpp/trunk/activemq-cpp/src/main/activemq/connector/openwire/commands/LastPartialCommand.h Tue Oct 17 15:39:06 2006
@@ -56,7 +56,27 @@
         LastPartialCommand();
         virtual ~LastPartialCommand();
 
+        /**
+         * Get the unique identifier that this object and its own
+         * Marshaller share.
+         * @returns new DataStructure type copy.
+         */
         virtual unsigned char getDataStructureType() const;
+
+        /**
+         * Clone this obbject and return a new instance that the
+         * caller now owns, this will be an exact copy of this one
+         * @returns new copy of this object.
+         */
+        virtual LastPartialCommand* clone() 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
+         */
+        virtual void clone( LastPartialCommand* dest ) const;
+
     };
 
 }}}}

Modified: incubator/activemq/activemq-cpp/trunk/activemq-cpp/src/main/activemq/connector/openwire/commands/LocalTransactionId.cpp
URL: http://svn.apache.org/viewvc/incubator/activemq/activemq-cpp/trunk/activemq-cpp/src/main/activemq/connector/openwire/commands/LocalTransactionId.cpp?view=diff&rev=465088&r1=465087&r2=465088
==============================================================================
--- incubator/activemq/activemq-cpp/trunk/activemq-cpp/src/main/activemq/connector/openwire/commands/LocalTransactionId.cpp (original)
+++ incubator/activemq/activemq-cpp/trunk/activemq-cpp/src/main/activemq/connector/openwire/commands/LocalTransactionId.cpp Tue Oct 17 15:39:06 2006
@@ -46,8 +46,30 @@
 }
 
 ////////////////////////////////////////////////////////////////////////////////
-unsigned char LocalTransactionId::getDataStructureType() const
-{
+LocalTransactionId* LocalTransactionId::clone() const {
+    LocalTransactionId* localTransactionId = new LocalTransactionId();
+
+    // Copy the data from the base class or classes
+    TransactionId::copy( localTransactionId );
+
+    localTransactionId->value = this->getValue()->clone();
+    localTransactionId->connectionId = this->getConnectionId();
+
+    return localTransactionId
+}
+
+////////////////////////////////////////////////////////////////////////////////
+void LocalTransactionId::copy( LocalTransactionId* dest ) const {
+
+    // Copy the data from the base class or classes
+    TransactionId::copy( localTransactionId );
+
+    dest->setValue( this->getValue()->clone() );
+    dest->setConnectionId( this->getConnectionId() );
+}
+
+////////////////////////////////////////////////////////////////////////////////
+unsigned char LocalTransactionId::getDataStructureType() const {
     return LocalTransactionId::ID_LOCALTRANSACTIONID; 
 }
 

Modified: incubator/activemq/activemq-cpp/trunk/activemq-cpp/src/main/activemq/connector/openwire/commands/LocalTransactionId.h
URL: http://svn.apache.org/viewvc/incubator/activemq/activemq-cpp/trunk/activemq-cpp/src/main/activemq/connector/openwire/commands/LocalTransactionId.h?view=diff&rev=465088&r1=465087&r2=465088
==============================================================================
--- incubator/activemq/activemq-cpp/trunk/activemq-cpp/src/main/activemq/connector/openwire/commands/LocalTransactionId.h (original)
+++ incubator/activemq/activemq-cpp/trunk/activemq-cpp/src/main/activemq/connector/openwire/commands/LocalTransactionId.h Tue Oct 17 15:39:06 2006
@@ -59,7 +59,27 @@
         LocalTransactionId();
         virtual ~LocalTransactionId();
 
+        /**
+         * Get the unique identifier that this object and its own
+         * Marshaller share.
+         * @returns new DataStructure type copy.
+         */
         virtual unsigned char getDataStructureType() const;
+
+        /**
+         * Clone this obbject and return a new instance that the
+         * caller now owns, this will be an exact copy of this one
+         * @returns new copy of this object.
+         */
+        virtual LocalTransactionId* clone() 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
+         */
+        virtual void clone( LocalTransactionId* dest ) const;
+
         virtual const long long getValue() const;
         virtual long long getValue();
         virtual void setValue( long long value );

Modified: incubator/activemq/activemq-cpp/trunk/activemq-cpp/src/main/activemq/connector/openwire/commands/Message.cpp
URL: http://svn.apache.org/viewvc/incubator/activemq/activemq-cpp/trunk/activemq-cpp/src/main/activemq/connector/openwire/commands/Message.cpp?view=diff&rev=465088&r1=465087&r2=465088
==============================================================================
--- incubator/activemq/activemq-cpp/trunk/activemq-cpp/src/main/activemq/connector/openwire/commands/Message.cpp (original)
+++ incubator/activemq/activemq-cpp/trunk/activemq-cpp/src/main/activemq/connector/openwire/commands/Message.cpp Tue Oct 17 15:39:06 2006
@@ -77,8 +77,82 @@
 }
 
 ////////////////////////////////////////////////////////////////////////////////
-unsigned char Message::getDataStructureType() const
-{
+Message* Message::clone() const {
+    Message* message = new Message();
+
+    // Copy the data from the base class or classes
+    BaseCommand::copy( message );
+
+    message->producerId = this->getProducerId();
+    message->destination = this->getDestination();
+    message->transactionId = this->getTransactionId();
+    message->originalDestination = this->getOriginalDestination();
+    message->messageId = this->getMessageId();
+    message->originalTransactionId = this->getOriginalTransactionId();
+    message->groupID = this->getGroupID();
+    message->groupSequence = this->getGroupSequence()->clone();
+    message->correlationId = this->getCorrelationId();
+    message->persistent = this->getPersistent()->clone();
+    message->expiration = this->getExpiration()->clone();
+    message->priority = this->getPriority()->clone();
+    message->replyTo = this->getReplyTo();
+    message->timestamp = this->getTimestamp()->clone();
+    message->type = this->getType();
+    message->content = this->getContent()->clone();
+    message->marshalledProperties = this->getMarshalledProperties()->clone();
+    message->dataStructure = this->getDataStructure();
+    message->targetConsumerId = this->getTargetConsumerId();
+    message->compressed = this->getCompressed()->clone();
+    message->redeliveryCounter = this->getRedeliveryCounter()->clone();
+    for( size_t ibrokerPath = 0; ibrokerPath < brokerPath.size(); ++ibrokerPath ) {
+        message->getBrokerPath().push_back( 
+            this->brokerPath[ibrokerPath]->clone();
+    }
+    message->arrival = this->getArrival()->clone();
+    message->userID = this->getUserID();
+    message->recievedByDFBridge = this->getRecievedByDFBridge()->clone();
+
+    return message
+}
+
+////////////////////////////////////////////////////////////////////////////////
+void Message::copy( Message* dest ) const {
+
+    // Copy the data from the base class or classes
+    BaseCommand::copy( message );
+
+    dest->setProducerId( this->getProducerId() );
+    dest->setDestination( this->getDestination() );
+    dest->setTransactionId( this->getTransactionId() );
+    dest->setOriginalDestination( this->getOriginalDestination() );
+    dest->setMessageId( this->getMessageId() );
+    dest->setOriginalTransactionId( this->getOriginalTransactionId() );
+    dest->setGroupID( this->getGroupID() );
+    dest->setGroupSequence( this->getGroupSequence()->clone() );
+    dest->setCorrelationId( this->getCorrelationId() );
+    dest->setPersistent( this->getPersistent()->clone() );
+    dest->setExpiration( this->getExpiration()->clone() );
+    dest->setPriority( this->getPriority()->clone() );
+    dest->setReplyTo( this->getReplyTo() );
+    dest->setTimestamp( this->getTimestamp()->clone() );
+    dest->setType( this->getType() );
+    dest->setContent( this->getContent()->clone() );
+    dest->setMarshalledProperties( this->getMarshalledProperties()->clone() );
+    dest->setDataStructure( this->getDataStructure() );
+    dest->setTargetConsumerId( this->getTargetConsumerId() );
+    dest->setCompressed( this->getCompressed()->clone() );
+    dest->setRedeliveryCounter( this->getRedeliveryCounter()->clone() );
+    for( size_t ibrokerPath = 0; ibrokerPath < brokerPath.size(); ++ibrokerPath ) {
+        dest->getBrokerPath().push_back( 
+            this->brokerPath[ibrokerPath]->clone() );
+    }
+    dest->setArrival( this->getArrival()->clone() );
+    dest->setUserID( this->getUserID() );
+    dest->setRecievedByDFBridge( this->getRecievedByDFBridge()->clone() );
+}
+
+////////////////////////////////////////////////////////////////////////////////
+unsigned char Message::getDataStructureType() const {
     return Message::ID_MESSAGE; 
 }
 

Modified: incubator/activemq/activemq-cpp/trunk/activemq-cpp/src/main/activemq/connector/openwire/commands/Message.h
URL: http://svn.apache.org/viewvc/incubator/activemq/activemq-cpp/trunk/activemq-cpp/src/main/activemq/connector/openwire/commands/Message.h?view=diff&rev=465088&r1=465087&r2=465088
==============================================================================
--- incubator/activemq/activemq-cpp/trunk/activemq-cpp/src/main/activemq/connector/openwire/commands/Message.h (original)
+++ incubator/activemq/activemq-cpp/trunk/activemq-cpp/src/main/activemq/connector/openwire/commands/Message.h Tue Oct 17 15:39:06 2006
@@ -91,7 +91,27 @@
         Message();
         virtual ~Message();
 
+        /**
+         * Get the unique identifier that this object and its own
+         * Marshaller share.
+         * @returns new DataStructure type copy.
+         */
         virtual unsigned char getDataStructureType() const;
+
+        /**
+         * Clone this obbject and return a new instance that the
+         * caller now owns, this will be an exact copy of this one
+         * @returns new copy of this object.
+         */
+        virtual Message* clone() 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
+         */
+        virtual void clone( Message* dest ) const;
+
         virtual const ProducerId* getProducerId() const;
         virtual ProducerId* getProducerId();
         virtual void setProducerId( ProducerId* producerId );

Modified: incubator/activemq/activemq-cpp/trunk/activemq-cpp/src/main/activemq/connector/openwire/commands/MessageAck.cpp
URL: http://svn.apache.org/viewvc/incubator/activemq/activemq-cpp/trunk/activemq-cpp/src/main/activemq/connector/openwire/commands/MessageAck.cpp?view=diff&rev=465088&r1=465087&r2=465088
==============================================================================
--- incubator/activemq/activemq-cpp/trunk/activemq-cpp/src/main/activemq/connector/openwire/commands/MessageAck.cpp (original)
+++ incubator/activemq/activemq-cpp/trunk/activemq-cpp/src/main/activemq/connector/openwire/commands/MessageAck.cpp Tue Oct 17 15:39:06 2006
@@ -55,8 +55,40 @@
 }
 
 ////////////////////////////////////////////////////////////////////////////////
-unsigned char MessageAck::getDataStructureType() const
-{
+MessageAck* MessageAck::clone() const {
+    MessageAck* messageAck = new MessageAck();
+
+    // Copy the data from the base class or classes
+    BaseCommand::copy( messageAck );
+
+    messageAck->destination = this->getDestination();
+    messageAck->transactionId = this->getTransactionId();
+    messageAck->consumerId = this->getConsumerId();
+    messageAck->ackType = this->getAckType()->clone();
+    messageAck->firstMessageId = this->getFirstMessageId();
+    messageAck->lastMessageId = this->getLastMessageId();
+    messageAck->messageCount = this->getMessageCount()->clone();
+
+    return messageAck
+}
+
+////////////////////////////////////////////////////////////////////////////////
+void MessageAck::copy( MessageAck* dest ) const {
+
+    // Copy the data from the base class or classes
+    BaseCommand::copy( messageAck );
+
+    dest->setDestination( this->getDestination() );
+    dest->setTransactionId( this->getTransactionId() );
+    dest->setConsumerId( this->getConsumerId() );
+    dest->setAckType( this->getAckType()->clone() );
+    dest->setFirstMessageId( this->getFirstMessageId() );
+    dest->setLastMessageId( this->getLastMessageId() );
+    dest->setMessageCount( this->getMessageCount()->clone() );
+}
+
+////////////////////////////////////////////////////////////////////////////////
+unsigned char MessageAck::getDataStructureType() const {
     return MessageAck::ID_MESSAGEACK; 
 }
 

Modified: incubator/activemq/activemq-cpp/trunk/activemq-cpp/src/main/activemq/connector/openwire/commands/MessageAck.h
URL: http://svn.apache.org/viewvc/incubator/activemq/activemq-cpp/trunk/activemq-cpp/src/main/activemq/connector/openwire/commands/MessageAck.h?view=diff&rev=465088&r1=465087&r2=465088
==============================================================================
--- incubator/activemq/activemq-cpp/trunk/activemq-cpp/src/main/activemq/connector/openwire/commands/MessageAck.h (original)
+++ incubator/activemq/activemq-cpp/trunk/activemq-cpp/src/main/activemq/connector/openwire/commands/MessageAck.h Tue Oct 17 15:39:06 2006
@@ -68,7 +68,27 @@
         MessageAck();
         virtual ~MessageAck();
 
+        /**
+         * Get the unique identifier that this object and its own
+         * Marshaller share.
+         * @returns new DataStructure type copy.
+         */
         virtual unsigned char getDataStructureType() const;
+
+        /**
+         * Clone this obbject and return a new instance that the
+         * caller now owns, this will be an exact copy of this one
+         * @returns new copy of this object.
+         */
+        virtual MessageAck* clone() 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
+         */
+        virtual void clone( MessageAck* dest ) const;
+
         virtual const ActiveMQDestination* getDestination() const;
         virtual ActiveMQDestination* getDestination();
         virtual void setDestination( ActiveMQDestination* destination );

Modified: incubator/activemq/activemq-cpp/trunk/activemq-cpp/src/main/activemq/connector/openwire/commands/MessageDispatch.cpp
URL: http://svn.apache.org/viewvc/incubator/activemq/activemq-cpp/trunk/activemq-cpp/src/main/activemq/connector/openwire/commands/MessageDispatch.cpp?view=diff&rev=465088&r1=465087&r2=465088
==============================================================================
--- incubator/activemq/activemq-cpp/trunk/activemq-cpp/src/main/activemq/connector/openwire/commands/MessageDispatch.cpp (original)
+++ incubator/activemq/activemq-cpp/trunk/activemq-cpp/src/main/activemq/connector/openwire/commands/MessageDispatch.cpp Tue Oct 17 15:39:06 2006
@@ -50,8 +50,34 @@
 }
 
 ////////////////////////////////////////////////////////////////////////////////
-unsigned char MessageDispatch::getDataStructureType() const
-{
+MessageDispatch* MessageDispatch::clone() const {
+    MessageDispatch* messageDispatch = new MessageDispatch();
+
+    // Copy the data from the base class or classes
+    BaseCommand::copy( messageDispatch );
+
+    messageDispatch->consumerId = this->getConsumerId();
+    messageDispatch->destination = this->getDestination();
+    messageDispatch->message = this->getMessage();
+    messageDispatch->redeliveryCounter = this->getRedeliveryCounter()->clone();
+
+    return messageDispatch
+}
+
+////////////////////////////////////////////////////////////////////////////////
+void MessageDispatch::copy( MessageDispatch* dest ) const {
+
+    // Copy the data from the base class or classes
+    BaseCommand::copy( messageDispatch );
+
+    dest->setConsumerId( this->getConsumerId() );
+    dest->setDestination( this->getDestination() );
+    dest->setMessage( this->getMessage() );
+    dest->setRedeliveryCounter( this->getRedeliveryCounter()->clone() );
+}
+
+////////////////////////////////////////////////////////////////////////////////
+unsigned char MessageDispatch::getDataStructureType() const {
     return MessageDispatch::ID_MESSAGEDISPATCH; 
 }
 

Modified: incubator/activemq/activemq-cpp/trunk/activemq-cpp/src/main/activemq/connector/openwire/commands/MessageDispatch.h
URL: http://svn.apache.org/viewvc/incubator/activemq/activemq-cpp/trunk/activemq-cpp/src/main/activemq/connector/openwire/commands/MessageDispatch.h?view=diff&rev=465088&r1=465087&r2=465088
==============================================================================
--- incubator/activemq/activemq-cpp/trunk/activemq-cpp/src/main/activemq/connector/openwire/commands/MessageDispatch.h (original)
+++ incubator/activemq/activemq-cpp/trunk/activemq-cpp/src/main/activemq/connector/openwire/commands/MessageDispatch.h Tue Oct 17 15:39:06 2006
@@ -63,7 +63,27 @@
         MessageDispatch();
         virtual ~MessageDispatch();
 
+        /**
+         * Get the unique identifier that this object and its own
+         * Marshaller share.
+         * @returns new DataStructure type copy.
+         */
         virtual unsigned char getDataStructureType() const;
+
+        /**
+         * Clone this obbject and return a new instance that the
+         * caller now owns, this will be an exact copy of this one
+         * @returns new copy of this object.
+         */
+        virtual MessageDispatch* clone() 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
+         */
+        virtual void clone( MessageDispatch* dest ) const;
+
         virtual const ConsumerId* getConsumerId() const;
         virtual ConsumerId* getConsumerId();
         virtual void setConsumerId( ConsumerId* consumerId );

Modified: incubator/activemq/activemq-cpp/trunk/activemq-cpp/src/main/activemq/connector/openwire/commands/MessageDispatchNotification.cpp
URL: http://svn.apache.org/viewvc/incubator/activemq/activemq-cpp/trunk/activemq-cpp/src/main/activemq/connector/openwire/commands/MessageDispatchNotification.cpp?view=diff&rev=465088&r1=465087&r2=465088
==============================================================================
--- incubator/activemq/activemq-cpp/trunk/activemq-cpp/src/main/activemq/connector/openwire/commands/MessageDispatchNotification.cpp (original)
+++ incubator/activemq/activemq-cpp/trunk/activemq-cpp/src/main/activemq/connector/openwire/commands/MessageDispatchNotification.cpp Tue Oct 17 15:39:06 2006
@@ -50,8 +50,34 @@
 }
 
 ////////////////////////////////////////////////////////////////////////////////
-unsigned char MessageDispatchNotification::getDataStructureType() const
-{
+MessageDispatchNotification* MessageDispatchNotification::clone() const {
+    MessageDispatchNotification* messageDispatchNotification = new MessageDispatchNotification();
+
+    // Copy the data from the base class or classes
+    BaseCommand::copy( messageDispatchNotification );
+
+    messageDispatchNotification->consumerId = this->getConsumerId();
+    messageDispatchNotification->destination = this->getDestination();
+    messageDispatchNotification->deliverySequenceId = this->getDeliverySequenceId()->clone();
+    messageDispatchNotification->messageId = this->getMessageId();
+
+    return messageDispatchNotification
+}
+
+////////////////////////////////////////////////////////////////////////////////
+void MessageDispatchNotification::copy( MessageDispatchNotification* dest ) const {
+
+    // Copy the data from the base class or classes
+    BaseCommand::copy( messageDispatchNotification );
+
+    dest->setConsumerId( this->getConsumerId() );
+    dest->setDestination( this->getDestination() );
+    dest->setDeliverySequenceId( this->getDeliverySequenceId()->clone() );
+    dest->setMessageId( this->getMessageId() );
+}
+
+////////////////////////////////////////////////////////////////////////////////
+unsigned char MessageDispatchNotification::getDataStructureType() const {
     return MessageDispatchNotification::ID_MESSAGEDISPATCHNOTIFICATION; 
 }
 

Modified: incubator/activemq/activemq-cpp/trunk/activemq-cpp/src/main/activemq/connector/openwire/commands/MessageDispatchNotification.h
URL: http://svn.apache.org/viewvc/incubator/activemq/activemq-cpp/trunk/activemq-cpp/src/main/activemq/connector/openwire/commands/MessageDispatchNotification.h?view=diff&rev=465088&r1=465087&r2=465088
==============================================================================
--- incubator/activemq/activemq-cpp/trunk/activemq-cpp/src/main/activemq/connector/openwire/commands/MessageDispatchNotification.h (original)
+++ incubator/activemq/activemq-cpp/trunk/activemq-cpp/src/main/activemq/connector/openwire/commands/MessageDispatchNotification.h Tue Oct 17 15:39:06 2006
@@ -63,7 +63,27 @@
         MessageDispatchNotification();
         virtual ~MessageDispatchNotification();
 
+        /**
+         * Get the unique identifier that this object and its own
+         * Marshaller share.
+         * @returns new DataStructure type copy.
+         */
         virtual unsigned char getDataStructureType() const;
+
+        /**
+         * Clone this obbject and return a new instance that the
+         * caller now owns, this will be an exact copy of this one
+         * @returns new copy of this object.
+         */
+        virtual MessageDispatchNotification* clone() 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
+         */
+        virtual void clone( MessageDispatchNotification* dest ) const;
+
         virtual const ConsumerId* getConsumerId() const;
         virtual ConsumerId* getConsumerId();
         virtual void setConsumerId( ConsumerId* consumerId );

Modified: incubator/activemq/activemq-cpp/trunk/activemq-cpp/src/main/activemq/connector/openwire/commands/MessageId.cpp
URL: http://svn.apache.org/viewvc/incubator/activemq/activemq-cpp/trunk/activemq-cpp/src/main/activemq/connector/openwire/commands/MessageId.cpp?view=diff&rev=465088&r1=465087&r2=465088
==============================================================================
--- incubator/activemq/activemq-cpp/trunk/activemq-cpp/src/main/activemq/connector/openwire/commands/MessageId.cpp (original)
+++ incubator/activemq/activemq-cpp/trunk/activemq-cpp/src/main/activemq/connector/openwire/commands/MessageId.cpp Tue Oct 17 15:39:06 2006
@@ -47,8 +47,32 @@
 }
 
 ////////////////////////////////////////////////////////////////////////////////
-unsigned char MessageId::getDataStructureType() const
-{
+MessageId* MessageId::clone() const {
+    MessageId* messageId = new MessageId();
+
+    // Copy the data from the base class or classes
+    BaseDataStructure::copy( messageId );
+
+    messageId->producerId = this->getProducerId();
+    messageId->producerSequenceId = this->getProducerSequenceId()->clone();
+    messageId->brokerSequenceId = this->getBrokerSequenceId()->clone();
+
+    return messageId
+}
+
+////////////////////////////////////////////////////////////////////////////////
+void MessageId::copy( MessageId* dest ) const {
+
+    // Copy the data from the base class or classes
+    BaseDataStructure::copy( messageId );
+
+    dest->setProducerId( this->getProducerId() );
+    dest->setProducerSequenceId( this->getProducerSequenceId()->clone() );
+    dest->setBrokerSequenceId( this->getBrokerSequenceId()->clone() );
+}
+
+////////////////////////////////////////////////////////////////////////////////
+unsigned char MessageId::getDataStructureType() const {
     return MessageId::ID_MESSAGEID; 
 }
 

Modified: incubator/activemq/activemq-cpp/trunk/activemq-cpp/src/main/activemq/connector/openwire/commands/MessageId.h
URL: http://svn.apache.org/viewvc/incubator/activemq/activemq-cpp/trunk/activemq-cpp/src/main/activemq/connector/openwire/commands/MessageId.h?view=diff&rev=465088&r1=465087&r2=465088
==============================================================================
--- incubator/activemq/activemq-cpp/trunk/activemq-cpp/src/main/activemq/connector/openwire/commands/MessageId.h (original)
+++ incubator/activemq/activemq-cpp/trunk/activemq-cpp/src/main/activemq/connector/openwire/commands/MessageId.h Tue Oct 17 15:39:06 2006
@@ -60,7 +60,27 @@
         MessageId();
         virtual ~MessageId();
 
+        /**
+         * Get the unique identifier that this object and its own
+         * Marshaller share.
+         * @returns new DataStructure type copy.
+         */
         virtual unsigned char getDataStructureType() const;
+
+        /**
+         * Clone this obbject and return a new instance that the
+         * caller now owns, this will be an exact copy of this one
+         * @returns new copy of this object.
+         */
+        virtual MessageId* clone() 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
+         */
+        virtual void clone( MessageId* dest ) const;
+
         virtual const ProducerId* getProducerId() const;
         virtual ProducerId* getProducerId();
         virtual void setProducerId( ProducerId* producerId );

Modified: incubator/activemq/activemq-cpp/trunk/activemq-cpp/src/main/activemq/connector/openwire/commands/MessagePull.cpp
URL: http://svn.apache.org/viewvc/incubator/activemq/activemq-cpp/trunk/activemq-cpp/src/main/activemq/connector/openwire/commands/MessagePull.cpp?view=diff&rev=465088&r1=465087&r2=465088
==============================================================================
--- incubator/activemq/activemq-cpp/trunk/activemq-cpp/src/main/activemq/connector/openwire/commands/MessagePull.cpp (original)
+++ incubator/activemq/activemq-cpp/trunk/activemq-cpp/src/main/activemq/connector/openwire/commands/MessagePull.cpp Tue Oct 17 15:39:06 2006
@@ -48,8 +48,32 @@
 }
 
 ////////////////////////////////////////////////////////////////////////////////
-unsigned char MessagePull::getDataStructureType() const
-{
+MessagePull* MessagePull::clone() const {
+    MessagePull* messagePull = new MessagePull();
+
+    // Copy the data from the base class or classes
+    BaseCommand::copy( messagePull );
+
+    messagePull->consumerId = this->getConsumerId();
+    messagePull->destination = this->getDestination();
+    messagePull->timeout = this->getTimeout()->clone();
+
+    return messagePull
+}
+
+////////////////////////////////////////////////////////////////////////////////
+void MessagePull::copy( MessagePull* dest ) const {
+
+    // Copy the data from the base class or classes
+    BaseCommand::copy( messagePull );
+
+    dest->setConsumerId( this->getConsumerId() );
+    dest->setDestination( this->getDestination() );
+    dest->setTimeout( this->getTimeout()->clone() );
+}
+
+////////////////////////////////////////////////////////////////////////////////
+unsigned char MessagePull::getDataStructureType() const {
     return MessagePull::ID_MESSAGEPULL; 
 }
 

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=465088&r1=465087&r2=465088
==============================================================================
--- 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 Tue Oct 17 15:39:06 2006
@@ -61,7 +61,27 @@
         MessagePull();
         virtual ~MessagePull();
 
+        /**
+         * Get the unique identifier that this object and its own
+         * Marshaller share.
+         * @returns new DataStructure type copy.
+         */
         virtual unsigned char getDataStructureType() const;
+
+        /**
+         * Clone this obbject and return a new instance that the
+         * caller now owns, this will be an exact copy of this one
+         * @returns new copy of this object.
+         */
+        virtual MessagePull* clone() 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
+         */
+        virtual void clone( MessagePull* dest ) const;
+
         virtual const ConsumerId* getConsumerId() const;
         virtual ConsumerId* getConsumerId();
         virtual void setConsumerId( ConsumerId* consumerId );

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=465088&r1=465087&r2=465088
==============================================================================
--- 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 Tue Oct 17 15:39:06 2006
@@ -46,8 +46,30 @@
 }
 
 ////////////////////////////////////////////////////////////////////////////////
-unsigned char NetworkBridgeFilter::getDataStructureType() const
-{
+NetworkBridgeFilter* NetworkBridgeFilter::clone() const {
+    NetworkBridgeFilter* networkBridgeFilter = new NetworkBridgeFilter();
+
+    // Copy the data from the base class or classes
+    BaseDataStructure::copy( networkBridgeFilter );
+
+    networkBridgeFilter->networkTTL = this->getNetworkTTL()->clone();
+    networkBridgeFilter->networkBrokerId = this->getNetworkBrokerId();
+
+    return networkBridgeFilter
+}
+
+////////////////////////////////////////////////////////////////////////////////
+void NetworkBridgeFilter::copy( NetworkBridgeFilter* dest ) const {
+
+    // Copy the data from the base class or classes
+    BaseDataStructure::copy( networkBridgeFilter );
+
+    dest->setNetworkTTL( this->getNetworkTTL()->clone() );
+    dest->setNetworkBrokerId( this->getNetworkBrokerId() );
+}
+
+////////////////////////////////////////////////////////////////////////////////
+unsigned char NetworkBridgeFilter::getDataStructureType() const {
     return NetworkBridgeFilter::ID_NETWORKBRIDGEFILTER; 
 }
 

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=465088&r1=465087&r2=465088
==============================================================================
--- 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 Tue Oct 17 15:39:06 2006
@@ -59,7 +59,27 @@
         NetworkBridgeFilter();
         virtual ~NetworkBridgeFilter();
 
+        /**
+         * Get the unique identifier that this object and its own
+         * Marshaller share.
+         * @returns new DataStructure type copy.
+         */
         virtual unsigned char getDataStructureType() const;
+
+        /**
+         * Clone this obbject and return a new instance that the
+         * caller now owns, this will be an exact copy of this one
+         * @returns new copy of this object.
+         */
+        virtual NetworkBridgeFilter* clone() 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
+         */
+        virtual void clone( NetworkBridgeFilter* dest ) const;
+
         virtual const int getNetworkTTL() const;
         virtual int getNetworkTTL();
         virtual void setNetworkTTL( int networkTTL );

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=465088&r1=465087&r2=465088
==============================================================================
--- 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 Tue Oct 17 15:39:06 2006
@@ -44,8 +44,30 @@
 }
 
 ////////////////////////////////////////////////////////////////////////////////
-unsigned char PartialCommand::getDataStructureType() const
-{
+PartialCommand* PartialCommand::clone() const {
+    PartialCommand* partialCommand = new PartialCommand();
+
+    // Copy the data from the base class or classes
+    BaseDataStructure::copy( partialCommand );
+
+    partialCommand->commandId = this->getCommandId()->clone();
+    partialCommand->data = this->getData()->clone();
+
+    return partialCommand
+}
+
+////////////////////////////////////////////////////////////////////////////////
+void PartialCommand::copy( PartialCommand* dest ) const {
+
+    // Copy the data from the base class or classes
+    BaseDataStructure::copy( partialCommand );
+
+    dest->setCommandId( this->getCommandId()->clone() );
+    dest->setData( this->getData()->clone() );
+}
+
+////////////////////////////////////////////////////////////////////////////////
+unsigned char PartialCommand::getDataStructureType() const {
     return PartialCommand::ID_PARTIALCOMMAND; 
 }
 

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=465088&r1=465087&r2=465088
==============================================================================
--- 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 Tue Oct 17 15:39:06 2006
@@ -58,7 +58,27 @@
         PartialCommand();
         virtual ~PartialCommand();
 
+        /**
+         * Get the unique identifier that this object and its own
+         * Marshaller share.
+         * @returns new DataStructure type copy.
+         */
         virtual unsigned char getDataStructureType() const;
+
+        /**
+         * Clone this obbject and return a new instance that the
+         * caller now owns, this will be an exact copy of this one
+         * @returns new copy of this object.
+         */
+        virtual PartialCommand* clone() 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
+         */
+        virtual void clone( PartialCommand* dest ) const;
+
         virtual const int getCommandId() const;
         virtual int getCommandId();
         virtual void setCommandId( int commandId );

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=465088&r1=465087&r2=465088
==============================================================================
--- 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 Tue Oct 17 15:39:06 2006
@@ -46,8 +46,32 @@
 }
 
 ////////////////////////////////////////////////////////////////////////////////
-unsigned char ProducerId::getDataStructureType() const
-{
+ProducerId* ProducerId::clone() const {
+    ProducerId* producerId = new ProducerId();
+
+    // Copy the data from the base class or classes
+    BaseDataStructure::copy( producerId );
+
+    producerId->connectionId = this->getConnectionId();
+    producerId->value = this->getValue()->clone();
+    producerId->sessionId = this->getSessionId()->clone();
+
+    return producerId
+}
+
+////////////////////////////////////////////////////////////////////////////////
+void ProducerId::copy( ProducerId* dest ) const {
+
+    // Copy the data from the base class or classes
+    BaseDataStructure::copy( producerId );
+
+    dest->setConnectionId( this->getConnectionId() );
+    dest->setValue( this->getValue()->clone() );
+    dest->setSessionId( this->getSessionId()->clone() );
+}
+
+////////////////////////////////////////////////////////////////////////////////
+unsigned char ProducerId::getDataStructureType() const {
     return ProducerId::ID_PRODUCERID; 
 }
 

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=465088&r1=465087&r2=465088
==============================================================================
--- 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 Tue Oct 17 15:39:06 2006
@@ -59,7 +59,27 @@
         ProducerId();
         virtual ~ProducerId();
 
+        /**
+         * Get the unique identifier that this object and its own
+         * Marshaller share.
+         * @returns new DataStructure type copy.
+         */
         virtual unsigned char getDataStructureType() const;
+
+        /**
+         * Clone this obbject and return a new instance that the
+         * caller now owns, this will be an exact copy of this one
+         * @returns new copy of this object.
+         */
+        virtual ProducerId* clone() 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
+         */
+        virtual void clone( ProducerId* dest ) const;
+
         virtual const std::string& getConnectionId() const;
         virtual std::string& getConnectionId();
         virtual void setConnectionId( const std::string& connectionId );

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=465088&r1=465087&r2=465088
==============================================================================
--- 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 Tue Oct 17 15:39:06 2006
@@ -50,8 +50,38 @@
 }
 
 ////////////////////////////////////////////////////////////////////////////////
-unsigned char ProducerInfo::getDataStructureType() const
-{
+ProducerInfo* ProducerInfo::clone() const {
+    ProducerInfo* producerInfo = new ProducerInfo();
+
+    // Copy the data from the base class or classes
+    BaseCommand::copy( producerInfo );
+
+    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();
+    }
+
+    return producerInfo
+}
+
+////////////////////////////////////////////////////////////////////////////////
+void ProducerInfo::copy( ProducerInfo* dest ) const {
+
+    // Copy the data from the base class or classes
+    BaseCommand::copy( producerInfo );
+
+    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() );
+    }
+}
+
+////////////////////////////////////////////////////////////////////////////////
+unsigned char ProducerInfo::getDataStructureType() const {
     return ProducerInfo::ID_PRODUCERINFO; 
 }
 

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=465088&r1=465087&r2=465088
==============================================================================
--- 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 Tue Oct 17 15:39:06 2006
@@ -62,7 +62,27 @@
         ProducerInfo();
         virtual ~ProducerInfo();
 
+        /**
+         * Get the unique identifier that this object and its own
+         * Marshaller share.
+         * @returns new DataStructure type copy.
+         */
         virtual unsigned char getDataStructureType() const;
+
+        /**
+         * Clone this obbject and return a new instance that the
+         * caller now owns, this will be an exact copy of this one
+         * @returns new copy of this object.
+         */
+        virtual ProducerInfo* clone() 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
+         */
+        virtual void clone( ProducerInfo* dest ) const;
+
         virtual const ProducerId* getProducerId() const;
         virtual ProducerId* getProducerId();
         virtual void setProducerId( ProducerId* producerId );

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=465088&r1=465087&r2=465088
==============================================================================
--- 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 Tue Oct 17 15:39:06 2006
@@ -45,8 +45,28 @@
 }
 
 ////////////////////////////////////////////////////////////////////////////////
-unsigned char RemoveInfo::getDataStructureType() const
-{
+RemoveInfo* RemoveInfo::clone() const {
+    RemoveInfo* removeInfo = new RemoveInfo();
+
+    // Copy the data from the base class or classes
+    BaseCommand::copy( removeInfo );
+
+    removeInfo->objectId = this->getObjectId();
+
+    return removeInfo
+}
+
+////////////////////////////////////////////////////////////////////////////////
+void RemoveInfo::copy( RemoveInfo* dest ) const {
+
+    // Copy the data from the base class or classes
+    BaseCommand::copy( removeInfo );
+
+    dest->setObjectId( this->getObjectId() );
+}
+
+////////////////////////////////////////////////////////////////////////////////
+unsigned char RemoveInfo::getDataStructureType() const {
     return RemoveInfo::ID_REMOVEINFO; 
 }
 

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=465088&r1=465087&r2=465088
==============================================================================
--- 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 Tue Oct 17 15:39:06 2006
@@ -58,7 +58,27 @@
         RemoveInfo();
         virtual ~RemoveInfo();
 
+        /**
+         * Get the unique identifier that this object and its own
+         * Marshaller share.
+         * @returns new DataStructure type copy.
+         */
         virtual unsigned char getDataStructureType() const;
+
+        /**
+         * Clone this obbject and return a new instance that the
+         * caller now owns, this will be an exact copy of this one
+         * @returns new copy of this object.
+         */
+        virtual RemoveInfo* clone() 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
+         */
+        virtual void clone( RemoveInfo* dest ) const;
+
         virtual const DataStructure* getObjectId() const;
         virtual DataStructure* getObjectId();
         virtual void setObjectId( DataStructure* objectId );

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=465088&r1=465087&r2=465088
==============================================================================
--- 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 Tue Oct 17 15:39:06 2006
@@ -47,8 +47,32 @@
 }
 
 ////////////////////////////////////////////////////////////////////////////////
-unsigned char RemoveSubscriptionInfo::getDataStructureType() const
-{
+RemoveSubscriptionInfo* RemoveSubscriptionInfo::clone() const {
+    RemoveSubscriptionInfo* removeSubscriptionInfo = new RemoveSubscriptionInfo();
+
+    // Copy the data from the base class or classes
+    BaseCommand::copy( removeSubscriptionInfo );
+
+    removeSubscriptionInfo->connectionId = this->getConnectionId();
+    removeSubscriptionInfo->subcriptionName = this->getSubcriptionName();
+    removeSubscriptionInfo->clientId = this->getClientId();
+
+    return removeSubscriptionInfo
+}
+
+////////////////////////////////////////////////////////////////////////////////
+void RemoveSubscriptionInfo::copy( RemoveSubscriptionInfo* dest ) const {
+
+    // Copy the data from the base class or classes
+    BaseCommand::copy( removeSubscriptionInfo );
+
+    dest->setConnectionId( this->getConnectionId() );
+    dest->setSubcriptionName( this->getSubcriptionName() );
+    dest->setClientId( this->getClientId() );
+}
+
+////////////////////////////////////////////////////////////////////////////////
+unsigned char RemoveSubscriptionInfo::getDataStructureType() const {
     return RemoveSubscriptionInfo::ID_REMOVESUBSCRIPTIONINFO; 
 }
 

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=465088&r1=465087&r2=465088
==============================================================================
--- 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 Tue Oct 17 15:39:06 2006
@@ -60,7 +60,27 @@
         RemoveSubscriptionInfo();
         virtual ~RemoveSubscriptionInfo();
 
+        /**
+         * Get the unique identifier that this object and its own
+         * Marshaller share.
+         * @returns new DataStructure type copy.
+         */
         virtual unsigned char getDataStructureType() const;
+
+        /**
+         * Clone this obbject and return a new instance that the
+         * caller now owns, this will be an exact copy of this one
+         * @returns new copy of this object.
+         */
+        virtual RemoveSubscriptionInfo* clone() 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
+         */
+        virtual void clone( RemoveSubscriptionInfo* dest ) const;
+
         virtual const ConnectionId* getConnectionId() const;
         virtual ConnectionId* getConnectionId();
         virtual void setConnectionId( ConnectionId* connectionId );

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=465088&r1=465087&r2=465088
==============================================================================
--- 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 Tue Oct 17 15:39:06 2006
@@ -45,8 +45,30 @@
 }
 
 ////////////////////////////////////////////////////////////////////////////////
-unsigned char ReplayCommand::getDataStructureType() const
-{
+ReplayCommand* ReplayCommand::clone() const {
+    ReplayCommand* replayCommand = new ReplayCommand();
+
+    // Copy the data from the base class or classes
+    BaseCommand::copy( replayCommand );
+
+    replayCommand->firstNakNumber = this->getFirstNakNumber()->clone();
+    replayCommand->lastNakNumber = this->getLastNakNumber()->clone();
+
+    return replayCommand
+}
+
+////////////////////////////////////////////////////////////////////////////////
+void ReplayCommand::copy( ReplayCommand* dest ) const {
+
+    // Copy the data from the base class or classes
+    BaseCommand::copy( replayCommand );
+
+    dest->setFirstNakNumber( this->getFirstNakNumber()->clone() );
+    dest->setLastNakNumber( this->getLastNakNumber()->clone() );
+}
+
+////////////////////////////////////////////////////////////////////////////////
+unsigned char ReplayCommand::getDataStructureType() const {
     return ReplayCommand::ID_REPLAYCOMMAND; 
 }
 

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=465088&r1=465087&r2=465088
==============================================================================
--- 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 Tue Oct 17 15:39:06 2006
@@ -58,7 +58,27 @@
         ReplayCommand();
         virtual ~ReplayCommand();
 
+        /**
+         * Get the unique identifier that this object and its own
+         * Marshaller share.
+         * @returns new DataStructure type copy.
+         */
         virtual unsigned char getDataStructureType() const;
+
+        /**
+         * Clone this obbject and return a new instance that the
+         * caller now owns, this will be an exact copy of this one
+         * @returns new copy of this object.
+         */
+        virtual ReplayCommand* clone() 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
+         */
+        virtual void clone( ReplayCommand* dest ) const;
+
         virtual const int getFirstNakNumber() const;
         virtual int getFirstNakNumber();
         virtual void setFirstNakNumber( int firstNakNumber );

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=465088&r1=465087&r2=465088
==============================================================================
--- 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 Tue Oct 17 15:39:06 2006
@@ -44,8 +44,28 @@
 }
 
 ////////////////////////////////////////////////////////////////////////////////
-unsigned char Response::getDataStructureType() const
-{
+Response* Response::clone() const {
+    Response* response = new Response();
+
+    // Copy the data from the base class or classes
+    BaseCommand::copy( response );
+
+    response->correlationId = this->getCorrelationId()->clone();
+
+    return response
+}
+
+////////////////////////////////////////////////////////////////////////////////
+void Response::copy( Response* dest ) const {
+
+    // Copy the data from the base class or classes
+    BaseCommand::copy( response );
+
+    dest->setCorrelationId( this->getCorrelationId()->clone() );
+}
+
+////////////////////////////////////////////////////////////////////////////////
+unsigned char Response::getDataStructureType() const {
     return Response::ID_RESPONSE; 
 }
 

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=465088&r1=465087&r2=465088
==============================================================================
--- 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 Tue Oct 17 15:39:06 2006
@@ -57,7 +57,27 @@
         Response();
         virtual ~Response();
 
+        /**
+         * Get the unique identifier that this object and its own
+         * Marshaller share.
+         * @returns new DataStructure type copy.
+         */
         virtual unsigned char getDataStructureType() const;
+
+        /**
+         * Clone this obbject and return a new instance that the
+         * caller now owns, this will be an exact copy of this one
+         * @returns new copy of this object.
+         */
+        virtual Response* clone() 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
+         */
+        virtual void clone( Response* dest ) const;
+
         virtual const int getCorrelationId() const;
         virtual int getCorrelationId();
         virtual void setCorrelationId( int correlationId );

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=465088&r1=465087&r2=465088
==============================================================================
--- 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 Tue Oct 17 15:39:06 2006
@@ -45,8 +45,30 @@
 }
 
 ////////////////////////////////////////////////////////////////////////////////
-unsigned char SessionId::getDataStructureType() const
-{
+SessionId* SessionId::clone() const {
+    SessionId* sessionId = new SessionId();
+
+    // Copy the data from the base class or classes
+    BaseDataStructure::copy( sessionId );
+
+    sessionId->connectionId = this->getConnectionId();
+    sessionId->value = this->getValue()->clone();
+
+    return sessionId
+}
+
+////////////////////////////////////////////////////////////////////////////////
+void SessionId::copy( SessionId* dest ) const {
+
+    // Copy the data from the base class or classes
+    BaseDataStructure::copy( sessionId );
+
+    dest->setConnectionId( this->getConnectionId() );
+    dest->setValue( this->getValue()->clone() );
+}
+
+////////////////////////////////////////////////////////////////////////////////
+unsigned char SessionId::getDataStructureType() const {
     return SessionId::ID_SESSIONID; 
 }
 

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=465088&r1=465087&r2=465088
==============================================================================
--- 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 Tue Oct 17 15:39:06 2006
@@ -58,7 +58,27 @@
         SessionId();
         virtual ~SessionId();
 
+        /**
+         * Get the unique identifier that this object and its own
+         * Marshaller share.
+         * @returns new DataStructure type copy.
+         */
         virtual unsigned char getDataStructureType() const;
+
+        /**
+         * Clone this obbject and return a new instance that the
+         * caller now owns, this will be an exact copy of this one
+         * @returns new copy of this object.
+         */
+        virtual SessionId* clone() 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
+         */
+        virtual void clone( SessionId* dest ) const;
+
         virtual const std::string& getConnectionId() const;
         virtual std::string& getConnectionId();
         virtual void setConnectionId( const std::string& connectionId );

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=465088&r1=465087&r2=465088
==============================================================================
--- 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 Tue Oct 17 15:39:06 2006
@@ -45,8 +45,28 @@
 }
 
 ////////////////////////////////////////////////////////////////////////////////
-unsigned char SessionInfo::getDataStructureType() const
-{
+SessionInfo* SessionInfo::clone() const {
+    SessionInfo* sessionInfo = new SessionInfo();
+
+    // Copy the data from the base class or classes
+    BaseCommand::copy( sessionInfo );
+
+    sessionInfo->sessionId = this->getSessionId();
+
+    return sessionInfo
+}
+
+////////////////////////////////////////////////////////////////////////////////
+void SessionInfo::copy( SessionInfo* dest ) const {
+
+    // Copy the data from the base class or classes
+    BaseCommand::copy( sessionInfo );
+
+    dest->setSessionId( this->getSessionId() );
+}
+
+////////////////////////////////////////////////////////////////////////////////
+unsigned char SessionInfo::getDataStructureType() const {
     return SessionInfo::ID_SESSIONINFO; 
 }
 

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=465088&r1=465087&r2=465088
==============================================================================
--- 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 Tue Oct 17 15:39:06 2006
@@ -58,7 +58,27 @@
         SessionInfo();
         virtual ~SessionInfo();
 
+        /**
+         * Get the unique identifier that this object and its own
+         * Marshaller share.
+         * @returns new DataStructure type copy.
+         */
         virtual unsigned char getDataStructureType() const;
+
+        /**
+         * Clone this obbject and return a new instance that the
+         * caller now owns, this will be an exact copy of this one
+         * @returns new copy of this object.
+         */
+        virtual SessionInfo* clone() 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
+         */
+        virtual void clone( SessionInfo* dest ) const;
+
         virtual const SessionId* getSessionId() const;
         virtual SessionId* getSessionId();
         virtual void setSessionId( SessionId* sessionId );

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=465088&r1=465087&r2=465088
==============================================================================
--- 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 Tue Oct 17 15:39:06 2006
@@ -43,8 +43,26 @@
 }
 
 ////////////////////////////////////////////////////////////////////////////////
-unsigned char ShutdownInfo::getDataStructureType() const
-{
+ShutdownInfo* ShutdownInfo::clone() const {
+    ShutdownInfo* shutdownInfo = new ShutdownInfo();
+
+    // Copy the data from the base class or classes
+    BaseCommand::copy( shutdownInfo );
+
+
+    return shutdownInfo
+}
+
+////////////////////////////////////////////////////////////////////////////////
+void ShutdownInfo::copy( ShutdownInfo* dest ) const {
+
+    // Copy the data from the base class or classes
+    BaseCommand::copy( shutdownInfo );
+
+}
+
+////////////////////////////////////////////////////////////////////////////////
+unsigned char ShutdownInfo::getDataStructureType() const {
     return ShutdownInfo::ID_SHUTDOWNINFO; 
 }
 

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=465088&r1=465087&r2=465088
==============================================================================
--- 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 Tue Oct 17 15:39:06 2006
@@ -56,7 +56,27 @@
         ShutdownInfo();
         virtual ~ShutdownInfo();
 
+        /**
+         * Get the unique identifier that this object and its own
+         * Marshaller share.
+         * @returns new DataStructure type copy.
+         */
         virtual unsigned char getDataStructureType() const;
+
+        /**
+         * Clone this obbject and return a new instance that the
+         * caller now owns, this will be an exact copy of this one
+         * @returns new copy of this object.
+         */
+        virtual ShutdownInfo* clone() 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
+         */
+        virtual void clone( ShutdownInfo* dest ) const;
+
     };
 
 }}}}

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=465088&r1=465087&r2=465088
==============================================================================
--- 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 Tue Oct 17 15:39:06 2006
@@ -48,8 +48,34 @@
 }
 
 ////////////////////////////////////////////////////////////////////////////////
-unsigned char SubscriptionInfo::getDataStructureType() const
-{
+SubscriptionInfo* SubscriptionInfo::clone() const {
+    SubscriptionInfo* subscriptionInfo = new SubscriptionInfo();
+
+    // Copy the data from the base class or classes
+    BaseDataStructure::copy( subscriptionInfo );
+
+    subscriptionInfo->clientId = this->getClientId();
+    subscriptionInfo->destination = this->getDestination();
+    subscriptionInfo->selector = this->getSelector();
+    subscriptionInfo->subcriptionName = this->getSubcriptionName();
+
+    return subscriptionInfo
+}
+
+////////////////////////////////////////////////////////////////////////////////
+void SubscriptionInfo::copy( SubscriptionInfo* dest ) const {
+
+    // Copy the data from the base class or classes
+    BaseDataStructure::copy( subscriptionInfo );
+
+    dest->setClientId( this->getClientId() );
+    dest->setDestination( this->getDestination() );
+    dest->setSelector( this->getSelector() );
+    dest->setSubcriptionName( this->getSubcriptionName() );
+}
+
+////////////////////////////////////////////////////////////////////////////////
+unsigned char SubscriptionInfo::getDataStructureType() const {
     return SubscriptionInfo::ID_SUBSCRIPTIONINFO; 
 }
 

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=465088&r1=465087&r2=465088
==============================================================================
--- 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 Tue Oct 17 15:39:06 2006
@@ -61,7 +61,27 @@
         SubscriptionInfo();
         virtual ~SubscriptionInfo();
 
+        /**
+         * Get the unique identifier that this object and its own
+         * Marshaller share.
+         * @returns new DataStructure type copy.
+         */
         virtual unsigned char getDataStructureType() const;
+
+        /**
+         * Clone this obbject and return a new instance that the
+         * caller now owns, this will be an exact copy of this one
+         * @returns new copy of this object.
+         */
+        virtual SubscriptionInfo* clone() 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
+         */
+        virtual void clone( SubscriptionInfo* dest ) const;
+
         virtual const std::string& getClientId() const;
         virtual std::string& getClientId();
         virtual void setClientId( const std::string& clientId );

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=465088&r1=465087&r2=465088
==============================================================================
--- 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 Tue Oct 17 15:39:06 2006
@@ -43,8 +43,26 @@
 }
 
 ////////////////////////////////////////////////////////////////////////////////
-unsigned char TransactionId::getDataStructureType() const
-{
+TransactionId* TransactionId::clone() const {
+    TransactionId* transactionId = new TransactionId();
+
+    // Copy the data from the base class or classes
+    BaseDataStructure::copy( transactionId );
+
+
+    return transactionId
+}
+
+////////////////////////////////////////////////////////////////////////////////
+void TransactionId::copy( TransactionId* dest ) const {
+
+    // Copy the data from the base class or classes
+    BaseDataStructure::copy( transactionId );
+
+}
+
+////////////////////////////////////////////////////////////////////////////////
+unsigned char TransactionId::getDataStructureType() const {
     return TransactionId::ID_TRANSACTIONID; 
 }
 

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=465088&r1=465087&r2=465088
==============================================================================
--- 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 Tue Oct 17 15:39:06 2006
@@ -56,7 +56,27 @@
         TransactionId();
         virtual ~TransactionId();
 
+        /**
+         * Get the unique identifier that this object and its own
+         * Marshaller share.
+         * @returns new DataStructure type copy.
+         */
         virtual unsigned char getDataStructureType() const;
+
+        /**
+         * Clone this obbject and return a new instance that the
+         * caller now owns, this will be an exact copy of this one
+         * @returns new copy of this object.
+         */
+        virtual TransactionId* clone() 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
+         */
+        virtual void clone( TransactionId* dest ) const;
+
     };
 
 }}}}

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=465088&r1=465087&r2=465088
==============================================================================
--- 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 Tue Oct 17 15:39:06 2006
@@ -48,8 +48,32 @@
 }
 
 ////////////////////////////////////////////////////////////////////////////////
-unsigned char TransactionInfo::getDataStructureType() const
-{
+TransactionInfo* TransactionInfo::clone() const {
+    TransactionInfo* transactionInfo = new TransactionInfo();
+
+    // Copy the data from the base class or classes
+    BaseCommand::copy( transactionInfo );
+
+    transactionInfo->connectionId = this->getConnectionId();
+    transactionInfo->transactionId = this->getTransactionId();
+    transactionInfo->type = this->getType()->clone();
+
+    return transactionInfo
+}
+
+////////////////////////////////////////////////////////////////////////////////
+void TransactionInfo::copy( TransactionInfo* dest ) const {
+
+    // Copy the data from the base class or classes
+    BaseCommand::copy( transactionInfo );
+
+    dest->setConnectionId( this->getConnectionId() );
+    dest->setTransactionId( this->getTransactionId() );
+    dest->setType( this->getType()->clone() );
+}
+
+////////////////////////////////////////////////////////////////////////////////
+unsigned char TransactionInfo::getDataStructureType() const {
     return TransactionInfo::ID_TRANSACTIONINFO; 
 }
 

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=465088&r1=465087&r2=465088
==============================================================================
--- 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 Tue Oct 17 15:39:06 2006
@@ -61,7 +61,27 @@
         TransactionInfo();
         virtual ~TransactionInfo();
 
+        /**
+         * Get the unique identifier that this object and its own
+         * Marshaller share.
+         * @returns new DataStructure type copy.
+         */
         virtual unsigned char getDataStructureType() const;
+
+        /**
+         * Clone this obbject and return a new instance that the
+         * caller now owns, this will be an exact copy of this one
+         * @returns new copy of this object.
+         */
+        virtual TransactionInfo* clone() 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
+         */
+        virtual void clone( TransactionInfo* dest ) const;
+
         virtual const ConnectionId* getConnectionId() const;
         virtual ConnectionId* getConnectionId();
         virtual void setConnectionId( ConnectionId* connectionId );

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=465088&r1=465087&r2=465088
==============================================================================
--- 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 Tue Oct 17 15:39:06 2006
@@ -44,8 +44,32 @@
 }
 
 ////////////////////////////////////////////////////////////////////////////////
-unsigned char XATransactionId::getDataStructureType() const
-{
+XATransactionId* XATransactionId::clone() const {
+    XATransactionId* xATransactionId = new XATransactionId();
+
+    // Copy the data from the base class or classes
+    TransactionId::copy( xATransactionId );
+
+    xATransactionId->formatId = this->getFormatId()->clone();
+    xATransactionId->globalTransactionId = this->getGlobalTransactionId()->clone();
+    xATransactionId->branchQualifier = this->getBranchQualifier()->clone();
+
+    return xATransactionId
+}
+
+////////////////////////////////////////////////////////////////////////////////
+void XATransactionId::copy( XATransactionId* dest ) const {
+
+    // Copy the data from the base class or classes
+    TransactionId::copy( xATransactionId );
+
+    dest->setFormatId( this->getFormatId()->clone() );
+    dest->setGlobalTransactionId( this->getGlobalTransactionId()->clone() );
+    dest->setBranchQualifier( this->getBranchQualifier()->clone() );
+}
+
+////////////////////////////////////////////////////////////////////////////////
+unsigned char XATransactionId::getDataStructureType() const {
     return XATransactionId::ID_XATRANSACTIONID; 
 }
 

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=465088&r1=465087&r2=465088
==============================================================================
--- 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 Tue Oct 17 15:39:06 2006
@@ -59,7 +59,27 @@
         XATransactionId();
         virtual ~XATransactionId();
 
+        /**
+         * Get the unique identifier that this object and its own
+         * Marshaller share.
+         * @returns new DataStructure type copy.
+         */
         virtual unsigned char getDataStructureType() const;
+
+        /**
+         * Clone this obbject and return a new instance that the
+         * caller now owns, this will be an exact copy of this one
+         * @returns new copy of this object.
+         */
+        virtual XATransactionId* clone() 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
+         */
+        virtual void clone( XATransactionId* dest ) const;
+
         virtual const int getFormatId() const;
         virtual int getFormatId();
         virtual void setFormatId( int formatId );



Mime
View raw message