activemq-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From tab...@apache.org
Subject svn commit: r1460467 [4/15] - in /activemq/activemq-cpp/trunk/activemq-cpp/src/main/activemq: commands/ wireformat/openwire/marshal/generated/
Date Sun, 24 Mar 2013 21:30:56 GMT
Modified: activemq/activemq-cpp/trunk/activemq-cpp/src/main/activemq/commands/Message.cpp
URL: http://svn.apache.org/viewvc/activemq/activemq-cpp/trunk/activemq-cpp/src/main/activemq/commands/Message.cpp?rev=1460467&r1=1460466&r2=1460467&view=diff
==============================================================================
--- activemq/activemq-cpp/trunk/activemq-cpp/src/main/activemq/commands/Message.cpp (original)
+++ activemq/activemq-cpp/trunk/activemq-cpp/src/main/activemq/commands/Message.cpp Sun Mar 24 21:30:52 2013
@@ -43,8 +43,8 @@ using namespace decaf::lang::exceptions;
  */
 
 ////////////////////////////////////////////////////////////////////////////////
-Message::Message() 
-    : BaseCommand(), producerId(NULL), destination(NULL), transactionId(NULL), originalDestination(NULL), messageId(NULL), originalTransactionId(NULL), 
+Message::Message() :
+    BaseCommand(), producerId(NULL), destination(NULL), transactionId(NULL), originalDestination(NULL), messageId(NULL), originalTransactionId(NULL), 
       groupID(""), groupSequence(0), correlationId(""), persistent(false), expiration(0), priority(0), replyTo(NULL), timestamp(0), 
       type(""), content(), marshalledProperties(), dataStructure(NULL), targetConsumerId(NULL), compressed(false), redeliveryCounter(0), 
       brokerPath(), arrival(0), userID(""), recievedByDFBridge(false), droppable(false), cluster(), brokerInTime(0), brokerOutTime(0), ackHandler(NULL), properties(), readOnlyProperties(false), readOnlyBody(false), connection(NULL) {
@@ -57,67 +57,67 @@ Message::~Message() {
 
 ////////////////////////////////////////////////////////////////////////////////
 Message* Message::cloneDataStructure() const {
-    std::auto_ptr<Message> message( new Message() );
+    std::auto_ptr<Message> message(new Message());
 
     // Copy the data from the base class or classes
-    message->copyDataStructure( this );
+    message->copyDataStructure(this);
 
     return message.release();
 }
 
 ////////////////////////////////////////////////////////////////////////////////
-void Message::copyDataStructure( const DataStructure* src ) {
+void Message::copyDataStructure(const DataStructure* src) {
 
     // Protect against invalid self assignment.
-    if( this == src ) {
+    if (this == src) {
         return;
     }
 
-    const Message* srcPtr = dynamic_cast<const Message*>( src );
+    const Message* srcPtr = dynamic_cast<const Message*>(src);
 
-    if( srcPtr == NULL || src == NULL ) {
+    if (srcPtr == NULL || src == NULL) {
         throw decaf::lang::exceptions::NullPointerException(
             __FILE__, __LINE__,
-            "Message::copyDataStructure - src is NULL or invalid" );
+            "Message::copyDataStructure - src is NULL or invalid");
     }
 
     // Copy the data of the base class or classes
-    BaseCommand::copyDataStructure( src );
+    BaseCommand::copyDataStructure(src);
 
-    this->setProducerId( srcPtr->getProducerId() );
-    this->setDestination( srcPtr->getDestination() );
-    this->setTransactionId( srcPtr->getTransactionId() );
-    this->setOriginalDestination( srcPtr->getOriginalDestination() );
-    this->setMessageId( srcPtr->getMessageId() );
-    this->setOriginalTransactionId( srcPtr->getOriginalTransactionId() );
-    this->setGroupID( srcPtr->getGroupID() );
-    this->setGroupSequence( srcPtr->getGroupSequence() );
-    this->setCorrelationId( srcPtr->getCorrelationId() );
-    this->setPersistent( srcPtr->isPersistent() );
-    this->setExpiration( srcPtr->getExpiration() );
-    this->setPriority( srcPtr->getPriority() );
-    this->setReplyTo( srcPtr->getReplyTo() );
-    this->setTimestamp( srcPtr->getTimestamp() );
-    this->setType( srcPtr->getType() );
-    this->setContent( srcPtr->getContent() );
-    this->setMarshalledProperties( srcPtr->getMarshalledProperties() );
-    this->setDataStructure( srcPtr->getDataStructure() );
-    this->setTargetConsumerId( srcPtr->getTargetConsumerId() );
-    this->setCompressed( srcPtr->isCompressed() );
-    this->setRedeliveryCounter( srcPtr->getRedeliveryCounter() );
-    this->setBrokerPath( srcPtr->getBrokerPath() );
-    this->setArrival( srcPtr->getArrival() );
-    this->setUserID( srcPtr->getUserID() );
-    this->setRecievedByDFBridge( srcPtr->isRecievedByDFBridge() );
-    this->setDroppable( srcPtr->isDroppable() );
-    this->setCluster( srcPtr->getCluster() );
-    this->setBrokerInTime( srcPtr->getBrokerInTime() );
-    this->setBrokerOutTime( srcPtr->getBrokerOutTime() );
-    this->properties.copy( srcPtr->properties );
-    this->setAckHandler( srcPtr->getAckHandler() );
-    this->setReadOnlyBody( srcPtr->isReadOnlyBody() );
-    this->setReadOnlyProperties( srcPtr->isReadOnlyProperties() );
-    this->setConnection( srcPtr->getConnection() );
+    this->setProducerId(srcPtr->getProducerId());
+    this->setDestination(srcPtr->getDestination());
+    this->setTransactionId(srcPtr->getTransactionId());
+    this->setOriginalDestination(srcPtr->getOriginalDestination());
+    this->setMessageId(srcPtr->getMessageId());
+    this->setOriginalTransactionId(srcPtr->getOriginalTransactionId());
+    this->setGroupID(srcPtr->getGroupID());
+    this->setGroupSequence(srcPtr->getGroupSequence());
+    this->setCorrelationId(srcPtr->getCorrelationId());
+    this->setPersistent(srcPtr->isPersistent());
+    this->setExpiration(srcPtr->getExpiration());
+    this->setPriority(srcPtr->getPriority());
+    this->setReplyTo(srcPtr->getReplyTo());
+    this->setTimestamp(srcPtr->getTimestamp());
+    this->setType(srcPtr->getType());
+    this->setContent(srcPtr->getContent());
+    this->setMarshalledProperties(srcPtr->getMarshalledProperties());
+    this->setDataStructure(srcPtr->getDataStructure());
+    this->setTargetConsumerId(srcPtr->getTargetConsumerId());
+    this->setCompressed(srcPtr->isCompressed());
+    this->setRedeliveryCounter(srcPtr->getRedeliveryCounter());
+    this->setBrokerPath(srcPtr->getBrokerPath());
+    this->setArrival(srcPtr->getArrival());
+    this->setUserID(srcPtr->getUserID());
+    this->setRecievedByDFBridge(srcPtr->isRecievedByDFBridge());
+    this->setDroppable(srcPtr->isDroppable());
+    this->setCluster(srcPtr->getCluster());
+    this->setBrokerInTime(srcPtr->getBrokerInTime());
+    this->setBrokerOutTime(srcPtr->getBrokerOutTime());
+    this->properties.copy(srcPtr->properties);
+    this->setAckHandler(srcPtr->getAckHandler());
+    this->setReadOnlyBody(srcPtr->isReadOnlyBody());
+    this->setReadOnlyProperties(srcPtr->isReadOnlyProperties());
+    this->setConnection(srcPtr->getConnection());
 }
 
 ////////////////////////////////////////////////////////////////////////////////
@@ -135,42 +135,42 @@ std::string Message::toString() const {
            << "responseRequired = " << boolalpha << this->isResponseRequired();
     stream << ", ";
     stream << "ProducerId = ";
-    if( this->getProducerId() != NULL ) {
+    if (this->getProducerId() != NULL) {
         stream << this->getProducerId()->toString();
     } else {
         stream << "NULL";
     }
     stream << ", ";
     stream << "Destination = ";
-    if( this->getDestination() != NULL ) {
+    if (this->getDestination() != NULL) {
         stream << this->getDestination()->toString();
     } else {
         stream << "NULL";
     }
     stream << ", ";
     stream << "TransactionId = ";
-    if( this->getTransactionId() != NULL ) {
+    if (this->getTransactionId() != NULL) {
         stream << this->getTransactionId()->toString();
     } else {
         stream << "NULL";
     }
     stream << ", ";
     stream << "OriginalDestination = ";
-    if( this->getOriginalDestination() != NULL ) {
+    if (this->getOriginalDestination() != NULL) {
         stream << this->getOriginalDestination()->toString();
     } else {
         stream << "NULL";
     }
     stream << ", ";
     stream << "MessageId = ";
-    if( this->getMessageId() != NULL ) {
+    if (this->getMessageId() != NULL) {
         stream << this->getMessageId()->toString();
     } else {
         stream << "NULL";
     }
     stream << ", ";
     stream << "OriginalTransactionId = ";
-    if( this->getOriginalTransactionId() != NULL ) {
+    if (this->getOriginalTransactionId() != NULL) {
         stream << this->getOriginalTransactionId()->toString();
     } else {
         stream << "NULL";
@@ -189,7 +189,7 @@ std::string Message::toString() const {
     stream << "Priority = " << (int)this->getPriority();
     stream << ", ";
     stream << "ReplyTo = ";
-    if( this->getReplyTo() != NULL ) {
+    if (this->getReplyTo() != NULL) {
         stream << this->getReplyTo()->toString();
     } else {
         stream << "NULL";
@@ -200,28 +200,28 @@ std::string Message::toString() const {
     stream << "Type = " << this->getType();
     stream << ", ";
     stream << "Content = ";
-    if( this->getContent().size() > 0 ) {
+    if (this->getContent().size() > 0) {
         stream << "[size=" << this->getContent().size() << "]";
     } else {
         stream << "NULL";
     }
     stream << ", ";
     stream << "MarshalledProperties = ";
-    if( this->getMarshalledProperties().size() > 0 ) {
+    if (this->getMarshalledProperties().size() > 0) {
         stream << "[size=" << this->getMarshalledProperties().size() << "]";
     } else {
         stream << "NULL";
     }
     stream << ", ";
     stream << "DataStructure = ";
-    if( this->getDataStructure() != NULL ) {
+    if (this->getDataStructure() != NULL) {
         stream << this->getDataStructure()->toString();
     } else {
         stream << "NULL";
     }
     stream << ", ";
     stream << "TargetConsumerId = ";
-    if( this->getTargetConsumerId() != NULL ) {
+    if (this->getTargetConsumerId() != NULL) {
         stream << this->getTargetConsumerId()->toString();
     } else {
         stream << "NULL";
@@ -232,10 +232,10 @@ std::string Message::toString() const {
     stream << "RedeliveryCounter = " << this->getRedeliveryCounter();
     stream << ", ";
     stream << "BrokerPath = ";
-    if( this->getBrokerPath().size() > 0 ) {
+    if (this->getBrokerPath().size() > 0) {
         stream << "[";
-        for( size_t ibrokerPath = 0; ibrokerPath < this->getBrokerPath().size(); ++ibrokerPath ) {
-            if( this->getBrokerPath()[ibrokerPath] != NULL ) {
+        for (size_t ibrokerPath = 0; ibrokerPath < this->getBrokerPath().size(); ++ibrokerPath) {
+            if (this->getBrokerPath()[ibrokerPath] != NULL) {
                 stream << this->getBrokerPath()[ibrokerPath]->toString() << ", ";
             } else {
                 stream << "NULL" << ", ";
@@ -255,10 +255,10 @@ std::string Message::toString() const {
     stream << "Droppable = " << this->isDroppable();
     stream << ", ";
     stream << "Cluster = ";
-    if( this->getCluster().size() > 0 ) {
+    if (this->getCluster().size() > 0) {
         stream << "[";
-        for( size_t icluster = 0; icluster < this->getCluster().size(); ++icluster ) {
-            if( this->getCluster()[icluster] != NULL ) {
+        for (size_t icluster = 0; icluster < this->getCluster().size(); ++icluster) {
+            if (this->getCluster()[icluster] != NULL) {
                 stream << this->getCluster()[icluster]->toString() << ", ";
             } else {
                 stream << "NULL" << ", ";
@@ -278,174 +278,174 @@ std::string Message::toString() const {
 }
 
 ////////////////////////////////////////////////////////////////////////////////
-bool Message::equals( const DataStructure* value ) const {
+bool Message::equals(const DataStructure* value) const {
 
-    if( this == value ) {
+    if (this == value) {
         return true;
     }
 
-    const Message* valuePtr = dynamic_cast<const Message*>( value );
+    const Message* valuePtr = dynamic_cast<const Message*>(value);
 
-    if( valuePtr == NULL || value == NULL ) {
+    if (valuePtr == NULL || value == NULL) {
         return false;
     }
 
-    if( this->getProducerId() != NULL ) {
-        if( !this->getProducerId()->equals( valuePtr->getProducerId().get() ) ) {
+    if (this->getProducerId() != NULL) {
+        if (!this->getProducerId()->equals( valuePtr->getProducerId().get())) {
             return false;
         }
-    } else if( valuePtr->getProducerId() != NULL ) {
+    } else if (valuePtr->getProducerId() != NULL) {
         return false;
     }
-    if( this->getDestination() != NULL ) {
-        if( !this->getDestination()->equals( valuePtr->getDestination().get() ) ) {
+    if (this->getDestination() != NULL) {
+        if (!this->getDestination()->equals( valuePtr->getDestination().get())) {
             return false;
         }
-    } else if( valuePtr->getDestination() != NULL ) {
+    } else if (valuePtr->getDestination() != NULL) {
         return false;
     }
-    if( this->getTransactionId() != NULL ) {
-        if( !this->getTransactionId()->equals( valuePtr->getTransactionId().get() ) ) {
+    if (this->getTransactionId() != NULL) {
+        if (!this->getTransactionId()->equals( valuePtr->getTransactionId().get())) {
             return false;
         }
-    } else if( valuePtr->getTransactionId() != NULL ) {
+    } else if (valuePtr->getTransactionId() != NULL) {
         return false;
     }
-    if( this->getOriginalDestination() != NULL ) {
-        if( !this->getOriginalDestination()->equals( valuePtr->getOriginalDestination().get() ) ) {
+    if (this->getOriginalDestination() != NULL) {
+        if (!this->getOriginalDestination()->equals( valuePtr->getOriginalDestination().get())) {
             return false;
         }
-    } else if( valuePtr->getOriginalDestination() != NULL ) {
+    } else if (valuePtr->getOriginalDestination() != NULL) {
         return false;
     }
-    if( this->getMessageId() != NULL ) {
-        if( !this->getMessageId()->equals( valuePtr->getMessageId().get() ) ) {
+    if (this->getMessageId() != NULL) {
+        if (!this->getMessageId()->equals( valuePtr->getMessageId().get())) {
             return false;
         }
-    } else if( valuePtr->getMessageId() != NULL ) {
+    } else if (valuePtr->getMessageId() != NULL) {
         return false;
     }
-    if( this->getOriginalTransactionId() != NULL ) {
-        if( !this->getOriginalTransactionId()->equals( valuePtr->getOriginalTransactionId().get() ) ) {
+    if (this->getOriginalTransactionId() != NULL) {
+        if (!this->getOriginalTransactionId()->equals( valuePtr->getOriginalTransactionId().get())) {
             return false;
         }
-    } else if( valuePtr->getOriginalTransactionId() != NULL ) {
+    } else if (valuePtr->getOriginalTransactionId() != NULL) {
         return false;
     }
-    if( this->getGroupID() != valuePtr->getGroupID() ) {
+    if (this->getGroupID() != valuePtr->getGroupID()) {
         return false;
     }
-    if( this->getGroupSequence() != valuePtr->getGroupSequence() ) {
+    if (this->getGroupSequence() != valuePtr->getGroupSequence()) {
         return false;
     }
-    if( this->getCorrelationId() != valuePtr->getCorrelationId() ) {
+    if (this->getCorrelationId() != valuePtr->getCorrelationId()) {
         return false;
     }
-    if( this->isPersistent() != valuePtr->isPersistent() ) {
+    if (this->isPersistent() != valuePtr->isPersistent()) {
         return false;
     }
-    if( this->getExpiration() != valuePtr->getExpiration() ) {
+    if (this->getExpiration() != valuePtr->getExpiration()) {
         return false;
     }
-    if( this->getPriority() != valuePtr->getPriority() ) {
+    if (this->getPriority() != valuePtr->getPriority()) {
         return false;
     }
-    if( this->getReplyTo() != NULL ) {
-        if( !this->getReplyTo()->equals( valuePtr->getReplyTo().get() ) ) {
+    if (this->getReplyTo() != NULL) {
+        if (!this->getReplyTo()->equals( valuePtr->getReplyTo().get())) {
             return false;
         }
-    } else if( valuePtr->getReplyTo() != NULL ) {
+    } else if (valuePtr->getReplyTo() != NULL) {
         return false;
     }
-    if( this->getTimestamp() != valuePtr->getTimestamp() ) {
+    if (this->getTimestamp() != valuePtr->getTimestamp()) {
         return false;
     }
-    if( this->getType() != valuePtr->getType() ) {
+    if (this->getType() != valuePtr->getType()) {
         return false;
     }
-    for( size_t icontent = 0; icontent < this->getContent().size(); ++icontent ) {
-        if( this->getContent()[icontent] != valuePtr->getContent()[icontent] ) {
+    for (size_t icontent = 0; icontent < this->getContent().size(); ++icontent) {
+        if (this->getContent()[icontent] != valuePtr->getContent()[icontent]) {
             return false;
         }
     }
-    for( size_t imarshalledProperties = 0; imarshalledProperties < this->getMarshalledProperties().size(); ++imarshalledProperties ) {
-        if( this->getMarshalledProperties()[imarshalledProperties] != valuePtr->getMarshalledProperties()[imarshalledProperties] ) {
+    for (size_t imarshalledProperties = 0; imarshalledProperties < this->getMarshalledProperties().size(); ++imarshalledProperties) {
+        if (this->getMarshalledProperties()[imarshalledProperties] != valuePtr->getMarshalledProperties()[imarshalledProperties]) {
             return false;
         }
     }
-    if( this->getDataStructure() != NULL ) {
-        if( !this->getDataStructure()->equals( valuePtr->getDataStructure().get() ) ) {
+    if (this->getDataStructure() != NULL) {
+        if (!this->getDataStructure()->equals( valuePtr->getDataStructure().get())) {
             return false;
         }
-    } else if( valuePtr->getDataStructure() != NULL ) {
+    } else if (valuePtr->getDataStructure() != NULL) {
         return false;
     }
-    if( this->getTargetConsumerId() != NULL ) {
-        if( !this->getTargetConsumerId()->equals( valuePtr->getTargetConsumerId().get() ) ) {
+    if (this->getTargetConsumerId() != NULL) {
+        if (!this->getTargetConsumerId()->equals( valuePtr->getTargetConsumerId().get())) {
             return false;
         }
-    } else if( valuePtr->getTargetConsumerId() != NULL ) {
+    } else if (valuePtr->getTargetConsumerId() != NULL) {
         return false;
     }
-    if( this->isCompressed() != valuePtr->isCompressed() ) {
+    if (this->isCompressed() != valuePtr->isCompressed()) {
         return false;
     }
-    if( this->getRedeliveryCounter() != valuePtr->getRedeliveryCounter() ) {
+    if (this->getRedeliveryCounter() != valuePtr->getRedeliveryCounter()) {
         return false;
     }
-    for( size_t ibrokerPath = 0; ibrokerPath < this->getBrokerPath().size(); ++ibrokerPath ) {
-        if( this->getBrokerPath()[ibrokerPath] != NULL ) {
-            if( !this->getBrokerPath()[ibrokerPath]->equals( valuePtr->getBrokerPath()[ibrokerPath].get() ) ) {
+    for (size_t ibrokerPath = 0; ibrokerPath < this->getBrokerPath().size(); ++ibrokerPath) {
+        if (this->getBrokerPath()[ibrokerPath] != NULL ) {
+            if (!this->getBrokerPath()[ibrokerPath]->equals( valuePtr->getBrokerPath()[ibrokerPath].get())) {
                 return false;
             }
-        } else if( valuePtr->getBrokerPath()[ibrokerPath] != NULL ) {
+        } else if (valuePtr->getBrokerPath()[ibrokerPath] != NULL) {
             return false;
         }
     }
-    if( this->getArrival() != valuePtr->getArrival() ) {
+    if (this->getArrival() != valuePtr->getArrival()) {
         return false;
     }
-    if( this->getUserID() != valuePtr->getUserID() ) {
+    if (this->getUserID() != valuePtr->getUserID()) {
         return false;
     }
-    if( this->isRecievedByDFBridge() != valuePtr->isRecievedByDFBridge() ) {
+    if (this->isRecievedByDFBridge() != valuePtr->isRecievedByDFBridge()) {
         return false;
     }
-    if( this->isDroppable() != valuePtr->isDroppable() ) {
+    if (this->isDroppable() != valuePtr->isDroppable()) {
         return false;
     }
-    for( size_t icluster = 0; icluster < this->getCluster().size(); ++icluster ) {
-        if( this->getCluster()[icluster] != NULL ) {
-            if( !this->getCluster()[icluster]->equals( valuePtr->getCluster()[icluster].get() ) ) {
+    for (size_t icluster = 0; icluster < this->getCluster().size(); ++icluster) {
+        if (this->getCluster()[icluster] != NULL ) {
+            if (!this->getCluster()[icluster]->equals( valuePtr->getCluster()[icluster].get())) {
                 return false;
             }
-        } else if( valuePtr->getCluster()[icluster] != NULL ) {
+        } else if (valuePtr->getCluster()[icluster] != NULL) {
             return false;
         }
     }
-    if( this->getBrokerInTime() != valuePtr->getBrokerInTime() ) {
+    if (this->getBrokerInTime() != valuePtr->getBrokerInTime()) {
         return false;
     }
-    if( this->getBrokerOutTime() != valuePtr->getBrokerOutTime() ) {
+    if (this->getBrokerOutTime() != valuePtr->getBrokerOutTime()) {
         return false;
     }
-    if( ackHandler != valuePtr->getAckHandler() ){
+    if (ackHandler != valuePtr->getAckHandler()){
         return false;
     }
 
-    if( !properties.equals( valuePtr->properties ) ) {
+    if (!properties.equals(valuePtr->properties)) {
         return false;
     }
 
-    if( readOnlyBody != valuePtr->isReadOnlyBody() ){
+    if (readOnlyBody != valuePtr->isReadOnlyBody()){
         return false;
     }
 
-    if( readOnlyProperties != valuePtr->isReadOnlyProperties() ){
+    if (readOnlyProperties != valuePtr->isReadOnlyProperties()){
         return false;
     }
 
-    if( !BaseCommand::equals( value ) ) {
+    if (!BaseCommand::equals(value)) {
         return false;
     }
     return true;
@@ -462,7 +462,7 @@ decaf::lang::Pointer<ProducerId>& Messag
 }
 
 ////////////////////////////////////////////////////////////////////////////////
-void Message::setProducerId( const decaf::lang::Pointer<ProducerId>& producerId ) {
+void Message::setProducerId(const decaf::lang::Pointer<ProducerId>& producerId) {
     this->producerId = producerId;
 }
 
@@ -477,7 +477,7 @@ decaf::lang::Pointer<ActiveMQDestination
 }
 
 ////////////////////////////////////////////////////////////////////////////////
-void Message::setDestination( const decaf::lang::Pointer<ActiveMQDestination>& destination ) {
+void Message::setDestination(const decaf::lang::Pointer<ActiveMQDestination>& destination) {
     this->destination = destination;
 }
 
@@ -492,7 +492,7 @@ decaf::lang::Pointer<TransactionId>& Mes
 }
 
 ////////////////////////////////////////////////////////////////////////////////
-void Message::setTransactionId( const decaf::lang::Pointer<TransactionId>& transactionId ) {
+void Message::setTransactionId(const decaf::lang::Pointer<TransactionId>& transactionId) {
     this->transactionId = transactionId;
 }
 
@@ -507,7 +507,7 @@ decaf::lang::Pointer<ActiveMQDestination
 }
 
 ////////////////////////////////////////////////////////////////////////////////
-void Message::setOriginalDestination( const decaf::lang::Pointer<ActiveMQDestination>& originalDestination ) {
+void Message::setOriginalDestination(const decaf::lang::Pointer<ActiveMQDestination>& originalDestination) {
     this->originalDestination = originalDestination;
 }
 
@@ -522,7 +522,7 @@ decaf::lang::Pointer<MessageId>& Message
 }
 
 ////////////////////////////////////////////////////////////////////////////////
-void Message::setMessageId( const decaf::lang::Pointer<MessageId>& messageId ) {
+void Message::setMessageId(const decaf::lang::Pointer<MessageId>& messageId) {
     this->messageId = messageId;
 }
 
@@ -537,7 +537,7 @@ decaf::lang::Pointer<TransactionId>& Mes
 }
 
 ////////////////////////////////////////////////////////////////////////////////
-void Message::setOriginalTransactionId( const decaf::lang::Pointer<TransactionId>& originalTransactionId ) {
+void Message::setOriginalTransactionId(const decaf::lang::Pointer<TransactionId>& originalTransactionId) {
     this->originalTransactionId = originalTransactionId;
 }
 
@@ -552,7 +552,7 @@ std::string& Message::getGroupID() {
 }
 
 ////////////////////////////////////////////////////////////////////////////////
-void Message::setGroupID( const std::string& groupID ) {
+void Message::setGroupID(const std::string& groupID) {
     this->groupID = groupID;
 }
 
@@ -562,7 +562,7 @@ int Message::getGroupSequence() const {
 }
 
 ////////////////////////////////////////////////////////////////////////////////
-void Message::setGroupSequence( int groupSequence ) {
+void Message::setGroupSequence(int groupSequence) {
     this->groupSequence = groupSequence;
 }
 
@@ -577,7 +577,7 @@ std::string& Message::getCorrelationId()
 }
 
 ////////////////////////////////////////////////////////////////////////////////
-void Message::setCorrelationId( const std::string& correlationId ) {
+void Message::setCorrelationId(const std::string& correlationId) {
     this->correlationId = correlationId;
 }
 
@@ -587,7 +587,7 @@ bool Message::isPersistent() const {
 }
 
 ////////////////////////////////////////////////////////////////////////////////
-void Message::setPersistent( bool persistent ) {
+void Message::setPersistent(bool persistent) {
     this->persistent = persistent;
 }
 
@@ -597,7 +597,7 @@ long long Message::getExpiration() const
 }
 
 ////////////////////////////////////////////////////////////////////////////////
-void Message::setExpiration( long long expiration ) {
+void Message::setExpiration(long long expiration) {
     this->expiration = expiration;
 }
 
@@ -607,7 +607,7 @@ unsigned char Message::getPriority() con
 }
 
 ////////////////////////////////////////////////////////////////////////////////
-void Message::setPriority( unsigned char priority ) {
+void Message::setPriority(unsigned char priority) {
     this->priority = priority;
 }
 
@@ -622,7 +622,7 @@ decaf::lang::Pointer<ActiveMQDestination
 }
 
 ////////////////////////////////////////////////////////////////////////////////
-void Message::setReplyTo( const decaf::lang::Pointer<ActiveMQDestination>& replyTo ) {
+void Message::setReplyTo(const decaf::lang::Pointer<ActiveMQDestination>& replyTo) {
     this->replyTo = replyTo;
 }
 
@@ -632,7 +632,7 @@ long long Message::getTimestamp() const 
 }
 
 ////////////////////////////////////////////////////////////////////////////////
-void Message::setTimestamp( long long timestamp ) {
+void Message::setTimestamp(long long timestamp) {
     this->timestamp = timestamp;
 }
 
@@ -647,7 +647,7 @@ std::string& Message::getType() {
 }
 
 ////////////////////////////////////////////////////////////////////////////////
-void Message::setType( const std::string& type ) {
+void Message::setType(const std::string& type) {
     this->type = type;
 }
 
@@ -662,7 +662,7 @@ std::vector<unsigned char>& Message::get
 }
 
 ////////////////////////////////////////////////////////////////////////////////
-void Message::setContent( const std::vector<unsigned char>& content ) {
+void Message::setContent(const std::vector<unsigned char>& content) {
     this->content = content;
 }
 
@@ -677,7 +677,7 @@ std::vector<unsigned char>& Message::get
 }
 
 ////////////////////////////////////////////////////////////////////////////////
-void Message::setMarshalledProperties( const std::vector<unsigned char>& marshalledProperties ) {
+void Message::setMarshalledProperties(const std::vector<unsigned char>& marshalledProperties) {
     this->marshalledProperties = marshalledProperties;
 }
 
@@ -692,7 +692,7 @@ decaf::lang::Pointer<DataStructure>& Mes
 }
 
 ////////////////////////////////////////////////////////////////////////////////
-void Message::setDataStructure( const decaf::lang::Pointer<DataStructure>& dataStructure ) {
+void Message::setDataStructure(const decaf::lang::Pointer<DataStructure>& dataStructure) {
     this->dataStructure = dataStructure;
 }
 
@@ -707,7 +707,7 @@ decaf::lang::Pointer<ConsumerId>& Messag
 }
 
 ////////////////////////////////////////////////////////////////////////////////
-void Message::setTargetConsumerId( const decaf::lang::Pointer<ConsumerId>& targetConsumerId ) {
+void Message::setTargetConsumerId(const decaf::lang::Pointer<ConsumerId>& targetConsumerId) {
     this->targetConsumerId = targetConsumerId;
 }
 
@@ -717,7 +717,7 @@ bool Message::isCompressed() const {
 }
 
 ////////////////////////////////////////////////////////////////////////////////
-void Message::setCompressed( bool compressed ) {
+void Message::setCompressed(bool compressed) {
     this->compressed = compressed;
 }
 
@@ -727,7 +727,7 @@ int Message::getRedeliveryCounter() cons
 }
 
 ////////////////////////////////////////////////////////////////////////////////
-void Message::setRedeliveryCounter( int redeliveryCounter ) {
+void Message::setRedeliveryCounter(int redeliveryCounter) {
     this->redeliveryCounter = redeliveryCounter;
 }
 
@@ -742,7 +742,7 @@ std::vector< decaf::lang::Pointer<Broker
 }
 
 ////////////////////////////////////////////////////////////////////////////////
-void Message::setBrokerPath( const std::vector< decaf::lang::Pointer<BrokerId> >& brokerPath ) {
+void Message::setBrokerPath(const std::vector< decaf::lang::Pointer<BrokerId> >& brokerPath) {
     this->brokerPath = brokerPath;
 }
 
@@ -752,7 +752,7 @@ long long Message::getArrival() const {
 }
 
 ////////////////////////////////////////////////////////////////////////////////
-void Message::setArrival( long long arrival ) {
+void Message::setArrival(long long arrival) {
     this->arrival = arrival;
 }
 
@@ -767,7 +767,7 @@ std::string& Message::getUserID() {
 }
 
 ////////////////////////////////////////////////////////////////////////////////
-void Message::setUserID( const std::string& userID ) {
+void Message::setUserID(const std::string& userID) {
     this->userID = userID;
 }
 
@@ -777,7 +777,7 @@ bool Message::isRecievedByDFBridge() con
 }
 
 ////////////////////////////////////////////////////////////////////////////////
-void Message::setRecievedByDFBridge( bool recievedByDFBridge ) {
+void Message::setRecievedByDFBridge(bool recievedByDFBridge) {
     this->recievedByDFBridge = recievedByDFBridge;
 }
 
@@ -787,7 +787,7 @@ bool Message::isDroppable() const {
 }
 
 ////////////////////////////////////////////////////////////////////////////////
-void Message::setDroppable( bool droppable ) {
+void Message::setDroppable(bool droppable) {
     this->droppable = droppable;
 }
 
@@ -802,7 +802,7 @@ std::vector< decaf::lang::Pointer<Broker
 }
 
 ////////////////////////////////////////////////////////////////////////////////
-void Message::setCluster( const std::vector< decaf::lang::Pointer<BrokerId> >& cluster ) {
+void Message::setCluster(const std::vector< decaf::lang::Pointer<BrokerId> >& cluster) {
     this->cluster = cluster;
 }
 
@@ -812,7 +812,7 @@ long long Message::getBrokerInTime() con
 }
 
 ////////////////////////////////////////////////////////////////////////////////
-void Message::setBrokerInTime( long long brokerInTime ) {
+void Message::setBrokerInTime(long long brokerInTime) {
     this->brokerInTime = brokerInTime;
 }
 
@@ -822,21 +822,20 @@ long long Message::getBrokerOutTime() co
 }
 
 ////////////////////////////////////////////////////////////////////////////////
-void Message::setBrokerOutTime( long long brokerOutTime ) {
+void Message::setBrokerOutTime(long long brokerOutTime) {
     this->brokerOutTime = brokerOutTime;
 }
 
 ////////////////////////////////////////////////////////////////////////////////
-decaf::lang::Pointer<commands::Command> Message::visit( activemq::state::CommandVisitor* visitor ) {
-
-    return visitor->processMessage( this );
+decaf::lang::Pointer<commands::Command> Message::visit(activemq::state::CommandVisitor* visitor) {
+    return visitor->processMessage(this);
 }
 
 ////////////////////////////////////////////////////////////////////////////////
 bool Message::isExpired() const {
     long long expireTime = this->getExpiration();
     long long currentTime = decaf::lang::System::currentTimeMillis();
-    if( expireTime > 0 && currentTime > expireTime ) {
+    if (expireTime > 0 && currentTime > expireTime) {
         return true;
     }
     return false;
@@ -854,31 +853,29 @@ unsigned int Message::getSize() const {
 }
 
 ////////////////////////////////////////////////////////////////////////////////
-void Message::beforeMarshal( wireformat::WireFormat* wireFormat AMQCPP_UNUSED ) {
-
-    try{
+void Message::beforeMarshal(wireformat::WireFormat* wireFormat AMQCPP_UNUSED) {
 
+    try {
         marshalledProperties.clear();
-        if( !properties.isEmpty() ) {
+        if (!properties.isEmpty()) {
             wireformat::openwire::marshal::PrimitiveTypesMarshaller::marshal(
                 &properties, marshalledProperties );
         }
     }
-    AMQ_CATCH_RETHROW( decaf::io::IOException )
-    AMQ_CATCH_EXCEPTION_CONVERT( decaf::lang::Exception, decaf::io::IOException )
-    AMQ_CATCHALL_THROW( decaf::io::IOException )
+    AMQ_CATCH_RETHROW(decaf::io::IOException)
+    AMQ_CATCH_EXCEPTION_CONVERT(decaf::lang::Exception, decaf::io::IOException)
+    AMQ_CATCHALL_THROW(decaf::io::IOException)
 }
 
 ////////////////////////////////////////////////////////////////////////////////
-void Message::afterUnmarshal( wireformat::WireFormat* wireFormat AMQCPP_UNUSED ) {
-
-    try{
+void Message::afterUnmarshal(wireformat::WireFormat* wireFormat AMQCPP_UNUSED) {
 
+    try {
         wireformat::openwire::marshal::PrimitiveTypesMarshaller::unmarshal(
-            &properties, marshalledProperties );
+            &properties, marshalledProperties);
     }
-    AMQ_CATCH_RETHROW( decaf::io::IOException )
-    AMQ_CATCH_EXCEPTION_CONVERT( decaf::lang::Exception, decaf::io::IOException )
-    AMQ_CATCHALL_THROW( decaf::io::IOException )
+    AMQ_CATCH_RETHROW(decaf::io::IOException)
+    AMQ_CATCH_EXCEPTION_CONVERT(decaf::lang::Exception, decaf::io::IOException)
+    AMQ_CATCHALL_THROW(decaf::io::IOException)
 }
 

Modified: activemq/activemq-cpp/trunk/activemq-cpp/src/main/activemq/commands/Message.h
URL: http://svn.apache.org/viewvc/activemq/activemq-cpp/trunk/activemq-cpp/src/main/activemq/commands/Message.h?rev=1460467&r1=1460466&r2=1460467&view=diff
==============================================================================
--- activemq/activemq-cpp/trunk/activemq-cpp/src/main/activemq/commands/Message.h (original)
+++ activemq/activemq-cpp/trunk/activemq-cpp/src/main/activemq/commands/Message.h Sun Mar 24 21:30:52 2013
@@ -117,8 +117,8 @@ namespace commands{
 
     private:
 
-        Message( const Message& );
-        Message& operator= ( const Message& );
+        Message(const Message&);
+        Message& operator= (const Message&);
 
     public:
 
@@ -130,11 +130,11 @@ namespace commands{
 
         virtual Message* cloneDataStructure() const;
 
-        virtual void copyDataStructure( const DataStructure* src );
+        virtual void copyDataStructure(const DataStructure* src);
 
         virtual std::string toString() const;
 
-        virtual bool equals( const DataStructure* value ) const;
+        virtual bool equals(const DataStructure* value) const;
 
         /**
          * Create a Pointer based copy of this message.  Useful for chaining a clone
@@ -154,14 +154,14 @@ namespace commands{
          * wire
          * @param wireFormat - the wireformat controller
          */
-        virtual void beforeMarshal( wireformat::WireFormat* wireFormat AMQCPP_UNUSED );
+        virtual void beforeMarshal(wireformat::WireFormat* wireFormat AMQCPP_UNUSED);
 
         /**
          * Called after unmarshaling is started to cleanup the object being
          * unmarshaled.
          * @param wireFormat - the wireformat object to control unmarshaling
          */
-        virtual void afterUnmarshal( wireformat::WireFormat* wireFormat AMQCPP_UNUSED );
+        virtual void afterUnmarshal(wireformat::WireFormat* wireFormat AMQCPP_UNUSED);
 
         /**
          * Indicates that this command is aware of Marshaling, and needs
@@ -177,7 +177,7 @@ namespace commands{
          * when the Acknowledge method is called.
          * @param handler ActiveMQAckHandler to call
          */
-        virtual void setAckHandler( const Pointer<core::ActiveMQAckHandler>& handler ) {
+        virtual void setAckHandler(const Pointer<core::ActiveMQAckHandler>& handler) {
             this->ackHandler = handler;
         }
 
@@ -195,7 +195,7 @@ namespace commands{
          * when the session create methods are called to create a Message..
          * @param handler ActiveMQConnection parent for this message
          */
-        void setConnection( core::ActiveMQConnection* connection ) {
+        void setConnection(core::ActiveMQConnection* connection) {
             this->connection = connection;
         }
 
@@ -251,7 +251,7 @@ namespace commands{
          * Set the Read Only State of the Message Properties.
          * @param value - true if Properties should be read only.
          */
-        void setReadOnlyProperties( bool value ) {
+        void setReadOnlyProperties(bool value) {
             this->readOnlyProperties = value;
         }
 
@@ -267,7 +267,7 @@ namespace commands{
          * Set the Read Only State of the Message Content.
          * @param value - true if Content should be read only.
          */
-        void setReadOnlyBody( bool value ) {
+        void setReadOnlyBody(bool value) {
             this->readOnlyBody = value;
         }
 
@@ -382,7 +382,7 @@ namespace commands{
             return true;
         }
 
-        virtual Pointer<Command> visit( activemq::state::CommandVisitor* visitor );
+        virtual Pointer<Command> visit(activemq::state::CommandVisitor* visitor);
 
     };
 

Modified: activemq/activemq-cpp/trunk/activemq-cpp/src/main/activemq/commands/MessageAck.cpp
URL: http://svn.apache.org/viewvc/activemq/activemq-cpp/trunk/activemq-cpp/src/main/activemq/commands/MessageAck.cpp?rev=1460467&r1=1460466&r2=1460467&view=diff
==============================================================================
--- activemq/activemq-cpp/trunk/activemq-cpp/src/main/activemq/commands/MessageAck.cpp (original)
+++ activemq/activemq-cpp/trunk/activemq-cpp/src/main/activemq/commands/MessageAck.cpp Sun Mar 24 21:30:52 2013
@@ -38,8 +38,8 @@ using namespace decaf::lang::exceptions;
  */
 
 ////////////////////////////////////////////////////////////////////////////////
-MessageAck::MessageAck() 
-    : BaseCommand(), destination(NULL), transactionId(NULL), consumerId(NULL), ackType(0), firstMessageId(NULL), lastMessageId(NULL), 
+MessageAck::MessageAck() :
+    BaseCommand(), destination(NULL), transactionId(NULL), consumerId(NULL), ackType(0), firstMessageId(NULL), lastMessageId(NULL), 
       messageCount(0), poisonCause(NULL) {
 
 }
@@ -50,41 +50,41 @@ MessageAck::~MessageAck() {
 
 ////////////////////////////////////////////////////////////////////////////////
 MessageAck* MessageAck::cloneDataStructure() const {
-    std::auto_ptr<MessageAck> messageAck( new MessageAck() );
+    std::auto_ptr<MessageAck> messageAck(new MessageAck());
 
     // Copy the data from the base class or classes
-    messageAck->copyDataStructure( this );
+    messageAck->copyDataStructure(this);
 
     return messageAck.release();
 }
 
 ////////////////////////////////////////////////////////////////////////////////
-void MessageAck::copyDataStructure( const DataStructure* src ) {
+void MessageAck::copyDataStructure(const DataStructure* src) {
 
     // Protect against invalid self assignment.
-    if( this == src ) {
+    if (this == src) {
         return;
     }
 
-    const MessageAck* srcPtr = dynamic_cast<const MessageAck*>( src );
+    const MessageAck* srcPtr = dynamic_cast<const MessageAck*>(src);
 
-    if( srcPtr == NULL || src == NULL ) {
+    if (srcPtr == NULL || src == NULL) {
         throw decaf::lang::exceptions::NullPointerException(
             __FILE__, __LINE__,
-            "MessageAck::copyDataStructure - src is NULL or invalid" );
+            "MessageAck::copyDataStructure - src is NULL or invalid");
     }
 
     // Copy the data of the base class or classes
-    BaseCommand::copyDataStructure( src );
+    BaseCommand::copyDataStructure(src);
 
-    this->setDestination( srcPtr->getDestination() );
-    this->setTransactionId( srcPtr->getTransactionId() );
-    this->setConsumerId( srcPtr->getConsumerId() );
-    this->setAckType( srcPtr->getAckType() );
-    this->setFirstMessageId( srcPtr->getFirstMessageId() );
-    this->setLastMessageId( srcPtr->getLastMessageId() );
-    this->setMessageCount( srcPtr->getMessageCount() );
-    this->setPoisonCause( srcPtr->getPoisonCause() );
+    this->setDestination(srcPtr->getDestination());
+    this->setTransactionId(srcPtr->getTransactionId());
+    this->setConsumerId(srcPtr->getConsumerId());
+    this->setAckType(srcPtr->getAckType());
+    this->setFirstMessageId(srcPtr->getFirstMessageId());
+    this->setLastMessageId(srcPtr->getLastMessageId());
+    this->setMessageCount(srcPtr->getMessageCount());
+    this->setPoisonCause(srcPtr->getPoisonCause());
 }
 
 ////////////////////////////////////////////////////////////////////////////////
@@ -102,21 +102,21 @@ std::string MessageAck::toString() const
            << "responseRequired = " << boolalpha << this->isResponseRequired();
     stream << ", ";
     stream << "Destination = ";
-    if( this->getDestination() != NULL ) {
+    if (this->getDestination() != NULL) {
         stream << this->getDestination()->toString();
     } else {
         stream << "NULL";
     }
     stream << ", ";
     stream << "TransactionId = ";
-    if( this->getTransactionId() != NULL ) {
+    if (this->getTransactionId() != NULL) {
         stream << this->getTransactionId()->toString();
     } else {
         stream << "NULL";
     }
     stream << ", ";
     stream << "ConsumerId = ";
-    if( this->getConsumerId() != NULL ) {
+    if (this->getConsumerId() != NULL) {
         stream << this->getConsumerId()->toString();
     } else {
         stream << "NULL";
@@ -125,14 +125,14 @@ std::string MessageAck::toString() const
     stream << "AckType = " << (int)this->getAckType();
     stream << ", ";
     stream << "FirstMessageId = ";
-    if( this->getFirstMessageId() != NULL ) {
+    if (this->getFirstMessageId() != NULL) {
         stream << this->getFirstMessageId()->toString();
     } else {
         stream << "NULL";
     }
     stream << ", ";
     stream << "LastMessageId = ";
-    if( this->getLastMessageId() != NULL ) {
+    if (this->getLastMessageId() != NULL) {
         stream << this->getLastMessageId()->toString();
     } else {
         stream << "NULL";
@@ -141,7 +141,7 @@ std::string MessageAck::toString() const
     stream << "MessageCount = " << this->getMessageCount();
     stream << ", ";
     stream << "PoisonCause = ";
-    if( this->getPoisonCause() != NULL ) {
+    if (this->getPoisonCause() != NULL) {
         stream << this->getPoisonCause()->toString();
     } else {
         stream << "NULL";
@@ -152,67 +152,67 @@ std::string MessageAck::toString() const
 }
 
 ////////////////////////////////////////////////////////////////////////////////
-bool MessageAck::equals( const DataStructure* value ) const {
+bool MessageAck::equals(const DataStructure* value) const {
 
-    if( this == value ) {
+    if (this == value) {
         return true;
     }
 
-    const MessageAck* valuePtr = dynamic_cast<const MessageAck*>( value );
+    const MessageAck* valuePtr = dynamic_cast<const MessageAck*>(value);
 
-    if( valuePtr == NULL || value == NULL ) {
+    if (valuePtr == NULL || value == NULL) {
         return false;
     }
 
-    if( this->getDestination() != NULL ) {
-        if( !this->getDestination()->equals( valuePtr->getDestination().get() ) ) {
+    if (this->getDestination() != NULL) {
+        if (!this->getDestination()->equals( valuePtr->getDestination().get())) {
             return false;
         }
-    } else if( valuePtr->getDestination() != NULL ) {
+    } else if (valuePtr->getDestination() != NULL) {
         return false;
     }
-    if( this->getTransactionId() != NULL ) {
-        if( !this->getTransactionId()->equals( valuePtr->getTransactionId().get() ) ) {
+    if (this->getTransactionId() != NULL) {
+        if (!this->getTransactionId()->equals( valuePtr->getTransactionId().get())) {
             return false;
         }
-    } else if( valuePtr->getTransactionId() != NULL ) {
+    } else if (valuePtr->getTransactionId() != NULL) {
         return false;
     }
-    if( this->getConsumerId() != NULL ) {
-        if( !this->getConsumerId()->equals( valuePtr->getConsumerId().get() ) ) {
+    if (this->getConsumerId() != NULL) {
+        if (!this->getConsumerId()->equals( valuePtr->getConsumerId().get())) {
             return false;
         }
-    } else if( valuePtr->getConsumerId() != NULL ) {
+    } else if (valuePtr->getConsumerId() != NULL) {
         return false;
     }
-    if( this->getAckType() != valuePtr->getAckType() ) {
+    if (this->getAckType() != valuePtr->getAckType()) {
         return false;
     }
-    if( this->getFirstMessageId() != NULL ) {
-        if( !this->getFirstMessageId()->equals( valuePtr->getFirstMessageId().get() ) ) {
+    if (this->getFirstMessageId() != NULL) {
+        if (!this->getFirstMessageId()->equals( valuePtr->getFirstMessageId().get())) {
             return false;
         }
-    } else if( valuePtr->getFirstMessageId() != NULL ) {
+    } else if (valuePtr->getFirstMessageId() != NULL) {
         return false;
     }
-    if( this->getLastMessageId() != NULL ) {
-        if( !this->getLastMessageId()->equals( valuePtr->getLastMessageId().get() ) ) {
+    if (this->getLastMessageId() != NULL) {
+        if (!this->getLastMessageId()->equals( valuePtr->getLastMessageId().get())) {
             return false;
         }
-    } else if( valuePtr->getLastMessageId() != NULL ) {
+    } else if (valuePtr->getLastMessageId() != NULL) {
         return false;
     }
-    if( this->getMessageCount() != valuePtr->getMessageCount() ) {
+    if (this->getMessageCount() != valuePtr->getMessageCount()) {
         return false;
     }
-    if( this->getPoisonCause() != NULL ) {
-        if( !this->getPoisonCause()->equals( valuePtr->getPoisonCause().get() ) ) {
+    if (this->getPoisonCause() != NULL) {
+        if (!this->getPoisonCause()->equals( valuePtr->getPoisonCause().get())) {
             return false;
         }
-    } else if( valuePtr->getPoisonCause() != NULL ) {
+    } else if (valuePtr->getPoisonCause() != NULL) {
         return false;
     }
-    if( !BaseCommand::equals( value ) ) {
+    if (!BaseCommand::equals(value)) {
         return false;
     }
     return true;
@@ -229,7 +229,7 @@ decaf::lang::Pointer<ActiveMQDestination
 }
 
 ////////////////////////////////////////////////////////////////////////////////
-void MessageAck::setDestination( const decaf::lang::Pointer<ActiveMQDestination>& destination ) {
+void MessageAck::setDestination(const decaf::lang::Pointer<ActiveMQDestination>& destination) {
     this->destination = destination;
 }
 
@@ -244,7 +244,7 @@ decaf::lang::Pointer<TransactionId>& Mes
 }
 
 ////////////////////////////////////////////////////////////////////////////////
-void MessageAck::setTransactionId( const decaf::lang::Pointer<TransactionId>& transactionId ) {
+void MessageAck::setTransactionId(const decaf::lang::Pointer<TransactionId>& transactionId) {
     this->transactionId = transactionId;
 }
 
@@ -259,7 +259,7 @@ decaf::lang::Pointer<ConsumerId>& Messag
 }
 
 ////////////////////////////////////////////////////////////////////////////////
-void MessageAck::setConsumerId( const decaf::lang::Pointer<ConsumerId>& consumerId ) {
+void MessageAck::setConsumerId(const decaf::lang::Pointer<ConsumerId>& consumerId) {
     this->consumerId = consumerId;
 }
 
@@ -269,7 +269,7 @@ unsigned char MessageAck::getAckType() c
 }
 
 ////////////////////////////////////////////////////////////////////////////////
-void MessageAck::setAckType( unsigned char ackType ) {
+void MessageAck::setAckType(unsigned char ackType) {
     this->ackType = ackType;
 }
 
@@ -284,7 +284,7 @@ decaf::lang::Pointer<MessageId>& Message
 }
 
 ////////////////////////////////////////////////////////////////////////////////
-void MessageAck::setFirstMessageId( const decaf::lang::Pointer<MessageId>& firstMessageId ) {
+void MessageAck::setFirstMessageId(const decaf::lang::Pointer<MessageId>& firstMessageId) {
     this->firstMessageId = firstMessageId;
 }
 
@@ -299,7 +299,7 @@ decaf::lang::Pointer<MessageId>& Message
 }
 
 ////////////////////////////////////////////////////////////////////////////////
-void MessageAck::setLastMessageId( const decaf::lang::Pointer<MessageId>& lastMessageId ) {
+void MessageAck::setLastMessageId(const decaf::lang::Pointer<MessageId>& lastMessageId) {
     this->lastMessageId = lastMessageId;
 }
 
@@ -309,7 +309,7 @@ int MessageAck::getMessageCount() const 
 }
 
 ////////////////////////////////////////////////////////////////////////////////
-void MessageAck::setMessageCount( int messageCount ) {
+void MessageAck::setMessageCount(int messageCount) {
     this->messageCount = messageCount;
 }
 
@@ -324,12 +324,11 @@ decaf::lang::Pointer<BrokerError>& Messa
 }
 
 ////////////////////////////////////////////////////////////////////////////////
-void MessageAck::setPoisonCause( const decaf::lang::Pointer<BrokerError>& poisonCause ) {
+void MessageAck::setPoisonCause(const decaf::lang::Pointer<BrokerError>& poisonCause) {
     this->poisonCause = poisonCause;
 }
 
 ////////////////////////////////////////////////////////////////////////////////
-decaf::lang::Pointer<commands::Command> MessageAck::visit( activemq::state::CommandVisitor* visitor ) {
-
-    return visitor->processMessageAck( this );
+decaf::lang::Pointer<commands::Command> MessageAck::visit(activemq::state::CommandVisitor* visitor) {
+    return visitor->processMessageAck(this);
 }

Modified: activemq/activemq-cpp/trunk/activemq-cpp/src/main/activemq/commands/MessageAck.h
URL: http://svn.apache.org/viewvc/activemq/activemq-cpp/trunk/activemq-cpp/src/main/activemq/commands/MessageAck.h?rev=1460467&r1=1460466&r2=1460467&view=diff
==============================================================================
--- activemq/activemq-cpp/trunk/activemq-cpp/src/main/activemq/commands/MessageAck.h (original)
+++ activemq/activemq-cpp/trunk/activemq-cpp/src/main/activemq/commands/MessageAck.h Sun Mar 24 21:30:52 2013
@@ -34,8 +34,8 @@
 #include <string>
 #include <vector>
 
-namespace activemq{
-namespace commands{
+namespace activemq {
+namespace commands {
 
     using decaf::lang::Pointer;
 
@@ -66,8 +66,8 @@ namespace commands{
 
     private:
 
-        MessageAck( const MessageAck& );
-        MessageAck& operator= ( const MessageAck& );
+        MessageAck(const MessageAck&);
+        MessageAck& operator= (const MessageAck&);
 
     public:
 
@@ -79,11 +79,11 @@ namespace commands{
 
         virtual MessageAck* cloneDataStructure() const;
 
-        virtual void copyDataStructure( const DataStructure* src );
+        virtual void copyDataStructure(const DataStructure* src);
 
         virtual std::string toString() const;
 
-        virtual bool equals( const DataStructure* value ) const;
+        virtual bool equals(const DataStructure* value) const;
 
         virtual const Pointer<ActiveMQDestination>& getDestination() const;
         virtual Pointer<ActiveMQDestination>& getDestination();
@@ -122,7 +122,7 @@ namespace commands{
             return true;
         }
 
-        virtual Pointer<Command> visit( activemq::state::CommandVisitor* visitor );
+        virtual Pointer<Command> visit(activemq::state::CommandVisitor* visitor);
 
     };
 

Modified: activemq/activemq-cpp/trunk/activemq-cpp/src/main/activemq/commands/MessageDispatch.cpp
URL: http://svn.apache.org/viewvc/activemq/activemq-cpp/trunk/activemq-cpp/src/main/activemq/commands/MessageDispatch.cpp?rev=1460467&r1=1460466&r2=1460467&view=diff
==============================================================================
--- activemq/activemq-cpp/trunk/activemq-cpp/src/main/activemq/commands/MessageDispatch.cpp (original)
+++ activemq/activemq-cpp/trunk/activemq-cpp/src/main/activemq/commands/MessageDispatch.cpp Sun Mar 24 21:30:52 2013
@@ -38,8 +38,8 @@ using namespace decaf::lang::exceptions;
  */
 
 ////////////////////////////////////////////////////////////////////////////////
-MessageDispatch::MessageDispatch() 
-    : BaseCommand(), consumerId(NULL), destination(NULL), message(NULL), redeliveryCounter(0) {
+MessageDispatch::MessageDispatch() :
+    BaseCommand(), consumerId(NULL), destination(NULL), message(NULL), redeliveryCounter(0) {
 
 }
 
@@ -49,37 +49,37 @@ MessageDispatch::~MessageDispatch() {
 
 ////////////////////////////////////////////////////////////////////////////////
 MessageDispatch* MessageDispatch::cloneDataStructure() const {
-    std::auto_ptr<MessageDispatch> messageDispatch( new MessageDispatch() );
+    std::auto_ptr<MessageDispatch> messageDispatch(new MessageDispatch());
 
     // Copy the data from the base class or classes
-    messageDispatch->copyDataStructure( this );
+    messageDispatch->copyDataStructure(this);
 
     return messageDispatch.release();
 }
 
 ////////////////////////////////////////////////////////////////////////////////
-void MessageDispatch::copyDataStructure( const DataStructure* src ) {
+void MessageDispatch::copyDataStructure(const DataStructure* src) {
 
     // Protect against invalid self assignment.
-    if( this == src ) {
+    if (this == src) {
         return;
     }
 
-    const MessageDispatch* srcPtr = dynamic_cast<const MessageDispatch*>( src );
+    const MessageDispatch* srcPtr = dynamic_cast<const MessageDispatch*>(src);
 
-    if( srcPtr == NULL || src == NULL ) {
+    if (srcPtr == NULL || src == NULL) {
         throw decaf::lang::exceptions::NullPointerException(
             __FILE__, __LINE__,
-            "MessageDispatch::copyDataStructure - src is NULL or invalid" );
+            "MessageDispatch::copyDataStructure - src is NULL or invalid");
     }
 
     // Copy the data of the base class or classes
-    BaseCommand::copyDataStructure( src );
+    BaseCommand::copyDataStructure(src);
 
-    this->setConsumerId( srcPtr->getConsumerId() );
-    this->setDestination( srcPtr->getDestination() );
-    this->setMessage( srcPtr->getMessage() );
-    this->setRedeliveryCounter( srcPtr->getRedeliveryCounter() );
+    this->setConsumerId(srcPtr->getConsumerId());
+    this->setDestination(srcPtr->getDestination());
+    this->setMessage(srcPtr->getMessage());
+    this->setRedeliveryCounter(srcPtr->getRedeliveryCounter());
 }
 
 ////////////////////////////////////////////////////////////////////////////////
@@ -97,21 +97,21 @@ std::string MessageDispatch::toString() 
            << "responseRequired = " << boolalpha << this->isResponseRequired();
     stream << ", ";
     stream << "ConsumerId = ";
-    if( this->getConsumerId() != NULL ) {
+    if (this->getConsumerId() != NULL) {
         stream << this->getConsumerId()->toString();
     } else {
         stream << "NULL";
     }
     stream << ", ";
     stream << "Destination = ";
-    if( this->getDestination() != NULL ) {
+    if (this->getDestination() != NULL) {
         stream << this->getDestination()->toString();
     } else {
         stream << "NULL";
     }
     stream << ", ";
     stream << "Message = ";
-    if( this->getMessage() != NULL ) {
+    if (this->getMessage() != NULL) {
         stream << this->getMessage()->toString();
     } else {
         stream << "NULL";
@@ -124,43 +124,43 @@ std::string MessageDispatch::toString() 
 }
 
 ////////////////////////////////////////////////////////////////////////////////
-bool MessageDispatch::equals( const DataStructure* value ) const {
+bool MessageDispatch::equals(const DataStructure* value) const {
 
-    if( this == value ) {
+    if (this == value) {
         return true;
     }
 
-    const MessageDispatch* valuePtr = dynamic_cast<const MessageDispatch*>( value );
+    const MessageDispatch* valuePtr = dynamic_cast<const MessageDispatch*>(value);
 
-    if( valuePtr == NULL || value == NULL ) {
+    if (valuePtr == NULL || value == NULL) {
         return false;
     }
 
-    if( this->getConsumerId() != NULL ) {
-        if( !this->getConsumerId()->equals( valuePtr->getConsumerId().get() ) ) {
+    if (this->getConsumerId() != NULL) {
+        if (!this->getConsumerId()->equals( valuePtr->getConsumerId().get())) {
             return false;
         }
-    } else if( valuePtr->getConsumerId() != NULL ) {
+    } else if (valuePtr->getConsumerId() != NULL) {
         return false;
     }
-    if( this->getDestination() != NULL ) {
-        if( !this->getDestination()->equals( valuePtr->getDestination().get() ) ) {
+    if (this->getDestination() != NULL) {
+        if (!this->getDestination()->equals( valuePtr->getDestination().get())) {
             return false;
         }
-    } else if( valuePtr->getDestination() != NULL ) {
+    } else if (valuePtr->getDestination() != NULL) {
         return false;
     }
-    if( this->getMessage() != NULL ) {
-        if( !this->getMessage()->equals( valuePtr->getMessage().get() ) ) {
+    if (this->getMessage() != NULL) {
+        if (!this->getMessage()->equals( valuePtr->getMessage().get())) {
             return false;
         }
-    } else if( valuePtr->getMessage() != NULL ) {
+    } else if (valuePtr->getMessage() != NULL) {
         return false;
     }
-    if( this->getRedeliveryCounter() != valuePtr->getRedeliveryCounter() ) {
+    if (this->getRedeliveryCounter() != valuePtr->getRedeliveryCounter()) {
         return false;
     }
-    if( !BaseCommand::equals( value ) ) {
+    if (!BaseCommand::equals(value)) {
         return false;
     }
     return true;
@@ -177,7 +177,7 @@ decaf::lang::Pointer<ConsumerId>& Messag
 }
 
 ////////////////////////////////////////////////////////////////////////////////
-void MessageDispatch::setConsumerId( const decaf::lang::Pointer<ConsumerId>& consumerId ) {
+void MessageDispatch::setConsumerId(const decaf::lang::Pointer<ConsumerId>& consumerId) {
     this->consumerId = consumerId;
 }
 
@@ -192,7 +192,7 @@ decaf::lang::Pointer<ActiveMQDestination
 }
 
 ////////////////////////////////////////////////////////////////////////////////
-void MessageDispatch::setDestination( const decaf::lang::Pointer<ActiveMQDestination>& destination ) {
+void MessageDispatch::setDestination(const decaf::lang::Pointer<ActiveMQDestination>& destination) {
     this->destination = destination;
 }
 
@@ -207,7 +207,7 @@ decaf::lang::Pointer<Message>& MessageDi
 }
 
 ////////////////////////////////////////////////////////////////////////////////
-void MessageDispatch::setMessage( const decaf::lang::Pointer<Message>& message ) {
+void MessageDispatch::setMessage(const decaf::lang::Pointer<Message>& message) {
     this->message = message;
 }
 
@@ -217,12 +217,11 @@ int MessageDispatch::getRedeliveryCounte
 }
 
 ////////////////////////////////////////////////////////////////////////////////
-void MessageDispatch::setRedeliveryCounter( int redeliveryCounter ) {
+void MessageDispatch::setRedeliveryCounter(int redeliveryCounter) {
     this->redeliveryCounter = redeliveryCounter;
 }
 
 ////////////////////////////////////////////////////////////////////////////////
-decaf::lang::Pointer<commands::Command> MessageDispatch::visit( activemq::state::CommandVisitor* visitor ) {
-
-    return visitor->processMessageDispatch( this );
+decaf::lang::Pointer<commands::Command> MessageDispatch::visit(activemq::state::CommandVisitor* visitor) {
+    return visitor->processMessageDispatch(this);
 }

Modified: activemq/activemq-cpp/trunk/activemq-cpp/src/main/activemq/commands/MessageDispatch.h
URL: http://svn.apache.org/viewvc/activemq/activemq-cpp/trunk/activemq-cpp/src/main/activemq/commands/MessageDispatch.h?rev=1460467&r1=1460466&r2=1460467&view=diff
==============================================================================
--- activemq/activemq-cpp/trunk/activemq-cpp/src/main/activemq/commands/MessageDispatch.h (original)
+++ activemq/activemq-cpp/trunk/activemq-cpp/src/main/activemq/commands/MessageDispatch.h Sun Mar 24 21:30:52 2013
@@ -32,8 +32,8 @@
 #include <string>
 #include <vector>
 
-namespace activemq{
-namespace commands{
+namespace activemq {
+namespace commands {
 
     using decaf::lang::Pointer;
 
@@ -60,8 +60,8 @@ namespace commands{
 
     private:
 
-        MessageDispatch( const MessageDispatch& );
-        MessageDispatch& operator= ( const MessageDispatch& );
+        MessageDispatch(const MessageDispatch&);
+        MessageDispatch& operator= (const MessageDispatch&);
 
     public:
 
@@ -73,11 +73,11 @@ namespace commands{
 
         virtual MessageDispatch* cloneDataStructure() const;
 
-        virtual void copyDataStructure( const DataStructure* src );
+        virtual void copyDataStructure(const DataStructure* src);
 
         virtual std::string toString() const;
 
-        virtual bool equals( const DataStructure* value ) const;
+        virtual bool equals(const DataStructure* value) const;
 
         virtual const Pointer<ConsumerId>& getConsumerId() const;
         virtual Pointer<ConsumerId>& getConsumerId();
@@ -101,7 +101,7 @@ namespace commands{
             return true;
         }
 
-        virtual Pointer<Command> visit( activemq::state::CommandVisitor* visitor );
+        virtual Pointer<Command> visit(activemq::state::CommandVisitor* visitor);
 
     };
 

Modified: activemq/activemq-cpp/trunk/activemq-cpp/src/main/activemq/commands/MessageDispatchNotification.cpp
URL: http://svn.apache.org/viewvc/activemq/activemq-cpp/trunk/activemq-cpp/src/main/activemq/commands/MessageDispatchNotification.cpp?rev=1460467&r1=1460466&r2=1460467&view=diff
==============================================================================
--- activemq/activemq-cpp/trunk/activemq-cpp/src/main/activemq/commands/MessageDispatchNotification.cpp (original)
+++ activemq/activemq-cpp/trunk/activemq-cpp/src/main/activemq/commands/MessageDispatchNotification.cpp Sun Mar 24 21:30:52 2013
@@ -38,8 +38,8 @@ using namespace decaf::lang::exceptions;
  */
 
 ////////////////////////////////////////////////////////////////////////////////
-MessageDispatchNotification::MessageDispatchNotification() 
-    : BaseCommand(), consumerId(NULL), destination(NULL), deliverySequenceId(0), messageId(NULL) {
+MessageDispatchNotification::MessageDispatchNotification() :
+    BaseCommand(), consumerId(NULL), destination(NULL), deliverySequenceId(0), messageId(NULL) {
 
 }
 
@@ -49,37 +49,37 @@ MessageDispatchNotification::~MessageDis
 
 ////////////////////////////////////////////////////////////////////////////////
 MessageDispatchNotification* MessageDispatchNotification::cloneDataStructure() const {
-    std::auto_ptr<MessageDispatchNotification> messageDispatchNotification( new MessageDispatchNotification() );
+    std::auto_ptr<MessageDispatchNotification> messageDispatchNotification(new MessageDispatchNotification());
 
     // Copy the data from the base class or classes
-    messageDispatchNotification->copyDataStructure( this );
+    messageDispatchNotification->copyDataStructure(this);
 
     return messageDispatchNotification.release();
 }
 
 ////////////////////////////////////////////////////////////////////////////////
-void MessageDispatchNotification::copyDataStructure( const DataStructure* src ) {
+void MessageDispatchNotification::copyDataStructure(const DataStructure* src) {
 
     // Protect against invalid self assignment.
-    if( this == src ) {
+    if (this == src) {
         return;
     }
 
-    const MessageDispatchNotification* srcPtr = dynamic_cast<const MessageDispatchNotification*>( src );
+    const MessageDispatchNotification* srcPtr = dynamic_cast<const MessageDispatchNotification*>(src);
 
-    if( srcPtr == NULL || src == NULL ) {
+    if (srcPtr == NULL || src == NULL) {
         throw decaf::lang::exceptions::NullPointerException(
             __FILE__, __LINE__,
-            "MessageDispatchNotification::copyDataStructure - src is NULL or invalid" );
+            "MessageDispatchNotification::copyDataStructure - src is NULL or invalid");
     }
 
     // Copy the data of the base class or classes
-    BaseCommand::copyDataStructure( src );
+    BaseCommand::copyDataStructure(src);
 
-    this->setConsumerId( srcPtr->getConsumerId() );
-    this->setDestination( srcPtr->getDestination() );
-    this->setDeliverySequenceId( srcPtr->getDeliverySequenceId() );
-    this->setMessageId( srcPtr->getMessageId() );
+    this->setConsumerId(srcPtr->getConsumerId());
+    this->setDestination(srcPtr->getDestination());
+    this->setDeliverySequenceId(srcPtr->getDeliverySequenceId());
+    this->setMessageId(srcPtr->getMessageId());
 }
 
 ////////////////////////////////////////////////////////////////////////////////
@@ -97,14 +97,14 @@ std::string MessageDispatchNotification:
            << "responseRequired = " << boolalpha << this->isResponseRequired();
     stream << ", ";
     stream << "ConsumerId = ";
-    if( this->getConsumerId() != NULL ) {
+    if (this->getConsumerId() != NULL) {
         stream << this->getConsumerId()->toString();
     } else {
         stream << "NULL";
     }
     stream << ", ";
     stream << "Destination = ";
-    if( this->getDestination() != NULL ) {
+    if (this->getDestination() != NULL) {
         stream << this->getDestination()->toString();
     } else {
         stream << "NULL";
@@ -113,7 +113,7 @@ std::string MessageDispatchNotification:
     stream << "DeliverySequenceId = " << this->getDeliverySequenceId();
     stream << ", ";
     stream << "MessageId = ";
-    if( this->getMessageId() != NULL ) {
+    if (this->getMessageId() != NULL) {
         stream << this->getMessageId()->toString();
     } else {
         stream << "NULL";
@@ -124,43 +124,43 @@ std::string MessageDispatchNotification:
 }
 
 ////////////////////////////////////////////////////////////////////////////////
-bool MessageDispatchNotification::equals( const DataStructure* value ) const {
+bool MessageDispatchNotification::equals(const DataStructure* value) const {
 
-    if( this == value ) {
+    if (this == value) {
         return true;
     }
 
-    const MessageDispatchNotification* valuePtr = dynamic_cast<const MessageDispatchNotification*>( value );
+    const MessageDispatchNotification* valuePtr = dynamic_cast<const MessageDispatchNotification*>(value);
 
-    if( valuePtr == NULL || value == NULL ) {
+    if (valuePtr == NULL || value == NULL) {
         return false;
     }
 
-    if( this->getConsumerId() != NULL ) {
-        if( !this->getConsumerId()->equals( valuePtr->getConsumerId().get() ) ) {
+    if (this->getConsumerId() != NULL) {
+        if (!this->getConsumerId()->equals( valuePtr->getConsumerId().get())) {
             return false;
         }
-    } else if( valuePtr->getConsumerId() != NULL ) {
+    } else if (valuePtr->getConsumerId() != NULL) {
         return false;
     }
-    if( this->getDestination() != NULL ) {
-        if( !this->getDestination()->equals( valuePtr->getDestination().get() ) ) {
+    if (this->getDestination() != NULL) {
+        if (!this->getDestination()->equals( valuePtr->getDestination().get())) {
             return false;
         }
-    } else if( valuePtr->getDestination() != NULL ) {
+    } else if (valuePtr->getDestination() != NULL) {
         return false;
     }
-    if( this->getDeliverySequenceId() != valuePtr->getDeliverySequenceId() ) {
+    if (this->getDeliverySequenceId() != valuePtr->getDeliverySequenceId()) {
         return false;
     }
-    if( this->getMessageId() != NULL ) {
-        if( !this->getMessageId()->equals( valuePtr->getMessageId().get() ) ) {
+    if (this->getMessageId() != NULL) {
+        if (!this->getMessageId()->equals( valuePtr->getMessageId().get())) {
             return false;
         }
-    } else if( valuePtr->getMessageId() != NULL ) {
+    } else if (valuePtr->getMessageId() != NULL) {
         return false;
     }
-    if( !BaseCommand::equals( value ) ) {
+    if (!BaseCommand::equals(value)) {
         return false;
     }
     return true;
@@ -177,7 +177,7 @@ decaf::lang::Pointer<ConsumerId>& Messag
 }
 
 ////////////////////////////////////////////////////////////////////////////////
-void MessageDispatchNotification::setConsumerId( const decaf::lang::Pointer<ConsumerId>& consumerId ) {
+void MessageDispatchNotification::setConsumerId(const decaf::lang::Pointer<ConsumerId>& consumerId) {
     this->consumerId = consumerId;
 }
 
@@ -192,7 +192,7 @@ decaf::lang::Pointer<ActiveMQDestination
 }
 
 ////////////////////////////////////////////////////////////////////////////////
-void MessageDispatchNotification::setDestination( const decaf::lang::Pointer<ActiveMQDestination>& destination ) {
+void MessageDispatchNotification::setDestination(const decaf::lang::Pointer<ActiveMQDestination>& destination) {
     this->destination = destination;
 }
 
@@ -202,7 +202,7 @@ long long MessageDispatchNotification::g
 }
 
 ////////////////////////////////////////////////////////////////////////////////
-void MessageDispatchNotification::setDeliverySequenceId( long long deliverySequenceId ) {
+void MessageDispatchNotification::setDeliverySequenceId(long long deliverySequenceId) {
     this->deliverySequenceId = deliverySequenceId;
 }
 
@@ -217,12 +217,11 @@ decaf::lang::Pointer<MessageId>& Message
 }
 
 ////////////////////////////////////////////////////////////////////////////////
-void MessageDispatchNotification::setMessageId( const decaf::lang::Pointer<MessageId>& messageId ) {
+void MessageDispatchNotification::setMessageId(const decaf::lang::Pointer<MessageId>& messageId) {
     this->messageId = messageId;
 }
 
 ////////////////////////////////////////////////////////////////////////////////
-decaf::lang::Pointer<commands::Command> MessageDispatchNotification::visit( activemq::state::CommandVisitor* visitor ) {
-
-    return visitor->processMessageDispatchNotification( this );
+decaf::lang::Pointer<commands::Command> MessageDispatchNotification::visit(activemq::state::CommandVisitor* visitor) {
+    return visitor->processMessageDispatchNotification(this);
 }

Modified: activemq/activemq-cpp/trunk/activemq-cpp/src/main/activemq/commands/MessageDispatchNotification.h
URL: http://svn.apache.org/viewvc/activemq/activemq-cpp/trunk/activemq-cpp/src/main/activemq/commands/MessageDispatchNotification.h?rev=1460467&r1=1460466&r2=1460467&view=diff
==============================================================================
--- activemq/activemq-cpp/trunk/activemq-cpp/src/main/activemq/commands/MessageDispatchNotification.h (original)
+++ activemq/activemq-cpp/trunk/activemq-cpp/src/main/activemq/commands/MessageDispatchNotification.h Sun Mar 24 21:30:52 2013
@@ -32,8 +32,8 @@
 #include <string>
 #include <vector>
 
-namespace activemq{
-namespace commands{
+namespace activemq {
+namespace commands {
 
     using decaf::lang::Pointer;
 
@@ -60,8 +60,8 @@ namespace commands{
 
     private:
 
-        MessageDispatchNotification( const MessageDispatchNotification& );
-        MessageDispatchNotification& operator= ( const MessageDispatchNotification& );
+        MessageDispatchNotification(const MessageDispatchNotification&);
+        MessageDispatchNotification& operator= (const MessageDispatchNotification&);
 
     public:
 
@@ -73,11 +73,11 @@ namespace commands{
 
         virtual MessageDispatchNotification* cloneDataStructure() const;
 
-        virtual void copyDataStructure( const DataStructure* src );
+        virtual void copyDataStructure(const DataStructure* src);
 
         virtual std::string toString() const;
 
-        virtual bool equals( const DataStructure* value ) const;
+        virtual bool equals(const DataStructure* value) const;
 
         virtual const Pointer<ConsumerId>& getConsumerId() const;
         virtual Pointer<ConsumerId>& getConsumerId();
@@ -101,7 +101,7 @@ namespace commands{
             return true;
         }
 
-        virtual Pointer<Command> visit( activemq::state::CommandVisitor* visitor );
+        virtual Pointer<Command> visit(activemq::state::CommandVisitor* visitor);
 
     };
 

Modified: activemq/activemq-cpp/trunk/activemq-cpp/src/main/activemq/commands/MessageId.cpp
URL: http://svn.apache.org/viewvc/activemq/activemq-cpp/trunk/activemq-cpp/src/main/activemq/commands/MessageId.cpp?rev=1460467&r1=1460466&r2=1460467&view=diff
==============================================================================
--- activemq/activemq-cpp/trunk/activemq-cpp/src/main/activemq/commands/MessageId.cpp (original)
+++ activemq/activemq-cpp/trunk/activemq-cpp/src/main/activemq/commands/MessageId.cpp Sun Mar 24 21:30:52 2013
@@ -18,9 +18,10 @@
 #include <activemq/commands/MessageId.h>
 #include <activemq/exceptions/ActiveMQException.h>
 #include <activemq/state/CommandVisitor.h>
-#include <apr_strings.h>
+#include <decaf/internal/util/StringUtils.h>
 #include <decaf/lang/Long.h>
 #include <decaf/lang/exceptions/NullPointerException.h>
+#include <decaf/util/HashCode.h>
 #include <sstream>
 
 using namespace std;
@@ -29,6 +30,7 @@ using namespace activemq::exceptions;
 using namespace activemq::commands;
 using namespace decaf::lang;
 using namespace decaf::lang::exceptions;
+using namespace decaf::internal::util;
 
 /*
  *
@@ -41,46 +43,46 @@ using namespace decaf::lang::exceptions;
  */
 
 ////////////////////////////////////////////////////////////////////////////////
-MessageId::MessageId() 
-    : BaseDataStructure(), producerId(NULL), producerSequenceId(0), brokerSequenceId(0), key("") {
+MessageId::MessageId() :
+    BaseDataStructure(), producerId(NULL), producerSequenceId(0), brokerSequenceId(0), key("") {
 
 }
 
 ////////////////////////////////////////////////////////////////////////////////
-MessageId::MessageId( const MessageId& other )
-    : BaseDataStructure(), producerId(NULL), producerSequenceId(0), brokerSequenceId(0), key("") {
+MessageId::MessageId(const MessageId& other) :
+    BaseDataStructure(), producerId(NULL), producerSequenceId(0), brokerSequenceId(0), key("") {
 
-    this->copyDataStructure( &other );
+    this->copyDataStructure(&other);
 }
 
 ////////////////////////////////////////////////////////////////////////////////
-MessageId::MessageId( const std::string& messageKey )
-    : BaseDataStructure(), producerId(NULL), producerSequenceId(0), brokerSequenceId(0), key("") {
+MessageId::MessageId(const std::string& messageKey) :
+    BaseDataStructure(), producerId(NULL), producerSequenceId(0), brokerSequenceId(0), key("") {
 
-    this->setValue( messageKey );
+    this->setValue(messageKey);
 }
 
 ////////////////////////////////////////////////////////////////////////////////
-MessageId::MessageId( const Pointer<ProducerInfo>& producerInfo, long long producerSequenceId )
-    : BaseDataStructure(), producerId(NULL), producerSequenceId(0), brokerSequenceId(0), key("") {
+MessageId::MessageId(const Pointer<ProducerInfo>& producerInfo, long long producerSequenceId) :
+    BaseDataStructure(), producerId(NULL), producerSequenceId(0), brokerSequenceId(0), key("") {
 
     this->producerId = producerInfo->getProducerId();
     this->producerSequenceId = producerSequenceId;
 }
 
 ////////////////////////////////////////////////////////////////////////////////
-MessageId::MessageId( const Pointer<ProducerId>& producerId, long long producerSequenceId )
-    : BaseDataStructure(), producerId(NULL), producerSequenceId(0), brokerSequenceId(0), key("") {
+MessageId::MessageId(const Pointer<ProducerId>& producerId, long long producerSequenceId) :
+    BaseDataStructure(), producerId(NULL), producerSequenceId(0), brokerSequenceId(0), key("") {
 
     this->producerId = producerId;
     this->producerSequenceId = producerSequenceId;
 }
 
 ////////////////////////////////////////////////////////////////////////////////
-MessageId::MessageId( const std::string& producerId, long long producerSequenceId )
-    : BaseDataStructure(), producerId(NULL), producerSequenceId(0), brokerSequenceId(0), key("") {
+MessageId::MessageId(const std::string& producerId, long long producerSequenceId) :
+    BaseDataStructure(), producerId(NULL), producerSequenceId(0), brokerSequenceId(0), key("") {
 
-    this->producerId.reset( new ProducerId( producerId ) );
+    this->producerId.reset(new ProducerId(producerId));
     this->producerSequenceId = producerSequenceId;
 }
 
@@ -90,36 +92,36 @@ MessageId::~MessageId() {
 
 ////////////////////////////////////////////////////////////////////////////////
 MessageId* MessageId::cloneDataStructure() const {
-    std::auto_ptr<MessageId> messageId( new MessageId() );
+    std::auto_ptr<MessageId> messageId(new MessageId());
 
     // Copy the data from the base class or classes
-    messageId->copyDataStructure( this );
+    messageId->copyDataStructure(this);
 
     return messageId.release();
 }
 
 ////////////////////////////////////////////////////////////////////////////////
-void MessageId::copyDataStructure( const DataStructure* src ) {
+void MessageId::copyDataStructure(const DataStructure* src) {
 
     // Protect against invalid self assignment.
-    if( this == src ) {
+    if (this == src) {
         return;
     }
 
-    const MessageId* srcPtr = dynamic_cast<const MessageId*>( src );
+    const MessageId* srcPtr = dynamic_cast<const MessageId*>(src);
 
-    if( srcPtr == NULL || src == NULL ) {
+    if (srcPtr == NULL || src == NULL) {
         throw decaf::lang::exceptions::NullPointerException(
             __FILE__, __LINE__,
-            "MessageId::copyDataStructure - src is NULL or invalid" );
+            "MessageId::copyDataStructure - src is NULL or invalid");
     }
 
     // Copy the data of the base class or classes
-    BaseDataStructure::copyDataStructure( src );
+    BaseDataStructure::copyDataStructure(src);
 
-    this->setProducerId( srcPtr->getProducerId() );
-    this->setProducerSequenceId( srcPtr->getProducerSequenceId() );
-    this->setBrokerSequenceId( srcPtr->getBrokerSequenceId() );
+    this->setProducerId(srcPtr->getProducerId());
+    this->setProducerSequenceId(srcPtr->getProducerSequenceId());
+    this->setBrokerSequenceId(srcPtr->getBrokerSequenceId());
 }
 
 ////////////////////////////////////////////////////////////////////////////////
@@ -133,40 +135,40 @@ std::string MessageId::toString() const 
 
     if( key == "" ) {
         this->key = this->producerId->toString() + ":" + 
-                    Long::toString( this->producerSequenceId ) + ":" + 
-                    Long::toString( this->brokerSequenceId );
+                    Long::toString( this->producerSequenceId) + ":" + 
+                    Long::toString( this->brokerSequenceId);
     }
 
     return this->key;
 }
 
 ////////////////////////////////////////////////////////////////////////////////
-bool MessageId::equals( const DataStructure* value ) const {
+bool MessageId::equals(const DataStructure* value) const {
 
-    if( this == value ) {
+    if (this == value) {
         return true;
     }
 
-    const MessageId* valuePtr = dynamic_cast<const MessageId*>( value );
+    const MessageId* valuePtr = dynamic_cast<const MessageId*>(value);
 
-    if( valuePtr == NULL || value == NULL ) {
+    if (valuePtr == NULL || value == NULL) {
         return false;
     }
 
-    if( this->getProducerId() != NULL ) {
-        if( !this->getProducerId()->equals( valuePtr->getProducerId().get() ) ) {
+    if (this->getProducerId() != NULL) {
+        if (!this->getProducerId()->equals( valuePtr->getProducerId().get())) {
             return false;
         }
-    } else if( valuePtr->getProducerId() != NULL ) {
+    } else if (valuePtr->getProducerId() != NULL) {
         return false;
     }
-    if( this->getProducerSequenceId() != valuePtr->getProducerSequenceId() ) {
+    if (this->getProducerSequenceId() != valuePtr->getProducerSequenceId()) {
         return false;
     }
-    if( this->getBrokerSequenceId() != valuePtr->getBrokerSequenceId() ) {
+    if (this->getBrokerSequenceId() != valuePtr->getBrokerSequenceId()) {
         return false;
     }
-    if( !BaseDataStructure::equals( value ) ) {
+    if (!BaseDataStructure::equals(value)) {
         return false;
     }
     return true;
@@ -183,7 +185,7 @@ decaf::lang::Pointer<ProducerId>& Messag
 }
 
 ////////////////////////////////////////////////////////////////////////////////
-void MessageId::setProducerId( const decaf::lang::Pointer<ProducerId>& producerId ) {
+void MessageId::setProducerId(const decaf::lang::Pointer<ProducerId>& producerId) {
     this->producerId = producerId;
 }
 
@@ -193,7 +195,7 @@ long long MessageId::getProducerSequence
 }
 
 ////////////////////////////////////////////////////////////////////////////////
-void MessageId::setProducerSequenceId( long long producerSequenceId ) {
+void MessageId::setProducerSequenceId(long long producerSequenceId) {
     this->producerSequenceId = producerSequenceId;
 }
 
@@ -203,31 +205,31 @@ long long MessageId::getBrokerSequenceId
 }
 
 ////////////////////////////////////////////////////////////////////////////////
-void MessageId::setBrokerSequenceId( long long brokerSequenceId ) {
+void MessageId::setBrokerSequenceId(long long brokerSequenceId) {
     this->brokerSequenceId = brokerSequenceId;
 }
 
 ////////////////////////////////////////////////////////////////////////////////
-int MessageId::compareTo( const MessageId& value ) const {
+int MessageId::compareTo(const MessageId& value) const {
 
-    if( this == &value ) {
+    if (this == &value) {
         return 0;
     }
 
-    int producerIdComp = this->producerId->compareTo( *( value.producerId ) );
-    if( producerIdComp != 0 ) {
+    int producerIdComp = this->producerId->compareTo(*(value.producerId));
+    if (producerIdComp != 0) {
         return producerIdComp;
     }
 
-    if( this->producerSequenceId > value.producerSequenceId ) {
+    if (this->producerSequenceId > value.producerSequenceId) {
         return 1;
-    } else if( this->producerSequenceId < value.producerSequenceId ) {
+    } else if(this->producerSequenceId < value.producerSequenceId) {
         return -1;
     }
 
-    if( this->brokerSequenceId > value.brokerSequenceId ) {
+    if (this->brokerSequenceId > value.brokerSequenceId) {
         return 1;
-    } else if( this->brokerSequenceId < value.brokerSequenceId ) {
+    } else if(this->brokerSequenceId < value.brokerSequenceId) {
         return -1;
     }
 
@@ -235,45 +237,50 @@ int MessageId::compareTo( const MessageI
 }
 
 ////////////////////////////////////////////////////////////////////////////////
-bool MessageId::equals( const MessageId& value ) const {
-    return this->equals( (const DataStructure*)&value );
+bool MessageId::equals(const MessageId& value) const {
+    return this->equals((const DataStructure*)&value);
 }
 
 ////////////////////////////////////////////////////////////////////////////////
-bool MessageId::operator==( const MessageId& value ) const {
-    return this->compareTo( value ) == 0;
+bool MessageId::operator==(const MessageId& value) const {
+    return this->compareTo(value) == 0;
 }
 
 ////////////////////////////////////////////////////////////////////////////////
-bool MessageId::operator<( const MessageId& value ) const {
-    return this->compareTo( value ) < 0;
+bool MessageId::operator<(const MessageId& value) const {
+    return this->compareTo(value) < 0;
 }
 
 ////////////////////////////////////////////////////////////////////////////////
-MessageId& MessageId::operator= ( const MessageId& other ) {
-    this->copyDataStructure( &other );
+MessageId& MessageId::operator= (const MessageId& other) {
+    this->copyDataStructure(&other);
     return *this;
 }
 
 ////////////////////////////////////////////////////////////////////////////////
-void MessageId::setValue( const std::string& key ) {
+int MessageId::getHashCode() const {
+    return decaf::util::HashCode<std::string>()(this->toString());
+}
+
+////////////////////////////////////////////////////////////////////////////////
+void MessageId::setValue(const std::string& key) {
 
     std::string messageKey = key;
 
     // Parse off the sequenceId
     std::size_t p = messageKey.rfind( ':' );
 
-    if( p != std::string::npos ) {
-        producerSequenceId = Long::parseLong( messageKey.substr( p + 1, std::string::npos ) );
-        messageKey = messageKey.substr( 0, p );
+    if (p != std::string::npos) {
+        producerSequenceId = Long::parseLong(messageKey.substr(p + 1, std::string::npos));
+        messageKey = messageKey.substr(0, p);
     }
 
-    this->producerId.reset( new ProducerId( messageKey ) );
+    this->producerId.reset(new ProducerId(messageKey));
     this->key = messageKey;
 }
 
 ////////////////////////////////////////////////////////////////////////////////
-void MessageId::setTextView( const std::string& key ) {
+void MessageId::setTextView(const std::string& key) {
     this->key = key;
 }
 

Modified: activemq/activemq-cpp/trunk/activemq-cpp/src/main/activemq/commands/MessageId.h
URL: http://svn.apache.org/viewvc/activemq/activemq-cpp/trunk/activemq-cpp/src/main/activemq/commands/MessageId.h?rev=1460467&r1=1460466&r2=1460467&view=diff
==============================================================================
--- activemq/activemq-cpp/trunk/activemq-cpp/src/main/activemq/commands/MessageId.h (original)
+++ activemq/activemq-cpp/trunk/activemq-cpp/src/main/activemq/commands/MessageId.h Sun Mar 24 21:30:52 2013
@@ -32,8 +32,8 @@
 #include <string>
 #include <vector>
 
-namespace activemq{
-namespace commands{
+namespace activemq {
+namespace commands {
 
     using decaf::lang::Pointer;
 
@@ -67,15 +67,15 @@ namespace commands{
 
         MessageId();
 
-        MessageId( const MessageId& other );
+        MessageId(const MessageId& other);
 
-        MessageId( const std::string& messageKey );
+        MessageId(const std::string& messageKey);
 
-        MessageId( const Pointer<ProducerInfo>& producerInfo, long long producerSequenceId );
+        MessageId(const Pointer<ProducerInfo>& producerInfo, long long producerSequenceId);
 
-        MessageId( const Pointer<ProducerId>& producerId, long long producerSequenceId );
+        MessageId(const Pointer<ProducerId>& producerId, long long producerSequenceId);
 
-        MessageId( const std::string& producerId, long long producerSequenceId );
+        MessageId(const std::string& producerId, long long producerSequenceId);
 
         virtual ~MessageId();
 
@@ -83,15 +83,15 @@ namespace commands{
 
         virtual MessageId* cloneDataStructure() const;
 
-        virtual void copyDataStructure( const DataStructure* src );
+        virtual void copyDataStructure(const DataStructure* src);
 
         virtual std::string toString() const;
 
-        virtual bool equals( const DataStructure* value ) const;
+        virtual bool equals(const DataStructure* value) const;
 
-        void setValue( const std::string& key );
+        void setValue(const std::string& key);
 
-        void setTextView( const std::string& key );
+        void setTextView(const std::string& key);
 
         virtual const Pointer<ProducerId>& getProducerId() const;
         virtual Pointer<ProducerId>& getProducerId();
@@ -103,15 +103,17 @@ namespace commands{
         virtual long long getBrokerSequenceId() const;
         virtual void setBrokerSequenceId( long long brokerSequenceId );
 
-        virtual int compareTo( const MessageId& value ) const;
+        virtual int compareTo(const MessageId& value) const;
 
-        virtual bool equals( const MessageId& value ) const;
+        virtual bool equals(const MessageId& value) const;
 
-        virtual bool operator==( const MessageId& value ) const;
+        virtual bool operator==(const MessageId& value) const;
 
-        virtual bool operator<( const MessageId& value ) const;
+        virtual bool operator<(const MessageId& value) const;
 
-        MessageId& operator= ( const MessageId& other );
+        MessageId& operator= (const MessageId& other);
+
+        int getHashCode() const;
 
     };
 



Mime
View raw message