activemq-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From tab...@apache.org
Subject svn commit: r506780 [3/3] - /activemq/activemq-cpp/trunk/activemq-cpp/src/main/activemq/connector/openwire/commands/
Date Tue, 13 Feb 2007 00:55:21 GMT
Modified: activemq/activemq-cpp/trunk/activemq-cpp/src/main/activemq/connector/openwire/commands/XATransactionId.cpp
URL: http://svn.apache.org/viewvc/activemq/activemq-cpp/trunk/activemq-cpp/src/main/activemq/connector/openwire/commands/XATransactionId.cpp?view=diff&rev=506780&r1=506779&r2=506780
==============================================================================
--- activemq/activemq-cpp/trunk/activemq-cpp/src/main/activemq/connector/openwire/commands/XATransactionId.cpp
(original)
+++ activemq/activemq-cpp/trunk/activemq-cpp/src/main/activemq/connector/openwire/commands/XATransactionId.cpp
Mon Feb 12 16:55:17 2007
@@ -80,6 +80,37 @@
 }
 
 ////////////////////////////////////////////////////////////////////////////////
+std::string XATransactionId::toString() const {
+
+    ostringstream stream;
+
+    stream << "Begin Class = XATransactionId" << std::endl;
+    stream << " Value of XATransactionId::ID_XATRANSACTIONID = 112" << std::endl;

+    stream << " Value of FormatId = " << this->getFormatId() << std::endl;
+    for( size_t iglobalTransactionId = 0; iglobalTransactionId < this->getGlobalTransactionId().size();
++iglobalTransactionId ) {
+        stream << " Value of GlobalTransactionId[" << iglobalTransactionId <<
"] = " << this->getGlobalTransactionId()[iglobalTransactionId] << std::endl;
+    }
+    for( size_t ibranchQualifier = 0; ibranchQualifier < this->getBranchQualifier().size();
++ibranchQualifier ) {
+        stream << " Value of BranchQualifier[" << ibranchQualifier << "]
= " << this->getBranchQualifier()[ibranchQualifier] << std::endl;
+    }
+    // Copy the data of the base class or classes
+    stream << TransactionId::toString();
+    stream << "End Class = XATransactionId" << std::endl;
+
+    return stream.str();
+}
+
+////////////////////////////////////////////////////////////////////////////////
+bool XATransactionId::equals( const DataStructure* value ) const {
+    const XATransactionId* valuePtr = dynamic_cast<const XATransactionId*>( value );
+
+    if( valuePtr == NULL || value == NULL ) {
+        return false;
+    }
+    return false;
+}
+
+////////////////////////////////////////////////////////////////////////////////
 int XATransactionId::getFormatId() const {
     return formatId;
 }

Modified: activemq/activemq-cpp/trunk/activemq-cpp/src/main/activemq/connector/openwire/commands/XATransactionId.h
URL: http://svn.apache.org/viewvc/activemq/activemq-cpp/trunk/activemq-cpp/src/main/activemq/connector/openwire/commands/XATransactionId.h?view=diff&rev=506780&r1=506779&r2=506780
==============================================================================
--- activemq/activemq-cpp/trunk/activemq-cpp/src/main/activemq/connector/openwire/commands/XATransactionId.h
(original)
+++ activemq/activemq-cpp/trunk/activemq-cpp/src/main/activemq/connector/openwire/commands/XATransactionId.h
Mon Feb 12 16:55:17 2007
@@ -80,6 +80,21 @@
          */
         virtual void copyDataStructure( const DataStructure* src );
 
+        /**
+         * Returns a string containing the information for this DataStructure
+         * such as its type and value of its elements.
+         * @return formatted string useful for debugging.
+         */
+        virtual std::string toString() const;
+
+        /**
+         * Compares the DataStructure passed in to this one, and returns if
+         * they are equivalent.  Equivalent here means that they are of the
+         * same type, and that each element of the objects are the same.
+         * @returns true if DataStructure's are Equal.
+         */
+        virtual bool equals( const DataStructure* value ) const;
+
         virtual int getFormatId() const;
         virtual void setFormatId( int formatId );
 



Mime
View raw message