Return-Path: Delivered-To: apmail-activemq-commits-archive@www.apache.org Received: (qmail 31021 invoked from network); 13 Feb 2007 00:55:45 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (140.211.11.2) by minotaur.apache.org with SMTP; 13 Feb 2007 00:55:45 -0000 Received: (qmail 15507 invoked by uid 500); 13 Feb 2007 00:55:53 -0000 Delivered-To: apmail-activemq-commits-archive@activemq.apache.org Received: (qmail 15483 invoked by uid 500); 13 Feb 2007 00:55:53 -0000 Mailing-List: contact commits-help@activemq.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: dev@activemq.apache.org Delivered-To: mailing list commits@activemq.apache.org Received: (qmail 15474 invoked by uid 99); 13 Feb 2007 00:55:53 -0000 Received: from herse.apache.org (HELO herse.apache.org) (140.211.11.133) by apache.org (qpsmtpd/0.29) with ESMTP; Mon, 12 Feb 2007 16:55:53 -0800 X-ASF-Spam-Status: No, hits=-9.4 required=10.0 tests=ALL_TRUSTED,NO_REAL_NAME X-Spam-Check-By: apache.org Received: from [140.211.11.3] (HELO eris.apache.org) (140.211.11.3) by apache.org (qpsmtpd/0.29) with ESMTP; Mon, 12 Feb 2007 16:55:44 -0800 Received: by eris.apache.org (Postfix, from userid 65534) id 21A771A9820; Mon, 12 Feb 2007 16:55:24 -0800 (PST) Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit 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 -0000 To: commits@activemq.apache.org From: tabish@apache.org X-Mailer: svnmailer-1.1.0 Message-Id: <20070213005524.21A771A9820@eris.apache.org> X-Virus-Checked: Checked by ClamAV on apache.org 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( 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 );