activemq-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From tab...@apache.org
Subject svn commit: r738877 [3/3] - /activemq/activemq-cpp/trunk/src/main/activemq/commands/
Date Thu, 29 Jan 2009 15:02:59 GMT
Modified: activemq/activemq-cpp/trunk/src/main/activemq/commands/ProducerAck.cpp
URL: http://svn.apache.org/viewvc/activemq/activemq-cpp/trunk/src/main/activemq/commands/ProducerAck.cpp?rev=738877&r1=738876&r2=738877&view=diff
==============================================================================
--- activemq/activemq-cpp/trunk/src/main/activemq/commands/ProducerAck.cpp (original)
+++ activemq/activemq-cpp/trunk/src/main/activemq/commands/ProducerAck.cpp Thu Jan 29 15:02:56 2009
@@ -30,21 +30,21 @@
  *  Command and marshaling code for OpenWire format for ProducerAck
  *
  *
- *  NOTE!: This file is autogenerated - do not modify!
+ *  NOTE!: This file is auto generated - do not modify!
  *         if you need to make a change, please see the Java Classes in the
  *         activemq-core module
  *
  */
 ////////////////////////////////////////////////////////////////////////////////
-ProducerAck::ProducerAck()
-{
+ProducerAck::ProducerAck() {
+
     this->producerId = NULL;
     this->size = 0;
 }
 
 ////////////////////////////////////////////////////////////////////////////////
-ProducerAck::~ProducerAck()
-{
+ProducerAck::~ProducerAck() {
+
     delete this->producerId;
 }
 
@@ -61,13 +61,17 @@
 ////////////////////////////////////////////////////////////////////////////////
 void ProducerAck::copyDataStructure( const DataStructure* src ) {
 
+    // Protect against invalid self assignment.
+    if( this == src ) {
+        return;
+    }
+
     // Copy the data of the base class or classes
     BaseCommand::copyDataStructure( src );
 
     const ProducerAck* srcPtr = dynamic_cast<const ProducerAck*>( src );
 
     if( srcPtr == NULL || src == NULL ) {
-
         throw decaf::lang::exceptions::NullPointerException(
             __FILE__, __LINE__,
             "ProducerAck::copyDataStructure - src is NULL or invalid" );
@@ -107,6 +111,11 @@
 
 ////////////////////////////////////////////////////////////////////////////////
 bool ProducerAck::equals( const DataStructure* value ) const {
+
+    if( this == value ) {
+        return true;
+    }
+
     const ProducerAck* valuePtr = dynamic_cast<const ProducerAck*>( value );
 
     if( valuePtr == NULL || value == NULL ) {
@@ -146,7 +155,7 @@
 }
 
 ////////////////////////////////////////////////////////////////////////////////
-void ProducerAck::setProducerId(ProducerId* producerId ) {
+void ProducerAck::setProducerId( ProducerId* producerId ) {
     this->producerId = producerId;
 }
 
@@ -156,7 +165,7 @@
 }
 
 ////////////////////////////////////////////////////////////////////////////////
-void ProducerAck::setSize(int size ) {
+void ProducerAck::setSize( int size ) {
     this->size = size;
 }
 

Modified: activemq/activemq-cpp/trunk/src/main/activemq/commands/ProducerAck.h
URL: http://svn.apache.org/viewvc/activemq/activemq-cpp/trunk/src/main/activemq/commands/ProducerAck.h?rev=738877&r1=738876&r2=738877&view=diff
==============================================================================
--- activemq/activemq-cpp/trunk/src/main/activemq/commands/ProducerAck.h (original)
+++ activemq/activemq-cpp/trunk/src/main/activemq/commands/ProducerAck.h Thu Jan 29 15:02:56 2009
@@ -37,7 +37,7 @@
      *  Command and marshaling code for OpenWire format for ProducerAck
      *
      *
-     *  NOTE!: This file is autogenerated - do not modify!
+     *  NOTE!: This file is auto generated - do not modify!
      *         if you need to make a change, please see the Java Classes
      *         in the activemq-openwire-generator module
      *
@@ -48,6 +48,11 @@
         ProducerId* producerId;
         int size;
 
+    protected:
+
+        ProducerAck( const ProducerAck& other );
+        ProducerAck& operator= ( const ProducerAck& other );
+
     public:
 
         const static unsigned char ID_PRODUCERACK = 19;
@@ -59,7 +64,7 @@
 
         /**
          * Get the unique identifier that this object and its own
-         * Marshaller share.
+         * Marshaler share.
          * @returns new DataStructure type copy.
          */
         virtual unsigned char getDataStructureType() const;

Modified: activemq/activemq-cpp/trunk/src/main/activemq/commands/ProducerId.cpp
URL: http://svn.apache.org/viewvc/activemq/activemq-cpp/trunk/src/main/activemq/commands/ProducerId.cpp?rev=738877&r1=738876&r2=738877&view=diff
==============================================================================
--- activemq/activemq-cpp/trunk/src/main/activemq/commands/ProducerId.cpp (original)
+++ activemq/activemq-cpp/trunk/src/main/activemq/commands/ProducerId.cpp Thu Jan 29 15:02:56 2009
@@ -18,6 +18,7 @@
 #include <activemq/state/CommandVisitor.h>
 #include <activemq/exceptions/ActiveMQException.h>
 #include <decaf/lang/exceptions/NullPointerException.h>
+#include <apr_strings.h>
 
 using namespace std;
 using namespace activemq;
@@ -30,22 +31,27 @@
  *  Command and marshaling code for OpenWire format for ProducerId
  *
  *
- *  NOTE!: This file is autogenerated - do not modify!
+ *  NOTE!: This file is auto generated - do not modify!
  *         if you need to make a change, please see the Java Classes in the
  *         activemq-core module
  *
  */
 ////////////////////////////////////////////////////////////////////////////////
-ProducerId::ProducerId()
-{
+ProducerId::ProducerId() {
+
     this->connectionId = "";
     this->value = 0;
     this->sessionId = 0;
 }
 
 ////////////////////////////////////////////////////////////////////////////////
-ProducerId::~ProducerId()
-{
+ProducerId::ProducerId( const ProducerId& other ) {
+    this->copyDataStructure( &other );
+}
+
+////////////////////////////////////////////////////////////////////////////////
+ProducerId::~ProducerId() {
+
 }
 
 ////////////////////////////////////////////////////////////////////////////////
@@ -61,13 +67,17 @@
 ////////////////////////////////////////////////////////////////////////////////
 void ProducerId::copyDataStructure( const DataStructure* src ) {
 
+    // Protect against invalid self assignment.
+    if( this == src ) {
+        return;
+    }
+
     // Copy the data of the base class or classes
     BaseDataStructure::copyDataStructure( src );
 
     const ProducerId* srcPtr = dynamic_cast<const ProducerId*>( src );
 
     if( srcPtr == NULL || src == NULL ) {
-
         throw decaf::lang::exceptions::NullPointerException(
             __FILE__, __LINE__,
             "ProducerId::copyDataStructure - src is NULL or invalid" );
@@ -100,6 +110,11 @@
 
 ////////////////////////////////////////////////////////////////////////////////
 bool ProducerId::equals( const DataStructure* value ) const {
+
+    if( this == value ) {
+        return true;
+    }
+
     const ProducerId* valuePtr = dynamic_cast<const ProducerId*>( value );
 
     if( valuePtr == NULL || value == NULL ) {
@@ -131,7 +146,7 @@
 }
 
 ////////////////////////////////////////////////////////////////////////////////
-void ProducerId::setConnectionId(const std::string& connectionId ) {
+void ProducerId::setConnectionId( const std::string& connectionId ) {
     this->connectionId = connectionId;
 }
 
@@ -141,7 +156,7 @@
 }
 
 ////////////////////////////////////////////////////////////////////////////////
-void ProducerId::setValue(long long value ) {
+void ProducerId::setValue( long long value ) {
     this->value = value;
 }
 
@@ -151,7 +166,53 @@
 }
 
 ////////////////////////////////////////////////////////////////////////////////
-void ProducerId::setSessionId(long long sessionId ) {
+void ProducerId::setSessionId( long long sessionId ) {
     this->sessionId = sessionId;
 }
 
+////////////////////////////////////////////////////////////////////////////////
+int ProducerId::compareTo( const ProducerId& value ) const {
+
+    if( this == &value ) {
+        return 0;
+    }
+
+    int connectionIdComp = apr_strnatcasecmp( this->connectionId.c_str(), value.connectionId.c_str() );
+    if( connectionIdComp != 0 ) {
+        return connectionIdComp;
+    }
+
+    if( this->value > value.value ) {
+        return 1;
+    } else if( this->value < value.value ) {
+        return -1;
+    }
+
+    if( this->sessionId > value.sessionId ) {
+        return 1;
+    } else if( this->sessionId < value.sessionId ) {
+        return -1;
+    }
+
+    return 0;
+}
+
+////////////////////////////////////////////////////////////////////////////////
+bool ProducerId::equals( const ProducerId& value ) const {
+    return this->equals( &value );
+}
+
+////////////////////////////////////////////////////////////////////////////////
+bool ProducerId::operator==( const ProducerId& value ) const {
+    return this->compareTo( value ) == 0;
+}
+
+////////////////////////////////////////////////////////////////////////////////
+bool ProducerId::operator<( const ProducerId& value ) const {
+    return this->compareTo( value ) < 0;
+}
+////////////////////////////////////////////////////////////////////////////////
+ProducerId& ProducerId::operator= ( const ProducerId& other ) {
+    this->copyDataStructure( &other );
+}
+

Modified: activemq/activemq-cpp/trunk/src/main/activemq/commands/ProducerId.h
URL: http://svn.apache.org/viewvc/activemq/activemq-cpp/trunk/src/main/activemq/commands/ProducerId.h?rev=738877&r1=738876&r2=738877&view=diff
==============================================================================
--- activemq/activemq-cpp/trunk/src/main/activemq/commands/ProducerId.h (original)
+++ activemq/activemq-cpp/trunk/src/main/activemq/commands/ProducerId.h Thu Jan 29 15:02:56 2009
@@ -25,6 +25,7 @@
 
 #include <activemq/util/Config.h>
 #include <activemq/commands/BaseDataStructure.h>
+#include <decaf/lang/Comparable.h>
 #include <vector>
 #include <string>
 
@@ -36,12 +37,12 @@
      *  Command and marshaling code for OpenWire format for ProducerId
      *
      *
-     *  NOTE!: This file is autogenerated - do not modify!
+     *  NOTE!: This file is auto generated - do not modify!
      *         if you need to make a change, please see the Java Classes
      *         in the activemq-openwire-generator module
      *
      */
-    class AMQCPP_API ProducerId : public BaseDataStructure {
+    class AMQCPP_API ProducerId : public BaseDataStructure, public decaf::lang::Comparable<ProducerId> {
     protected:
 
         std::string connectionId;
@@ -55,11 +56,12 @@
     public:
 
         ProducerId();
+        ProducerId( const ProducerId& other );
         virtual ~ProducerId();
 
         /**
          * Get the unique identifier that this object and its own
-         * Marshaller share.
+         * Marshaler share.
          * @returns new DataStructure type copy.
          */
         virtual unsigned char getDataStructureType() const;
@@ -103,6 +105,15 @@
         virtual long long getSessionId() const;
         virtual void setSessionId( long long sessionId );
 
+        virtual int compareTo( const ProducerId& value ) const;
+
+        virtual bool equals( const ProducerId& value ) const;
+
+        virtual bool operator==( const ProducerId& value ) const;
+
+        virtual bool operator<( const ProducerId& value ) const;
+
+        ProducerId& operator= ( const ProducerId& other );
     };
 
 }}

Modified: activemq/activemq-cpp/trunk/src/main/activemq/commands/ProducerInfo.cpp
URL: http://svn.apache.org/viewvc/activemq/activemq-cpp/trunk/src/main/activemq/commands/ProducerInfo.cpp?rev=738877&r1=738876&r2=738877&view=diff
==============================================================================
--- activemq/activemq-cpp/trunk/src/main/activemq/commands/ProducerInfo.cpp (original)
+++ activemq/activemq-cpp/trunk/src/main/activemq/commands/ProducerInfo.cpp Thu Jan 29 15:02:56 2009
@@ -30,14 +30,14 @@
  *  Command and marshaling code for OpenWire format for ProducerInfo
  *
  *
- *  NOTE!: This file is autogenerated - do not modify!
+ *  NOTE!: This file is auto generated - do not modify!
  *         if you need to make a change, please see the Java Classes in the
  *         activemq-core module
  *
  */
 ////////////////////////////////////////////////////////////////////////////////
-ProducerInfo::ProducerInfo()
-{
+ProducerInfo::ProducerInfo() {
+
     this->producerId = NULL;
     this->destination = NULL;
     this->dispatchAsync = false;
@@ -45,8 +45,8 @@
 }
 
 ////////////////////////////////////////////////////////////////////////////////
-ProducerInfo::~ProducerInfo()
-{
+ProducerInfo::~ProducerInfo() {
+
     delete this->producerId;
     delete this->destination;
     for( size_t ibrokerPath = 0; ibrokerPath < brokerPath.size(); ++ibrokerPath ) {
@@ -67,13 +67,17 @@
 ////////////////////////////////////////////////////////////////////////////////
 void ProducerInfo::copyDataStructure( const DataStructure* src ) {
 
+    // Protect against invalid self assignment.
+    if( this == src ) {
+        return;
+    }
+
     // Copy the data of the base class or classes
     BaseCommand::copyDataStructure( src );
 
     const ProducerInfo* srcPtr = dynamic_cast<const ProducerInfo*>( src );
 
     if( srcPtr == NULL || src == NULL ) {
-
         throw decaf::lang::exceptions::NullPointerException(
             __FILE__, __LINE__,
             "ProducerInfo::copyDataStructure - src is NULL or invalid" );
@@ -143,6 +147,11 @@
 
 ////////////////////////////////////////////////////////////////////////////////
 bool ProducerInfo::equals( const DataStructure* value ) const {
+
+    if( this == value ) {
+        return true;
+    }
+
     const ProducerInfo* valuePtr = dynamic_cast<const ProducerInfo*>( value );
 
     if( valuePtr == NULL || value == NULL ) {
@@ -201,7 +210,7 @@
 }
 
 ////////////////////////////////////////////////////////////////////////////////
-void ProducerInfo::setProducerId(ProducerId* producerId ) {
+void ProducerInfo::setProducerId( ProducerId* producerId ) {
     this->producerId = producerId;
 }
 
@@ -216,7 +225,7 @@
 }
 
 ////////////////////////////////////////////////////////////////////////////////
-void ProducerInfo::setDestination(ActiveMQDestination* destination ) {
+void ProducerInfo::setDestination( ActiveMQDestination* destination ) {
     this->destination = destination;
 }
 
@@ -231,7 +240,7 @@
 }
 
 ////////////////////////////////////////////////////////////////////////////////
-void ProducerInfo::setBrokerPath(const std::vector<BrokerId*>& brokerPath ) {
+void ProducerInfo::setBrokerPath( const std::vector<BrokerId*>& brokerPath ) {
     this->brokerPath = brokerPath;
 }
 
@@ -241,7 +250,7 @@
 }
 
 ////////////////////////////////////////////////////////////////////////////////
-void ProducerInfo::setDispatchAsync(bool dispatchAsync ) {
+void ProducerInfo::setDispatchAsync( bool dispatchAsync ) {
     this->dispatchAsync = dispatchAsync;
 }
 
@@ -251,7 +260,7 @@
 }
 
 ////////////////////////////////////////////////////////////////////////////////
-void ProducerInfo::setWindowSize(int windowSize ) {
+void ProducerInfo::setWindowSize( int windowSize ) {
     this->windowSize = windowSize;
 }
 

Modified: activemq/activemq-cpp/trunk/src/main/activemq/commands/ProducerInfo.h
URL: http://svn.apache.org/viewvc/activemq/activemq-cpp/trunk/src/main/activemq/commands/ProducerInfo.h?rev=738877&r1=738876&r2=738877&view=diff
==============================================================================
--- activemq/activemq-cpp/trunk/src/main/activemq/commands/ProducerInfo.h (original)
+++ activemq/activemq-cpp/trunk/src/main/activemq/commands/ProducerInfo.h Thu Jan 29 15:02:56 2009
@@ -39,7 +39,7 @@
      *  Command and marshaling code for OpenWire format for ProducerInfo
      *
      *
-     *  NOTE!: This file is autogenerated - do not modify!
+     *  NOTE!: This file is auto generated - do not modify!
      *         if you need to make a change, please see the Java Classes
      *         in the activemq-openwire-generator module
      *
@@ -53,6 +53,11 @@
         bool dispatchAsync;
         int windowSize;
 
+    protected:
+
+        ProducerInfo( const ProducerInfo& other );
+        ProducerInfo& operator= ( const ProducerInfo& other );
+
     public:
 
         const static unsigned char ID_PRODUCERINFO = 6;
@@ -64,7 +69,7 @@
 
         /**
          * Get the unique identifier that this object and its own
-         * Marshaller share.
+         * Marshaler share.
          * @returns new DataStructure type copy.
          */
         virtual unsigned char getDataStructureType() const;

Modified: activemq/activemq-cpp/trunk/src/main/activemq/commands/RemoveInfo.cpp
URL: http://svn.apache.org/viewvc/activemq/activemq-cpp/trunk/src/main/activemq/commands/RemoveInfo.cpp?rev=738877&r1=738876&r2=738877&view=diff
==============================================================================
--- activemq/activemq-cpp/trunk/src/main/activemq/commands/RemoveInfo.cpp (original)
+++ activemq/activemq-cpp/trunk/src/main/activemq/commands/RemoveInfo.cpp Thu Jan 29 15:02:56 2009
@@ -30,20 +30,20 @@
  *  Command and marshaling code for OpenWire format for RemoveInfo
  *
  *
- *  NOTE!: This file is autogenerated - do not modify!
+ *  NOTE!: This file is auto generated - do not modify!
  *         if you need to make a change, please see the Java Classes in the
  *         activemq-core module
  *
  */
 ////////////////////////////////////////////////////////////////////////////////
-RemoveInfo::RemoveInfo()
-{
+RemoveInfo::RemoveInfo() {
+
     this->objectId = NULL;
 }
 
 ////////////////////////////////////////////////////////////////////////////////
-RemoveInfo::~RemoveInfo()
-{
+RemoveInfo::~RemoveInfo() {
+
     delete this->objectId;
 }
 
@@ -60,13 +60,17 @@
 ////////////////////////////////////////////////////////////////////////////////
 void RemoveInfo::copyDataStructure( const DataStructure* src ) {
 
+    // Protect against invalid self assignment.
+    if( this == src ) {
+        return;
+    }
+
     // Copy the data of the base class or classes
     BaseCommand::copyDataStructure( src );
 
     const RemoveInfo* srcPtr = dynamic_cast<const RemoveInfo*>( src );
 
     if( srcPtr == NULL || src == NULL ) {
-
         throw decaf::lang::exceptions::NullPointerException(
             __FILE__, __LINE__,
             "RemoveInfo::copyDataStructure - src is NULL or invalid" );
@@ -104,6 +108,11 @@
 
 ////////////////////////////////////////////////////////////////////////////////
 bool RemoveInfo::equals( const DataStructure* value ) const {
+
+    if( this == value ) {
+        return true;
+    }
+
     const RemoveInfo* valuePtr = dynamic_cast<const RemoveInfo*>( value );
 
     if( valuePtr == NULL || value == NULL ) {
@@ -140,7 +149,7 @@
 }
 
 ////////////////////////////////////////////////////////////////////////////////
-void RemoveInfo::setObjectId(DataStructure* objectId ) {
+void RemoveInfo::setObjectId( DataStructure* objectId ) {
     this->objectId = objectId;
 }
 

Modified: activemq/activemq-cpp/trunk/src/main/activemq/commands/RemoveInfo.h
URL: http://svn.apache.org/viewvc/activemq/activemq-cpp/trunk/src/main/activemq/commands/RemoveInfo.h?rev=738877&r1=738876&r2=738877&view=diff
==============================================================================
--- activemq/activemq-cpp/trunk/src/main/activemq/commands/RemoveInfo.h (original)
+++ activemq/activemq-cpp/trunk/src/main/activemq/commands/RemoveInfo.h Thu Jan 29 15:02:56 2009
@@ -37,7 +37,7 @@
      *  Command and marshaling code for OpenWire format for RemoveInfo
      *
      *
-     *  NOTE!: This file is autogenerated - do not modify!
+     *  NOTE!: This file is auto generated - do not modify!
      *         if you need to make a change, please see the Java Classes
      *         in the activemq-openwire-generator module
      *
@@ -47,6 +47,11 @@
 
         DataStructure* objectId;
 
+    protected:
+
+        RemoveInfo( const RemoveInfo& other );
+        RemoveInfo& operator= ( const RemoveInfo& other );
+
     public:
 
         const static unsigned char ID_REMOVEINFO = 12;
@@ -58,7 +63,7 @@
 
         /**
          * Get the unique identifier that this object and its own
-         * Marshaller share.
+         * Marshaler share.
          * @returns new DataStructure type copy.
          */
         virtual unsigned char getDataStructureType() const;

Modified: activemq/activemq-cpp/trunk/src/main/activemq/commands/RemoveSubscriptionInfo.cpp
URL: http://svn.apache.org/viewvc/activemq/activemq-cpp/trunk/src/main/activemq/commands/RemoveSubscriptionInfo.cpp?rev=738877&r1=738876&r2=738877&view=diff
==============================================================================
--- activemq/activemq-cpp/trunk/src/main/activemq/commands/RemoveSubscriptionInfo.cpp (original)
+++ activemq/activemq-cpp/trunk/src/main/activemq/commands/RemoveSubscriptionInfo.cpp Thu Jan 29 15:02:56 2009
@@ -30,22 +30,22 @@
  *  Command and marshaling code for OpenWire format for RemoveSubscriptionInfo
  *
  *
- *  NOTE!: This file is autogenerated - do not modify!
+ *  NOTE!: This file is auto generated - do not modify!
  *         if you need to make a change, please see the Java Classes in the
  *         activemq-core module
  *
  */
 ////////////////////////////////////////////////////////////////////////////////
-RemoveSubscriptionInfo::RemoveSubscriptionInfo()
-{
+RemoveSubscriptionInfo::RemoveSubscriptionInfo() {
+
     this->connectionId = NULL;
     this->subcriptionName = "";
     this->clientId = "";
 }
 
 ////////////////////////////////////////////////////////////////////////////////
-RemoveSubscriptionInfo::~RemoveSubscriptionInfo()
-{
+RemoveSubscriptionInfo::~RemoveSubscriptionInfo() {
+
     delete this->connectionId;
 }
 
@@ -62,13 +62,17 @@
 ////////////////////////////////////////////////////////////////////////////////
 void RemoveSubscriptionInfo::copyDataStructure( const DataStructure* src ) {
 
+    // Protect against invalid self assignment.
+    if( this == src ) {
+        return;
+    }
+
     // Copy the data of the base class or classes
     BaseCommand::copyDataStructure( src );
 
     const RemoveSubscriptionInfo* srcPtr = dynamic_cast<const RemoveSubscriptionInfo*>( src );
 
     if( srcPtr == NULL || src == NULL ) {
-
         throw decaf::lang::exceptions::NullPointerException(
             __FILE__, __LINE__,
             "RemoveSubscriptionInfo::copyDataStructure - src is NULL or invalid" );
@@ -110,6 +114,11 @@
 
 ////////////////////////////////////////////////////////////////////////////////
 bool RemoveSubscriptionInfo::equals( const DataStructure* value ) const {
+
+    if( this == value ) {
+        return true;
+    }
+
     const RemoveSubscriptionInfo* valuePtr = dynamic_cast<const RemoveSubscriptionInfo*>( value );
 
     if( valuePtr == NULL || value == NULL ) {
@@ -152,7 +161,7 @@
 }
 
 ////////////////////////////////////////////////////////////////////////////////
-void RemoveSubscriptionInfo::setConnectionId(ConnectionId* connectionId ) {
+void RemoveSubscriptionInfo::setConnectionId( ConnectionId* connectionId ) {
     this->connectionId = connectionId;
 }
 
@@ -167,7 +176,7 @@
 }
 
 ////////////////////////////////////////////////////////////////////////////////
-void RemoveSubscriptionInfo::setSubcriptionName(const std::string& subcriptionName ) {
+void RemoveSubscriptionInfo::setSubcriptionName( const std::string& subcriptionName ) {
     this->subcriptionName = subcriptionName;
 }
 
@@ -182,7 +191,7 @@
 }
 
 ////////////////////////////////////////////////////////////////////////////////
-void RemoveSubscriptionInfo::setClientId(const std::string& clientId ) {
+void RemoveSubscriptionInfo::setClientId( const std::string& clientId ) {
     this->clientId = clientId;
 }
 

Modified: activemq/activemq-cpp/trunk/src/main/activemq/commands/RemoveSubscriptionInfo.h
URL: http://svn.apache.org/viewvc/activemq/activemq-cpp/trunk/src/main/activemq/commands/RemoveSubscriptionInfo.h?rev=738877&r1=738876&r2=738877&view=diff
==============================================================================
--- activemq/activemq-cpp/trunk/src/main/activemq/commands/RemoveSubscriptionInfo.h (original)
+++ activemq/activemq-cpp/trunk/src/main/activemq/commands/RemoveSubscriptionInfo.h Thu Jan 29 15:02:56 2009
@@ -37,7 +37,7 @@
      *  Command and marshaling code for OpenWire format for RemoveSubscriptionInfo
      *
      *
-     *  NOTE!: This file is autogenerated - do not modify!
+     *  NOTE!: This file is auto generated - do not modify!
      *         if you need to make a change, please see the Java Classes
      *         in the activemq-openwire-generator module
      *
@@ -49,6 +49,11 @@
         std::string subcriptionName;
         std::string clientId;
 
+    protected:
+
+        RemoveSubscriptionInfo( const RemoveSubscriptionInfo& other );
+        RemoveSubscriptionInfo& operator= ( const RemoveSubscriptionInfo& other );
+
     public:
 
         const static unsigned char ID_REMOVESUBSCRIPTIONINFO = 9;
@@ -60,7 +65,7 @@
 
         /**
          * Get the unique identifier that this object and its own
-         * Marshaller share.
+         * Marshaler share.
          * @returns new DataStructure type copy.
          */
         virtual unsigned char getDataStructureType() const;

Modified: activemq/activemq-cpp/trunk/src/main/activemq/commands/ReplayCommand.cpp
URL: http://svn.apache.org/viewvc/activemq/activemq-cpp/trunk/src/main/activemq/commands/ReplayCommand.cpp?rev=738877&r1=738876&r2=738877&view=diff
==============================================================================
--- activemq/activemq-cpp/trunk/src/main/activemq/commands/ReplayCommand.cpp (original)
+++ activemq/activemq-cpp/trunk/src/main/activemq/commands/ReplayCommand.cpp Thu Jan 29 15:02:56 2009
@@ -30,21 +30,21 @@
  *  Command and marshaling code for OpenWire format for ReplayCommand
  *
  *
- *  NOTE!: This file is autogenerated - do not modify!
+ *  NOTE!: This file is auto generated - do not modify!
  *         if you need to make a change, please see the Java Classes in the
  *         activemq-core module
  *
  */
 ////////////////////////////////////////////////////////////////////////////////
-ReplayCommand::ReplayCommand()
-{
+ReplayCommand::ReplayCommand() {
+
     this->firstNakNumber = 0;
     this->lastNakNumber = 0;
 }
 
 ////////////////////////////////////////////////////////////////////////////////
-ReplayCommand::~ReplayCommand()
-{
+ReplayCommand::~ReplayCommand() {
+
 }
 
 ////////////////////////////////////////////////////////////////////////////////
@@ -60,13 +60,17 @@
 ////////////////////////////////////////////////////////////////////////////////
 void ReplayCommand::copyDataStructure( const DataStructure* src ) {
 
+    // Protect against invalid self assignment.
+    if( this == src ) {
+        return;
+    }
+
     // Copy the data of the base class or classes
     BaseCommand::copyDataStructure( src );
 
     const ReplayCommand* srcPtr = dynamic_cast<const ReplayCommand*>( src );
 
     if( srcPtr == NULL || src == NULL ) {
-
         throw decaf::lang::exceptions::NullPointerException(
             __FILE__, __LINE__,
             "ReplayCommand::copyDataStructure - src is NULL or invalid" );
@@ -97,6 +101,11 @@
 
 ////////////////////////////////////////////////////////////////////////////////
 bool ReplayCommand::equals( const DataStructure* value ) const {
+
+    if( this == value ) {
+        return true;
+    }
+
     const ReplayCommand* valuePtr = dynamic_cast<const ReplayCommand*>( value );
 
     if( valuePtr == NULL || value == NULL ) {
@@ -127,7 +136,7 @@
 }
 
 ////////////////////////////////////////////////////////////////////////////////
-void ReplayCommand::setFirstNakNumber(int firstNakNumber ) {
+void ReplayCommand::setFirstNakNumber( int firstNakNumber ) {
     this->firstNakNumber = firstNakNumber;
 }
 
@@ -137,7 +146,7 @@
 }
 
 ////////////////////////////////////////////////////////////////////////////////
-void ReplayCommand::setLastNakNumber(int lastNakNumber ) {
+void ReplayCommand::setLastNakNumber( int lastNakNumber ) {
     this->lastNakNumber = lastNakNumber;
 }
 

Modified: activemq/activemq-cpp/trunk/src/main/activemq/commands/ReplayCommand.h
URL: http://svn.apache.org/viewvc/activemq/activemq-cpp/trunk/src/main/activemq/commands/ReplayCommand.h?rev=738877&r1=738876&r2=738877&view=diff
==============================================================================
--- activemq/activemq-cpp/trunk/src/main/activemq/commands/ReplayCommand.h (original)
+++ activemq/activemq-cpp/trunk/src/main/activemq/commands/ReplayCommand.h Thu Jan 29 15:02:56 2009
@@ -36,7 +36,7 @@
      *  Command and marshaling code for OpenWire format for ReplayCommand
      *
      *
-     *  NOTE!: This file is autogenerated - do not modify!
+     *  NOTE!: This file is auto generated - do not modify!
      *         if you need to make a change, please see the Java Classes
      *         in the activemq-openwire-generator module
      *
@@ -47,6 +47,11 @@
         int firstNakNumber;
         int lastNakNumber;
 
+    protected:
+
+        ReplayCommand( const ReplayCommand& other );
+        ReplayCommand& operator= ( const ReplayCommand& other );
+
     public:
 
         const static unsigned char ID_REPLAYCOMMAND = 65;
@@ -58,7 +63,7 @@
 
         /**
          * Get the unique identifier that this object and its own
-         * Marshaller share.
+         * Marshaler share.
          * @returns new DataStructure type copy.
          */
         virtual unsigned char getDataStructureType() const;

Modified: activemq/activemq-cpp/trunk/src/main/activemq/commands/Response.cpp
URL: http://svn.apache.org/viewvc/activemq/activemq-cpp/trunk/src/main/activemq/commands/Response.cpp?rev=738877&r1=738876&r2=738877&view=diff
==============================================================================
--- activemq/activemq-cpp/trunk/src/main/activemq/commands/Response.cpp (original)
+++ activemq/activemq-cpp/trunk/src/main/activemq/commands/Response.cpp Thu Jan 29 15:02:56 2009
@@ -30,20 +30,20 @@
  *  Command and marshaling code for OpenWire format for Response
  *
  *
- *  NOTE!: This file is autogenerated - do not modify!
+ *  NOTE!: This file is auto generated - do not modify!
  *         if you need to make a change, please see the Java Classes in the
  *         activemq-core module
  *
  */
 ////////////////////////////////////////////////////////////////////////////////
-Response::Response()
-{
+Response::Response() {
+
     this->correlationId = 0;
 }
 
 ////////////////////////////////////////////////////////////////////////////////
-Response::~Response()
-{
+Response::~Response() {
+
 }
 
 ////////////////////////////////////////////////////////////////////////////////
@@ -59,13 +59,17 @@
 ////////////////////////////////////////////////////////////////////////////////
 void Response::copyDataStructure( const DataStructure* src ) {
 
+    // Protect against invalid self assignment.
+    if( this == src ) {
+        return;
+    }
+
     // Copy the data of the base class or classes
     BaseCommand::copyDataStructure( src );
 
     const Response* srcPtr = dynamic_cast<const Response*>( src );
 
     if( srcPtr == NULL || src == NULL ) {
-
         throw decaf::lang::exceptions::NullPointerException(
             __FILE__, __LINE__,
             "Response::copyDataStructure - src is NULL or invalid" );
@@ -94,6 +98,11 @@
 
 ////////////////////////////////////////////////////////////////////////////////
 bool Response::equals( const DataStructure* value ) const {
+
+    if( this == value ) {
+        return true;
+    }
+
     const Response* valuePtr = dynamic_cast<const Response*>( value );
 
     if( valuePtr == NULL || value == NULL ) {
@@ -121,7 +130,7 @@
 }
 
 ////////////////////////////////////////////////////////////////////////////////
-void Response::setCorrelationId(int correlationId ) {
+void Response::setCorrelationId( int correlationId ) {
     this->correlationId = correlationId;
 }
 

Modified: activemq/activemq-cpp/trunk/src/main/activemq/commands/Response.h
URL: http://svn.apache.org/viewvc/activemq/activemq-cpp/trunk/src/main/activemq/commands/Response.h?rev=738877&r1=738876&r2=738877&view=diff
==============================================================================
--- activemq/activemq-cpp/trunk/src/main/activemq/commands/Response.h (original)
+++ activemq/activemq-cpp/trunk/src/main/activemq/commands/Response.h Thu Jan 29 15:02:56 2009
@@ -36,7 +36,7 @@
      *  Command and marshaling code for OpenWire format for Response
      *
      *
-     *  NOTE!: This file is autogenerated - do not modify!
+     *  NOTE!: This file is auto generated - do not modify!
      *         if you need to make a change, please see the Java Classes
      *         in the activemq-openwire-generator module
      *
@@ -46,6 +46,11 @@
 
         int correlationId;
 
+    protected:
+
+        Response( const Response& other );
+        Response& operator= ( const Response& other );
+
     public:
 
         const static unsigned char ID_RESPONSE = 30;
@@ -57,7 +62,7 @@
 
         /**
          * Get the unique identifier that this object and its own
-         * Marshaller share.
+         * Marshaler share.
          * @returns new DataStructure type copy.
          */
         virtual unsigned char getDataStructureType() const;

Modified: activemq/activemq-cpp/trunk/src/main/activemq/commands/SessionId.cpp
URL: http://svn.apache.org/viewvc/activemq/activemq-cpp/trunk/src/main/activemq/commands/SessionId.cpp?rev=738877&r1=738876&r2=738877&view=diff
==============================================================================
--- activemq/activemq-cpp/trunk/src/main/activemq/commands/SessionId.cpp (original)
+++ activemq/activemq-cpp/trunk/src/main/activemq/commands/SessionId.cpp Thu Jan 29 15:02:56 2009
@@ -18,6 +18,7 @@
 #include <activemq/state/CommandVisitor.h>
 #include <activemq/exceptions/ActiveMQException.h>
 #include <decaf/lang/exceptions/NullPointerException.h>
+#include <apr_strings.h>
 
 using namespace std;
 using namespace activemq;
@@ -30,21 +31,26 @@
  *  Command and marshaling code for OpenWire format for SessionId
  *
  *
- *  NOTE!: This file is autogenerated - do not modify!
+ *  NOTE!: This file is auto generated - do not modify!
  *         if you need to make a change, please see the Java Classes in the
  *         activemq-core module
  *
  */
 ////////////////////////////////////////////////////////////////////////////////
-SessionId::SessionId()
-{
+SessionId::SessionId() {
+
     this->connectionId = "";
     this->value = 0;
 }
 
 ////////////////////////////////////////////////////////////////////////////////
-SessionId::~SessionId()
-{
+SessionId::SessionId( const SessionId& other ) {
+    this->copyDataStructure( &other );
+}
+
+////////////////////////////////////////////////////////////////////////////////
+SessionId::~SessionId() {
+
 }
 
 ////////////////////////////////////////////////////////////////////////////////
@@ -60,13 +66,17 @@
 ////////////////////////////////////////////////////////////////////////////////
 void SessionId::copyDataStructure( const DataStructure* src ) {
 
+    // Protect against invalid self assignment.
+    if( this == src ) {
+        return;
+    }
+
     // Copy the data of the base class or classes
     BaseDataStructure::copyDataStructure( src );
 
     const SessionId* srcPtr = dynamic_cast<const SessionId*>( src );
 
     if( srcPtr == NULL || src == NULL ) {
-
         throw decaf::lang::exceptions::NullPointerException(
             __FILE__, __LINE__,
             "SessionId::copyDataStructure - src is NULL or invalid" );
@@ -97,6 +107,11 @@
 
 ////////////////////////////////////////////////////////////////////////////////
 bool SessionId::equals( const DataStructure* value ) const {
+
+    if( this == value ) {
+        return true;
+    }
+
     const SessionId* valuePtr = dynamic_cast<const SessionId*>( value );
 
     if( valuePtr == NULL || value == NULL ) {
@@ -125,7 +140,7 @@
 }
 
 ////////////////////////////////////////////////////////////////////////////////
-void SessionId::setConnectionId(const std::string& connectionId ) {
+void SessionId::setConnectionId( const std::string& connectionId ) {
     this->connectionId = connectionId;
 }
 
@@ -135,7 +150,47 @@
 }
 
 ////////////////////////////////////////////////////////////////////////////////
-void SessionId::setValue(long long value ) {
+void SessionId::setValue( long long value ) {
     this->value = value;
 }
 
+////////////////////////////////////////////////////////////////////////////////
+int SessionId::compareTo( const SessionId& value ) const {
+
+    if( this == &value ) {
+        return 0;
+    }
+
+    int connectionIdComp = apr_strnatcasecmp( this->connectionId.c_str(), value.connectionId.c_str() );
+    if( connectionIdComp != 0 ) {
+        return connectionIdComp;
+    }
+
+    if( this->value > value.value ) {
+        return 1;
+    } else if( this->value < value.value ) {
+        return -1;
+    }
+
+    return 0;
+}
+
+////////////////////////////////////////////////////////////////////////////////
+bool SessionId::equals( const SessionId& value ) const {
+    return this->equals( &value );
+}
+
+////////////////////////////////////////////////////////////////////////////////
+bool SessionId::operator==( const SessionId& value ) const {
+    return this->compareTo( value ) == 0;
+}
+
+////////////////////////////////////////////////////////////////////////////////
+bool SessionId::operator<( const SessionId& value ) const {
+    return this->compareTo( value ) < 0;
+}
+////////////////////////////////////////////////////////////////////////////////
+SessionId& SessionId::operator= ( const SessionId& other ) {
+    this->copyDataStructure( &other );
+}
+

Modified: activemq/activemq-cpp/trunk/src/main/activemq/commands/SessionId.h
URL: http://svn.apache.org/viewvc/activemq/activemq-cpp/trunk/src/main/activemq/commands/SessionId.h?rev=738877&r1=738876&r2=738877&view=diff
==============================================================================
--- activemq/activemq-cpp/trunk/src/main/activemq/commands/SessionId.h (original)
+++ activemq/activemq-cpp/trunk/src/main/activemq/commands/SessionId.h Thu Jan 29 15:02:56 2009
@@ -25,6 +25,7 @@
 
 #include <activemq/util/Config.h>
 #include <activemq/commands/BaseDataStructure.h>
+#include <decaf/lang/Comparable.h>
 #include <vector>
 #include <string>
 
@@ -36,12 +37,12 @@
      *  Command and marshaling code for OpenWire format for SessionId
      *
      *
-     *  NOTE!: This file is autogenerated - do not modify!
+     *  NOTE!: This file is auto generated - do not modify!
      *         if you need to make a change, please see the Java Classes
      *         in the activemq-openwire-generator module
      *
      */
-    class AMQCPP_API SessionId : public BaseDataStructure {
+    class AMQCPP_API SessionId : public BaseDataStructure, public decaf::lang::Comparable<SessionId> {
     protected:
 
         std::string connectionId;
@@ -54,11 +55,12 @@
     public:
 
         SessionId();
+        SessionId( const SessionId& other );
         virtual ~SessionId();
 
         /**
          * Get the unique identifier that this object and its own
-         * Marshaller share.
+         * Marshaler share.
          * @returns new DataStructure type copy.
          */
         virtual unsigned char getDataStructureType() const;
@@ -99,6 +101,15 @@
         virtual long long getValue() const;
         virtual void setValue( long long value );
 
+        virtual int compareTo( const SessionId& value ) const;
+
+        virtual bool equals( const SessionId& value ) const;
+
+        virtual bool operator==( const SessionId& value ) const;
+
+        virtual bool operator<( const SessionId& value ) const;
+
+        SessionId& operator= ( const SessionId& other );
     };
 
 }}

Modified: activemq/activemq-cpp/trunk/src/main/activemq/commands/SessionInfo.cpp
URL: http://svn.apache.org/viewvc/activemq/activemq-cpp/trunk/src/main/activemq/commands/SessionInfo.cpp?rev=738877&r1=738876&r2=738877&view=diff
==============================================================================
--- activemq/activemq-cpp/trunk/src/main/activemq/commands/SessionInfo.cpp (original)
+++ activemq/activemq-cpp/trunk/src/main/activemq/commands/SessionInfo.cpp Thu Jan 29 15:02:56 2009
@@ -30,20 +30,20 @@
  *  Command and marshaling code for OpenWire format for SessionInfo
  *
  *
- *  NOTE!: This file is autogenerated - do not modify!
+ *  NOTE!: This file is auto generated - do not modify!
  *         if you need to make a change, please see the Java Classes in the
  *         activemq-core module
  *
  */
 ////////////////////////////////////////////////////////////////////////////////
-SessionInfo::SessionInfo()
-{
+SessionInfo::SessionInfo() {
+
     this->sessionId = NULL;
 }
 
 ////////////////////////////////////////////////////////////////////////////////
-SessionInfo::~SessionInfo()
-{
+SessionInfo::~SessionInfo() {
+
     delete this->sessionId;
 }
 
@@ -60,13 +60,17 @@
 ////////////////////////////////////////////////////////////////////////////////
 void SessionInfo::copyDataStructure( const DataStructure* src ) {
 
+    // Protect against invalid self assignment.
+    if( this == src ) {
+        return;
+    }
+
     // Copy the data of the base class or classes
     BaseCommand::copyDataStructure( src );
 
     const SessionInfo* srcPtr = dynamic_cast<const SessionInfo*>( src );
 
     if( srcPtr == NULL || src == NULL ) {
-
         throw decaf::lang::exceptions::NullPointerException(
             __FILE__, __LINE__,
             "SessionInfo::copyDataStructure - src is NULL or invalid" );
@@ -104,6 +108,11 @@
 
 ////////////////////////////////////////////////////////////////////////////////
 bool SessionInfo::equals( const DataStructure* value ) const {
+
+    if( this == value ) {
+        return true;
+    }
+
     const SessionInfo* valuePtr = dynamic_cast<const SessionInfo*>( value );
 
     if( valuePtr == NULL || value == NULL ) {
@@ -140,7 +149,7 @@
 }
 
 ////////////////////////////////////////////////////////////////////////////////
-void SessionInfo::setSessionId(SessionId* sessionId ) {
+void SessionInfo::setSessionId( SessionId* sessionId ) {
     this->sessionId = sessionId;
 }
 

Modified: activemq/activemq-cpp/trunk/src/main/activemq/commands/SessionInfo.h
URL: http://svn.apache.org/viewvc/activemq/activemq-cpp/trunk/src/main/activemq/commands/SessionInfo.h?rev=738877&r1=738876&r2=738877&view=diff
==============================================================================
--- activemq/activemq-cpp/trunk/src/main/activemq/commands/SessionInfo.h (original)
+++ activemq/activemq-cpp/trunk/src/main/activemq/commands/SessionInfo.h Thu Jan 29 15:02:56 2009
@@ -37,7 +37,7 @@
      *  Command and marshaling code for OpenWire format for SessionInfo
      *
      *
-     *  NOTE!: This file is autogenerated - do not modify!
+     *  NOTE!: This file is auto generated - do not modify!
      *         if you need to make a change, please see the Java Classes
      *         in the activemq-openwire-generator module
      *
@@ -47,6 +47,11 @@
 
         SessionId* sessionId;
 
+    protected:
+
+        SessionInfo( const SessionInfo& other );
+        SessionInfo& operator= ( const SessionInfo& other );
+
     public:
 
         const static unsigned char ID_SESSIONINFO = 4;
@@ -58,7 +63,7 @@
 
         /**
          * Get the unique identifier that this object and its own
-         * Marshaller share.
+         * Marshaler share.
          * @returns new DataStructure type copy.
          */
         virtual unsigned char getDataStructureType() const;

Modified: activemq/activemq-cpp/trunk/src/main/activemq/commands/ShutdownInfo.cpp
URL: http://svn.apache.org/viewvc/activemq/activemq-cpp/trunk/src/main/activemq/commands/ShutdownInfo.cpp?rev=738877&r1=738876&r2=738877&view=diff
==============================================================================
--- activemq/activemq-cpp/trunk/src/main/activemq/commands/ShutdownInfo.cpp (original)
+++ activemq/activemq-cpp/trunk/src/main/activemq/commands/ShutdownInfo.cpp Thu Jan 29 15:02:56 2009
@@ -30,19 +30,19 @@
  *  Command and marshaling code for OpenWire format for ShutdownInfo
  *
  *
- *  NOTE!: This file is autogenerated - do not modify!
+ *  NOTE!: This file is auto generated - do not modify!
  *         if you need to make a change, please see the Java Classes in the
  *         activemq-core module
  *
  */
 ////////////////////////////////////////////////////////////////////////////////
-ShutdownInfo::ShutdownInfo()
-{
+ShutdownInfo::ShutdownInfo() {
+
 }
 
 ////////////////////////////////////////////////////////////////////////////////
-ShutdownInfo::~ShutdownInfo()
-{
+ShutdownInfo::~ShutdownInfo() {
+
 }
 
 ////////////////////////////////////////////////////////////////////////////////
@@ -58,13 +58,17 @@
 ////////////////////////////////////////////////////////////////////////////////
 void ShutdownInfo::copyDataStructure( const DataStructure* src ) {
 
+    // Protect against invalid self assignment.
+    if( this == src ) {
+        return;
+    }
+
     // 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 decaf::lang::exceptions::NullPointerException(
             __FILE__, __LINE__,
             "ShutdownInfo::copyDataStructure - src is NULL or invalid" );
@@ -91,6 +95,11 @@
 
 ////////////////////////////////////////////////////////////////////////////////
 bool ShutdownInfo::equals( const DataStructure* value ) const {
+
+    if( this == value ) {
+        return true;
+    }
+
     const ShutdownInfo* valuePtr = dynamic_cast<const ShutdownInfo*>( value );
 
     if( valuePtr == NULL || value == NULL ) {

Modified: activemq/activemq-cpp/trunk/src/main/activemq/commands/ShutdownInfo.h
URL: http://svn.apache.org/viewvc/activemq/activemq-cpp/trunk/src/main/activemq/commands/ShutdownInfo.h?rev=738877&r1=738876&r2=738877&view=diff
==============================================================================
--- activemq/activemq-cpp/trunk/src/main/activemq/commands/ShutdownInfo.h (original)
+++ activemq/activemq-cpp/trunk/src/main/activemq/commands/ShutdownInfo.h Thu Jan 29 15:02:56 2009
@@ -36,7 +36,7 @@
      *  Command and marshaling code for OpenWire format for ShutdownInfo
      *
      *
-     *  NOTE!: This file is autogenerated - do not modify!
+     *  NOTE!: This file is auto generated - do not modify!
      *         if you need to make a change, please see the Java Classes
      *         in the activemq-openwire-generator module
      *
@@ -45,6 +45,11 @@
     protected:
 
 
+    protected:
+
+        ShutdownInfo( const ShutdownInfo& other );
+        ShutdownInfo& operator= ( const ShutdownInfo& other );
+
     public:
 
         const static unsigned char ID_SHUTDOWNINFO = 11;
@@ -56,7 +61,7 @@
 
         /**
          * Get the unique identifier that this object and its own
-         * Marshaller share.
+         * Marshaler share.
          * @returns new DataStructure type copy.
          */
         virtual unsigned char getDataStructureType() const;

Modified: activemq/activemq-cpp/trunk/src/main/activemq/commands/SubscriptionInfo.cpp
URL: http://svn.apache.org/viewvc/activemq/activemq-cpp/trunk/src/main/activemq/commands/SubscriptionInfo.cpp?rev=738877&r1=738876&r2=738877&view=diff
==============================================================================
--- activemq/activemq-cpp/trunk/src/main/activemq/commands/SubscriptionInfo.cpp (original)
+++ activemq/activemq-cpp/trunk/src/main/activemq/commands/SubscriptionInfo.cpp Thu Jan 29 15:02:56 2009
@@ -30,14 +30,14 @@
  *  Command and marshaling code for OpenWire format for SubscriptionInfo
  *
  *
- *  NOTE!: This file is autogenerated - do not modify!
+ *  NOTE!: This file is auto generated - do not modify!
  *         if you need to make a change, please see the Java Classes in the
  *         activemq-core module
  *
  */
 ////////////////////////////////////////////////////////////////////////////////
-SubscriptionInfo::SubscriptionInfo()
-{
+SubscriptionInfo::SubscriptionInfo() {
+
     this->clientId = "";
     this->destination = NULL;
     this->selector = "";
@@ -46,8 +46,8 @@
 }
 
 ////////////////////////////////////////////////////////////////////////////////
-SubscriptionInfo::~SubscriptionInfo()
-{
+SubscriptionInfo::~SubscriptionInfo() {
+
     delete this->destination;
     delete this->subscribedDestination;
 }
@@ -65,13 +65,17 @@
 ////////////////////////////////////////////////////////////////////////////////
 void SubscriptionInfo::copyDataStructure( const DataStructure* src ) {
 
+    // Protect against invalid self assignment.
+    if( this == src ) {
+        return;
+    }
+
     // Copy the data of the base class or classes
     BaseDataStructure::copyDataStructure( src );
 
     const SubscriptionInfo* srcPtr = dynamic_cast<const SubscriptionInfo*>( src );
 
     if( srcPtr == NULL || src == NULL ) {
-
         throw decaf::lang::exceptions::NullPointerException(
             __FILE__, __LINE__,
             "SubscriptionInfo::copyDataStructure - src is NULL or invalid" );
@@ -126,6 +130,11 @@
 
 ////////////////////////////////////////////////////////////////////////////////
 bool SubscriptionInfo::equals( const DataStructure* value ) const {
+
+    if( this == value ) {
+        return true;
+    }
+
     const SubscriptionInfo* valuePtr = dynamic_cast<const SubscriptionInfo*>( value );
 
     if( valuePtr == NULL || value == NULL ) {
@@ -171,7 +180,7 @@
 }
 
 ////////////////////////////////////////////////////////////////////////////////
-void SubscriptionInfo::setClientId(const std::string& clientId ) {
+void SubscriptionInfo::setClientId( const std::string& clientId ) {
     this->clientId = clientId;
 }
 
@@ -186,7 +195,7 @@
 }
 
 ////////////////////////////////////////////////////////////////////////////////
-void SubscriptionInfo::setDestination(ActiveMQDestination* destination ) {
+void SubscriptionInfo::setDestination( ActiveMQDestination* destination ) {
     this->destination = destination;
 }
 
@@ -201,7 +210,7 @@
 }
 
 ////////////////////////////////////////////////////////////////////////////////
-void SubscriptionInfo::setSelector(const std::string& selector ) {
+void SubscriptionInfo::setSelector( const std::string& selector ) {
     this->selector = selector;
 }
 
@@ -216,7 +225,7 @@
 }
 
 ////////////////////////////////////////////////////////////////////////////////
-void SubscriptionInfo::setSubcriptionName(const std::string& subcriptionName ) {
+void SubscriptionInfo::setSubcriptionName( const std::string& subcriptionName ) {
     this->subcriptionName = subcriptionName;
 }
 
@@ -231,7 +240,7 @@
 }
 
 ////////////////////////////////////////////////////////////////////////////////
-void SubscriptionInfo::setSubscribedDestination(ActiveMQDestination* subscribedDestination ) {
+void SubscriptionInfo::setSubscribedDestination( ActiveMQDestination* subscribedDestination ) {
     this->subscribedDestination = subscribedDestination;
 }
 

Modified: activemq/activemq-cpp/trunk/src/main/activemq/commands/SubscriptionInfo.h
URL: http://svn.apache.org/viewvc/activemq/activemq-cpp/trunk/src/main/activemq/commands/SubscriptionInfo.h?rev=738877&r1=738876&r2=738877&view=diff
==============================================================================
--- activemq/activemq-cpp/trunk/src/main/activemq/commands/SubscriptionInfo.h (original)
+++ activemq/activemq-cpp/trunk/src/main/activemq/commands/SubscriptionInfo.h Thu Jan 29 15:02:56 2009
@@ -38,7 +38,7 @@
      *  Command and marshaling code for OpenWire format for SubscriptionInfo
      *
      *
-     *  NOTE!: This file is autogenerated - do not modify!
+     *  NOTE!: This file is auto generated - do not modify!
      *         if you need to make a change, please see the Java Classes
      *         in the activemq-openwire-generator module
      *
@@ -52,6 +52,11 @@
         std::string subcriptionName;
         ActiveMQDestination* subscribedDestination;
 
+    protected:
+
+        SubscriptionInfo( const SubscriptionInfo& other );
+        SubscriptionInfo& operator= ( const SubscriptionInfo& other );
+
     public:
 
         const static unsigned char ID_SUBSCRIPTIONINFO = 55;
@@ -63,7 +68,7 @@
 
         /**
          * Get the unique identifier that this object and its own
-         * Marshaller share.
+         * Marshaler share.
          * @returns new DataStructure type copy.
          */
         virtual unsigned char getDataStructureType() const;

Modified: activemq/activemq-cpp/trunk/src/main/activemq/commands/TransactionId.cpp
URL: http://svn.apache.org/viewvc/activemq/activemq-cpp/trunk/src/main/activemq/commands/TransactionId.cpp?rev=738877&r1=738876&r2=738877&view=diff
==============================================================================
--- activemq/activemq-cpp/trunk/src/main/activemq/commands/TransactionId.cpp (original)
+++ activemq/activemq-cpp/trunk/src/main/activemq/commands/TransactionId.cpp Thu Jan 29 15:02:56 2009
@@ -18,6 +18,7 @@
 #include <activemq/state/CommandVisitor.h>
 #include <activemq/exceptions/ActiveMQException.h>
 #include <decaf/lang/exceptions/NullPointerException.h>
+#include <apr_strings.h>
 
 using namespace std;
 using namespace activemq;
@@ -30,19 +31,24 @@
  *  Command and marshaling code for OpenWire format for TransactionId
  *
  *
- *  NOTE!: This file is autogenerated - do not modify!
+ *  NOTE!: This file is auto generated - do not modify!
  *         if you need to make a change, please see the Java Classes in the
  *         activemq-core module
  *
  */
 ////////////////////////////////////////////////////////////////////////////////
-TransactionId::TransactionId()
-{
+TransactionId::TransactionId() {
+
 }
 
 ////////////////////////////////////////////////////////////////////////////////
-TransactionId::~TransactionId()
-{
+TransactionId::TransactionId( const TransactionId& other ) {
+    this->copyDataStructure( &other );
+}
+
+////////////////////////////////////////////////////////////////////////////////
+TransactionId::~TransactionId() {
+
 }
 
 ////////////////////////////////////////////////////////////////////////////////
@@ -58,13 +64,17 @@
 ////////////////////////////////////////////////////////////////////////////////
 void TransactionId::copyDataStructure( const DataStructure* src ) {
 
+    // Protect against invalid self assignment.
+    if( this == src ) {
+        return;
+    }
+
     // 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 decaf::lang::exceptions::NullPointerException(
             __FILE__, __LINE__,
             "TransactionId::copyDataStructure - src is NULL or invalid" );
@@ -91,6 +101,11 @@
 
 ////////////////////////////////////////////////////////////////////////////////
 bool TransactionId::equals( const DataStructure* value ) const {
+
+    if( this == value ) {
+        return true;
+    }
+
     const TransactionId* valuePtr = dynamic_cast<const TransactionId*>( value );
 
     if( valuePtr == NULL || value == NULL ) {
@@ -102,3 +117,32 @@
     return true;
 }
 
+////////////////////////////////////////////////////////////////////////////////
+int TransactionId::compareTo( const TransactionId& value ) const {
+
+    if( this == &value ) {
+        return 0;
+    }
+
+    return 0;
+}
+
+////////////////////////////////////////////////////////////////////////////////
+bool TransactionId::equals( const TransactionId& value ) const {
+    return this->equals( &value );
+}
+
+////////////////////////////////////////////////////////////////////////////////
+bool TransactionId::operator==( const TransactionId& value ) const {
+    return this->compareTo( value ) == 0;
+}
+
+////////////////////////////////////////////////////////////////////////////////
+bool TransactionId::operator<( const TransactionId& value ) const {
+    return this->compareTo( value ) < 0;
+}
+////////////////////////////////////////////////////////////////////////////////
+TransactionId& TransactionId::operator= ( const TransactionId& other ) {
+    this->copyDataStructure( &other );
+}
+

Modified: activemq/activemq-cpp/trunk/src/main/activemq/commands/TransactionId.h
URL: http://svn.apache.org/viewvc/activemq/activemq-cpp/trunk/src/main/activemq/commands/TransactionId.h?rev=738877&r1=738876&r2=738877&view=diff
==============================================================================
--- activemq/activemq-cpp/trunk/src/main/activemq/commands/TransactionId.h (original)
+++ activemq/activemq-cpp/trunk/src/main/activemq/commands/TransactionId.h Thu Jan 29 15:02:56 2009
@@ -25,6 +25,7 @@
 
 #include <activemq/util/Config.h>
 #include <activemq/commands/BaseDataStructure.h>
+#include <decaf/lang/Comparable.h>
 #include <vector>
 #include <string>
 
@@ -36,12 +37,12 @@
      *  Command and marshaling code for OpenWire format for TransactionId
      *
      *
-     *  NOTE!: This file is autogenerated - do not modify!
+     *  NOTE!: This file is auto generated - do not modify!
      *         if you need to make a change, please see the Java Classes
      *         in the activemq-openwire-generator module
      *
      */
-    class AMQCPP_API TransactionId : public BaseDataStructure {
+    class AMQCPP_API TransactionId : public BaseDataStructure, public decaf::lang::Comparable<TransactionId> {
     protected:
 
 
@@ -52,11 +53,12 @@
     public:
 
         TransactionId();
+        TransactionId( const TransactionId& other );
         virtual ~TransactionId();
 
         /**
          * Get the unique identifier that this object and its own
-         * Marshaller share.
+         * Marshaler share.
          * @returns new DataStructure type copy.
          */
         virtual unsigned char getDataStructureType() const;
@@ -90,6 +92,15 @@
          */
         virtual bool equals( const DataStructure* value ) const;
 
+        virtual int compareTo( const TransactionId& value ) const;
+
+        virtual bool equals( const TransactionId& value ) const;
+
+        virtual bool operator==( const TransactionId& value ) const;
+
+        virtual bool operator<( const TransactionId& value ) const;
+
+        TransactionId& operator= ( const TransactionId& other );
     };
 
 }}

Modified: activemq/activemq-cpp/trunk/src/main/activemq/commands/TransactionInfo.cpp
URL: http://svn.apache.org/viewvc/activemq/activemq-cpp/trunk/src/main/activemq/commands/TransactionInfo.cpp?rev=738877&r1=738876&r2=738877&view=diff
==============================================================================
--- activemq/activemq-cpp/trunk/src/main/activemq/commands/TransactionInfo.cpp (original)
+++ activemq/activemq-cpp/trunk/src/main/activemq/commands/TransactionInfo.cpp Thu Jan 29 15:02:56 2009
@@ -30,22 +30,22 @@
  *  Command and marshaling code for OpenWire format for TransactionInfo
  *
  *
- *  NOTE!: This file is autogenerated - do not modify!
+ *  NOTE!: This file is auto generated - do not modify!
  *         if you need to make a change, please see the Java Classes in the
  *         activemq-core module
  *
  */
 ////////////////////////////////////////////////////////////////////////////////
-TransactionInfo::TransactionInfo()
-{
+TransactionInfo::TransactionInfo() {
+
     this->connectionId = NULL;
     this->transactionId = NULL;
     this->type = 0;
 }
 
 ////////////////////////////////////////////////////////////////////////////////
-TransactionInfo::~TransactionInfo()
-{
+TransactionInfo::~TransactionInfo() {
+
     delete this->connectionId;
     delete this->transactionId;
 }
@@ -63,13 +63,17 @@
 ////////////////////////////////////////////////////////////////////////////////
 void TransactionInfo::copyDataStructure( const DataStructure* src ) {
 
+    // Protect against invalid self assignment.
+    if( this == src ) {
+        return;
+    }
+
     // Copy the data of the base class or classes
     BaseCommand::copyDataStructure( src );
 
     const TransactionInfo* srcPtr = dynamic_cast<const TransactionInfo*>( src );
 
     if( srcPtr == NULL || src == NULL ) {
-
         throw decaf::lang::exceptions::NullPointerException(
             __FILE__, __LINE__,
             "TransactionInfo::copyDataStructure - src is NULL or invalid" );
@@ -120,6 +124,11 @@
 
 ////////////////////////////////////////////////////////////////////////////////
 bool TransactionInfo::equals( const DataStructure* value ) const {
+
+    if( this == value ) {
+        return true;
+    }
+
     const TransactionInfo* valuePtr = dynamic_cast<const TransactionInfo*>( value );
 
     if( valuePtr == NULL || value == NULL ) {
@@ -166,7 +175,7 @@
 }
 
 ////////////////////////////////////////////////////////////////////////////////
-void TransactionInfo::setConnectionId(ConnectionId* connectionId ) {
+void TransactionInfo::setConnectionId( ConnectionId* connectionId ) {
     this->connectionId = connectionId;
 }
 
@@ -181,7 +190,7 @@
 }
 
 ////////////////////////////////////////////////////////////////////////////////
-void TransactionInfo::setTransactionId(TransactionId* transactionId ) {
+void TransactionInfo::setTransactionId( TransactionId* transactionId ) {
     this->transactionId = transactionId;
 }
 
@@ -191,7 +200,7 @@
 }
 
 ////////////////////////////////////////////////////////////////////////////////
-void TransactionInfo::setType(unsigned char type ) {
+void TransactionInfo::setType( unsigned char type ) {
     this->type = type;
 }
 

Modified: activemq/activemq-cpp/trunk/src/main/activemq/commands/TransactionInfo.h
URL: http://svn.apache.org/viewvc/activemq/activemq-cpp/trunk/src/main/activemq/commands/TransactionInfo.h?rev=738877&r1=738876&r2=738877&view=diff
==============================================================================
--- activemq/activemq-cpp/trunk/src/main/activemq/commands/TransactionInfo.h (original)
+++ activemq/activemq-cpp/trunk/src/main/activemq/commands/TransactionInfo.h Thu Jan 29 15:02:56 2009
@@ -38,7 +38,7 @@
      *  Command and marshaling code for OpenWire format for TransactionInfo
      *
      *
-     *  NOTE!: This file is autogenerated - do not modify!
+     *  NOTE!: This file is auto generated - do not modify!
      *         if you need to make a change, please see the Java Classes
      *         in the activemq-openwire-generator module
      *
@@ -50,6 +50,11 @@
         TransactionId* transactionId;
         unsigned char type;
 
+    protected:
+
+        TransactionInfo( const TransactionInfo& other );
+        TransactionInfo& operator= ( const TransactionInfo& other );
+
     public:
 
         const static unsigned char ID_TRANSACTIONINFO = 7;
@@ -61,7 +66,7 @@
 
         /**
          * Get the unique identifier that this object and its own
-         * Marshaller share.
+         * Marshaler share.
          * @returns new DataStructure type copy.
          */
         virtual unsigned char getDataStructureType() const;

Modified: activemq/activemq-cpp/trunk/src/main/activemq/commands/XATransactionId.cpp
URL: http://svn.apache.org/viewvc/activemq/activemq-cpp/trunk/src/main/activemq/commands/XATransactionId.cpp?rev=738877&r1=738876&r2=738877&view=diff
==============================================================================
--- activemq/activemq-cpp/trunk/src/main/activemq/commands/XATransactionId.cpp (original)
+++ activemq/activemq-cpp/trunk/src/main/activemq/commands/XATransactionId.cpp Thu Jan 29 15:02:56 2009
@@ -18,6 +18,7 @@
 #include <activemq/state/CommandVisitor.h>
 #include <activemq/exceptions/ActiveMQException.h>
 #include <decaf/lang/exceptions/NullPointerException.h>
+#include <apr_strings.h>
 
 using namespace std;
 using namespace activemq;
@@ -30,20 +31,25 @@
  *  Command and marshaling code for OpenWire format for XATransactionId
  *
  *
- *  NOTE!: This file is autogenerated - do not modify!
+ *  NOTE!: This file is auto generated - do not modify!
  *         if you need to make a change, please see the Java Classes in the
  *         activemq-core module
  *
  */
 ////////////////////////////////////////////////////////////////////////////////
-XATransactionId::XATransactionId()
-{
+XATransactionId::XATransactionId() {
+
     this->formatId = 0;
 }
 
 ////////////////////////////////////////////////////////////////////////////////
-XATransactionId::~XATransactionId()
-{
+XATransactionId::XATransactionId( const XATransactionId& other ) {
+    this->copyDataStructure( &other );
+}
+
+////////////////////////////////////////////////////////////////////////////////
+XATransactionId::~XATransactionId() {
+
 }
 
 ////////////////////////////////////////////////////////////////////////////////
@@ -59,13 +65,17 @@
 ////////////////////////////////////////////////////////////////////////////////
 void XATransactionId::copyDataStructure( const DataStructure* src ) {
 
+    // Protect against invalid self assignment.
+    if( this == src ) {
+        return;
+    }
+
     // Copy the data of the base class or classes
     TransactionId::copyDataStructure( src );
 
     const XATransactionId* srcPtr = dynamic_cast<const XATransactionId*>( src );
 
     if( srcPtr == NULL || src == NULL ) {
-
         throw decaf::lang::exceptions::NullPointerException(
             __FILE__, __LINE__,
             "XATransactionId::copyDataStructure - src is NULL or invalid" );
@@ -102,6 +112,11 @@
 
 ////////////////////////////////////////////////////////////////////////////////
 bool XATransactionId::equals( const DataStructure* value ) const {
+
+    if( this == value ) {
+        return true;
+    }
+
     const XATransactionId* valuePtr = dynamic_cast<const XATransactionId*>( value );
 
     if( valuePtr == NULL || value == NULL ) {
@@ -132,7 +147,7 @@
 }
 
 ////////////////////////////////////////////////////////////////////////////////
-void XATransactionId::setFormatId(int formatId ) {
+void XATransactionId::setFormatId( int formatId ) {
     this->formatId = formatId;
 }
 
@@ -147,7 +162,7 @@
 }
 
 ////////////////////////////////////////////////////////////////////////////////
-void XATransactionId::setGlobalTransactionId(const std::vector<unsigned char>& globalTransactionId ) {
+void XATransactionId::setGlobalTransactionId( const std::vector<unsigned char>& globalTransactionId ) {
     this->globalTransactionId = globalTransactionId;
 }
 
@@ -162,7 +177,54 @@
 }
 
 ////////////////////////////////////////////////////////////////////////////////
-void XATransactionId::setBranchQualifier(const std::vector<unsigned char>& branchQualifier ) {
+void XATransactionId::setBranchQualifier( const std::vector<unsigned char>& branchQualifier ) {
     this->branchQualifier = branchQualifier;
 }
 
+////////////////////////////////////////////////////////////////////////////////
+int XATransactionId::compareTo( const XATransactionId& value ) const {
+
+    if( this == &value ) {
+        return 0;
+    }
+
+    if( this->formatId > value.formatId ) {
+        return 1;
+    } else if( this->formatId < value.formatId ) {
+        return -1;
+    }
+
+    if( this->globalTransactionId > value.globalTransactionId ) {
+        return 1;
+    } else if( this->globalTransactionId < value.globalTransactionId ) {
+        return -1;
+    }
+
+    if( this->branchQualifier > value.branchQualifier ) {
+        return 1;
+    } else if( this->branchQualifier < value.branchQualifier ) {
+        return -1;
+    }
+
+    return 0;
+}
+
+////////////////////////////////////////////////////////////////////////////////
+bool XATransactionId::equals( const XATransactionId& value ) const {
+    return this->equals( &value );
+}
+
+////////////////////////////////////////////////////////////////////////////////
+bool XATransactionId::operator==( const XATransactionId& value ) const {
+    return this->compareTo( value ) == 0;
+}
+
+////////////////////////////////////////////////////////////////////////////////
+bool XATransactionId::operator<( const XATransactionId& value ) const {
+    return this->compareTo( value ) < 0;
+}
+////////////////////////////////////////////////////////////////////////////////
+XATransactionId& XATransactionId::operator= ( const XATransactionId& other ) {
+    this->copyDataStructure( &other );
+}
+

Modified: activemq/activemq-cpp/trunk/src/main/activemq/commands/XATransactionId.h
URL: http://svn.apache.org/viewvc/activemq/activemq-cpp/trunk/src/main/activemq/commands/XATransactionId.h?rev=738877&r1=738876&r2=738877&view=diff
==============================================================================
--- activemq/activemq-cpp/trunk/src/main/activemq/commands/XATransactionId.h (original)
+++ activemq/activemq-cpp/trunk/src/main/activemq/commands/XATransactionId.h Thu Jan 29 15:02:56 2009
@@ -25,6 +25,7 @@
 
 #include <activemq/util/Config.h>
 #include <activemq/commands/TransactionId.h>
+#include <decaf/lang/Comparable.h>
 #include <vector>
 #include <string>
 
@@ -36,12 +37,12 @@
      *  Command and marshaling code for OpenWire format for XATransactionId
      *
      *
-     *  NOTE!: This file is autogenerated - do not modify!
+     *  NOTE!: This file is auto generated - do not modify!
      *         if you need to make a change, please see the Java Classes
      *         in the activemq-openwire-generator module
      *
      */
-    class AMQCPP_API XATransactionId : public TransactionId {
+    class AMQCPP_API XATransactionId : public TransactionId, public decaf::lang::Comparable<XATransactionId> {
     protected:
 
         int formatId;
@@ -55,11 +56,12 @@
     public:
 
         XATransactionId();
+        XATransactionId( const XATransactionId& other );
         virtual ~XATransactionId();
 
         /**
          * Get the unique identifier that this object and its own
-         * Marshaller share.
+         * Marshaler share.
          * @returns new DataStructure type copy.
          */
         virtual unsigned char getDataStructureType() const;
@@ -104,6 +106,15 @@
         virtual std::vector<unsigned char>& getBranchQualifier();
         virtual void setBranchQualifier( const std::vector<unsigned char>& branchQualifier );
 
+        virtual int compareTo( const XATransactionId& value ) const;
+
+        virtual bool equals( const XATransactionId& value ) const;
+
+        virtual bool operator==( const XATransactionId& value ) const;
+
+        virtual bool operator<( const XATransactionId& value ) const;
+
+        XATransactionId& operator= ( const XATransactionId& other );
     };
 
 }}



Mime
View raw message