Return-Path: Delivered-To: apmail-geronimo-activemq-commits-archive@www.apache.org Received: (qmail 55732 invoked from network); 13 Nov 2006 00:47:40 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (140.211.11.2) by minotaur.apache.org with SMTP; 13 Nov 2006 00:47:40 -0000 Received: (qmail 75392 invoked by uid 500); 13 Nov 2006 00:47:50 -0000 Delivered-To: apmail-geronimo-activemq-commits-archive@geronimo.apache.org Received: (qmail 75333 invoked by uid 500); 13 Nov 2006 00:47:50 -0000 Mailing-List: contact activemq-commits-help@geronimo.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: activemq-dev@geronimo.apache.org Delivered-To: mailing list activemq-commits@geronimo.apache.org Received: (qmail 75268 invoked by uid 99); 13 Nov 2006 00:47:50 -0000 Received: from herse.apache.org (HELO herse.apache.org) (140.211.11.133) by apache.org (qpsmtpd/0.29) with ESMTP; Sun, 12 Nov 2006 16:47:50 -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; Sun, 12 Nov 2006 16:47:34 -0800 Received: by eris.apache.org (Postfix, from userid 65534) id 92E6F1A985C; Sun, 12 Nov 2006 16:46:38 -0800 (PST) Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Subject: svn commit: r474108 [7/10] - in /incubator/activemq/activemq-cpp/trunk/activemq-cpp/src/main: ./ activemq/connector/openwire/commands/ activemq/connector/openwire/marshal/ activemq/connector/openwire/marshal/v2/ Date: Mon, 13 Nov 2006 00:46:30 -0000 To: activemq-commits@geronimo.apache.org From: tabish@apache.org X-Mailer: svnmailer-1.1.0 Message-Id: <20061113004638.92E6F1A985C@eris.apache.org> X-Virus-Checked: Checked by ClamAV on apache.org Modified: incubator/activemq/activemq-cpp/trunk/activemq-cpp/src/main/activemq/connector/openwire/marshal/v2/JournalQueueAckMarshaller.cpp URL: http://svn.apache.org/viewvc/incubator/activemq/activemq-cpp/trunk/activemq-cpp/src/main/activemq/connector/openwire/marshal/v2/JournalQueueAckMarshaller.cpp?view=diff&rev=474108&r1=474107&r2=474108 ============================================================================== --- incubator/activemq/activemq-cpp/trunk/activemq-cpp/src/main/activemq/connector/openwire/marshal/v2/JournalQueueAckMarshaller.cpp (original) +++ incubator/activemq/activemq-cpp/trunk/activemq-cpp/src/main/activemq/connector/openwire/marshal/v2/JournalQueueAckMarshaller.cpp Sun Nov 12 16:46:23 2006 @@ -32,7 +32,7 @@ using namespace activemq::connector::openwire; using namespace activemq::connector::openwire::commands; using namespace activemq::connector::openwire::marshal; -using namespace activemq::connector::openwire::util; +using namespace activemq::connector::openwire::utils; using namespace activemq::connector::openwire::marshal::v2; /////////////////////////////////////////////////////////////////////////////// @@ -46,77 +46,59 @@ } /////////////////////////////////////////////////////////////////////////////// -void JournalQueueAckMarshaller::tightUnmarshal( OpenWireFormat* wireFormat, DataStructure* dataStructure, DataInputStream* dataIn, BooleanStream* bs ) { +void JournalQueueAckMarshaller::tightUnmarshal( OpenWireFormat* wireFormat, DataStructure* dataStructure, DataInputStream* dataIn, BooleanStream* bs ) throw( io::IOException ){ BaseDataStreamMarshaller::tightUnmarshal( wireFormat, dataStructure, dataIn, bs ); JournalQueueAck* info = dynamic_cast( dataStructure ); info->setDestination( dynamic_cast< ActiveMQDestination* >( - tightUnmarsalNestedObject( wireFormat, dataIn, bs ) ); + tightUnmarshalNestedObject( wireFormat, dataIn, bs ) ) ); info->setMessageAck( dynamic_cast< MessageAck* >( - tightUnmarsalNestedObject( wireFormat, dataIn, bs ) ); + tightUnmarshalNestedObject( wireFormat, dataIn, bs ) ) ); } /////////////////////////////////////////////////////////////////////////////// -int JournalQueueAckMarshaller::tightMarshal1( OpenWireFormat& wireFormat, DataStructure* dataStructure, BooleanStream& bs ) { +int JournalQueueAckMarshaller::tightMarshal1( OpenWireFormat* wireFormat, DataStructure* dataStructure, BooleanStream* bs ) throw( io::IOException ){ JournalQueueAck* info = dynamic_cast( dataStructure ); int rc = BaseDataStreamMarshaller::tightMarshal1( wireFormat, dataStructure, bs ); - DataStructure* data = - dynamic_cast< DataStructure* >( info->getDestination() ); - - rc += tightMarshalNestedObject1( wireFormat, data, bs ); - DataStructure* data = - dynamic_cast< DataStructure* >( info->getMessageAck() ); - - rc += tightMarshalNestedObject1( wireFormat, data, bs ); + rc += tightMarshalNestedObject1( wireFormat, info->getDestination(), bs ); + rc += tightMarshalNestedObject1( wireFormat, info->getMessageAck(), bs ); return rc + 0; } /////////////////////////////////////////////////////////////////////////////// -void JournalQueueAckMarshaller::tightMarshal2( OpenWireFormat& wireFormat, DataStructure* dataStructure, DataOutputStream& dataOut, BooleanStream& bs ) { +void JournalQueueAckMarshaller::tightMarshal2( OpenWireFormat* wireFormat, DataStructure* dataStructure, DataOutputStream* dataOut, BooleanStream* bs ) throw( io::IOException ){ BaseDataStreamMarshaller::tightMarshal2( wireFormat, dataStructure, dataOut, bs ); JournalQueueAck* info = dynamic_cast( dataStructure ); - DataStructure* data = - dynamic_cast< DataStructure* >( info->getDestination() ); - - tightMarshalNestedObject2( wireFormat, data, dataOut, bs ); - DataStructure* data = - dynamic_cast< DataStructure* >( info->getMessageAck() ); - - tightMarshalNestedObject2( wireFormat, data, dataOut, bs ); + tightMarshalNestedObject2( wireFormat, info->getDestination(), dataOut, bs ); + tightMarshalNestedObject2( wireFormat, info->getMessageAck(), dataOut, bs ); } /////////////////////////////////////////////////////////////////////////////// -void JournalQueueAckMarshaller::looseUnmarshal( OpenWireFormat& wireFormat, DataStructure* dataStructure, DataInputStream& dataIn ) { +void JournalQueueAckMarshaller::looseUnmarshal( OpenWireFormat* wireFormat, DataStructure* dataStructure, DataInputStream* dataIn ) throw( io::IOException ){ BaseDataStreamMarshaller::looseUnmarshal( wireFormat, dataStructure, dataIn ); JournalQueueAck* info = dynamic_cast( dataStructure ); - info->setDestination( dynamic_cast( - looseUnmarshalNestedObject( wireFormat, dataIn ) ) ); - info->setMessageAck( dynamic_cast( - looseUnmarshalNestedObject( wireFormat, dataIn ) ) ); + info->setDestination( dynamic_cast< ActiveMQDestination* >( + looseUnmarshalNestedObject( wireFormat, dataIn ) ) ); + info->setMessageAck( dynamic_cast< MessageAck* >( + looseUnmarshalNestedObject( wireFormat, dataIn ) ) ); } /////////////////////////////////////////////////////////////////////////////// -void JournalQueueAckMarshaller::looseMarshal( OpenWireFormat& wireFormat, DataStructure* dataStructure, DataOutputStream& dataOut ) { +void JournalQueueAckMarshaller::looseMarshal( OpenWireFormat* wireFormat, DataStructure* dataStructure, DataOutputStream* dataOut ) throw( io::IOException ){ JournalQueueAck* info = dynamic_cast( dataStructure ); BaseDataStreamMarshaller::looseMarshal( wireFormat, dataStructure, dataOut ); - DataStructure* data = - dynamic_cast< DataStructure* >( info->getDestination() ); - - looseMarshalNestedObject( wireFormat, data, dataOut ); - DataStructure* data = - dynamic_cast< DataStructure* >( info->getMessageAck() ); - - looseMarshalNestedObject( wireFormat, data, dataOut ); + looseMarshalNestedObject( wireFormat, info->getDestination(), dataOut ); + looseMarshalNestedObject( wireFormat, info->getMessageAck(), dataOut ); } Modified: incubator/activemq/activemq-cpp/trunk/activemq-cpp/src/main/activemq/connector/openwire/marshal/v2/JournalQueueAckMarshaller.h URL: http://svn.apache.org/viewvc/incubator/activemq/activemq-cpp/trunk/activemq-cpp/src/main/activemq/connector/openwire/marshal/v2/JournalQueueAckMarshaller.h?view=diff&rev=474108&r1=474107&r2=474108 ============================================================================== --- incubator/activemq/activemq-cpp/trunk/activemq-cpp/src/main/activemq/connector/openwire/marshal/v2/JournalQueueAckMarshaller.h (original) +++ incubator/activemq/activemq-cpp/trunk/activemq-cpp/src/main/activemq/connector/openwire/marshal/v2/JournalQueueAckMarshaller.h Sun Nov 12 16:46:23 2006 @@ -23,13 +23,14 @@ #pragma warning( disable : 4290 ) #endif -#include +#include #include #include #include +#include #include -#include +#include namespace activemq{ namespace connector{ @@ -55,7 +56,7 @@ * Creates a new instance of this marshalable type. * @return new DataStructure object pointer caller owns it. */ - virtual DataStructure* createObject() const; + virtual commands::DataStructure* createObject() const; /** * Get the Data Structure Type that identifies this Marshaller @@ -73,7 +74,7 @@ virtual void tightUnmarshal( OpenWireFormat* wireFormat, commands::DataStructure* dataStructure, io::DataInputStream* dataIn, - util::BooleanStream* bs ) throws( io::IOException ); + utils::BooleanStream* bs ) throw( io::IOException ); /** * Write the booleans that this object uses to a BooleanStream @@ -84,7 +85,7 @@ */ virtual int tightMarshal1( OpenWireFormat* wireFormat, commands::DataStructure* dataStructure, - BooleanStream* bs ) throws( io::IOException ); + utils::BooleanStream* bs ) throw( io::IOException ); /** * Write a object instance to data output stream @@ -96,7 +97,7 @@ virtual void tightMarshal2( OpenWireFormat* wireFormat, commands::DataStructure* dataStructure, io::DataOutputStream* dataOut, - BooleanStream* bs ) throws( io::IOException ); + utils::BooleanStream* bs ) throw( io::IOException ); /** * Un-marshal an object instance from the data input stream @@ -106,7 +107,7 @@ */ virtual void looseUnmarshal( OpenWireFormat* wireFormat, commands::DataStructure* dataStructure, - io::DataInputStream* dataIn ) throws( io::IOException ); + io::DataInputStream* dataIn ) throw( io::IOException ); /** * Write a object instance to data output stream @@ -116,7 +117,7 @@ */ virtual void looseMarshal( OpenWireFormat* wireFormat, commands::DataStructure* dataStructure, - io::DataOutputStream* dataOut ) throws( io::IOException ); + io::DataOutputStream* dataOut ) throw( io::IOException ); }; Modified: incubator/activemq/activemq-cpp/trunk/activemq-cpp/src/main/activemq/connector/openwire/marshal/v2/JournalTopicAckMarshaller.cpp URL: http://svn.apache.org/viewvc/incubator/activemq/activemq-cpp/trunk/activemq-cpp/src/main/activemq/connector/openwire/marshal/v2/JournalTopicAckMarshaller.cpp?view=diff&rev=474108&r1=474107&r2=474108 ============================================================================== --- incubator/activemq/activemq-cpp/trunk/activemq-cpp/src/main/activemq/connector/openwire/marshal/v2/JournalTopicAckMarshaller.cpp (original) +++ incubator/activemq/activemq-cpp/trunk/activemq-cpp/src/main/activemq/connector/openwire/marshal/v2/JournalTopicAckMarshaller.cpp Sun Nov 12 16:46:23 2006 @@ -32,7 +32,7 @@ using namespace activemq::connector::openwire; using namespace activemq::connector::openwire::commands; using namespace activemq::connector::openwire::marshal; -using namespace activemq::connector::openwire::util; +using namespace activemq::connector::openwire::utils; using namespace activemq::connector::openwire::marshal::v2; /////////////////////////////////////////////////////////////////////////////// @@ -46,108 +46,81 @@ } /////////////////////////////////////////////////////////////////////////////// -void JournalTopicAckMarshaller::tightUnmarshal( OpenWireFormat* wireFormat, DataStructure* dataStructure, DataInputStream* dataIn, BooleanStream* bs ) { +void JournalTopicAckMarshaller::tightUnmarshal( OpenWireFormat* wireFormat, DataStructure* dataStructure, DataInputStream* dataIn, BooleanStream* bs ) throw( io::IOException ){ BaseDataStreamMarshaller::tightUnmarshal( wireFormat, dataStructure, dataIn, bs ); JournalTopicAck* info = dynamic_cast( dataStructure ); info->setDestination( dynamic_cast< ActiveMQDestination* >( - tightUnmarsalNestedObject( wireFormat, dataIn, bs ) ); + tightUnmarshalNestedObject( wireFormat, dataIn, bs ) ) ); info->setMessageId( dynamic_cast< MessageId* >( - tightUnmarsalNestedObject( wireFormat, dataIn, bs ) ); - info->setMessageSequenceId( TightUnmarshalLong( wireFormat, dataIn, bs ) ); - info->setSubscritionName( TightUnmarshalString( dataIn, bs ) ); - info->setClientId( TightUnmarshalString( dataIn, bs ) ); + tightUnmarshalNestedObject( wireFormat, dataIn, bs ) ) ); + info->setMessageSequenceId( tightUnmarshalLong( wireFormat, dataIn, bs ) ); + info->setSubscritionName( tightUnmarshalString( dataIn, bs ) ); + info->setClientId( tightUnmarshalString( dataIn, bs ) ); info->setTransactionId( dynamic_cast< TransactionId* >( - tightUnmarsalNestedObject( wireFormat, dataIn, bs ) ); + tightUnmarshalNestedObject( wireFormat, dataIn, bs ) ) ); } /////////////////////////////////////////////////////////////////////////////// -int JournalTopicAckMarshaller::tightMarshal1( OpenWireFormat& wireFormat, DataStructure* dataStructure, BooleanStream& bs ) { +int JournalTopicAckMarshaller::tightMarshal1( OpenWireFormat* wireFormat, DataStructure* dataStructure, BooleanStream* bs ) throw( io::IOException ){ JournalTopicAck* info = dynamic_cast( dataStructure ); int rc = BaseDataStreamMarshaller::tightMarshal1( wireFormat, dataStructure, bs ); - DataStructure* data = - dynamic_cast< DataStructure* >( info->getDestination() ); - - rc += tightMarshalNestedObject1( wireFormat, data, bs ); - DataStructure* data = - dynamic_cast< DataStructure* >( info->getMessageId() ); - - rc += tightMarshalNestedObject1( wireFormat, data, bs ); + rc += tightMarshalNestedObject1( wireFormat, info->getDestination(), bs ); + rc += tightMarshalNestedObject1( wireFormat, info->getMessageId(), bs ); rc += tightMarshalLong1( wireFormat, info->getMessageSequenceId(), bs ); rc += tightMarshalString1( info->getSubscritionName(), bs ); rc += tightMarshalString1( info->getClientId(), bs ); - DataStructure* data = - dynamic_cast< DataStructure* >( info->getTransactionId() ); - - rc += tightMarshalNestedObject1( wireFormat, data, bs ); + rc += tightMarshalNestedObject1( wireFormat, info->getTransactionId(), bs ); return rc + 0; } /////////////////////////////////////////////////////////////////////////////// -void JournalTopicAckMarshaller::tightMarshal2( OpenWireFormat& wireFormat, DataStructure* dataStructure, DataOutputStream& dataOut, BooleanStream& bs ) { +void JournalTopicAckMarshaller::tightMarshal2( OpenWireFormat* wireFormat, DataStructure* dataStructure, DataOutputStream* dataOut, BooleanStream* bs ) throw( io::IOException ){ BaseDataStreamMarshaller::tightMarshal2( wireFormat, dataStructure, dataOut, bs ); JournalTopicAck* info = dynamic_cast( dataStructure ); - DataStructure* data = - dynamic_cast< DataStructure* >( info->getDestination() ); - - tightMarshalNestedObject2( wireFormat, data, dataOut, bs ); - DataStructure* data = - dynamic_cast< DataStructure* >( info->getMessageId() ); - - tightMarshalNestedObject2( wireFormat, data, dataOut, bs ); + tightMarshalNestedObject2( wireFormat, info->getDestination(), dataOut, bs ); + tightMarshalNestedObject2( wireFormat, info->getMessageId(), dataOut, bs ); tightMarshalLong2( wireFormat, info->getMessageSequenceId(), dataOut, bs ); tightMarshalString2( info->getSubscritionName(), dataOut, bs ); tightMarshalString2( info->getClientId(), dataOut, bs ); - DataStructure* data = - dynamic_cast< DataStructure* >( info->getTransactionId() ); - - tightMarshalNestedObject2( wireFormat, data, dataOut, bs ); + tightMarshalNestedObject2( wireFormat, info->getTransactionId(), dataOut, bs ); } /////////////////////////////////////////////////////////////////////////////// -void JournalTopicAckMarshaller::looseUnmarshal( OpenWireFormat& wireFormat, DataStructure* dataStructure, DataInputStream& dataIn ) { +void JournalTopicAckMarshaller::looseUnmarshal( OpenWireFormat* wireFormat, DataStructure* dataStructure, DataInputStream* dataIn ) throw( io::IOException ){ BaseDataStreamMarshaller::looseUnmarshal( wireFormat, dataStructure, dataIn ); JournalTopicAck* info = dynamic_cast( dataStructure ); - info->setDestination( dynamic_cast( - looseUnmarshalNestedObject( wireFormat, dataIn ) ) ); - info->setMessageId( dynamic_cast( - looseUnmarshalNestedObject( wireFormat, dataIn ) ) ); + info->setDestination( dynamic_cast< ActiveMQDestination* >( + looseUnmarshalNestedObject( wireFormat, dataIn ) ) ); + info->setMessageId( dynamic_cast< MessageId* >( + looseUnmarshalNestedObject( wireFormat, dataIn ) ) ); info->setMessageSequenceId( looseUnmarshalLong( wireFormat, dataIn ) ); info->setSubscritionName( looseUnmarshalString( dataIn ) ); info->setClientId( looseUnmarshalString( dataIn ) ); - info->setTransactionId( dynamic_cast( - looseUnmarshalNestedObject( wireFormat, dataIn ) ) ); + info->setTransactionId( dynamic_cast< TransactionId* >( + looseUnmarshalNestedObject( wireFormat, dataIn ) ) ); } /////////////////////////////////////////////////////////////////////////////// -void JournalTopicAckMarshaller::looseMarshal( OpenWireFormat& wireFormat, DataStructure* dataStructure, DataOutputStream& dataOut ) { +void JournalTopicAckMarshaller::looseMarshal( OpenWireFormat* wireFormat, DataStructure* dataStructure, DataOutputStream* dataOut ) throw( io::IOException ){ JournalTopicAck* info = dynamic_cast( dataStructure ); BaseDataStreamMarshaller::looseMarshal( wireFormat, dataStructure, dataOut ); - DataStructure* data = - dynamic_cast< DataStructure* >( info->getDestination() ); - - looseMarshalNestedObject( wireFormat, data, dataOut ); - DataStructure* data = - dynamic_cast< DataStructure* >( info->getMessageId() ); - - looseMarshalNestedObject( wireFormat, data, dataOut ); + looseMarshalNestedObject( wireFormat, info->getDestination(), dataOut ); + looseMarshalNestedObject( wireFormat, info->getMessageId(), dataOut ); looseMarshalLong( wireFormat, info->getMessageSequenceId(), dataOut ); looseMarshalString( info->getSubscritionName(), dataOut ); looseMarshalString( info->getClientId(), dataOut ); - DataStructure* data = - dynamic_cast< DataStructure* >( info->getTransactionId() ); - - looseMarshalNestedObject( wireFormat, data, dataOut ); + looseMarshalNestedObject( wireFormat, info->getTransactionId(), dataOut ); } Modified: incubator/activemq/activemq-cpp/trunk/activemq-cpp/src/main/activemq/connector/openwire/marshal/v2/JournalTopicAckMarshaller.h URL: http://svn.apache.org/viewvc/incubator/activemq/activemq-cpp/trunk/activemq-cpp/src/main/activemq/connector/openwire/marshal/v2/JournalTopicAckMarshaller.h?view=diff&rev=474108&r1=474107&r2=474108 ============================================================================== --- incubator/activemq/activemq-cpp/trunk/activemq-cpp/src/main/activemq/connector/openwire/marshal/v2/JournalTopicAckMarshaller.h (original) +++ incubator/activemq/activemq-cpp/trunk/activemq-cpp/src/main/activemq/connector/openwire/marshal/v2/JournalTopicAckMarshaller.h Sun Nov 12 16:46:23 2006 @@ -23,13 +23,14 @@ #pragma warning( disable : 4290 ) #endif -#include +#include #include #include #include +#include #include -#include +#include namespace activemq{ namespace connector{ @@ -55,7 +56,7 @@ * Creates a new instance of this marshalable type. * @return new DataStructure object pointer caller owns it. */ - virtual DataStructure* createObject() const; + virtual commands::DataStructure* createObject() const; /** * Get the Data Structure Type that identifies this Marshaller @@ -73,7 +74,7 @@ virtual void tightUnmarshal( OpenWireFormat* wireFormat, commands::DataStructure* dataStructure, io::DataInputStream* dataIn, - util::BooleanStream* bs ) throws( io::IOException ); + utils::BooleanStream* bs ) throw( io::IOException ); /** * Write the booleans that this object uses to a BooleanStream @@ -84,7 +85,7 @@ */ virtual int tightMarshal1( OpenWireFormat* wireFormat, commands::DataStructure* dataStructure, - BooleanStream* bs ) throws( io::IOException ); + utils::BooleanStream* bs ) throw( io::IOException ); /** * Write a object instance to data output stream @@ -96,7 +97,7 @@ virtual void tightMarshal2( OpenWireFormat* wireFormat, commands::DataStructure* dataStructure, io::DataOutputStream* dataOut, - BooleanStream* bs ) throws( io::IOException ); + utils::BooleanStream* bs ) throw( io::IOException ); /** * Un-marshal an object instance from the data input stream @@ -106,7 +107,7 @@ */ virtual void looseUnmarshal( OpenWireFormat* wireFormat, commands::DataStructure* dataStructure, - io::DataInputStream* dataIn ) throws( io::IOException ); + io::DataInputStream* dataIn ) throw( io::IOException ); /** * Write a object instance to data output stream @@ -116,7 +117,7 @@ */ virtual void looseMarshal( OpenWireFormat* wireFormat, commands::DataStructure* dataStructure, - io::DataOutputStream* dataOut ) throws( io::IOException ); + io::DataOutputStream* dataOut ) throw( io::IOException ); }; Modified: incubator/activemq/activemq-cpp/trunk/activemq-cpp/src/main/activemq/connector/openwire/marshal/v2/JournalTraceMarshaller.cpp URL: http://svn.apache.org/viewvc/incubator/activemq/activemq-cpp/trunk/activemq-cpp/src/main/activemq/connector/openwire/marshal/v2/JournalTraceMarshaller.cpp?view=diff&rev=474108&r1=474107&r2=474108 ============================================================================== --- incubator/activemq/activemq-cpp/trunk/activemq-cpp/src/main/activemq/connector/openwire/marshal/v2/JournalTraceMarshaller.cpp (original) +++ incubator/activemq/activemq-cpp/trunk/activemq-cpp/src/main/activemq/connector/openwire/marshal/v2/JournalTraceMarshaller.cpp Sun Nov 12 16:46:23 2006 @@ -32,7 +32,7 @@ using namespace activemq::connector::openwire; using namespace activemq::connector::openwire::commands; using namespace activemq::connector::openwire::marshal; -using namespace activemq::connector::openwire::util; +using namespace activemq::connector::openwire::utils; using namespace activemq::connector::openwire::marshal::v2; /////////////////////////////////////////////////////////////////////////////// @@ -46,16 +46,16 @@ } /////////////////////////////////////////////////////////////////////////////// -void JournalTraceMarshaller::tightUnmarshal( OpenWireFormat* wireFormat, DataStructure* dataStructure, DataInputStream* dataIn, BooleanStream* bs ) { +void JournalTraceMarshaller::tightUnmarshal( OpenWireFormat* wireFormat, DataStructure* dataStructure, DataInputStream* dataIn, BooleanStream* bs ) throw( io::IOException ){ BaseDataStreamMarshaller::tightUnmarshal( wireFormat, dataStructure, dataIn, bs ); JournalTrace* info = dynamic_cast( dataStructure ); - info->setMessage( TightUnmarshalString( dataIn, bs ) ); + info->setMessage( tightUnmarshalString( dataIn, bs ) ); } /////////////////////////////////////////////////////////////////////////////// -int JournalTraceMarshaller::tightMarshal1( OpenWireFormat& wireFormat, DataStructure* dataStructure, BooleanStream& bs ) { +int JournalTraceMarshaller::tightMarshal1( OpenWireFormat* wireFormat, DataStructure* dataStructure, BooleanStream* bs ) throw( io::IOException ){ JournalTrace* info = dynamic_cast( dataStructure ); @@ -67,7 +67,7 @@ } /////////////////////////////////////////////////////////////////////////////// -void JournalTraceMarshaller::tightMarshal2( OpenWireFormat& wireFormat, DataStructure* dataStructure, DataOutputStream& dataOut, BooleanStream& bs ) { +void JournalTraceMarshaller::tightMarshal2( OpenWireFormat* wireFormat, DataStructure* dataStructure, DataOutputStream* dataOut, BooleanStream* bs ) throw( io::IOException ){ BaseDataStreamMarshaller::tightMarshal2( wireFormat, dataStructure, dataOut, bs ); @@ -77,7 +77,7 @@ } /////////////////////////////////////////////////////////////////////////////// -void JournalTraceMarshaller::looseUnmarshal( OpenWireFormat& wireFormat, DataStructure* dataStructure, DataInputStream& dataIn ) { +void JournalTraceMarshaller::looseUnmarshal( OpenWireFormat* wireFormat, DataStructure* dataStructure, DataInputStream* dataIn ) throw( io::IOException ){ BaseDataStreamMarshaller::looseUnmarshal( wireFormat, dataStructure, dataIn ); JournalTrace* info = dynamic_cast( dataStructure ); @@ -85,7 +85,7 @@ } /////////////////////////////////////////////////////////////////////////////// -void JournalTraceMarshaller::looseMarshal( OpenWireFormat& wireFormat, DataStructure* dataStructure, DataOutputStream& dataOut ) { +void JournalTraceMarshaller::looseMarshal( OpenWireFormat* wireFormat, DataStructure* dataStructure, DataOutputStream* dataOut ) throw( io::IOException ){ JournalTrace* info = dynamic_cast( dataStructure ); BaseDataStreamMarshaller::looseMarshal( wireFormat, dataStructure, dataOut ); Modified: incubator/activemq/activemq-cpp/trunk/activemq-cpp/src/main/activemq/connector/openwire/marshal/v2/JournalTraceMarshaller.h URL: http://svn.apache.org/viewvc/incubator/activemq/activemq-cpp/trunk/activemq-cpp/src/main/activemq/connector/openwire/marshal/v2/JournalTraceMarshaller.h?view=diff&rev=474108&r1=474107&r2=474108 ============================================================================== --- incubator/activemq/activemq-cpp/trunk/activemq-cpp/src/main/activemq/connector/openwire/marshal/v2/JournalTraceMarshaller.h (original) +++ incubator/activemq/activemq-cpp/trunk/activemq-cpp/src/main/activemq/connector/openwire/marshal/v2/JournalTraceMarshaller.h Sun Nov 12 16:46:23 2006 @@ -23,13 +23,14 @@ #pragma warning( disable : 4290 ) #endif -#include +#include #include #include #include +#include #include -#include +#include namespace activemq{ namespace connector{ @@ -55,7 +56,7 @@ * Creates a new instance of this marshalable type. * @return new DataStructure object pointer caller owns it. */ - virtual DataStructure* createObject() const; + virtual commands::DataStructure* createObject() const; /** * Get the Data Structure Type that identifies this Marshaller @@ -73,7 +74,7 @@ virtual void tightUnmarshal( OpenWireFormat* wireFormat, commands::DataStructure* dataStructure, io::DataInputStream* dataIn, - util::BooleanStream* bs ) throws( io::IOException ); + utils::BooleanStream* bs ) throw( io::IOException ); /** * Write the booleans that this object uses to a BooleanStream @@ -84,7 +85,7 @@ */ virtual int tightMarshal1( OpenWireFormat* wireFormat, commands::DataStructure* dataStructure, - BooleanStream* bs ) throws( io::IOException ); + utils::BooleanStream* bs ) throw( io::IOException ); /** * Write a object instance to data output stream @@ -96,7 +97,7 @@ virtual void tightMarshal2( OpenWireFormat* wireFormat, commands::DataStructure* dataStructure, io::DataOutputStream* dataOut, - BooleanStream* bs ) throws( io::IOException ); + utils::BooleanStream* bs ) throw( io::IOException ); /** * Un-marshal an object instance from the data input stream @@ -106,7 +107,7 @@ */ virtual void looseUnmarshal( OpenWireFormat* wireFormat, commands::DataStructure* dataStructure, - io::DataInputStream* dataIn ) throws( io::IOException ); + io::DataInputStream* dataIn ) throw( io::IOException ); /** * Write a object instance to data output stream @@ -116,7 +117,7 @@ */ virtual void looseMarshal( OpenWireFormat* wireFormat, commands::DataStructure* dataStructure, - io::DataOutputStream* dataOut ) throws( io::IOException ); + io::DataOutputStream* dataOut ) throw( io::IOException ); }; Modified: incubator/activemq/activemq-cpp/trunk/activemq-cpp/src/main/activemq/connector/openwire/marshal/v2/JournalTransactionMarshaller.cpp URL: http://svn.apache.org/viewvc/incubator/activemq/activemq-cpp/trunk/activemq-cpp/src/main/activemq/connector/openwire/marshal/v2/JournalTransactionMarshaller.cpp?view=diff&rev=474108&r1=474107&r2=474108 ============================================================================== --- incubator/activemq/activemq-cpp/trunk/activemq-cpp/src/main/activemq/connector/openwire/marshal/v2/JournalTransactionMarshaller.cpp (original) +++ incubator/activemq/activemq-cpp/trunk/activemq-cpp/src/main/activemq/connector/openwire/marshal/v2/JournalTransactionMarshaller.cpp Sun Nov 12 16:46:23 2006 @@ -32,7 +32,7 @@ using namespace activemq::connector::openwire; using namespace activemq::connector::openwire::commands; using namespace activemq::connector::openwire::marshal; -using namespace activemq::connector::openwire::util; +using namespace activemq::connector::openwire::utils; using namespace activemq::connector::openwire::marshal::v2; /////////////////////////////////////////////////////////////////////////////// @@ -46,69 +46,60 @@ } /////////////////////////////////////////////////////////////////////////////// -void JournalTransactionMarshaller::tightUnmarshal( OpenWireFormat* wireFormat, DataStructure* dataStructure, DataInputStream* dataIn, BooleanStream* bs ) { +void JournalTransactionMarshaller::tightUnmarshal( OpenWireFormat* wireFormat, DataStructure* dataStructure, DataInputStream* dataIn, BooleanStream* bs ) throw( io::IOException ){ BaseDataStreamMarshaller::tightUnmarshal( wireFormat, dataStructure, dataIn, bs ); JournalTransaction* info = dynamic_cast( dataStructure ); info->setTransactionId( dynamic_cast< TransactionId* >( - tightUnmarsalNestedObject( wireFormat, dataIn, bs ) ); + tightUnmarshalNestedObject( wireFormat, dataIn, bs ) ) ); info->setType( dataIn->readByte() ); info->setWasPrepared( bs->readBoolean() ); } /////////////////////////////////////////////////////////////////////////////// -int JournalTransactionMarshaller::tightMarshal1( OpenWireFormat& wireFormat, DataStructure* dataStructure, BooleanStream& bs ) { +int JournalTransactionMarshaller::tightMarshal1( OpenWireFormat* wireFormat, DataStructure* dataStructure, BooleanStream* bs ) throw( io::IOException ){ JournalTransaction* info = dynamic_cast( dataStructure ); int rc = BaseDataStreamMarshaller::tightMarshal1( wireFormat, dataStructure, bs ); - DataStructure* data = - dynamic_cast< DataStructure* >( info->getTransactionId() ); - - rc += tightMarshalNestedObject1( wireFormat, data, bs ); + rc += tightMarshalNestedObject1( wireFormat, info->getTransactionId(), bs ); bs->writeBoolean( info->getWasPrepared() ); return rc + 1; } /////////////////////////////////////////////////////////////////////////////// -void JournalTransactionMarshaller::tightMarshal2( OpenWireFormat& wireFormat, DataStructure* dataStructure, DataOutputStream& dataOut, BooleanStream& bs ) { +void JournalTransactionMarshaller::tightMarshal2( OpenWireFormat* wireFormat, DataStructure* dataStructure, DataOutputStream* dataOut, BooleanStream* bs ) throw( io::IOException ){ BaseDataStreamMarshaller::tightMarshal2( wireFormat, dataStructure, dataOut, bs ); JournalTransaction* info = dynamic_cast( dataStructure ); - DataStructure* data = - dynamic_cast< DataStructure* >( info->getTransactionId() ); - - tightMarshalNestedObject2( wireFormat, data, dataOut, bs ); + tightMarshalNestedObject2( wireFormat, info->getTransactionId(), dataOut, bs ); dataOut->write( info->getType() ); bs->readBoolean(); } /////////////////////////////////////////////////////////////////////////////// -void JournalTransactionMarshaller::looseUnmarshal( OpenWireFormat& wireFormat, DataStructure* dataStructure, DataInputStream& dataIn ) { +void JournalTransactionMarshaller::looseUnmarshal( OpenWireFormat* wireFormat, DataStructure* dataStructure, DataInputStream* dataIn ) throw( io::IOException ){ BaseDataStreamMarshaller::looseUnmarshal( wireFormat, dataStructure, dataIn ); JournalTransaction* info = dynamic_cast( dataStructure ); - info->setTransactionId( dynamic_cast( - looseUnmarshalNestedObject( wireFormat, dataIn ) ) ); + info->setTransactionId( dynamic_cast< TransactionId* >( + looseUnmarshalNestedObject( wireFormat, dataIn ) ) ); info->setType( dataIn->readByte() ); info->setWasPrepared( dataIn->readBoolean() ); } /////////////////////////////////////////////////////////////////////////////// -void JournalTransactionMarshaller::looseMarshal( OpenWireFormat& wireFormat, DataStructure* dataStructure, DataOutputStream& dataOut ) { +void JournalTransactionMarshaller::looseMarshal( OpenWireFormat* wireFormat, DataStructure* dataStructure, DataOutputStream* dataOut ) throw( io::IOException ){ JournalTransaction* info = dynamic_cast( dataStructure ); BaseDataStreamMarshaller::looseMarshal( wireFormat, dataStructure, dataOut ); - DataStructure* data = - dynamic_cast< DataStructure* >( info->getTransactionId() ); - - looseMarshalNestedObject( wireFormat, data, dataOut ); + looseMarshalNestedObject( wireFormat, info->getTransactionId(), dataOut ); dataOut->write( info->getType() ); dataOut->write( info->getWasPrepared() ); } Modified: incubator/activemq/activemq-cpp/trunk/activemq-cpp/src/main/activemq/connector/openwire/marshal/v2/JournalTransactionMarshaller.h URL: http://svn.apache.org/viewvc/incubator/activemq/activemq-cpp/trunk/activemq-cpp/src/main/activemq/connector/openwire/marshal/v2/JournalTransactionMarshaller.h?view=diff&rev=474108&r1=474107&r2=474108 ============================================================================== --- incubator/activemq/activemq-cpp/trunk/activemq-cpp/src/main/activemq/connector/openwire/marshal/v2/JournalTransactionMarshaller.h (original) +++ incubator/activemq/activemq-cpp/trunk/activemq-cpp/src/main/activemq/connector/openwire/marshal/v2/JournalTransactionMarshaller.h Sun Nov 12 16:46:23 2006 @@ -23,13 +23,14 @@ #pragma warning( disable : 4290 ) #endif -#include +#include #include #include #include +#include #include -#include +#include namespace activemq{ namespace connector{ @@ -55,7 +56,7 @@ * Creates a new instance of this marshalable type. * @return new DataStructure object pointer caller owns it. */ - virtual DataStructure* createObject() const; + virtual commands::DataStructure* createObject() const; /** * Get the Data Structure Type that identifies this Marshaller @@ -73,7 +74,7 @@ virtual void tightUnmarshal( OpenWireFormat* wireFormat, commands::DataStructure* dataStructure, io::DataInputStream* dataIn, - util::BooleanStream* bs ) throws( io::IOException ); + utils::BooleanStream* bs ) throw( io::IOException ); /** * Write the booleans that this object uses to a BooleanStream @@ -84,7 +85,7 @@ */ virtual int tightMarshal1( OpenWireFormat* wireFormat, commands::DataStructure* dataStructure, - BooleanStream* bs ) throws( io::IOException ); + utils::BooleanStream* bs ) throw( io::IOException ); /** * Write a object instance to data output stream @@ -96,7 +97,7 @@ virtual void tightMarshal2( OpenWireFormat* wireFormat, commands::DataStructure* dataStructure, io::DataOutputStream* dataOut, - BooleanStream* bs ) throws( io::IOException ); + utils::BooleanStream* bs ) throw( io::IOException ); /** * Un-marshal an object instance from the data input stream @@ -106,7 +107,7 @@ */ virtual void looseUnmarshal( OpenWireFormat* wireFormat, commands::DataStructure* dataStructure, - io::DataInputStream* dataIn ) throws( io::IOException ); + io::DataInputStream* dataIn ) throw( io::IOException ); /** * Write a object instance to data output stream @@ -116,7 +117,7 @@ */ virtual void looseMarshal( OpenWireFormat* wireFormat, commands::DataStructure* dataStructure, - io::DataOutputStream* dataOut ) throws( io::IOException ); + io::DataOutputStream* dataOut ) throw( io::IOException ); }; Modified: incubator/activemq/activemq-cpp/trunk/activemq-cpp/src/main/activemq/connector/openwire/marshal/v2/KeepAliveInfoMarshaller.cpp URL: http://svn.apache.org/viewvc/incubator/activemq/activemq-cpp/trunk/activemq-cpp/src/main/activemq/connector/openwire/marshal/v2/KeepAliveInfoMarshaller.cpp?view=diff&rev=474108&r1=474107&r2=474108 ============================================================================== --- incubator/activemq/activemq-cpp/trunk/activemq-cpp/src/main/activemq/connector/openwire/marshal/v2/KeepAliveInfoMarshaller.cpp (original) +++ incubator/activemq/activemq-cpp/trunk/activemq-cpp/src/main/activemq/connector/openwire/marshal/v2/KeepAliveInfoMarshaller.cpp Sun Nov 12 16:46:23 2006 @@ -32,7 +32,7 @@ using namespace activemq::connector::openwire; using namespace activemq::connector::openwire::commands; using namespace activemq::connector::openwire::marshal; -using namespace activemq::connector::openwire::util; +using namespace activemq::connector::openwire::utils; using namespace activemq::connector::openwire::marshal::v2; /////////////////////////////////////////////////////////////////////////////// @@ -46,13 +46,13 @@ } /////////////////////////////////////////////////////////////////////////////// -void KeepAliveInfoMarshaller::tightUnmarshal( OpenWireFormat* wireFormat, DataStructure* dataStructure, DataInputStream* dataIn, BooleanStream* bs ) { +void KeepAliveInfoMarshaller::tightUnmarshal( OpenWireFormat* wireFormat, DataStructure* dataStructure, DataInputStream* dataIn, BooleanStream* bs ) throw( io::IOException ){ BaseCommandMarshaller::tightUnmarshal( wireFormat, dataStructure, dataIn, bs ); } /////////////////////////////////////////////////////////////////////////////// -int KeepAliveInfoMarshaller::tightMarshal1( OpenWireFormat& wireFormat, DataStructure* dataStructure, BooleanStream& bs ) { +int KeepAliveInfoMarshaller::tightMarshal1( OpenWireFormat* wireFormat, DataStructure* dataStructure, BooleanStream* bs ) throw( io::IOException ){ int rc = BaseCommandMarshaller::tightMarshal1( wireFormat, dataStructure, bs ); @@ -60,19 +60,19 @@ } /////////////////////////////////////////////////////////////////////////////// -void KeepAliveInfoMarshaller::tightMarshal2( OpenWireFormat& wireFormat, DataStructure* dataStructure, DataOutputStream& dataOut, BooleanStream& bs ) { +void KeepAliveInfoMarshaller::tightMarshal2( OpenWireFormat* wireFormat, DataStructure* dataStructure, DataOutputStream* dataOut, BooleanStream* bs ) throw( io::IOException ){ BaseCommandMarshaller::tightMarshal2( wireFormat, dataStructure, dataOut, bs ); } /////////////////////////////////////////////////////////////////////////////// -void KeepAliveInfoMarshaller::looseUnmarshal( OpenWireFormat& wireFormat, DataStructure* dataStructure, DataInputStream& dataIn ) { +void KeepAliveInfoMarshaller::looseUnmarshal( OpenWireFormat* wireFormat, DataStructure* dataStructure, DataInputStream* dataIn ) throw( io::IOException ){ BaseCommandMarshaller::looseUnmarshal( wireFormat, dataStructure, dataIn ); } /////////////////////////////////////////////////////////////////////////////// -void KeepAliveInfoMarshaller::looseMarshal( OpenWireFormat& wireFormat, DataStructure* dataStructure, DataOutputStream& dataOut ) { +void KeepAliveInfoMarshaller::looseMarshal( OpenWireFormat* wireFormat, DataStructure* dataStructure, DataOutputStream* dataOut ) throw( io::IOException ){ BaseCommandMarshaller::looseMarshal( wireFormat, dataStructure, dataOut ); } Modified: incubator/activemq/activemq-cpp/trunk/activemq-cpp/src/main/activemq/connector/openwire/marshal/v2/KeepAliveInfoMarshaller.h URL: http://svn.apache.org/viewvc/incubator/activemq/activemq-cpp/trunk/activemq-cpp/src/main/activemq/connector/openwire/marshal/v2/KeepAliveInfoMarshaller.h?view=diff&rev=474108&r1=474107&r2=474108 ============================================================================== --- incubator/activemq/activemq-cpp/trunk/activemq-cpp/src/main/activemq/connector/openwire/marshal/v2/KeepAliveInfoMarshaller.h (original) +++ incubator/activemq/activemq-cpp/trunk/activemq-cpp/src/main/activemq/connector/openwire/marshal/v2/KeepAliveInfoMarshaller.h Sun Nov 12 16:46:23 2006 @@ -23,13 +23,14 @@ #pragma warning( disable : 4290 ) #endif -#include +#include #include #include #include +#include #include -#include +#include namespace activemq{ namespace connector{ @@ -55,7 +56,7 @@ * Creates a new instance of this marshalable type. * @return new DataStructure object pointer caller owns it. */ - virtual DataStructure* createObject() const; + virtual commands::DataStructure* createObject() const; /** * Get the Data Structure Type that identifies this Marshaller @@ -73,7 +74,7 @@ virtual void tightUnmarshal( OpenWireFormat* wireFormat, commands::DataStructure* dataStructure, io::DataInputStream* dataIn, - util::BooleanStream* bs ) throws( io::IOException ); + utils::BooleanStream* bs ) throw( io::IOException ); /** * Write the booleans that this object uses to a BooleanStream @@ -84,7 +85,7 @@ */ virtual int tightMarshal1( OpenWireFormat* wireFormat, commands::DataStructure* dataStructure, - BooleanStream* bs ) throws( io::IOException ); + utils::BooleanStream* bs ) throw( io::IOException ); /** * Write a object instance to data output stream @@ -96,7 +97,7 @@ virtual void tightMarshal2( OpenWireFormat* wireFormat, commands::DataStructure* dataStructure, io::DataOutputStream* dataOut, - BooleanStream* bs ) throws( io::IOException ); + utils::BooleanStream* bs ) throw( io::IOException ); /** * Un-marshal an object instance from the data input stream @@ -106,7 +107,7 @@ */ virtual void looseUnmarshal( OpenWireFormat* wireFormat, commands::DataStructure* dataStructure, - io::DataInputStream* dataIn ) throws( io::IOException ); + io::DataInputStream* dataIn ) throw( io::IOException ); /** * Write a object instance to data output stream @@ -116,7 +117,7 @@ */ virtual void looseMarshal( OpenWireFormat* wireFormat, commands::DataStructure* dataStructure, - io::DataOutputStream* dataOut ) throws( io::IOException ); + io::DataOutputStream* dataOut ) throw( io::IOException ); }; Modified: incubator/activemq/activemq-cpp/trunk/activemq-cpp/src/main/activemq/connector/openwire/marshal/v2/LastPartialCommandMarshaller.cpp URL: http://svn.apache.org/viewvc/incubator/activemq/activemq-cpp/trunk/activemq-cpp/src/main/activemq/connector/openwire/marshal/v2/LastPartialCommandMarshaller.cpp?view=diff&rev=474108&r1=474107&r2=474108 ============================================================================== --- incubator/activemq/activemq-cpp/trunk/activemq-cpp/src/main/activemq/connector/openwire/marshal/v2/LastPartialCommandMarshaller.cpp (original) +++ incubator/activemq/activemq-cpp/trunk/activemq-cpp/src/main/activemq/connector/openwire/marshal/v2/LastPartialCommandMarshaller.cpp Sun Nov 12 16:46:23 2006 @@ -32,7 +32,7 @@ using namespace activemq::connector::openwire; using namespace activemq::connector::openwire::commands; using namespace activemq::connector::openwire::marshal; -using namespace activemq::connector::openwire::util; +using namespace activemq::connector::openwire::utils; using namespace activemq::connector::openwire::marshal::v2; /////////////////////////////////////////////////////////////////////////////// @@ -46,13 +46,13 @@ } /////////////////////////////////////////////////////////////////////////////// -void LastPartialCommandMarshaller::tightUnmarshal( OpenWireFormat* wireFormat, DataStructure* dataStructure, DataInputStream* dataIn, BooleanStream* bs ) { +void LastPartialCommandMarshaller::tightUnmarshal( OpenWireFormat* wireFormat, DataStructure* dataStructure, DataInputStream* dataIn, BooleanStream* bs ) throw( io::IOException ){ PartialCommandMarshaller::tightUnmarshal( wireFormat, dataStructure, dataIn, bs ); } /////////////////////////////////////////////////////////////////////////////// -int LastPartialCommandMarshaller::tightMarshal1( OpenWireFormat& wireFormat, DataStructure* dataStructure, BooleanStream& bs ) { +int LastPartialCommandMarshaller::tightMarshal1( OpenWireFormat* wireFormat, DataStructure* dataStructure, BooleanStream* bs ) throw( io::IOException ){ int rc = PartialCommandMarshaller::tightMarshal1( wireFormat, dataStructure, bs ); @@ -60,19 +60,19 @@ } /////////////////////////////////////////////////////////////////////////////// -void LastPartialCommandMarshaller::tightMarshal2( OpenWireFormat& wireFormat, DataStructure* dataStructure, DataOutputStream& dataOut, BooleanStream& bs ) { +void LastPartialCommandMarshaller::tightMarshal2( OpenWireFormat* wireFormat, DataStructure* dataStructure, DataOutputStream* dataOut, BooleanStream* bs ) throw( io::IOException ){ PartialCommandMarshaller::tightMarshal2( wireFormat, dataStructure, dataOut, bs ); } /////////////////////////////////////////////////////////////////////////////// -void LastPartialCommandMarshaller::looseUnmarshal( OpenWireFormat& wireFormat, DataStructure* dataStructure, DataInputStream& dataIn ) { +void LastPartialCommandMarshaller::looseUnmarshal( OpenWireFormat* wireFormat, DataStructure* dataStructure, DataInputStream* dataIn ) throw( io::IOException ){ PartialCommandMarshaller::looseUnmarshal( wireFormat, dataStructure, dataIn ); } /////////////////////////////////////////////////////////////////////////////// -void LastPartialCommandMarshaller::looseMarshal( OpenWireFormat& wireFormat, DataStructure* dataStructure, DataOutputStream& dataOut ) { +void LastPartialCommandMarshaller::looseMarshal( OpenWireFormat* wireFormat, DataStructure* dataStructure, DataOutputStream* dataOut ) throw( io::IOException ){ PartialCommandMarshaller::looseMarshal( wireFormat, dataStructure, dataOut ); } Modified: incubator/activemq/activemq-cpp/trunk/activemq-cpp/src/main/activemq/connector/openwire/marshal/v2/LastPartialCommandMarshaller.h URL: http://svn.apache.org/viewvc/incubator/activemq/activemq-cpp/trunk/activemq-cpp/src/main/activemq/connector/openwire/marshal/v2/LastPartialCommandMarshaller.h?view=diff&rev=474108&r1=474107&r2=474108 ============================================================================== --- incubator/activemq/activemq-cpp/trunk/activemq-cpp/src/main/activemq/connector/openwire/marshal/v2/LastPartialCommandMarshaller.h (original) +++ incubator/activemq/activemq-cpp/trunk/activemq-cpp/src/main/activemq/connector/openwire/marshal/v2/LastPartialCommandMarshaller.h Sun Nov 12 16:46:23 2006 @@ -23,13 +23,14 @@ #pragma warning( disable : 4290 ) #endif -#include +#include #include #include #include +#include #include -#include +#include namespace activemq{ namespace connector{ @@ -55,7 +56,7 @@ * Creates a new instance of this marshalable type. * @return new DataStructure object pointer caller owns it. */ - virtual DataStructure* createObject() const; + virtual commands::DataStructure* createObject() const; /** * Get the Data Structure Type that identifies this Marshaller @@ -73,7 +74,7 @@ virtual void tightUnmarshal( OpenWireFormat* wireFormat, commands::DataStructure* dataStructure, io::DataInputStream* dataIn, - util::BooleanStream* bs ) throws( io::IOException ); + utils::BooleanStream* bs ) throw( io::IOException ); /** * Write the booleans that this object uses to a BooleanStream @@ -84,7 +85,7 @@ */ virtual int tightMarshal1( OpenWireFormat* wireFormat, commands::DataStructure* dataStructure, - BooleanStream* bs ) throws( io::IOException ); + utils::BooleanStream* bs ) throw( io::IOException ); /** * Write a object instance to data output stream @@ -96,7 +97,7 @@ virtual void tightMarshal2( OpenWireFormat* wireFormat, commands::DataStructure* dataStructure, io::DataOutputStream* dataOut, - BooleanStream* bs ) throws( io::IOException ); + utils::BooleanStream* bs ) throw( io::IOException ); /** * Un-marshal an object instance from the data input stream @@ -106,7 +107,7 @@ */ virtual void looseUnmarshal( OpenWireFormat* wireFormat, commands::DataStructure* dataStructure, - io::DataInputStream* dataIn ) throws( io::IOException ); + io::DataInputStream* dataIn ) throw( io::IOException ); /** * Write a object instance to data output stream @@ -116,7 +117,7 @@ */ virtual void looseMarshal( OpenWireFormat* wireFormat, commands::DataStructure* dataStructure, - io::DataOutputStream* dataOut ) throws( io::IOException ); + io::DataOutputStream* dataOut ) throw( io::IOException ); }; Modified: incubator/activemq/activemq-cpp/trunk/activemq-cpp/src/main/activemq/connector/openwire/marshal/v2/LocalTransactionIdMarshaller.cpp URL: http://svn.apache.org/viewvc/incubator/activemq/activemq-cpp/trunk/activemq-cpp/src/main/activemq/connector/openwire/marshal/v2/LocalTransactionIdMarshaller.cpp?view=diff&rev=474108&r1=474107&r2=474108 ============================================================================== --- incubator/activemq/activemq-cpp/trunk/activemq-cpp/src/main/activemq/connector/openwire/marshal/v2/LocalTransactionIdMarshaller.cpp (original) +++ incubator/activemq/activemq-cpp/trunk/activemq-cpp/src/main/activemq/connector/openwire/marshal/v2/LocalTransactionIdMarshaller.cpp Sun Nov 12 16:46:23 2006 @@ -32,7 +32,7 @@ using namespace activemq::connector::openwire; using namespace activemq::connector::openwire::commands; using namespace activemq::connector::openwire::marshal; -using namespace activemq::connector::openwire::util; +using namespace activemq::connector::openwire::utils; using namespace activemq::connector::openwire::marshal::v2; /////////////////////////////////////////////////////////////////////////////// @@ -46,66 +46,57 @@ } /////////////////////////////////////////////////////////////////////////////// -void LocalTransactionIdMarshaller::tightUnmarshal( OpenWireFormat* wireFormat, DataStructure* dataStructure, DataInputStream* dataIn, BooleanStream* bs ) { +void LocalTransactionIdMarshaller::tightUnmarshal( OpenWireFormat* wireFormat, DataStructure* dataStructure, DataInputStream* dataIn, BooleanStream* bs ) throw( io::IOException ){ TransactionIdMarshaller::tightUnmarshal( wireFormat, dataStructure, dataIn, bs ); LocalTransactionId* info = dynamic_cast( dataStructure ); - info->setValue( TightUnmarshalLong( wireFormat, dataIn, bs ) ); + info->setValue( tightUnmarshalLong( wireFormat, dataIn, bs ) ); info->setConnectionId( dynamic_cast< ConnectionId* >( - tightUnmarsalCachedObject( wireFormat, dataIn, bs ) ); + tightUnmarshalCachedObject( wireFormat, dataIn, bs ) ) ); } /////////////////////////////////////////////////////////////////////////////// -int LocalTransactionIdMarshaller::tightMarshal1( OpenWireFormat& wireFormat, DataStructure* dataStructure, BooleanStream& bs ) { +int LocalTransactionIdMarshaller::tightMarshal1( OpenWireFormat* wireFormat, DataStructure* dataStructure, BooleanStream* bs ) throw( io::IOException ){ LocalTransactionId* info = dynamic_cast( dataStructure ); int rc = TransactionIdMarshaller::tightMarshal1( wireFormat, dataStructure, bs ); rc += tightMarshalLong1( wireFormat, info->getValue(), bs ); - DataStructure* data = - dynamic_cast< DataStructure* >( info->getConnectionId() ); - - rc += tightMarshalCachedObject1( wireFormat, data, bs ); + rc += tightMarshalCachedObject1( wireFormat, info->getConnectionId(), bs ); return rc + 0; } /////////////////////////////////////////////////////////////////////////////// -void LocalTransactionIdMarshaller::tightMarshal2( OpenWireFormat& wireFormat, DataStructure* dataStructure, DataOutputStream& dataOut, BooleanStream& bs ) { +void LocalTransactionIdMarshaller::tightMarshal2( OpenWireFormat* wireFormat, DataStructure* dataStructure, DataOutputStream* dataOut, BooleanStream* bs ) throw( io::IOException ){ TransactionIdMarshaller::tightMarshal2( wireFormat, dataStructure, dataOut, bs ); LocalTransactionId* info = dynamic_cast( dataStructure ); tightMarshalLong2( wireFormat, info->getValue(), dataOut, bs ); - DataStructure* data = - dynamic_cast< DataStructure* >( info->getConnectionId() ); - - tightMarshalCachedObject2( wireFormat, data, dataOut, bs ); + tightMarshalCachedObject2( wireFormat, info->getConnectionId(), dataOut, bs ); } /////////////////////////////////////////////////////////////////////////////// -void LocalTransactionIdMarshaller::looseUnmarshal( OpenWireFormat& wireFormat, DataStructure* dataStructure, DataInputStream& dataIn ) { +void LocalTransactionIdMarshaller::looseUnmarshal( OpenWireFormat* wireFormat, DataStructure* dataStructure, DataInputStream* dataIn ) throw( io::IOException ){ TransactionIdMarshaller::looseUnmarshal( wireFormat, dataStructure, dataIn ); LocalTransactionId* info = dynamic_cast( dataStructure ); info->setValue( looseUnmarshalLong( wireFormat, dataIn ) ); - info->setConnectionId( dynamic_cast( - looseUnmarshalCachedObject( wireFormat, dataIn ) ) ); + info->setConnectionId( dynamic_cast< ConnectionId* >( + looseUnmarshalCachedObject( wireFormat, dataIn ) ) ); } /////////////////////////////////////////////////////////////////////////////// -void LocalTransactionIdMarshaller::looseMarshal( OpenWireFormat& wireFormat, DataStructure* dataStructure, DataOutputStream& dataOut ) { +void LocalTransactionIdMarshaller::looseMarshal( OpenWireFormat* wireFormat, DataStructure* dataStructure, DataOutputStream* dataOut ) throw( io::IOException ){ LocalTransactionId* info = dynamic_cast( dataStructure ); TransactionIdMarshaller::looseMarshal( wireFormat, dataStructure, dataOut ); looseMarshalLong( wireFormat, info->getValue(), dataOut ); - DataStructure* data = - dynamic_cast< DataStructure* >( info->getConnectionId() ); - - looseMarshalCachedObject( wireFormat, data, dataOut ); + looseMarshalCachedObject( wireFormat, info->getConnectionId(), dataOut ); } Modified: incubator/activemq/activemq-cpp/trunk/activemq-cpp/src/main/activemq/connector/openwire/marshal/v2/LocalTransactionIdMarshaller.h URL: http://svn.apache.org/viewvc/incubator/activemq/activemq-cpp/trunk/activemq-cpp/src/main/activemq/connector/openwire/marshal/v2/LocalTransactionIdMarshaller.h?view=diff&rev=474108&r1=474107&r2=474108 ============================================================================== --- incubator/activemq/activemq-cpp/trunk/activemq-cpp/src/main/activemq/connector/openwire/marshal/v2/LocalTransactionIdMarshaller.h (original) +++ incubator/activemq/activemq-cpp/trunk/activemq-cpp/src/main/activemq/connector/openwire/marshal/v2/LocalTransactionIdMarshaller.h Sun Nov 12 16:46:23 2006 @@ -23,13 +23,14 @@ #pragma warning( disable : 4290 ) #endif -#include +#include #include #include #include +#include #include -#include +#include namespace activemq{ namespace connector{ @@ -55,7 +56,7 @@ * Creates a new instance of this marshalable type. * @return new DataStructure object pointer caller owns it. */ - virtual DataStructure* createObject() const; + virtual commands::DataStructure* createObject() const; /** * Get the Data Structure Type that identifies this Marshaller @@ -73,7 +74,7 @@ virtual void tightUnmarshal( OpenWireFormat* wireFormat, commands::DataStructure* dataStructure, io::DataInputStream* dataIn, - util::BooleanStream* bs ) throws( io::IOException ); + utils::BooleanStream* bs ) throw( io::IOException ); /** * Write the booleans that this object uses to a BooleanStream @@ -84,7 +85,7 @@ */ virtual int tightMarshal1( OpenWireFormat* wireFormat, commands::DataStructure* dataStructure, - BooleanStream* bs ) throws( io::IOException ); + utils::BooleanStream* bs ) throw( io::IOException ); /** * Write a object instance to data output stream @@ -96,7 +97,7 @@ virtual void tightMarshal2( OpenWireFormat* wireFormat, commands::DataStructure* dataStructure, io::DataOutputStream* dataOut, - BooleanStream* bs ) throws( io::IOException ); + utils::BooleanStream* bs ) throw( io::IOException ); /** * Un-marshal an object instance from the data input stream @@ -106,7 +107,7 @@ */ virtual void looseUnmarshal( OpenWireFormat* wireFormat, commands::DataStructure* dataStructure, - io::DataInputStream* dataIn ) throws( io::IOException ); + io::DataInputStream* dataIn ) throw( io::IOException ); /** * Write a object instance to data output stream @@ -116,7 +117,7 @@ */ virtual void looseMarshal( OpenWireFormat* wireFormat, commands::DataStructure* dataStructure, - io::DataOutputStream* dataOut ) throws( io::IOException ); + io::DataOutputStream* dataOut ) throw( io::IOException ); }; Modified: incubator/activemq/activemq-cpp/trunk/activemq-cpp/src/main/activemq/connector/openwire/marshal/v2/MessageAckMarshaller.cpp URL: http://svn.apache.org/viewvc/incubator/activemq/activemq-cpp/trunk/activemq-cpp/src/main/activemq/connector/openwire/marshal/v2/MessageAckMarshaller.cpp?view=diff&rev=474108&r1=474107&r2=474108 ============================================================================== --- incubator/activemq/activemq-cpp/trunk/activemq-cpp/src/main/activemq/connector/openwire/marshal/v2/MessageAckMarshaller.cpp (original) +++ incubator/activemq/activemq-cpp/trunk/activemq-cpp/src/main/activemq/connector/openwire/marshal/v2/MessageAckMarshaller.cpp Sun Nov 12 16:46:23 2006 @@ -32,7 +32,7 @@ using namespace activemq::connector::openwire; using namespace activemq::connector::openwire::commands; using namespace activemq::connector::openwire::marshal; -using namespace activemq::connector::openwire::util; +using namespace activemq::connector::openwire::utils; using namespace activemq::connector::openwire::marshal::v2; /////////////////////////////////////////////////////////////////////////////// @@ -46,133 +46,88 @@ } /////////////////////////////////////////////////////////////////////////////// -void MessageAckMarshaller::tightUnmarshal( OpenWireFormat* wireFormat, DataStructure* dataStructure, DataInputStream* dataIn, BooleanStream* bs ) { +void MessageAckMarshaller::tightUnmarshal( OpenWireFormat* wireFormat, DataStructure* dataStructure, DataInputStream* dataIn, BooleanStream* bs ) throw( io::IOException ){ BaseCommandMarshaller::tightUnmarshal( wireFormat, dataStructure, dataIn, bs ); MessageAck* info = dynamic_cast( dataStructure ); info->setDestination( dynamic_cast< ActiveMQDestination* >( - tightUnmarsalCachedObject( wireFormat, dataIn, bs ) ); + tightUnmarshalCachedObject( wireFormat, dataIn, bs ) ) ); info->setTransactionId( dynamic_cast< TransactionId* >( - tightUnmarsalCachedObject( wireFormat, dataIn, bs ) ); + tightUnmarshalCachedObject( wireFormat, dataIn, bs ) ) ); info->setConsumerId( dynamic_cast< ConsumerId* >( - tightUnmarsalCachedObject( wireFormat, dataIn, bs ) ); + tightUnmarshalCachedObject( wireFormat, dataIn, bs ) ) ); info->setAckType( dataIn->readByte() ); info->setFirstMessageId( dynamic_cast< MessageId* >( - tightUnmarsalNestedObject( wireFormat, dataIn, bs ) ); + tightUnmarshalNestedObject( wireFormat, dataIn, bs ) ) ); info->setLastMessageId( dynamic_cast< MessageId* >( - tightUnmarsalNestedObject( wireFormat, dataIn, bs ) ); + tightUnmarshalNestedObject( wireFormat, dataIn, bs ) ) ); info->setMessageCount( dataIn->readInt() ); } /////////////////////////////////////////////////////////////////////////////// -int MessageAckMarshaller::tightMarshal1( OpenWireFormat& wireFormat, DataStructure* dataStructure, BooleanStream& bs ) { +int MessageAckMarshaller::tightMarshal1( OpenWireFormat* wireFormat, DataStructure* dataStructure, BooleanStream* bs ) throw( io::IOException ){ MessageAck* info = dynamic_cast( dataStructure ); int rc = BaseCommandMarshaller::tightMarshal1( wireFormat, dataStructure, bs ); - DataStructure* data = - dynamic_cast< DataStructure* >( info->getDestination() ); - - rc += tightMarshalCachedObject1( wireFormat, data, bs ); - DataStructure* data = - dynamic_cast< DataStructure* >( info->getTransactionId() ); - - rc += tightMarshalCachedObject1( wireFormat, data, bs ); - DataStructure* data = - dynamic_cast< DataStructure* >( info->getConsumerId() ); - - rc += tightMarshalCachedObject1( wireFormat, data, bs ); - DataStructure* data = - dynamic_cast< DataStructure* >( info->getFirstMessageId() ); - - rc += tightMarshalNestedObject1( wireFormat, data, bs ); - DataStructure* data = - dynamic_cast< DataStructure* >( info->getLastMessageId() ); - - rc += tightMarshalNestedObject1( wireFormat, data, bs ); + rc += tightMarshalCachedObject1( wireFormat, info->getDestination(), bs ); + rc += tightMarshalCachedObject1( wireFormat, info->getTransactionId(), bs ); + rc += tightMarshalCachedObject1( wireFormat, info->getConsumerId(), bs ); + rc += tightMarshalNestedObject1( wireFormat, info->getFirstMessageId(), bs ); + rc += tightMarshalNestedObject1( wireFormat, info->getLastMessageId(), bs ); return rc + 5; } /////////////////////////////////////////////////////////////////////////////// -void MessageAckMarshaller::tightMarshal2( OpenWireFormat& wireFormat, DataStructure* dataStructure, DataOutputStream& dataOut, BooleanStream& bs ) { +void MessageAckMarshaller::tightMarshal2( OpenWireFormat* wireFormat, DataStructure* dataStructure, DataOutputStream* dataOut, BooleanStream* bs ) throw( io::IOException ){ BaseCommandMarshaller::tightMarshal2( wireFormat, dataStructure, dataOut, bs ); MessageAck* info = dynamic_cast( dataStructure ); - DataStructure* data = - dynamic_cast< DataStructure* >( info->getDestination() ); - - tightMarshalCachedObject2( wireFormat, data, dataOut, bs ); - DataStructure* data = - dynamic_cast< DataStructure* >( info->getTransactionId() ); - - tightMarshalCachedObject2( wireFormat, data, dataOut, bs ); - DataStructure* data = - dynamic_cast< DataStructure* >( info->getConsumerId() ); - - tightMarshalCachedObject2( wireFormat, data, dataOut, bs ); + tightMarshalCachedObject2( wireFormat, info->getDestination(), dataOut, bs ); + tightMarshalCachedObject2( wireFormat, info->getTransactionId(), dataOut, bs ); + tightMarshalCachedObject2( wireFormat, info->getConsumerId(), dataOut, bs ); dataOut->write( info->getAckType() ); - DataStructure* data = - dynamic_cast< DataStructure* >( info->getFirstMessageId() ); - - tightMarshalNestedObject2( wireFormat, data, dataOut, bs ); - DataStructure* data = - dynamic_cast< DataStructure* >( info->getLastMessageId() ); - - tightMarshalNestedObject2( wireFormat, data, dataOut, bs ); + tightMarshalNestedObject2( wireFormat, info->getFirstMessageId(), dataOut, bs ); + tightMarshalNestedObject2( wireFormat, info->getLastMessageId(), dataOut, bs ); dataOut->write( info->getMessageCount() ); } /////////////////////////////////////////////////////////////////////////////// -void MessageAckMarshaller::looseUnmarshal( OpenWireFormat& wireFormat, DataStructure* dataStructure, DataInputStream& dataIn ) { +void MessageAckMarshaller::looseUnmarshal( OpenWireFormat* wireFormat, DataStructure* dataStructure, DataInputStream* dataIn ) throw( io::IOException ){ BaseCommandMarshaller::looseUnmarshal( wireFormat, dataStructure, dataIn ); MessageAck* info = dynamic_cast( dataStructure ); - info->setDestination( dynamic_cast( - looseUnmarshalCachedObject( wireFormat, dataIn ) ) ); - info->setTransactionId( dynamic_cast( - looseUnmarshalCachedObject( wireFormat, dataIn ) ) ); - info->setConsumerId( dynamic_cast( - looseUnmarshalCachedObject( wireFormat, dataIn ) ) ); + info->setDestination( dynamic_cast< ActiveMQDestination* >( + looseUnmarshalCachedObject( wireFormat, dataIn ) ) ); + info->setTransactionId( dynamic_cast< TransactionId* >( + looseUnmarshalCachedObject( wireFormat, dataIn ) ) ); + info->setConsumerId( dynamic_cast< ConsumerId* >( + looseUnmarshalCachedObject( wireFormat, dataIn ) ) ); info->setAckType( dataIn->readByte() ); - info->setFirstMessageId( dynamic_cast( - looseUnmarshalNestedObject( wireFormat, dataIn ) ) ); - info->setLastMessageId( dynamic_cast( - looseUnmarshalNestedObject( wireFormat, dataIn ) ) ); + info->setFirstMessageId( dynamic_cast< MessageId* >( + looseUnmarshalNestedObject( wireFormat, dataIn ) ) ); + info->setLastMessageId( dynamic_cast< MessageId* >( + looseUnmarshalNestedObject( wireFormat, dataIn ) ) ); info->setMessageCount( dataIn->readInt() ); } /////////////////////////////////////////////////////////////////////////////// -void MessageAckMarshaller::looseMarshal( OpenWireFormat& wireFormat, DataStructure* dataStructure, DataOutputStream& dataOut ) { +void MessageAckMarshaller::looseMarshal( OpenWireFormat* wireFormat, DataStructure* dataStructure, DataOutputStream* dataOut ) throw( io::IOException ){ MessageAck* info = dynamic_cast( dataStructure ); BaseCommandMarshaller::looseMarshal( wireFormat, dataStructure, dataOut ); - DataStructure* data = - dynamic_cast< DataStructure* >( info->getDestination() ); - - looseMarshalCachedObject( wireFormat, data, dataOut ); - DataStructure* data = - dynamic_cast< DataStructure* >( info->getTransactionId() ); - - looseMarshalCachedObject( wireFormat, data, dataOut ); - DataStructure* data = - dynamic_cast< DataStructure* >( info->getConsumerId() ); - - looseMarshalCachedObject( wireFormat, data, dataOut ); + looseMarshalCachedObject( wireFormat, info->getDestination(), dataOut ); + looseMarshalCachedObject( wireFormat, info->getTransactionId(), dataOut ); + looseMarshalCachedObject( wireFormat, info->getConsumerId(), dataOut ); dataOut->write( info->getAckType() ); - DataStructure* data = - dynamic_cast< DataStructure* >( info->getFirstMessageId() ); - - looseMarshalNestedObject( wireFormat, data, dataOut ); - DataStructure* data = - dynamic_cast< DataStructure* >( info->getLastMessageId() ); - - looseMarshalNestedObject( wireFormat, data, dataOut ); + looseMarshalNestedObject( wireFormat, info->getFirstMessageId(), dataOut ); + looseMarshalNestedObject( wireFormat, info->getLastMessageId(), dataOut ); dataOut->write( info->getMessageCount() ); } Modified: incubator/activemq/activemq-cpp/trunk/activemq-cpp/src/main/activemq/connector/openwire/marshal/v2/MessageAckMarshaller.h URL: http://svn.apache.org/viewvc/incubator/activemq/activemq-cpp/trunk/activemq-cpp/src/main/activemq/connector/openwire/marshal/v2/MessageAckMarshaller.h?view=diff&rev=474108&r1=474107&r2=474108 ============================================================================== --- incubator/activemq/activemq-cpp/trunk/activemq-cpp/src/main/activemq/connector/openwire/marshal/v2/MessageAckMarshaller.h (original) +++ incubator/activemq/activemq-cpp/trunk/activemq-cpp/src/main/activemq/connector/openwire/marshal/v2/MessageAckMarshaller.h Sun Nov 12 16:46:23 2006 @@ -23,13 +23,14 @@ #pragma warning( disable : 4290 ) #endif -#include +#include #include #include #include +#include #include -#include +#include namespace activemq{ namespace connector{ @@ -55,7 +56,7 @@ * Creates a new instance of this marshalable type. * @return new DataStructure object pointer caller owns it. */ - virtual DataStructure* createObject() const; + virtual commands::DataStructure* createObject() const; /** * Get the Data Structure Type that identifies this Marshaller @@ -73,7 +74,7 @@ virtual void tightUnmarshal( OpenWireFormat* wireFormat, commands::DataStructure* dataStructure, io::DataInputStream* dataIn, - util::BooleanStream* bs ) throws( io::IOException ); + utils::BooleanStream* bs ) throw( io::IOException ); /** * Write the booleans that this object uses to a BooleanStream @@ -84,7 +85,7 @@ */ virtual int tightMarshal1( OpenWireFormat* wireFormat, commands::DataStructure* dataStructure, - BooleanStream* bs ) throws( io::IOException ); + utils::BooleanStream* bs ) throw( io::IOException ); /** * Write a object instance to data output stream @@ -96,7 +97,7 @@ virtual void tightMarshal2( OpenWireFormat* wireFormat, commands::DataStructure* dataStructure, io::DataOutputStream* dataOut, - BooleanStream* bs ) throws( io::IOException ); + utils::BooleanStream* bs ) throw( io::IOException ); /** * Un-marshal an object instance from the data input stream @@ -106,7 +107,7 @@ */ virtual void looseUnmarshal( OpenWireFormat* wireFormat, commands::DataStructure* dataStructure, - io::DataInputStream* dataIn ) throws( io::IOException ); + io::DataInputStream* dataIn ) throw( io::IOException ); /** * Write a object instance to data output stream @@ -116,7 +117,7 @@ */ virtual void looseMarshal( OpenWireFormat* wireFormat, commands::DataStructure* dataStructure, - io::DataOutputStream* dataOut ) throws( io::IOException ); + io::DataOutputStream* dataOut ) throw( io::IOException ); }; Modified: incubator/activemq/activemq-cpp/trunk/activemq-cpp/src/main/activemq/connector/openwire/marshal/v2/MessageDispatchMarshaller.cpp URL: http://svn.apache.org/viewvc/incubator/activemq/activemq-cpp/trunk/activemq-cpp/src/main/activemq/connector/openwire/marshal/v2/MessageDispatchMarshaller.cpp?view=diff&rev=474108&r1=474107&r2=474108 ============================================================================== --- incubator/activemq/activemq-cpp/trunk/activemq-cpp/src/main/activemq/connector/openwire/marshal/v2/MessageDispatchMarshaller.cpp (original) +++ incubator/activemq/activemq-cpp/trunk/activemq-cpp/src/main/activemq/connector/openwire/marshal/v2/MessageDispatchMarshaller.cpp Sun Nov 12 16:46:23 2006 @@ -32,7 +32,7 @@ using namespace activemq::connector::openwire; using namespace activemq::connector::openwire::commands; using namespace activemq::connector::openwire::marshal; -using namespace activemq::connector::openwire::util; +using namespace activemq::connector::openwire::utils; using namespace activemq::connector::openwire::marshal::v2; /////////////////////////////////////////////////////////////////////////////// @@ -46,97 +46,70 @@ } /////////////////////////////////////////////////////////////////////////////// -void MessageDispatchMarshaller::tightUnmarshal( OpenWireFormat* wireFormat, DataStructure* dataStructure, DataInputStream* dataIn, BooleanStream* bs ) { +void MessageDispatchMarshaller::tightUnmarshal( OpenWireFormat* wireFormat, DataStructure* dataStructure, DataInputStream* dataIn, BooleanStream* bs ) throw( io::IOException ){ BaseCommandMarshaller::tightUnmarshal( wireFormat, dataStructure, dataIn, bs ); MessageDispatch* info = dynamic_cast( dataStructure ); info->setConsumerId( dynamic_cast< ConsumerId* >( - tightUnmarsalCachedObject( wireFormat, dataIn, bs ) ); + tightUnmarshalCachedObject( wireFormat, dataIn, bs ) ) ); info->setDestination( dynamic_cast< ActiveMQDestination* >( - tightUnmarsalCachedObject( wireFormat, dataIn, bs ) ); + tightUnmarshalCachedObject( wireFormat, dataIn, bs ) ) ); info->setMessage( dynamic_cast< Message* >( - tightUnmarsalNestedObject( wireFormat, dataIn, bs ) ); + tightUnmarshalNestedObject( wireFormat, dataIn, bs ) ) ); info->setRedeliveryCounter( dataIn->readInt() ); } /////////////////////////////////////////////////////////////////////////////// -int MessageDispatchMarshaller::tightMarshal1( OpenWireFormat& wireFormat, DataStructure* dataStructure, BooleanStream& bs ) { +int MessageDispatchMarshaller::tightMarshal1( OpenWireFormat* wireFormat, DataStructure* dataStructure, BooleanStream* bs ) throw( io::IOException ){ MessageDispatch* info = dynamic_cast( dataStructure ); int rc = BaseCommandMarshaller::tightMarshal1( wireFormat, dataStructure, bs ); - DataStructure* data = - dynamic_cast< DataStructure* >( info->getConsumerId() ); - - rc += tightMarshalCachedObject1( wireFormat, data, bs ); - DataStructure* data = - dynamic_cast< DataStructure* >( info->getDestination() ); - - rc += tightMarshalCachedObject1( wireFormat, data, bs ); - DataStructure* data = - dynamic_cast< DataStructure* >( info->getMessage() ); - - rc += tightMarshalNestedObject1( wireFormat, data, bs ); + rc += tightMarshalCachedObject1( wireFormat, info->getConsumerId(), bs ); + rc += tightMarshalCachedObject1( wireFormat, info->getDestination(), bs ); + rc += tightMarshalNestedObject1( wireFormat, info->getMessage(), bs ); return rc + 4; } /////////////////////////////////////////////////////////////////////////////// -void MessageDispatchMarshaller::tightMarshal2( OpenWireFormat& wireFormat, DataStructure* dataStructure, DataOutputStream& dataOut, BooleanStream& bs ) { +void MessageDispatchMarshaller::tightMarshal2( OpenWireFormat* wireFormat, DataStructure* dataStructure, DataOutputStream* dataOut, BooleanStream* bs ) throw( io::IOException ){ BaseCommandMarshaller::tightMarshal2( wireFormat, dataStructure, dataOut, bs ); MessageDispatch* info = dynamic_cast( dataStructure ); - DataStructure* data = - dynamic_cast< DataStructure* >( info->getConsumerId() ); - - tightMarshalCachedObject2( wireFormat, data, dataOut, bs ); - DataStructure* data = - dynamic_cast< DataStructure* >( info->getDestination() ); - - tightMarshalCachedObject2( wireFormat, data, dataOut, bs ); - DataStructure* data = - dynamic_cast< DataStructure* >( info->getMessage() ); - - tightMarshalNestedObject2( wireFormat, data, dataOut, bs ); + tightMarshalCachedObject2( wireFormat, info->getConsumerId(), dataOut, bs ); + tightMarshalCachedObject2( wireFormat, info->getDestination(), dataOut, bs ); + tightMarshalNestedObject2( wireFormat, info->getMessage(), dataOut, bs ); dataOut->write( info->getRedeliveryCounter() ); } /////////////////////////////////////////////////////////////////////////////// -void MessageDispatchMarshaller::looseUnmarshal( OpenWireFormat& wireFormat, DataStructure* dataStructure, DataInputStream& dataIn ) { +void MessageDispatchMarshaller::looseUnmarshal( OpenWireFormat* wireFormat, DataStructure* dataStructure, DataInputStream* dataIn ) throw( io::IOException ){ BaseCommandMarshaller::looseUnmarshal( wireFormat, dataStructure, dataIn ); MessageDispatch* info = dynamic_cast( dataStructure ); - info->setConsumerId( dynamic_cast( - looseUnmarshalCachedObject( wireFormat, dataIn ) ) ); - info->setDestination( dynamic_cast( - looseUnmarshalCachedObject( wireFormat, dataIn ) ) ); - info->setMessage( dynamic_cast( - looseUnmarshalNestedObject( wireFormat, dataIn ) ) ); + info->setConsumerId( dynamic_cast< ConsumerId* >( + looseUnmarshalCachedObject( wireFormat, dataIn ) ) ); + info->setDestination( dynamic_cast< ActiveMQDestination* >( + looseUnmarshalCachedObject( wireFormat, dataIn ) ) ); + info->setMessage( dynamic_cast< Message* >( + looseUnmarshalNestedObject( wireFormat, dataIn ) ) ); info->setRedeliveryCounter( dataIn->readInt() ); } /////////////////////////////////////////////////////////////////////////////// -void MessageDispatchMarshaller::looseMarshal( OpenWireFormat& wireFormat, DataStructure* dataStructure, DataOutputStream& dataOut ) { +void MessageDispatchMarshaller::looseMarshal( OpenWireFormat* wireFormat, DataStructure* dataStructure, DataOutputStream* dataOut ) throw( io::IOException ){ MessageDispatch* info = dynamic_cast( dataStructure ); BaseCommandMarshaller::looseMarshal( wireFormat, dataStructure, dataOut ); - DataStructure* data = - dynamic_cast< DataStructure* >( info->getConsumerId() ); - - looseMarshalCachedObject( wireFormat, data, dataOut ); - DataStructure* data = - dynamic_cast< DataStructure* >( info->getDestination() ); - - looseMarshalCachedObject( wireFormat, data, dataOut ); - DataStructure* data = - dynamic_cast< DataStructure* >( info->getMessage() ); - - looseMarshalNestedObject( wireFormat, data, dataOut ); + looseMarshalCachedObject( wireFormat, info->getConsumerId(), dataOut ); + looseMarshalCachedObject( wireFormat, info->getDestination(), dataOut ); + looseMarshalNestedObject( wireFormat, info->getMessage(), dataOut ); dataOut->write( info->getRedeliveryCounter() ); }