activemq-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From tab...@apache.org
Subject svn commit: r738877 [1/3] - /activemq/activemq-cpp/trunk/src/main/activemq/commands/
Date Thu, 29 Jan 2009 15:02:59 GMT
Author: tabish
Date: Thu Jan 29 15:02:56 2009
New Revision: 738877

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

Newly generated commands based on the new Generator code.

Modified:
    activemq/activemq-cpp/trunk/src/main/activemq/commands/BrokerId.cpp
    activemq/activemq-cpp/trunk/src/main/activemq/commands/BrokerId.h
    activemq/activemq-cpp/trunk/src/main/activemq/commands/BrokerInfo.cpp
    activemq/activemq-cpp/trunk/src/main/activemq/commands/BrokerInfo.h
    activemq/activemq-cpp/trunk/src/main/activemq/commands/ConnectionControl.cpp
    activemq/activemq-cpp/trunk/src/main/activemq/commands/ConnectionControl.h
    activemq/activemq-cpp/trunk/src/main/activemq/commands/ConnectionError.cpp
    activemq/activemq-cpp/trunk/src/main/activemq/commands/ConnectionError.h
    activemq/activemq-cpp/trunk/src/main/activemq/commands/ConnectionId.cpp
    activemq/activemq-cpp/trunk/src/main/activemq/commands/ConnectionId.h
    activemq/activemq-cpp/trunk/src/main/activemq/commands/ConnectionInfo.cpp
    activemq/activemq-cpp/trunk/src/main/activemq/commands/ConnectionInfo.h
    activemq/activemq-cpp/trunk/src/main/activemq/commands/ConsumerControl.cpp
    activemq/activemq-cpp/trunk/src/main/activemq/commands/ConsumerControl.h
    activemq/activemq-cpp/trunk/src/main/activemq/commands/ConsumerId.cpp
    activemq/activemq-cpp/trunk/src/main/activemq/commands/ConsumerId.h
    activemq/activemq-cpp/trunk/src/main/activemq/commands/ConsumerInfo.cpp
    activemq/activemq-cpp/trunk/src/main/activemq/commands/ConsumerInfo.h
    activemq/activemq-cpp/trunk/src/main/activemq/commands/ControlCommand.cpp
    activemq/activemq-cpp/trunk/src/main/activemq/commands/ControlCommand.h
    activemq/activemq-cpp/trunk/src/main/activemq/commands/DataArrayResponse.cpp
    activemq/activemq-cpp/trunk/src/main/activemq/commands/DataArrayResponse.h
    activemq/activemq-cpp/trunk/src/main/activemq/commands/DataResponse.cpp
    activemq/activemq-cpp/trunk/src/main/activemq/commands/DataResponse.h
    activemq/activemq-cpp/trunk/src/main/activemq/commands/DestinationInfo.cpp
    activemq/activemq-cpp/trunk/src/main/activemq/commands/DestinationInfo.h
    activemq/activemq-cpp/trunk/src/main/activemq/commands/DiscoveryEvent.cpp
    activemq/activemq-cpp/trunk/src/main/activemq/commands/DiscoveryEvent.h
    activemq/activemq-cpp/trunk/src/main/activemq/commands/ExceptionResponse.cpp
    activemq/activemq-cpp/trunk/src/main/activemq/commands/ExceptionResponse.h
    activemq/activemq-cpp/trunk/src/main/activemq/commands/FlushCommand.cpp
    activemq/activemq-cpp/trunk/src/main/activemq/commands/FlushCommand.h
    activemq/activemq-cpp/trunk/src/main/activemq/commands/IntegerResponse.cpp
    activemq/activemq-cpp/trunk/src/main/activemq/commands/IntegerResponse.h
    activemq/activemq-cpp/trunk/src/main/activemq/commands/JournalQueueAck.cpp
    activemq/activemq-cpp/trunk/src/main/activemq/commands/JournalQueueAck.h
    activemq/activemq-cpp/trunk/src/main/activemq/commands/JournalTopicAck.cpp
    activemq/activemq-cpp/trunk/src/main/activemq/commands/JournalTopicAck.h
    activemq/activemq-cpp/trunk/src/main/activemq/commands/JournalTrace.cpp
    activemq/activemq-cpp/trunk/src/main/activemq/commands/JournalTrace.h
    activemq/activemq-cpp/trunk/src/main/activemq/commands/JournalTransaction.cpp
    activemq/activemq-cpp/trunk/src/main/activemq/commands/JournalTransaction.h
    activemq/activemq-cpp/trunk/src/main/activemq/commands/KeepAliveInfo.cpp
    activemq/activemq-cpp/trunk/src/main/activemq/commands/KeepAliveInfo.h
    activemq/activemq-cpp/trunk/src/main/activemq/commands/LastPartialCommand.cpp
    activemq/activemq-cpp/trunk/src/main/activemq/commands/LastPartialCommand.h
    activemq/activemq-cpp/trunk/src/main/activemq/commands/LocalTransactionId.cpp
    activemq/activemq-cpp/trunk/src/main/activemq/commands/LocalTransactionId.h
    activemq/activemq-cpp/trunk/src/main/activemq/commands/Message.cpp
    activemq/activemq-cpp/trunk/src/main/activemq/commands/Message.h
    activemq/activemq-cpp/trunk/src/main/activemq/commands/MessageAck.cpp
    activemq/activemq-cpp/trunk/src/main/activemq/commands/MessageAck.h
    activemq/activemq-cpp/trunk/src/main/activemq/commands/MessageDispatch.cpp
    activemq/activemq-cpp/trunk/src/main/activemq/commands/MessageDispatch.h
    activemq/activemq-cpp/trunk/src/main/activemq/commands/MessageDispatchNotification.cpp
    activemq/activemq-cpp/trunk/src/main/activemq/commands/MessageDispatchNotification.h
    activemq/activemq-cpp/trunk/src/main/activemq/commands/MessageId.cpp
    activemq/activemq-cpp/trunk/src/main/activemq/commands/MessageId.h
    activemq/activemq-cpp/trunk/src/main/activemq/commands/MessagePull.cpp
    activemq/activemq-cpp/trunk/src/main/activemq/commands/MessagePull.h
    activemq/activemq-cpp/trunk/src/main/activemq/commands/NetworkBridgeFilter.cpp
    activemq/activemq-cpp/trunk/src/main/activemq/commands/NetworkBridgeFilter.h
    activemq/activemq-cpp/trunk/src/main/activemq/commands/PartialCommand.cpp
    activemq/activemq-cpp/trunk/src/main/activemq/commands/PartialCommand.h
    activemq/activemq-cpp/trunk/src/main/activemq/commands/ProducerAck.cpp
    activemq/activemq-cpp/trunk/src/main/activemq/commands/ProducerAck.h
    activemq/activemq-cpp/trunk/src/main/activemq/commands/ProducerId.cpp
    activemq/activemq-cpp/trunk/src/main/activemq/commands/ProducerId.h
    activemq/activemq-cpp/trunk/src/main/activemq/commands/ProducerInfo.cpp
    activemq/activemq-cpp/trunk/src/main/activemq/commands/ProducerInfo.h
    activemq/activemq-cpp/trunk/src/main/activemq/commands/RemoveInfo.cpp
    activemq/activemq-cpp/trunk/src/main/activemq/commands/RemoveInfo.h
    activemq/activemq-cpp/trunk/src/main/activemq/commands/RemoveSubscriptionInfo.cpp
    activemq/activemq-cpp/trunk/src/main/activemq/commands/RemoveSubscriptionInfo.h
    activemq/activemq-cpp/trunk/src/main/activemq/commands/ReplayCommand.cpp
    activemq/activemq-cpp/trunk/src/main/activemq/commands/ReplayCommand.h
    activemq/activemq-cpp/trunk/src/main/activemq/commands/Response.cpp
    activemq/activemq-cpp/trunk/src/main/activemq/commands/Response.h
    activemq/activemq-cpp/trunk/src/main/activemq/commands/SessionId.cpp
    activemq/activemq-cpp/trunk/src/main/activemq/commands/SessionId.h
    activemq/activemq-cpp/trunk/src/main/activemq/commands/SessionInfo.cpp
    activemq/activemq-cpp/trunk/src/main/activemq/commands/SessionInfo.h
    activemq/activemq-cpp/trunk/src/main/activemq/commands/ShutdownInfo.cpp
    activemq/activemq-cpp/trunk/src/main/activemq/commands/ShutdownInfo.h
    activemq/activemq-cpp/trunk/src/main/activemq/commands/SubscriptionInfo.cpp
    activemq/activemq-cpp/trunk/src/main/activemq/commands/SubscriptionInfo.h
    activemq/activemq-cpp/trunk/src/main/activemq/commands/TransactionId.cpp
    activemq/activemq-cpp/trunk/src/main/activemq/commands/TransactionId.h
    activemq/activemq-cpp/trunk/src/main/activemq/commands/TransactionInfo.cpp
    activemq/activemq-cpp/trunk/src/main/activemq/commands/TransactionInfo.h
    activemq/activemq-cpp/trunk/src/main/activemq/commands/XATransactionId.cpp
    activemq/activemq-cpp/trunk/src/main/activemq/commands/XATransactionId.h

Modified: activemq/activemq-cpp/trunk/src/main/activemq/commands/BrokerId.cpp
URL: http://svn.apache.org/viewvc/activemq/activemq-cpp/trunk/src/main/activemq/commands/BrokerId.cpp?rev=738877&r1=738876&r2=738877&view=diff
==============================================================================
--- activemq/activemq-cpp/trunk/src/main/activemq/commands/BrokerId.cpp (original)
+++ activemq/activemq-cpp/trunk/src/main/activemq/commands/BrokerId.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 BrokerId
  *
  *
- *  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
  *
  */
 ////////////////////////////////////////////////////////////////////////////////
-BrokerId::BrokerId()
-{
+BrokerId::BrokerId() {
+
     this->value = "";
 }
 
 ////////////////////////////////////////////////////////////////////////////////
-BrokerId::~BrokerId()
-{
+BrokerId::BrokerId( const BrokerId& other ) {
+    this->copyDataStructure( &other );
+}
+
+////////////////////////////////////////////////////////////////////////////////
+BrokerId::~BrokerId() {
+
 }
 
 ////////////////////////////////////////////////////////////////////////////////
@@ -59,13 +65,17 @@
 ////////////////////////////////////////////////////////////////////////////////
 void BrokerId::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 BrokerId* srcPtr = dynamic_cast<const BrokerId*>( src );
 
     if( srcPtr == NULL || src == NULL ) {
-
         throw decaf::lang::exceptions::NullPointerException(
             __FILE__, __LINE__,
             "BrokerId::copyDataStructure - src is NULL or invalid" );
@@ -94,6 +104,11 @@
 
 ////////////////////////////////////////////////////////////////////////////////
 bool BrokerId::equals( const DataStructure* value ) const {
+
+    if( this == value ) {
+        return true;
+    }
+
     const BrokerId* valuePtr = dynamic_cast<const BrokerId*>( value );
 
     if( valuePtr == NULL || value == NULL ) {
@@ -119,7 +134,41 @@
 }
 
 ////////////////////////////////////////////////////////////////////////////////
-void BrokerId::setValue(const std::string& value ) {
+void BrokerId::setValue( const std::string& value ) {
     this->value = value;
 }
 
+////////////////////////////////////////////////////////////////////////////////
+int BrokerId::compareTo( const BrokerId& value ) const {
+
+    if( this == &value ) {
+        return 0;
+    }
+
+    int valueComp = apr_strnatcasecmp( this->value.c_str(), value.value.c_str() );
+    if( valueComp != 0 ) {
+        return valueComp;
+    }
+
+    return 0;
+}
+
+////////////////////////////////////////////////////////////////////////////////
+bool BrokerId::equals( const BrokerId& value ) const {
+    return this->equals( &value );
+}
+
+////////////////////////////////////////////////////////////////////////////////
+bool BrokerId::operator==( const BrokerId& value ) const {
+    return this->compareTo( value ) == 0;
+}
+
+////////////////////////////////////////////////////////////////////////////////
+bool BrokerId::operator<( const BrokerId& value ) const {
+    return this->compareTo( value ) < 0;
+}
+////////////////////////////////////////////////////////////////////////////////
+BrokerId& BrokerId::operator= ( const BrokerId& other ) {
+    this->copyDataStructure( &other );
+}
+

Modified: activemq/activemq-cpp/trunk/src/main/activemq/commands/BrokerId.h
URL: http://svn.apache.org/viewvc/activemq/activemq-cpp/trunk/src/main/activemq/commands/BrokerId.h?rev=738877&r1=738876&r2=738877&view=diff
==============================================================================
--- activemq/activemq-cpp/trunk/src/main/activemq/commands/BrokerId.h (original)
+++ activemq/activemq-cpp/trunk/src/main/activemq/commands/BrokerId.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 BrokerId
      *
      *
-     *  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 BrokerId : public BaseDataStructure {
+    class AMQCPP_API BrokerId : public BaseDataStructure, public decaf::lang::Comparable<BrokerId> {
     protected:
 
         std::string value;
@@ -53,11 +54,12 @@
     public:
 
         BrokerId();
+        BrokerId( const BrokerId& other );
         virtual ~BrokerId();
 
         /**
          * Get the unique identifier that this object and its own
-         * Marshaller share.
+         * Marshaler share.
          * @returns new DataStructure type copy.
          */
         virtual unsigned char getDataStructureType() const;
@@ -95,6 +97,15 @@
         virtual std::string& getValue();
         virtual void setValue( const std::string& value );
 
+        virtual int compareTo( const BrokerId& value ) const;
+
+        virtual bool equals( const BrokerId& value ) const;
+
+        virtual bool operator==( const BrokerId& value ) const;
+
+        virtual bool operator<( const BrokerId& value ) const;
+
+        BrokerId& operator= ( const BrokerId& other );
     };
 
 }}

Modified: activemq/activemq-cpp/trunk/src/main/activemq/commands/BrokerInfo.cpp
URL: http://svn.apache.org/viewvc/activemq/activemq-cpp/trunk/src/main/activemq/commands/BrokerInfo.cpp?rev=738877&r1=738876&r2=738877&view=diff
==============================================================================
--- activemq/activemq-cpp/trunk/src/main/activemq/commands/BrokerInfo.cpp (original)
+++ activemq/activemq-cpp/trunk/src/main/activemq/commands/BrokerInfo.cpp Thu Jan 29 15:02:56 2009
@@ -30,14 +30,14 @@
  *  Command and marshaling code for OpenWire format for BrokerInfo
  *
  *
- *  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
  *
  */
 ////////////////////////////////////////////////////////////////////////////////
-BrokerInfo::BrokerInfo()
-{
+BrokerInfo::BrokerInfo() {
+
     this->brokerId = NULL;
     this->brokerURL = "";
     this->brokerName = "";
@@ -52,8 +52,8 @@
 }
 
 ////////////////////////////////////////////////////////////////////////////////
-BrokerInfo::~BrokerInfo()
-{
+BrokerInfo::~BrokerInfo() {
+
     delete this->brokerId;
     for( size_t ipeerBrokerInfos = 0; ipeerBrokerInfos < peerBrokerInfos.size(); ++ipeerBrokerInfos ) {
         delete peerBrokerInfos[ipeerBrokerInfos];
@@ -73,13 +73,17 @@
 ////////////////////////////////////////////////////////////////////////////////
 void BrokerInfo::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 BrokerInfo* srcPtr = dynamic_cast<const BrokerInfo*>( src );
 
     if( srcPtr == NULL || src == NULL ) {
-
         throw decaf::lang::exceptions::NullPointerException(
             __FILE__, __LINE__,
             "BrokerInfo::copyDataStructure - src is NULL or invalid" );
@@ -154,6 +158,11 @@
 
 ////////////////////////////////////////////////////////////////////////////////
 bool BrokerInfo::equals( const DataStructure* value ) const {
+
+    if( this == value ) {
+        return true;
+    }
+
     const BrokerInfo* valuePtr = dynamic_cast<const BrokerInfo*>( value );
 
     if( valuePtr == NULL || value == NULL ) {
@@ -229,7 +238,7 @@
 }
 
 ////////////////////////////////////////////////////////////////////////////////
-void BrokerInfo::setBrokerId(BrokerId* brokerId ) {
+void BrokerInfo::setBrokerId( BrokerId* brokerId ) {
     this->brokerId = brokerId;
 }
 
@@ -244,7 +253,7 @@
 }
 
 ////////////////////////////////////////////////////////////////////////////////
-void BrokerInfo::setBrokerURL(const std::string& brokerURL ) {
+void BrokerInfo::setBrokerURL( const std::string& brokerURL ) {
     this->brokerURL = brokerURL;
 }
 
@@ -259,7 +268,7 @@
 }
 
 ////////////////////////////////////////////////////////////////////////////////
-void BrokerInfo::setPeerBrokerInfos(const std::vector<BrokerInfo*>& peerBrokerInfos ) {
+void BrokerInfo::setPeerBrokerInfos( const std::vector<BrokerInfo*>& peerBrokerInfos ) {
     this->peerBrokerInfos = peerBrokerInfos;
 }
 
@@ -274,7 +283,7 @@
 }
 
 ////////////////////////////////////////////////////////////////////////////////
-void BrokerInfo::setBrokerName(const std::string& brokerName ) {
+void BrokerInfo::setBrokerName( const std::string& brokerName ) {
     this->brokerName = brokerName;
 }
 
@@ -284,7 +293,7 @@
 }
 
 ////////////////////////////////////////////////////////////////////////////////
-void BrokerInfo::setSlaveBroker(bool slaveBroker ) {
+void BrokerInfo::setSlaveBroker( bool slaveBroker ) {
     this->slaveBroker = slaveBroker;
 }
 
@@ -294,7 +303,7 @@
 }
 
 ////////////////////////////////////////////////////////////////////////////////
-void BrokerInfo::setMasterBroker(bool masterBroker ) {
+void BrokerInfo::setMasterBroker( bool masterBroker ) {
     this->masterBroker = masterBroker;
 }
 
@@ -304,7 +313,7 @@
 }
 
 ////////////////////////////////////////////////////////////////////////////////
-void BrokerInfo::setFaultTolerantConfiguration(bool faultTolerantConfiguration ) {
+void BrokerInfo::setFaultTolerantConfiguration( bool faultTolerantConfiguration ) {
     this->faultTolerantConfiguration = faultTolerantConfiguration;
 }
 
@@ -314,7 +323,7 @@
 }
 
 ////////////////////////////////////////////////////////////////////////////////
-void BrokerInfo::setDuplexConnection(bool duplexConnection ) {
+void BrokerInfo::setDuplexConnection( bool duplexConnection ) {
     this->duplexConnection = duplexConnection;
 }
 
@@ -324,7 +333,7 @@
 }
 
 ////////////////////////////////////////////////////////////////////////////////
-void BrokerInfo::setNetworkConnection(bool networkConnection ) {
+void BrokerInfo::setNetworkConnection( bool networkConnection ) {
     this->networkConnection = networkConnection;
 }
 
@@ -334,7 +343,7 @@
 }
 
 ////////////////////////////////////////////////////////////////////////////////
-void BrokerInfo::setConnectionId(long long connectionId ) {
+void BrokerInfo::setConnectionId( long long connectionId ) {
     this->connectionId = connectionId;
 }
 
@@ -349,7 +358,7 @@
 }
 
 ////////////////////////////////////////////////////////////////////////////////
-void BrokerInfo::setBrokerUploadUrl(const std::string& brokerUploadUrl ) {
+void BrokerInfo::setBrokerUploadUrl( const std::string& brokerUploadUrl ) {
     this->brokerUploadUrl = brokerUploadUrl;
 }
 
@@ -364,7 +373,7 @@
 }
 
 ////////////////////////////////////////////////////////////////////////////////
-void BrokerInfo::setNetworkProperties(const std::string& networkProperties ) {
+void BrokerInfo::setNetworkProperties( const std::string& networkProperties ) {
     this->networkProperties = networkProperties;
 }
 

Modified: activemq/activemq-cpp/trunk/src/main/activemq/commands/BrokerInfo.h
URL: http://svn.apache.org/viewvc/activemq/activemq-cpp/trunk/src/main/activemq/commands/BrokerInfo.h?rev=738877&r1=738876&r2=738877&view=diff
==============================================================================
--- activemq/activemq-cpp/trunk/src/main/activemq/commands/BrokerInfo.h (original)
+++ activemq/activemq-cpp/trunk/src/main/activemq/commands/BrokerInfo.h Thu Jan 29 15:02:56 2009
@@ -38,7 +38,7 @@
      *  Command and marshaling code for OpenWire format for BrokerInfo
      *
      *
-     *  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
      *
@@ -59,6 +59,11 @@
         std::string brokerUploadUrl;
         std::string networkProperties;
 
+    protected:
+
+        BrokerInfo( const BrokerInfo& other );
+        BrokerInfo& operator= ( const BrokerInfo& other );
+
     public:
 
         const static unsigned char ID_BROKERINFO = 2;
@@ -70,7 +75,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/ConnectionControl.cpp
URL: http://svn.apache.org/viewvc/activemq/activemq-cpp/trunk/src/main/activemq/commands/ConnectionControl.cpp?rev=738877&r1=738876&r2=738877&view=diff
==============================================================================
--- activemq/activemq-cpp/trunk/src/main/activemq/commands/ConnectionControl.cpp (original)
+++ activemq/activemq-cpp/trunk/src/main/activemq/commands/ConnectionControl.cpp Thu Jan 29 15:02:56 2009
@@ -30,14 +30,14 @@
  *  Command and marshaling code for OpenWire format for ConnectionControl
  *
  *
- *  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
  *
  */
 ////////////////////////////////////////////////////////////////////////////////
-ConnectionControl::ConnectionControl()
-{
+ConnectionControl::ConnectionControl() {
+
     this->close = false;
     this->exit = false;
     this->faultTolerant = false;
@@ -46,8 +46,8 @@
 }
 
 ////////////////////////////////////////////////////////////////////////////////
-ConnectionControl::~ConnectionControl()
-{
+ConnectionControl::~ConnectionControl() {
+
 }
 
 ////////////////////////////////////////////////////////////////////////////////
@@ -63,13 +63,17 @@
 ////////////////////////////////////////////////////////////////////////////////
 void ConnectionControl::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 ConnectionControl* srcPtr = dynamic_cast<const ConnectionControl*>( src );
 
     if( srcPtr == NULL || src == NULL ) {
-
         throw decaf::lang::exceptions::NullPointerException(
             __FILE__, __LINE__,
             "ConnectionControl::copyDataStructure - src is NULL or invalid" );
@@ -106,6 +110,11 @@
 
 ////////////////////////////////////////////////////////////////////////////////
 bool ConnectionControl::equals( const DataStructure* value ) const {
+
+    if( this == value ) {
+        return true;
+    }
+
     const ConnectionControl* valuePtr = dynamic_cast<const ConnectionControl*>( value );
 
     if( valuePtr == NULL || value == NULL ) {
@@ -145,7 +154,7 @@
 }
 
 ////////////////////////////////////////////////////////////////////////////////
-void ConnectionControl::setClose(bool close ) {
+void ConnectionControl::setClose( bool close ) {
     this->close = close;
 }
 
@@ -155,7 +164,7 @@
 }
 
 ////////////////////////////////////////////////////////////////////////////////
-void ConnectionControl::setExit(bool exit ) {
+void ConnectionControl::setExit( bool exit ) {
     this->exit = exit;
 }
 
@@ -165,7 +174,7 @@
 }
 
 ////////////////////////////////////////////////////////////////////////////////
-void ConnectionControl::setFaultTolerant(bool faultTolerant ) {
+void ConnectionControl::setFaultTolerant( bool faultTolerant ) {
     this->faultTolerant = faultTolerant;
 }
 
@@ -175,7 +184,7 @@
 }
 
 ////////////////////////////////////////////////////////////////////////////////
-void ConnectionControl::setResume(bool resume ) {
+void ConnectionControl::setResume( bool resume ) {
     this->resume = resume;
 }
 
@@ -185,7 +194,7 @@
 }
 
 ////////////////////////////////////////////////////////////////////////////////
-void ConnectionControl::setSuspend(bool suspend ) {
+void ConnectionControl::setSuspend( bool suspend ) {
     this->suspend = suspend;
 }
 

Modified: activemq/activemq-cpp/trunk/src/main/activemq/commands/ConnectionControl.h
URL: http://svn.apache.org/viewvc/activemq/activemq-cpp/trunk/src/main/activemq/commands/ConnectionControl.h?rev=738877&r1=738876&r2=738877&view=diff
==============================================================================
--- activemq/activemq-cpp/trunk/src/main/activemq/commands/ConnectionControl.h (original)
+++ activemq/activemq-cpp/trunk/src/main/activemq/commands/ConnectionControl.h Thu Jan 29 15:02:56 2009
@@ -36,7 +36,7 @@
      *  Command and marshaling code for OpenWire format for ConnectionControl
      *
      *
-     *  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 @@
         bool resume;
         bool suspend;
 
+    protected:
+
+        ConnectionControl( const ConnectionControl& other );
+        ConnectionControl& operator= ( const ConnectionControl& other );
+
     public:
 
         const static unsigned char ID_CONNECTIONCONTROL = 18;
@@ -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/ConnectionError.cpp
URL: http://svn.apache.org/viewvc/activemq/activemq-cpp/trunk/src/main/activemq/commands/ConnectionError.cpp?rev=738877&r1=738876&r2=738877&view=diff
==============================================================================
--- activemq/activemq-cpp/trunk/src/main/activemq/commands/ConnectionError.cpp (original)
+++ activemq/activemq-cpp/trunk/src/main/activemq/commands/ConnectionError.cpp Thu Jan 29 15:02:56 2009
@@ -30,21 +30,21 @@
  *  Command and marshaling code for OpenWire format for ConnectionError
  *
  *
- *  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
  *
  */
 ////////////////////////////////////////////////////////////////////////////////
-ConnectionError::ConnectionError()
-{
+ConnectionError::ConnectionError() {
+
     this->exception = NULL;
     this->connectionId = NULL;
 }
 
 ////////////////////////////////////////////////////////////////////////////////
-ConnectionError::~ConnectionError()
-{
+ConnectionError::~ConnectionError() {
+
     delete this->exception;
     delete this->connectionId;
 }
@@ -62,13 +62,17 @@
 ////////////////////////////////////////////////////////////////////////////////
 void ConnectionError::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 ConnectionError* srcPtr = dynamic_cast<const ConnectionError*>( src );
 
     if( srcPtr == NULL || src == NULL ) {
-
         throw decaf::lang::exceptions::NullPointerException(
             __FILE__, __LINE__,
             "ConnectionError::copyDataStructure - src is NULL or invalid" );
@@ -117,6 +121,11 @@
 
 ////////////////////////////////////////////////////////////////////////////////
 bool ConnectionError::equals( const DataStructure* value ) const {
+
+    if( this == value ) {
+        return true;
+    }
+
     const ConnectionError* valuePtr = dynamic_cast<const ConnectionError*>( value );
 
     if( valuePtr == NULL || value == NULL ) {
@@ -160,7 +169,7 @@
 }
 
 ////////////////////////////////////////////////////////////////////////////////
-void ConnectionError::setException(BrokerError* exception ) {
+void ConnectionError::setException( BrokerError* exception ) {
     this->exception = exception;
 }
 
@@ -175,7 +184,7 @@
 }
 
 ////////////////////////////////////////////////////////////////////////////////
-void ConnectionError::setConnectionId(ConnectionId* connectionId ) {
+void ConnectionError::setConnectionId( ConnectionId* connectionId ) {
     this->connectionId = connectionId;
 }
 

Modified: activemq/activemq-cpp/trunk/src/main/activemq/commands/ConnectionError.h
URL: http://svn.apache.org/viewvc/activemq/activemq-cpp/trunk/src/main/activemq/commands/ConnectionError.h?rev=738877&r1=738876&r2=738877&view=diff
==============================================================================
--- activemq/activemq-cpp/trunk/src/main/activemq/commands/ConnectionError.h (original)
+++ activemq/activemq-cpp/trunk/src/main/activemq/commands/ConnectionError.h Thu Jan 29 15:02:56 2009
@@ -38,7 +38,7 @@
      *  Command and marshaling code for OpenWire format for ConnectionError
      *
      *
-     *  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 @@
         BrokerError* exception;
         ConnectionId* connectionId;
 
+    protected:
+
+        ConnectionError( const ConnectionError& other );
+        ConnectionError& operator= ( const ConnectionError& other );
+
     public:
 
         const static unsigned char ID_CONNECTIONERROR = 16;
@@ -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/ConnectionId.cpp
URL: http://svn.apache.org/viewvc/activemq/activemq-cpp/trunk/src/main/activemq/commands/ConnectionId.cpp?rev=738877&r1=738876&r2=738877&view=diff
==============================================================================
--- activemq/activemq-cpp/trunk/src/main/activemq/commands/ConnectionId.cpp (original)
+++ activemq/activemq-cpp/trunk/src/main/activemq/commands/ConnectionId.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 ConnectionId
  *
  *
- *  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
  *
  */
 ////////////////////////////////////////////////////////////////////////////////
-ConnectionId::ConnectionId()
-{
+ConnectionId::ConnectionId() {
+
     this->value = "";
 }
 
 ////////////////////////////////////////////////////////////////////////////////
-ConnectionId::~ConnectionId()
-{
+ConnectionId::ConnectionId( const ConnectionId& other ) {
+    this->copyDataStructure( &other );
+}
+
+////////////////////////////////////////////////////////////////////////////////
+ConnectionId::~ConnectionId() {
+
 }
 
 ////////////////////////////////////////////////////////////////////////////////
@@ -59,13 +65,17 @@
 ////////////////////////////////////////////////////////////////////////////////
 void ConnectionId::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 ConnectionId* srcPtr = dynamic_cast<const ConnectionId*>( src );
 
     if( srcPtr == NULL || src == NULL ) {
-
         throw decaf::lang::exceptions::NullPointerException(
             __FILE__, __LINE__,
             "ConnectionId::copyDataStructure - src is NULL or invalid" );
@@ -94,6 +104,11 @@
 
 ////////////////////////////////////////////////////////////////////////////////
 bool ConnectionId::equals( const DataStructure* value ) const {
+
+    if( this == value ) {
+        return true;
+    }
+
     const ConnectionId* valuePtr = dynamic_cast<const ConnectionId*>( value );
 
     if( valuePtr == NULL || value == NULL ) {
@@ -119,7 +134,41 @@
 }
 
 ////////////////////////////////////////////////////////////////////////////////
-void ConnectionId::setValue(const std::string& value ) {
+void ConnectionId::setValue( const std::string& value ) {
     this->value = value;
 }
 
+////////////////////////////////////////////////////////////////////////////////
+int ConnectionId::compareTo( const ConnectionId& value ) const {
+
+    if( this == &value ) {
+        return 0;
+    }
+
+    int valueComp = apr_strnatcasecmp( this->value.c_str(), value.value.c_str() );
+    if( valueComp != 0 ) {
+        return valueComp;
+    }
+
+    return 0;
+}
+
+////////////////////////////////////////////////////////////////////////////////
+bool ConnectionId::equals( const ConnectionId& value ) const {
+    return this->equals( &value );
+}
+
+////////////////////////////////////////////////////////////////////////////////
+bool ConnectionId::operator==( const ConnectionId& value ) const {
+    return this->compareTo( value ) == 0;
+}
+
+////////////////////////////////////////////////////////////////////////////////
+bool ConnectionId::operator<( const ConnectionId& value ) const {
+    return this->compareTo( value ) < 0;
+}
+////////////////////////////////////////////////////////////////////////////////
+ConnectionId& ConnectionId::operator= ( const ConnectionId& other ) {
+    this->copyDataStructure( &other );
+}
+

Modified: activemq/activemq-cpp/trunk/src/main/activemq/commands/ConnectionId.h
URL: http://svn.apache.org/viewvc/activemq/activemq-cpp/trunk/src/main/activemq/commands/ConnectionId.h?rev=738877&r1=738876&r2=738877&view=diff
==============================================================================
--- activemq/activemq-cpp/trunk/src/main/activemq/commands/ConnectionId.h (original)
+++ activemq/activemq-cpp/trunk/src/main/activemq/commands/ConnectionId.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 ConnectionId
      *
      *
-     *  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 ConnectionId : public BaseDataStructure {
+    class AMQCPP_API ConnectionId : public BaseDataStructure, public decaf::lang::Comparable<ConnectionId> {
     protected:
 
         std::string value;
@@ -53,11 +54,12 @@
     public:
 
         ConnectionId();
+        ConnectionId( const ConnectionId& other );
         virtual ~ConnectionId();
 
         /**
          * Get the unique identifier that this object and its own
-         * Marshaller share.
+         * Marshaler share.
          * @returns new DataStructure type copy.
          */
         virtual unsigned char getDataStructureType() const;
@@ -95,6 +97,15 @@
         virtual std::string& getValue();
         virtual void setValue( const std::string& value );
 
+        virtual int compareTo( const ConnectionId& value ) const;
+
+        virtual bool equals( const ConnectionId& value ) const;
+
+        virtual bool operator==( const ConnectionId& value ) const;
+
+        virtual bool operator<( const ConnectionId& value ) const;
+
+        ConnectionId& operator= ( const ConnectionId& other );
     };
 
 }}

Modified: activemq/activemq-cpp/trunk/src/main/activemq/commands/ConnectionInfo.cpp
URL: http://svn.apache.org/viewvc/activemq/activemq-cpp/trunk/src/main/activemq/commands/ConnectionInfo.cpp?rev=738877&r1=738876&r2=738877&view=diff
==============================================================================
--- activemq/activemq-cpp/trunk/src/main/activemq/commands/ConnectionInfo.cpp (original)
+++ activemq/activemq-cpp/trunk/src/main/activemq/commands/ConnectionInfo.cpp Thu Jan 29 15:02:56 2009
@@ -30,14 +30,14 @@
  *  Command and marshaling code for OpenWire format for ConnectionInfo
  *
  *
- *  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
  *
  */
 ////////////////////////////////////////////////////////////////////////////////
-ConnectionInfo::ConnectionInfo()
-{
+ConnectionInfo::ConnectionInfo() {
+
     this->connectionId = NULL;
     this->clientId = "";
     this->password = "";
@@ -48,8 +48,8 @@
 }
 
 ////////////////////////////////////////////////////////////////////////////////
-ConnectionInfo::~ConnectionInfo()
-{
+ConnectionInfo::~ConnectionInfo() {
+
     delete this->connectionId;
     for( size_t ibrokerPath = 0; ibrokerPath < brokerPath.size(); ++ibrokerPath ) {
         delete brokerPath[ibrokerPath];
@@ -69,13 +69,17 @@
 ////////////////////////////////////////////////////////////////////////////////
 void ConnectionInfo::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 ConnectionInfo* srcPtr = dynamic_cast<const ConnectionInfo*>( src );
 
     if( srcPtr == NULL || src == NULL ) {
-
         throw decaf::lang::exceptions::NullPointerException(
             __FILE__, __LINE__,
             "ConnectionInfo::copyDataStructure - src is NULL or invalid" );
@@ -142,6 +146,11 @@
 
 ////////////////////////////////////////////////////////////////////////////////
 bool ConnectionInfo::equals( const DataStructure* value ) const {
+
+    if( this == value ) {
+        return true;
+    }
+
     const ConnectionInfo* valuePtr = dynamic_cast<const ConnectionInfo*>( value );
 
     if( valuePtr == NULL || value == NULL ) {
@@ -205,7 +214,7 @@
 }
 
 ////////////////////////////////////////////////////////////////////////////////
-void ConnectionInfo::setConnectionId(ConnectionId* connectionId ) {
+void ConnectionInfo::setConnectionId( ConnectionId* connectionId ) {
     this->connectionId = connectionId;
 }
 
@@ -220,7 +229,7 @@
 }
 
 ////////////////////////////////////////////////////////////////////////////////
-void ConnectionInfo::setClientId(const std::string& clientId ) {
+void ConnectionInfo::setClientId( const std::string& clientId ) {
     this->clientId = clientId;
 }
 
@@ -235,7 +244,7 @@
 }
 
 ////////////////////////////////////////////////////////////////////////////////
-void ConnectionInfo::setPassword(const std::string& password ) {
+void ConnectionInfo::setPassword( const std::string& password ) {
     this->password = password;
 }
 
@@ -250,7 +259,7 @@
 }
 
 ////////////////////////////////////////////////////////////////////////////////
-void ConnectionInfo::setUserName(const std::string& userName ) {
+void ConnectionInfo::setUserName( const std::string& userName ) {
     this->userName = userName;
 }
 
@@ -265,7 +274,7 @@
 }
 
 ////////////////////////////////////////////////////////////////////////////////
-void ConnectionInfo::setBrokerPath(const std::vector<BrokerId*>& brokerPath ) {
+void ConnectionInfo::setBrokerPath( const std::vector<BrokerId*>& brokerPath ) {
     this->brokerPath = brokerPath;
 }
 
@@ -275,7 +284,7 @@
 }
 
 ////////////////////////////////////////////////////////////////////////////////
-void ConnectionInfo::setBrokerMasterConnector(bool brokerMasterConnector ) {
+void ConnectionInfo::setBrokerMasterConnector( bool brokerMasterConnector ) {
     this->brokerMasterConnector = brokerMasterConnector;
 }
 
@@ -285,7 +294,7 @@
 }
 
 ////////////////////////////////////////////////////////////////////////////////
-void ConnectionInfo::setManageable(bool manageable ) {
+void ConnectionInfo::setManageable( bool manageable ) {
     this->manageable = manageable;
 }
 
@@ -295,7 +304,7 @@
 }
 
 ////////////////////////////////////////////////////////////////////////////////
-void ConnectionInfo::setClientMaster(bool clientMaster ) {
+void ConnectionInfo::setClientMaster( bool clientMaster ) {
     this->clientMaster = clientMaster;
 }
 

Modified: activemq/activemq-cpp/trunk/src/main/activemq/commands/ConnectionInfo.h
URL: http://svn.apache.org/viewvc/activemq/activemq-cpp/trunk/src/main/activemq/commands/ConnectionInfo.h?rev=738877&r1=738876&r2=738877&view=diff
==============================================================================
--- activemq/activemq-cpp/trunk/src/main/activemq/commands/ConnectionInfo.h (original)
+++ activemq/activemq-cpp/trunk/src/main/activemq/commands/ConnectionInfo.h Thu Jan 29 15:02:56 2009
@@ -38,7 +38,7 @@
      *  Command and marshaling code for OpenWire format for ConnectionInfo
      *
      *
-     *  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
      *
@@ -55,6 +55,11 @@
         bool manageable;
         bool clientMaster;
 
+    protected:
+
+        ConnectionInfo( const ConnectionInfo& other );
+        ConnectionInfo& operator= ( const ConnectionInfo& other );
+
     public:
 
         const static unsigned char ID_CONNECTIONINFO = 3;
@@ -66,7 +71,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/ConsumerControl.cpp
URL: http://svn.apache.org/viewvc/activemq/activemq-cpp/trunk/src/main/activemq/commands/ConsumerControl.cpp?rev=738877&r1=738876&r2=738877&view=diff
==============================================================================
--- activemq/activemq-cpp/trunk/src/main/activemq/commands/ConsumerControl.cpp (original)
+++ activemq/activemq-cpp/trunk/src/main/activemq/commands/ConsumerControl.cpp Thu Jan 29 15:02:56 2009
@@ -30,14 +30,14 @@
  *  Command and marshaling code for OpenWire format for ConsumerControl
  *
  *
- *  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
  *
  */
 ////////////////////////////////////////////////////////////////////////////////
-ConsumerControl::ConsumerControl()
-{
+ConsumerControl::ConsumerControl() {
+
     this->close = false;
     this->consumerId = NULL;
     this->prefetch = 0;
@@ -47,8 +47,8 @@
 }
 
 ////////////////////////////////////////////////////////////////////////////////
-ConsumerControl::~ConsumerControl()
-{
+ConsumerControl::~ConsumerControl() {
+
     delete this->consumerId;
 }
 
@@ -65,13 +65,17 @@
 ////////////////////////////////////////////////////////////////////////////////
 void ConsumerControl::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 ConsumerControl* srcPtr = dynamic_cast<const ConsumerControl*>( src );
 
     if( srcPtr == NULL || src == NULL ) {
-
         throw decaf::lang::exceptions::NullPointerException(
             __FILE__, __LINE__,
             "ConsumerControl::copyDataStructure - src is NULL or invalid" );
@@ -119,6 +123,11 @@
 
 ////////////////////////////////////////////////////////////////////////////////
 bool ConsumerControl::equals( const DataStructure* value ) const {
+
+    if( this == value ) {
+        return true;
+    }
+
     const ConsumerControl* valuePtr = dynamic_cast<const ConsumerControl*>( value );
 
     if( valuePtr == NULL || value == NULL ) {
@@ -165,7 +174,7 @@
 }
 
 ////////////////////////////////////////////////////////////////////////////////
-void ConsumerControl::setClose(bool close ) {
+void ConsumerControl::setClose( bool close ) {
     this->close = close;
 }
 
@@ -180,7 +189,7 @@
 }
 
 ////////////////////////////////////////////////////////////////////////////////
-void ConsumerControl::setConsumerId(ConsumerId* consumerId ) {
+void ConsumerControl::setConsumerId( ConsumerId* consumerId ) {
     this->consumerId = consumerId;
 }
 
@@ -190,7 +199,7 @@
 }
 
 ////////////////////////////////////////////////////////////////////////////////
-void ConsumerControl::setPrefetch(int prefetch ) {
+void ConsumerControl::setPrefetch( int prefetch ) {
     this->prefetch = prefetch;
 }
 
@@ -200,7 +209,7 @@
 }
 
 ////////////////////////////////////////////////////////////////////////////////
-void ConsumerControl::setFlush(bool flush ) {
+void ConsumerControl::setFlush( bool flush ) {
     this->flush = flush;
 }
 
@@ -210,7 +219,7 @@
 }
 
 ////////////////////////////////////////////////////////////////////////////////
-void ConsumerControl::setStart(bool start ) {
+void ConsumerControl::setStart( bool start ) {
     this->start = start;
 }
 
@@ -220,7 +229,7 @@
 }
 
 ////////////////////////////////////////////////////////////////////////////////
-void ConsumerControl::setStop(bool stop ) {
+void ConsumerControl::setStop( bool stop ) {
     this->stop = stop;
 }
 

Modified: activemq/activemq-cpp/trunk/src/main/activemq/commands/ConsumerControl.h
URL: http://svn.apache.org/viewvc/activemq/activemq-cpp/trunk/src/main/activemq/commands/ConsumerControl.h?rev=738877&r1=738876&r2=738877&view=diff
==============================================================================
--- activemq/activemq-cpp/trunk/src/main/activemq/commands/ConsumerControl.h (original)
+++ activemq/activemq-cpp/trunk/src/main/activemq/commands/ConsumerControl.h Thu Jan 29 15:02:56 2009
@@ -37,7 +37,7 @@
      *  Command and marshaling code for OpenWire format for ConsumerControl
      *
      *
-     *  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 @@
         bool start;
         bool stop;
 
+    protected:
+
+        ConsumerControl( const ConsumerControl& other );
+        ConsumerControl& operator= ( const ConsumerControl& other );
+
     public:
 
         const static unsigned char ID_CONSUMERCONTROL = 17;
@@ -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/ConsumerId.cpp
URL: http://svn.apache.org/viewvc/activemq/activemq-cpp/trunk/src/main/activemq/commands/ConsumerId.cpp?rev=738877&r1=738876&r2=738877&view=diff
==============================================================================
--- activemq/activemq-cpp/trunk/src/main/activemq/commands/ConsumerId.cpp (original)
+++ activemq/activemq-cpp/trunk/src/main/activemq/commands/ConsumerId.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 ConsumerId
  *
  *
- *  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
  *
  */
 ////////////////////////////////////////////////////////////////////////////////
-ConsumerId::ConsumerId()
-{
+ConsumerId::ConsumerId() {
+
     this->connectionId = "";
     this->sessionId = 0;
     this->value = 0;
 }
 
 ////////////////////////////////////////////////////////////////////////////////
-ConsumerId::~ConsumerId()
-{
+ConsumerId::ConsumerId( const ConsumerId& other ) {
+    this->copyDataStructure( &other );
+}
+
+////////////////////////////////////////////////////////////////////////////////
+ConsumerId::~ConsumerId() {
+
 }
 
 ////////////////////////////////////////////////////////////////////////////////
@@ -61,13 +67,17 @@
 ////////////////////////////////////////////////////////////////////////////////
 void ConsumerId::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 ConsumerId* srcPtr = dynamic_cast<const ConsumerId*>( src );
 
     if( srcPtr == NULL || src == NULL ) {
-
         throw decaf::lang::exceptions::NullPointerException(
             __FILE__, __LINE__,
             "ConsumerId::copyDataStructure - src is NULL or invalid" );
@@ -100,6 +110,11 @@
 
 ////////////////////////////////////////////////////////////////////////////////
 bool ConsumerId::equals( const DataStructure* value ) const {
+
+    if( this == value ) {
+        return true;
+    }
+
     const ConsumerId* valuePtr = dynamic_cast<const ConsumerId*>( value );
 
     if( valuePtr == NULL || value == NULL ) {
@@ -131,7 +146,7 @@
 }
 
 ////////////////////////////////////////////////////////////////////////////////
-void ConsumerId::setConnectionId(const std::string& connectionId ) {
+void ConsumerId::setConnectionId( const std::string& connectionId ) {
     this->connectionId = connectionId;
 }
 
@@ -141,7 +156,7 @@
 }
 
 ////////////////////////////////////////////////////////////////////////////////
-void ConsumerId::setSessionId(long long sessionId ) {
+void ConsumerId::setSessionId( long long sessionId ) {
     this->sessionId = sessionId;
 }
 
@@ -151,7 +166,53 @@
 }
 
 ////////////////////////////////////////////////////////////////////////////////
-void ConsumerId::setValue(long long value ) {
+void ConsumerId::setValue( long long value ) {
     this->value = value;
 }
 
+////////////////////////////////////////////////////////////////////////////////
+int ConsumerId::compareTo( const ConsumerId& 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->sessionId > value.sessionId ) {
+        return 1;
+    } else if( this->sessionId < value.sessionId ) {
+        return -1;
+    }
+
+    if( this->value > value.value ) {
+        return 1;
+    } else if( this->value < value.value ) {
+        return -1;
+    }
+
+    return 0;
+}
+
+////////////////////////////////////////////////////////////////////////////////
+bool ConsumerId::equals( const ConsumerId& value ) const {
+    return this->equals( &value );
+}
+
+////////////////////////////////////////////////////////////////////////////////
+bool ConsumerId::operator==( const ConsumerId& value ) const {
+    return this->compareTo( value ) == 0;
+}
+
+////////////////////////////////////////////////////////////////////////////////
+bool ConsumerId::operator<( const ConsumerId& value ) const {
+    return this->compareTo( value ) < 0;
+}
+////////////////////////////////////////////////////////////////////////////////
+ConsumerId& ConsumerId::operator= ( const ConsumerId& other ) {
+    this->copyDataStructure( &other );
+}
+

Modified: activemq/activemq-cpp/trunk/src/main/activemq/commands/ConsumerId.h
URL: http://svn.apache.org/viewvc/activemq/activemq-cpp/trunk/src/main/activemq/commands/ConsumerId.h?rev=738877&r1=738876&r2=738877&view=diff
==============================================================================
--- activemq/activemq-cpp/trunk/src/main/activemq/commands/ConsumerId.h (original)
+++ activemq/activemq-cpp/trunk/src/main/activemq/commands/ConsumerId.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 ConsumerId
      *
      *
-     *  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 ConsumerId : public BaseDataStructure {
+    class AMQCPP_API ConsumerId : public BaseDataStructure, public decaf::lang::Comparable<ConsumerId> {
     protected:
 
         std::string connectionId;
@@ -55,11 +56,12 @@
     public:
 
         ConsumerId();
+        ConsumerId( const ConsumerId& other );
         virtual ~ConsumerId();
 
         /**
          * 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 getValue() const;
         virtual void setValue( long long value );
 
+        virtual int compareTo( const ConsumerId& value ) const;
+
+        virtual bool equals( const ConsumerId& value ) const;
+
+        virtual bool operator==( const ConsumerId& value ) const;
+
+        virtual bool operator<( const ConsumerId& value ) const;
+
+        ConsumerId& operator= ( const ConsumerId& other );
     };
 
 }}

Modified: activemq/activemq-cpp/trunk/src/main/activemq/commands/ConsumerInfo.cpp
URL: http://svn.apache.org/viewvc/activemq/activemq-cpp/trunk/src/main/activemq/commands/ConsumerInfo.cpp?rev=738877&r1=738876&r2=738877&view=diff
==============================================================================
--- activemq/activemq-cpp/trunk/src/main/activemq/commands/ConsumerInfo.cpp (original)
+++ activemq/activemq-cpp/trunk/src/main/activemq/commands/ConsumerInfo.cpp Thu Jan 29 15:02:56 2009
@@ -30,14 +30,14 @@
  *  Command and marshaling code for OpenWire format for ConsumerInfo
  *
  *
- *  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
  *
  */
 ////////////////////////////////////////////////////////////////////////////////
-ConsumerInfo::ConsumerInfo()
-{
+ConsumerInfo::ConsumerInfo() {
+
     this->consumerId = NULL;
     this->browser = false;
     this->destination = NULL;
@@ -57,8 +57,8 @@
 }
 
 ////////////////////////////////////////////////////////////////////////////////
-ConsumerInfo::~ConsumerInfo()
-{
+ConsumerInfo::~ConsumerInfo() {
+
     delete this->consumerId;
     delete this->destination;
     for( size_t ibrokerPath = 0; ibrokerPath < brokerPath.size(); ++ibrokerPath ) {
@@ -80,13 +80,17 @@
 ////////////////////////////////////////////////////////////////////////////////
 void ConsumerInfo::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 ConsumerInfo* srcPtr = dynamic_cast<const ConsumerInfo*>( src );
 
     if( srcPtr == NULL || src == NULL ) {
-
         throw decaf::lang::exceptions::NullPointerException(
             __FILE__, __LINE__,
             "ConsumerInfo::copyDataStructure - src is NULL or invalid" );
@@ -189,6 +193,11 @@
 
 ////////////////////////////////////////////////////////////////////////////////
 bool ConsumerInfo::equals( const DataStructure* value ) const {
+
+    if( this == value ) {
+        return true;
+    }
+
     const ConsumerInfo* valuePtr = dynamic_cast<const ConsumerInfo*>( value );
 
     if( valuePtr == NULL || value == NULL ) {
@@ -287,7 +296,7 @@
 }
 
 ////////////////////////////////////////////////////////////////////////////////
-void ConsumerInfo::setConsumerId(ConsumerId* consumerId ) {
+void ConsumerInfo::setConsumerId( ConsumerId* consumerId ) {
     this->consumerId = consumerId;
 }
 
@@ -297,7 +306,7 @@
 }
 
 ////////////////////////////////////////////////////////////////////////////////
-void ConsumerInfo::setBrowser(bool browser ) {
+void ConsumerInfo::setBrowser( bool browser ) {
     this->browser = browser;
 }
 
@@ -312,7 +321,7 @@
 }
 
 ////////////////////////////////////////////////////////////////////////////////
-void ConsumerInfo::setDestination(ActiveMQDestination* destination ) {
+void ConsumerInfo::setDestination( ActiveMQDestination* destination ) {
     this->destination = destination;
 }
 
@@ -322,7 +331,7 @@
 }
 
 ////////////////////////////////////////////////////////////////////////////////
-void ConsumerInfo::setPrefetchSize(int prefetchSize ) {
+void ConsumerInfo::setPrefetchSize( int prefetchSize ) {
     this->prefetchSize = prefetchSize;
 }
 
@@ -332,7 +341,7 @@
 }
 
 ////////////////////////////////////////////////////////////////////////////////
-void ConsumerInfo::setMaximumPendingMessageLimit(int maximumPendingMessageLimit ) {
+void ConsumerInfo::setMaximumPendingMessageLimit( int maximumPendingMessageLimit ) {
     this->maximumPendingMessageLimit = maximumPendingMessageLimit;
 }
 
@@ -342,7 +351,7 @@
 }
 
 ////////////////////////////////////////////////////////////////////////////////
-void ConsumerInfo::setDispatchAsync(bool dispatchAsync ) {
+void ConsumerInfo::setDispatchAsync( bool dispatchAsync ) {
     this->dispatchAsync = dispatchAsync;
 }
 
@@ -357,7 +366,7 @@
 }
 
 ////////////////////////////////////////////////////////////////////////////////
-void ConsumerInfo::setSelector(const std::string& selector ) {
+void ConsumerInfo::setSelector( const std::string& selector ) {
     this->selector = selector;
 }
 
@@ -372,7 +381,7 @@
 }
 
 ////////////////////////////////////////////////////////////////////////////////
-void ConsumerInfo::setSubscriptionName(const std::string& subscriptionName ) {
+void ConsumerInfo::setSubscriptionName( const std::string& subscriptionName ) {
     this->subscriptionName = subscriptionName;
 }
 
@@ -382,7 +391,7 @@
 }
 
 ////////////////////////////////////////////////////////////////////////////////
-void ConsumerInfo::setNoLocal(bool noLocal ) {
+void ConsumerInfo::setNoLocal( bool noLocal ) {
     this->noLocal = noLocal;
 }
 
@@ -392,7 +401,7 @@
 }
 
 ////////////////////////////////////////////////////////////////////////////////
-void ConsumerInfo::setExclusive(bool exclusive ) {
+void ConsumerInfo::setExclusive( bool exclusive ) {
     this->exclusive = exclusive;
 }
 
@@ -402,7 +411,7 @@
 }
 
 ////////////////////////////////////////////////////////////////////////////////
-void ConsumerInfo::setRetroactive(bool retroactive ) {
+void ConsumerInfo::setRetroactive( bool retroactive ) {
     this->retroactive = retroactive;
 }
 
@@ -412,7 +421,7 @@
 }
 
 ////////////////////////////////////////////////////////////////////////////////
-void ConsumerInfo::setPriority(unsigned char priority ) {
+void ConsumerInfo::setPriority( unsigned char priority ) {
     this->priority = priority;
 }
 
@@ -427,7 +436,7 @@
 }
 
 ////////////////////////////////////////////////////////////////////////////////
-void ConsumerInfo::setBrokerPath(const std::vector<BrokerId*>& brokerPath ) {
+void ConsumerInfo::setBrokerPath( const std::vector<BrokerId*>& brokerPath ) {
     this->brokerPath = brokerPath;
 }
 
@@ -442,7 +451,7 @@
 }
 
 ////////////////////////////////////////////////////////////////////////////////
-void ConsumerInfo::setAdditionalPredicate(BooleanExpression* additionalPredicate ) {
+void ConsumerInfo::setAdditionalPredicate( BooleanExpression* additionalPredicate ) {
     this->additionalPredicate = additionalPredicate;
 }
 
@@ -452,7 +461,7 @@
 }
 
 ////////////////////////////////////////////////////////////////////////////////
-void ConsumerInfo::setNetworkSubscription(bool networkSubscription ) {
+void ConsumerInfo::setNetworkSubscription( bool networkSubscription ) {
     this->networkSubscription = networkSubscription;
 }
 
@@ -462,7 +471,7 @@
 }
 
 ////////////////////////////////////////////////////////////////////////////////
-void ConsumerInfo::setOptimizedAcknowledge(bool optimizedAcknowledge ) {
+void ConsumerInfo::setOptimizedAcknowledge( bool optimizedAcknowledge ) {
     this->optimizedAcknowledge = optimizedAcknowledge;
 }
 
@@ -472,7 +481,7 @@
 }
 
 ////////////////////////////////////////////////////////////////////////////////
-void ConsumerInfo::setNoRangeAcks(bool noRangeAcks ) {
+void ConsumerInfo::setNoRangeAcks( bool noRangeAcks ) {
     this->noRangeAcks = noRangeAcks;
 }
 

Modified: activemq/activemq-cpp/trunk/src/main/activemq/commands/ConsumerInfo.h
URL: http://svn.apache.org/viewvc/activemq/activemq-cpp/trunk/src/main/activemq/commands/ConsumerInfo.h?rev=738877&r1=738876&r2=738877&view=diff
==============================================================================
--- activemq/activemq-cpp/trunk/src/main/activemq/commands/ConsumerInfo.h (original)
+++ activemq/activemq-cpp/trunk/src/main/activemq/commands/ConsumerInfo.h Thu Jan 29 15:02:56 2009
@@ -40,7 +40,7 @@
      *  Command and marshaling code for OpenWire format for ConsumerInfo
      *
      *
-     *  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
      *
@@ -66,6 +66,11 @@
         bool optimizedAcknowledge;
         bool noRangeAcks;
 
+    protected:
+
+        ConsumerInfo( const ConsumerInfo& other );
+        ConsumerInfo& operator= ( const ConsumerInfo& other );
+
     public:
 
         const static unsigned char ID_CONSUMERINFO = 5;
@@ -77,7 +82,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/ControlCommand.cpp
URL: http://svn.apache.org/viewvc/activemq/activemq-cpp/trunk/src/main/activemq/commands/ControlCommand.cpp?rev=738877&r1=738876&r2=738877&view=diff
==============================================================================
--- activemq/activemq-cpp/trunk/src/main/activemq/commands/ControlCommand.cpp (original)
+++ activemq/activemq-cpp/trunk/src/main/activemq/commands/ControlCommand.cpp Thu Jan 29 15:02:56 2009
@@ -30,20 +30,20 @@
  *  Command and marshaling code for OpenWire format for ControlCommand
  *
  *
- *  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
  *
  */
 ////////////////////////////////////////////////////////////////////////////////
-ControlCommand::ControlCommand()
-{
+ControlCommand::ControlCommand() {
+
     this->command = "";
 }
 
 ////////////////////////////////////////////////////////////////////////////////
-ControlCommand::~ControlCommand()
-{
+ControlCommand::~ControlCommand() {
+
 }
 
 ////////////////////////////////////////////////////////////////////////////////
@@ -59,13 +59,17 @@
 ////////////////////////////////////////////////////////////////////////////////
 void ControlCommand::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 ControlCommand* srcPtr = dynamic_cast<const ControlCommand*>( src );
 
     if( srcPtr == NULL || src == NULL ) {
-
         throw decaf::lang::exceptions::NullPointerException(
             __FILE__, __LINE__,
             "ControlCommand::copyDataStructure - src is NULL or invalid" );
@@ -94,6 +98,11 @@
 
 ////////////////////////////////////////////////////////////////////////////////
 bool ControlCommand::equals( const DataStructure* value ) const {
+
+    if( this == value ) {
+        return true;
+    }
+
     const ControlCommand* valuePtr = dynamic_cast<const ControlCommand*>( value );
 
     if( valuePtr == NULL || value == NULL ) {
@@ -126,7 +135,7 @@
 }
 
 ////////////////////////////////////////////////////////////////////////////////
-void ControlCommand::setCommand(const std::string& command ) {
+void ControlCommand::setCommand( const std::string& command ) {
     this->command = command;
 }
 

Modified: activemq/activemq-cpp/trunk/src/main/activemq/commands/ControlCommand.h
URL: http://svn.apache.org/viewvc/activemq/activemq-cpp/trunk/src/main/activemq/commands/ControlCommand.h?rev=738877&r1=738876&r2=738877&view=diff
==============================================================================
--- activemq/activemq-cpp/trunk/src/main/activemq/commands/ControlCommand.h (original)
+++ activemq/activemq-cpp/trunk/src/main/activemq/commands/ControlCommand.h Thu Jan 29 15:02:56 2009
@@ -36,7 +36,7 @@
      *  Command and marshaling code for OpenWire format for ControlCommand
      *
      *
-     *  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 @@
 
         std::string command;
 
+    protected:
+
+        ControlCommand( const ControlCommand& other );
+        ControlCommand& operator= ( const ControlCommand& other );
+
     public:
 
         const static unsigned char ID_CONTROLCOMMAND = 14;
@@ -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/DataArrayResponse.cpp
URL: http://svn.apache.org/viewvc/activemq/activemq-cpp/trunk/src/main/activemq/commands/DataArrayResponse.cpp?rev=738877&r1=738876&r2=738877&view=diff
==============================================================================
--- activemq/activemq-cpp/trunk/src/main/activemq/commands/DataArrayResponse.cpp (original)
+++ activemq/activemq-cpp/trunk/src/main/activemq/commands/DataArrayResponse.cpp Thu Jan 29 15:02:56 2009
@@ -30,19 +30,19 @@
  *  Command and marshaling code for OpenWire format for DataArrayResponse
  *
  *
- *  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
  *
  */
 ////////////////////////////////////////////////////////////////////////////////
-DataArrayResponse::DataArrayResponse()
-{
+DataArrayResponse::DataArrayResponse() {
+
 }
 
 ////////////////////////////////////////////////////////////////////////////////
-DataArrayResponse::~DataArrayResponse()
-{
+DataArrayResponse::~DataArrayResponse() {
+
     for( size_t idata = 0; idata < data.size(); ++idata ) {
         delete data[idata];
     }
@@ -61,13 +61,17 @@
 ////////////////////////////////////////////////////////////////////////////////
 void DataArrayResponse::copyDataStructure( const DataStructure* src ) {
 
+    // Protect against invalid self assignment.
+    if( this == src ) {
+        return;
+    }
+
     // Copy the data of the base class or classes
     Response::copyDataStructure( src );
 
     const DataArrayResponse* srcPtr = dynamic_cast<const DataArrayResponse*>( src );
 
     if( srcPtr == NULL || src == NULL ) {
-
         throw decaf::lang::exceptions::NullPointerException(
             __FILE__, __LINE__,
             "DataArrayResponse::copyDataStructure - src is NULL or invalid" );
@@ -111,6 +115,11 @@
 
 ////////////////////////////////////////////////////////////////////////////////
 bool DataArrayResponse::equals( const DataStructure* value ) const {
+
+    if( this == value ) {
+        return true;
+    }
+
     const DataArrayResponse* valuePtr = dynamic_cast<const DataArrayResponse*>( value );
 
     if( valuePtr == NULL || value == NULL ) {
@@ -142,7 +151,7 @@
 }
 
 ////////////////////////////////////////////////////////////////////////////////
-void DataArrayResponse::setData(const std::vector<DataStructure*>& data ) {
+void DataArrayResponse::setData( const std::vector<DataStructure*>& data ) {
     this->data = data;
 }
 

Modified: activemq/activemq-cpp/trunk/src/main/activemq/commands/DataArrayResponse.h
URL: http://svn.apache.org/viewvc/activemq/activemq-cpp/trunk/src/main/activemq/commands/DataArrayResponse.h?rev=738877&r1=738876&r2=738877&view=diff
==============================================================================
--- activemq/activemq-cpp/trunk/src/main/activemq/commands/DataArrayResponse.h (original)
+++ activemq/activemq-cpp/trunk/src/main/activemq/commands/DataArrayResponse.h Thu Jan 29 15:02:56 2009
@@ -37,7 +37,7 @@
      *  Command and marshaling code for OpenWire format for DataArrayResponse
      *
      *
-     *  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 @@
 
         std::vector<DataStructure*> data;
 
+    protected:
+
+        DataArrayResponse( const DataArrayResponse& other );
+        DataArrayResponse& operator= ( const DataArrayResponse& other );
+
     public:
 
         const static unsigned char ID_DATAARRAYRESPONSE = 33;
@@ -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/DataResponse.cpp
URL: http://svn.apache.org/viewvc/activemq/activemq-cpp/trunk/src/main/activemq/commands/DataResponse.cpp?rev=738877&r1=738876&r2=738877&view=diff
==============================================================================
--- activemq/activemq-cpp/trunk/src/main/activemq/commands/DataResponse.cpp (original)
+++ activemq/activemq-cpp/trunk/src/main/activemq/commands/DataResponse.cpp Thu Jan 29 15:02:56 2009
@@ -30,20 +30,20 @@
  *  Command and marshaling code for OpenWire format for DataResponse
  *
  *
- *  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
  *
  */
 ////////////////////////////////////////////////////////////////////////////////
-DataResponse::DataResponse()
-{
+DataResponse::DataResponse() {
+
     this->data = NULL;
 }
 
 ////////////////////////////////////////////////////////////////////////////////
-DataResponse::~DataResponse()
-{
+DataResponse::~DataResponse() {
+
     delete this->data;
 }
 
@@ -60,13 +60,17 @@
 ////////////////////////////////////////////////////////////////////////////////
 void DataResponse::copyDataStructure( const DataStructure* src ) {
 
+    // Protect against invalid self assignment.
+    if( this == src ) {
+        return;
+    }
+
     // Copy the data of the base class or classes
     Response::copyDataStructure( src );
 
     const DataResponse* srcPtr = dynamic_cast<const DataResponse*>( src );
 
     if( srcPtr == NULL || src == NULL ) {
-
         throw decaf::lang::exceptions::NullPointerException(
             __FILE__, __LINE__,
             "DataResponse::copyDataStructure - src is NULL or invalid" );
@@ -104,6 +108,11 @@
 
 ////////////////////////////////////////////////////////////////////////////////
 bool DataResponse::equals( const DataStructure* value ) const {
+
+    if( this == value ) {
+        return true;
+    }
+
     const DataResponse* valuePtr = dynamic_cast<const DataResponse*>( value );
 
     if( valuePtr == NULL || value == NULL ) {
@@ -133,7 +142,7 @@
 }
 
 ////////////////////////////////////////////////////////////////////////////////
-void DataResponse::setData(DataStructure* data ) {
+void DataResponse::setData( DataStructure* data ) {
     this->data = data;
 }
 

Modified: activemq/activemq-cpp/trunk/src/main/activemq/commands/DataResponse.h
URL: http://svn.apache.org/viewvc/activemq/activemq-cpp/trunk/src/main/activemq/commands/DataResponse.h?rev=738877&r1=738876&r2=738877&view=diff
==============================================================================
--- activemq/activemq-cpp/trunk/src/main/activemq/commands/DataResponse.h (original)
+++ activemq/activemq-cpp/trunk/src/main/activemq/commands/DataResponse.h Thu Jan 29 15:02:56 2009
@@ -37,7 +37,7 @@
      *  Command and marshaling code for OpenWire format for DataResponse
      *
      *
-     *  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* data;
 
+    protected:
+
+        DataResponse( const DataResponse& other );
+        DataResponse& operator= ( const DataResponse& other );
+
     public:
 
         const static unsigned char ID_DATARESPONSE = 32;
@@ -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/DestinationInfo.cpp
URL: http://svn.apache.org/viewvc/activemq/activemq-cpp/trunk/src/main/activemq/commands/DestinationInfo.cpp?rev=738877&r1=738876&r2=738877&view=diff
==============================================================================
--- activemq/activemq-cpp/trunk/src/main/activemq/commands/DestinationInfo.cpp (original)
+++ activemq/activemq-cpp/trunk/src/main/activemq/commands/DestinationInfo.cpp Thu Jan 29 15:02:56 2009
@@ -30,14 +30,14 @@
  *  Command and marshaling code for OpenWire format for DestinationInfo
  *
  *
- *  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
  *
  */
 ////////////////////////////////////////////////////////////////////////////////
-DestinationInfo::DestinationInfo()
-{
+DestinationInfo::DestinationInfo() {
+
     this->connectionId = NULL;
     this->destination = NULL;
     this->operationType = 0;
@@ -45,8 +45,8 @@
 }
 
 ////////////////////////////////////////////////////////////////////////////////
-DestinationInfo::~DestinationInfo()
-{
+DestinationInfo::~DestinationInfo() {
+
     delete this->connectionId;
     delete this->destination;
     for( size_t ibrokerPath = 0; ibrokerPath < brokerPath.size(); ++ibrokerPath ) {
@@ -67,13 +67,17 @@
 ////////////////////////////////////////////////////////////////////////////////
 void DestinationInfo::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 DestinationInfo* srcPtr = dynamic_cast<const DestinationInfo*>( src );
 
     if( srcPtr == NULL || src == NULL ) {
-
         throw decaf::lang::exceptions::NullPointerException(
             __FILE__, __LINE__,
             "DestinationInfo::copyDataStructure - src is NULL or invalid" );
@@ -143,6 +147,11 @@
 
 ////////////////////////////////////////////////////////////////////////////////
 bool DestinationInfo::equals( const DataStructure* value ) const {
+
+    if( this == value ) {
+        return true;
+    }
+
     const DestinationInfo* valuePtr = dynamic_cast<const DestinationInfo*>( value );
 
     if( valuePtr == NULL || value == NULL ) {
@@ -201,7 +210,7 @@
 }
 
 ////////////////////////////////////////////////////////////////////////////////
-void DestinationInfo::setConnectionId(ConnectionId* connectionId ) {
+void DestinationInfo::setConnectionId( ConnectionId* connectionId ) {
     this->connectionId = connectionId;
 }
 
@@ -216,7 +225,7 @@
 }
 
 ////////////////////////////////////////////////////////////////////////////////
-void DestinationInfo::setDestination(ActiveMQDestination* destination ) {
+void DestinationInfo::setDestination( ActiveMQDestination* destination ) {
     this->destination = destination;
 }
 
@@ -226,7 +235,7 @@
 }
 
 ////////////////////////////////////////////////////////////////////////////////
-void DestinationInfo::setOperationType(unsigned char operationType ) {
+void DestinationInfo::setOperationType( unsigned char operationType ) {
     this->operationType = operationType;
 }
 
@@ -236,7 +245,7 @@
 }
 
 ////////////////////////////////////////////////////////////////////////////////
-void DestinationInfo::setTimeout(long long timeout ) {
+void DestinationInfo::setTimeout( long long timeout ) {
     this->timeout = timeout;
 }
 
@@ -251,7 +260,7 @@
 }
 
 ////////////////////////////////////////////////////////////////////////////////
-void DestinationInfo::setBrokerPath(const std::vector<BrokerId*>& brokerPath ) {
+void DestinationInfo::setBrokerPath( const std::vector<BrokerId*>& brokerPath ) {
     this->brokerPath = brokerPath;
 }
 

Modified: activemq/activemq-cpp/trunk/src/main/activemq/commands/DestinationInfo.h
URL: http://svn.apache.org/viewvc/activemq/activemq-cpp/trunk/src/main/activemq/commands/DestinationInfo.h?rev=738877&r1=738876&r2=738877&view=diff
==============================================================================
--- activemq/activemq-cpp/trunk/src/main/activemq/commands/DestinationInfo.h (original)
+++ activemq/activemq-cpp/trunk/src/main/activemq/commands/DestinationInfo.h Thu Jan 29 15:02:56 2009
@@ -39,7 +39,7 @@
      *  Command and marshaling code for OpenWire format for DestinationInfo
      *
      *
-     *  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 @@
         long long timeout;
         std::vector<BrokerId*> brokerPath;
 
+    protected:
+
+        DestinationInfo( const DestinationInfo& other );
+        DestinationInfo& operator= ( const DestinationInfo& other );
+
     public:
 
         const static unsigned char ID_DESTINATIONINFO = 8;
@@ -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/DiscoveryEvent.cpp
URL: http://svn.apache.org/viewvc/activemq/activemq-cpp/trunk/src/main/activemq/commands/DiscoveryEvent.cpp?rev=738877&r1=738876&r2=738877&view=diff
==============================================================================
--- activemq/activemq-cpp/trunk/src/main/activemq/commands/DiscoveryEvent.cpp (original)
+++ activemq/activemq-cpp/trunk/src/main/activemq/commands/DiscoveryEvent.cpp Thu Jan 29 15:02:56 2009
@@ -30,21 +30,21 @@
  *  Command and marshaling code for OpenWire format for DiscoveryEvent
  *
  *
- *  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
  *
  */
 ////////////////////////////////////////////////////////////////////////////////
-DiscoveryEvent::DiscoveryEvent()
-{
+DiscoveryEvent::DiscoveryEvent() {
+
     this->serviceName = "";
     this->brokerName = "";
 }
 
 ////////////////////////////////////////////////////////////////////////////////
-DiscoveryEvent::~DiscoveryEvent()
-{
+DiscoveryEvent::~DiscoveryEvent() {
+
 }
 
 ////////////////////////////////////////////////////////////////////////////////
@@ -60,13 +60,17 @@
 ////////////////////////////////////////////////////////////////////////////////
 void DiscoveryEvent::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 DiscoveryEvent* srcPtr = dynamic_cast<const DiscoveryEvent*>( src );
 
     if( srcPtr == NULL || src == NULL ) {
-
         throw decaf::lang::exceptions::NullPointerException(
             __FILE__, __LINE__,
             "DiscoveryEvent::copyDataStructure - src is NULL or invalid" );
@@ -97,6 +101,11 @@
 
 ////////////////////////////////////////////////////////////////////////////////
 bool DiscoveryEvent::equals( const DataStructure* value ) const {
+
+    if( this == value ) {
+        return true;
+    }
+
     const DiscoveryEvent* valuePtr = dynamic_cast<const DiscoveryEvent*>( value );
 
     if( valuePtr == NULL || value == NULL ) {
@@ -125,7 +134,7 @@
 }
 
 ////////////////////////////////////////////////////////////////////////////////
-void DiscoveryEvent::setServiceName(const std::string& serviceName ) {
+void DiscoveryEvent::setServiceName( const std::string& serviceName ) {
     this->serviceName = serviceName;
 }
 
@@ -140,7 +149,7 @@
 }
 
 ////////////////////////////////////////////////////////////////////////////////
-void DiscoveryEvent::setBrokerName(const std::string& brokerName ) {
+void DiscoveryEvent::setBrokerName( const std::string& brokerName ) {
     this->brokerName = brokerName;
 }
 

Modified: activemq/activemq-cpp/trunk/src/main/activemq/commands/DiscoveryEvent.h
URL: http://svn.apache.org/viewvc/activemq/activemq-cpp/trunk/src/main/activemq/commands/DiscoveryEvent.h?rev=738877&r1=738876&r2=738877&view=diff
==============================================================================
--- activemq/activemq-cpp/trunk/src/main/activemq/commands/DiscoveryEvent.h (original)
+++ activemq/activemq-cpp/trunk/src/main/activemq/commands/DiscoveryEvent.h Thu Jan 29 15:02:56 2009
@@ -36,7 +36,7 @@
      *  Command and marshaling code for OpenWire format for DiscoveryEvent
      *
      *
-     *  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 @@
         std::string serviceName;
         std::string brokerName;
 
+    protected:
+
+        DiscoveryEvent( const DiscoveryEvent& other );
+        DiscoveryEvent& operator= ( const DiscoveryEvent& other );
+
     public:
 
         const static unsigned char ID_DISCOVERYEVENT = 40;
@@ -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/ExceptionResponse.cpp
URL: http://svn.apache.org/viewvc/activemq/activemq-cpp/trunk/src/main/activemq/commands/ExceptionResponse.cpp?rev=738877&r1=738876&r2=738877&view=diff
==============================================================================
--- activemq/activemq-cpp/trunk/src/main/activemq/commands/ExceptionResponse.cpp (original)
+++ activemq/activemq-cpp/trunk/src/main/activemq/commands/ExceptionResponse.cpp Thu Jan 29 15:02:56 2009
@@ -30,20 +30,20 @@
  *  Command and marshaling code for OpenWire format for ExceptionResponse
  *
  *
- *  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
  *
  */
 ////////////////////////////////////////////////////////////////////////////////
-ExceptionResponse::ExceptionResponse()
-{
+ExceptionResponse::ExceptionResponse() {
+
     this->exception = NULL;
 }
 
 ////////////////////////////////////////////////////////////////////////////////
-ExceptionResponse::~ExceptionResponse()
-{
+ExceptionResponse::~ExceptionResponse() {
+
     delete this->exception;
 }
 
@@ -60,13 +60,17 @@
 ////////////////////////////////////////////////////////////////////////////////
 void ExceptionResponse::copyDataStructure( const DataStructure* src ) {
 
+    // Protect against invalid self assignment.
+    if( this == src ) {
+        return;
+    }
+
     // Copy the data of the base class or classes
     Response::copyDataStructure( src );
 
     const ExceptionResponse* srcPtr = dynamic_cast<const ExceptionResponse*>( src );
 
     if( srcPtr == NULL || src == NULL ) {
-
         throw decaf::lang::exceptions::NullPointerException(
             __FILE__, __LINE__,
             "ExceptionResponse::copyDataStructure - src is NULL or invalid" );
@@ -104,6 +108,11 @@
 
 ////////////////////////////////////////////////////////////////////////////////
 bool ExceptionResponse::equals( const DataStructure* value ) const {
+
+    if( this == value ) {
+        return true;
+    }
+
     const ExceptionResponse* valuePtr = dynamic_cast<const ExceptionResponse*>( value );
 
     if( valuePtr == NULL || value == NULL ) {
@@ -133,7 +142,7 @@
 }
 
 ////////////////////////////////////////////////////////////////////////////////
-void ExceptionResponse::setException(BrokerError* exception ) {
+void ExceptionResponse::setException( BrokerError* exception ) {
     this->exception = exception;
 }
 

Modified: activemq/activemq-cpp/trunk/src/main/activemq/commands/ExceptionResponse.h
URL: http://svn.apache.org/viewvc/activemq/activemq-cpp/trunk/src/main/activemq/commands/ExceptionResponse.h?rev=738877&r1=738876&r2=738877&view=diff
==============================================================================
--- activemq/activemq-cpp/trunk/src/main/activemq/commands/ExceptionResponse.h (original)
+++ activemq/activemq-cpp/trunk/src/main/activemq/commands/ExceptionResponse.h Thu Jan 29 15:02:56 2009
@@ -37,7 +37,7 @@
      *  Command and marshaling code for OpenWire format for ExceptionResponse
      *
      *
-     *  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 @@
 
         BrokerError* exception;
 
+    protected:
+
+        ExceptionResponse( const ExceptionResponse& other );
+        ExceptionResponse& operator= ( const ExceptionResponse& other );
+
     public:
 
         const static unsigned char ID_EXCEPTIONRESPONSE = 31;
@@ -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;



Mime
View raw message