You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@activemq.apache.org by ta...@apache.org on 2006/11/13 01:46:30 UTC

svn commit: r474108 [8/10] - in /incubator/activemq/activemq-cpp/trunk/activemq-cpp/src/main: ./ activemq/connector/openwire/commands/ activemq/connector/openwire/marshal/ activemq/connector/openwire/marshal/v2/

Modified: incubator/activemq/activemq-cpp/trunk/activemq-cpp/src/main/activemq/connector/openwire/marshal/v2/MessageDispatchMarshaller.h
URL: http://svn.apache.org/viewvc/incubator/activemq/activemq-cpp/trunk/activemq-cpp/src/main/activemq/connector/openwire/marshal/v2/MessageDispatchMarshaller.h?view=diff&rev=474108&r1=474107&r2=474108
==============================================================================
--- incubator/activemq/activemq-cpp/trunk/activemq-cpp/src/main/activemq/connector/openwire/marshal/v2/MessageDispatchMarshaller.h (original)
+++ incubator/activemq/activemq-cpp/trunk/activemq-cpp/src/main/activemq/connector/openwire/marshal/v2/MessageDispatchMarshaller.h Sun Nov 12 16:46:23 2006
@@ -23,13 +23,14 @@
 #pragma warning( disable : 4290 )
 #endif
 
-#include <activemq/connector/openwire/marshal/V2/BaseCommandMarshaller.h>
+#include <activemq/connector/openwire/marshal/v2/BaseCommandMarshaller.h>
 
 #include <activemq/io/DataInputStream.h>
 #include <activemq/io/DataOutputStream.h>
 #include <activemq/io/IOException.h>
+#include <activemq/connector/openwire/OpenWireFormat.h>
 #include <activemq/connector/openwire/commands/DataStructure.h>
-#include <activemq/connector/openwire/util/BooleanStream.h>
+#include <activemq/connector/openwire/utils/BooleanStream.h>
 
 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/MessageDispatchNotificationMarshaller.cpp
URL: http://svn.apache.org/viewvc/incubator/activemq/activemq-cpp/trunk/activemq-cpp/src/main/activemq/connector/openwire/marshal/v2/MessageDispatchNotificationMarshaller.cpp?view=diff&rev=474108&r1=474107&r2=474108
==============================================================================
--- incubator/activemq/activemq-cpp/trunk/activemq-cpp/src/main/activemq/connector/openwire/marshal/v2/MessageDispatchNotificationMarshaller.cpp (original)
+++ incubator/activemq/activemq-cpp/trunk/activemq-cpp/src/main/activemq/connector/openwire/marshal/v2/MessageDispatchNotificationMarshaller.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,98 +46,71 @@
 }
 
 ///////////////////////////////////////////////////////////////////////////////
-void MessageDispatchNotificationMarshaller::tightUnmarshal( OpenWireFormat* wireFormat, DataStructure* dataStructure, DataInputStream* dataIn, BooleanStream* bs ) {
+void MessageDispatchNotificationMarshaller::tightUnmarshal( OpenWireFormat* wireFormat, DataStructure* dataStructure, DataInputStream* dataIn, BooleanStream* bs ) throw( io::IOException ){
    BaseCommandMarshaller::tightUnmarshal( wireFormat, dataStructure, dataIn, bs );
 
     MessageDispatchNotification* info =
         dynamic_cast<MessageDispatchNotification*>( dataStructure );
     info->setConsumerId( dynamic_cast< ConsumerId* >(
-        tightUnmarsalCachedObject( wireFormat, dataIn, bs ) );
+        tightUnmarshalCachedObject( wireFormat, dataIn, bs ) ) );
     info->setDestination( dynamic_cast< ActiveMQDestination* >(
-        tightUnmarsalCachedObject( wireFormat, dataIn, bs ) );
-    info->setDeliverySequenceId( TightUnmarshalLong( wireFormat, dataIn, bs ) );
+        tightUnmarshalCachedObject( wireFormat, dataIn, bs ) ) );
+    info->setDeliverySequenceId( tightUnmarshalLong( wireFormat, dataIn, bs ) );
     info->setMessageId( dynamic_cast< MessageId* >(
-        tightUnmarsalNestedObject( wireFormat, dataIn, bs ) );
+        tightUnmarshalNestedObject( wireFormat, dataIn, bs ) ) );
 }
 
 ///////////////////////////////////////////////////////////////////////////////
-int MessageDispatchNotificationMarshaller::tightMarshal1( OpenWireFormat& wireFormat, DataStructure* dataStructure, BooleanStream& bs ) {
+int MessageDispatchNotificationMarshaller::tightMarshal1( OpenWireFormat* wireFormat, DataStructure* dataStructure, BooleanStream* bs ) throw( io::IOException ){
 
     MessageDispatchNotification* info =
         dynamic_cast<MessageDispatchNotification*>( 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 );
+    rc += tightMarshalCachedObject1( wireFormat, info->getConsumerId(), bs );
+    rc += tightMarshalCachedObject1( wireFormat, info->getDestination(), bs );
     rc += tightMarshalLong1( wireFormat, info->getDeliverySequenceId(), bs );
-    DataStructure* data = 
-        dynamic_cast< DataStructure* >( info->getMessageId() );
-
-    rc += tightMarshalNestedObject1( wireFormat, data, bs );
+    rc += tightMarshalNestedObject1( wireFormat, info->getMessageId(), bs );
 
     return rc + 0;
 }
 
 ///////////////////////////////////////////////////////////////////////////////
-void MessageDispatchNotificationMarshaller::tightMarshal2( OpenWireFormat& wireFormat, DataStructure* dataStructure, DataOutputStream& dataOut, BooleanStream& bs ) {
+void MessageDispatchNotificationMarshaller::tightMarshal2( OpenWireFormat* wireFormat, DataStructure* dataStructure, DataOutputStream* dataOut, BooleanStream* bs ) throw( io::IOException ){
 
     BaseCommandMarshaller::tightMarshal2( wireFormat, dataStructure, dataOut, bs );
 
     MessageDispatchNotification* info =
         dynamic_cast<MessageDispatchNotification*>( 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 );
+    tightMarshalCachedObject2( wireFormat, info->getConsumerId(), dataOut, bs );
+    tightMarshalCachedObject2( wireFormat, info->getDestination(), dataOut, bs );
     tightMarshalLong2( wireFormat, info->getDeliverySequenceId(), dataOut, bs );
-    DataStructure* data = 
-        dynamic_cast< DataStructure* >( info->getMessageId() );
-
-    tightMarshalNestedObject2( wireFormat, data, dataOut, bs );
+    tightMarshalNestedObject2( wireFormat, info->getMessageId(), dataOut, bs );
 }
 
 ///////////////////////////////////////////////////////////////////////////////
-void MessageDispatchNotificationMarshaller::looseUnmarshal( OpenWireFormat& wireFormat, DataStructure* dataStructure, DataInputStream& dataIn ) {
+void MessageDispatchNotificationMarshaller::looseUnmarshal( OpenWireFormat* wireFormat, DataStructure* dataStructure, DataInputStream* dataIn ) throw( io::IOException ){
     BaseCommandMarshaller::looseUnmarshal( wireFormat, dataStructure, dataIn );
     MessageDispatchNotification* info = 
         dynamic_cast<MessageDispatchNotification*>( dataStructure );
-   info->setConsumerId( dynamic_cast<ConsumerId* >( 
-       looseUnmarshalCachedObject( wireFormat, dataIn ) ) );
-   info->setDestination( dynamic_cast<ActiveMQDestination* >( 
-       looseUnmarshalCachedObject( wireFormat, dataIn ) ) );
+    info->setConsumerId( dynamic_cast< ConsumerId* >( 
+        looseUnmarshalCachedObject( wireFormat, dataIn ) ) );
+    info->setDestination( dynamic_cast< ActiveMQDestination* >( 
+        looseUnmarshalCachedObject( wireFormat, dataIn ) ) );
     info->setDeliverySequenceId( looseUnmarshalLong( wireFormat, dataIn ) );
-   info->setMessageId( dynamic_cast<MessageId* >( 
-       looseUnmarshalNestedObject( wireFormat, dataIn ) ) );
+    info->setMessageId( dynamic_cast< MessageId* >( 
+        looseUnmarshalNestedObject( wireFormat, dataIn ) ) );
 }
 
 ///////////////////////////////////////////////////////////////////////////////
-void MessageDispatchNotificationMarshaller::looseMarshal( OpenWireFormat& wireFormat, DataStructure* dataStructure, DataOutputStream& dataOut ) {
+void MessageDispatchNotificationMarshaller::looseMarshal( OpenWireFormat* wireFormat, DataStructure* dataStructure, DataOutputStream* dataOut ) throw( io::IOException ){
     MessageDispatchNotification* info =
         dynamic_cast<MessageDispatchNotification*>( 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 );
+    looseMarshalCachedObject( wireFormat, info->getConsumerId(), dataOut );
+    looseMarshalCachedObject( wireFormat, info->getDestination(), dataOut );
     looseMarshalLong( wireFormat, info->getDeliverySequenceId(), dataOut );
-    DataStructure* data = 
-        dynamic_cast< DataStructure* >( info->getMessageId() );
-
-    looseMarshalNestedObject( wireFormat, data, dataOut );
+    looseMarshalNestedObject( wireFormat, info->getMessageId(), dataOut );
 }
 

Modified: incubator/activemq/activemq-cpp/trunk/activemq-cpp/src/main/activemq/connector/openwire/marshal/v2/MessageDispatchNotificationMarshaller.h
URL: http://svn.apache.org/viewvc/incubator/activemq/activemq-cpp/trunk/activemq-cpp/src/main/activemq/connector/openwire/marshal/v2/MessageDispatchNotificationMarshaller.h?view=diff&rev=474108&r1=474107&r2=474108
==============================================================================
--- incubator/activemq/activemq-cpp/trunk/activemq-cpp/src/main/activemq/connector/openwire/marshal/v2/MessageDispatchNotificationMarshaller.h (original)
+++ incubator/activemq/activemq-cpp/trunk/activemq-cpp/src/main/activemq/connector/openwire/marshal/v2/MessageDispatchNotificationMarshaller.h Sun Nov 12 16:46:23 2006
@@ -23,13 +23,14 @@
 #pragma warning( disable : 4290 )
 #endif
 
-#include <activemq/connector/openwire/marshal/V2/BaseCommandMarshaller.h>
+#include <activemq/connector/openwire/marshal/v2/BaseCommandMarshaller.h>
 
 #include <activemq/io/DataInputStream.h>
 #include <activemq/io/DataOutputStream.h>
 #include <activemq/io/IOException.h>
+#include <activemq/connector/openwire/OpenWireFormat.h>
 #include <activemq/connector/openwire/commands/DataStructure.h>
-#include <activemq/connector/openwire/util/BooleanStream.h>
+#include <activemq/connector/openwire/utils/BooleanStream.h>
 
 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/MessageIdMarshaller.cpp
URL: http://svn.apache.org/viewvc/incubator/activemq/activemq-cpp/trunk/activemq-cpp/src/main/activemq/connector/openwire/marshal/v2/MessageIdMarshaller.cpp?view=diff&rev=474108&r1=474107&r2=474108
==============================================================================
--- incubator/activemq/activemq-cpp/trunk/activemq-cpp/src/main/activemq/connector/openwire/marshal/v2/MessageIdMarshaller.cpp (original)
+++ incubator/activemq/activemq-cpp/trunk/activemq-cpp/src/main/activemq/connector/openwire/marshal/v2/MessageIdMarshaller.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,28 +46,25 @@
 }
 
 ///////////////////////////////////////////////////////////////////////////////
-void MessageIdMarshaller::tightUnmarshal( OpenWireFormat* wireFormat, DataStructure* dataStructure, DataInputStream* dataIn, BooleanStream* bs ) {
+void MessageIdMarshaller::tightUnmarshal( OpenWireFormat* wireFormat, DataStructure* dataStructure, DataInputStream* dataIn, BooleanStream* bs ) throw( io::IOException ){
    BaseDataStreamMarshaller::tightUnmarshal( wireFormat, dataStructure, dataIn, bs );
 
     MessageId* info =
         dynamic_cast<MessageId*>( dataStructure );
     info->setProducerId( dynamic_cast< ProducerId* >(
-        tightUnmarsalCachedObject( wireFormat, dataIn, bs ) );
-    info->setProducerSequenceId( TightUnmarshalLong( wireFormat, dataIn, bs ) );
-    info->setBrokerSequenceId( TightUnmarshalLong( wireFormat, dataIn, bs ) );
+        tightUnmarshalCachedObject( wireFormat, dataIn, bs ) ) );
+    info->setProducerSequenceId( tightUnmarshalLong( wireFormat, dataIn, bs ) );
+    info->setBrokerSequenceId( tightUnmarshalLong( wireFormat, dataIn, bs ) );
 }
 
 ///////////////////////////////////////////////////////////////////////////////
-int MessageIdMarshaller::tightMarshal1( OpenWireFormat& wireFormat, DataStructure* dataStructure, BooleanStream& bs ) {
+int MessageIdMarshaller::tightMarshal1( OpenWireFormat* wireFormat, DataStructure* dataStructure, BooleanStream* bs ) throw( io::IOException ){
 
     MessageId* info =
         dynamic_cast<MessageId*>( dataStructure );
 
     int rc = BaseDataStreamMarshaller::tightMarshal1( wireFormat, dataStructure, bs );
-    DataStructure* data = 
-        dynamic_cast< DataStructure* >( info->getProducerId() );
-
-    rc += tightMarshalCachedObject1( wireFormat, data, bs );
+    rc += tightMarshalCachedObject1( wireFormat, info->getProducerId(), bs );
     rc += tightMarshalLong1( wireFormat, info->getProducerSequenceId(), bs );
     rc += tightMarshalLong1( wireFormat, info->getBrokerSequenceId(), bs );
 
@@ -75,41 +72,35 @@
 }
 
 ///////////////////////////////////////////////////////////////////////////////
-void MessageIdMarshaller::tightMarshal2( OpenWireFormat& wireFormat, DataStructure* dataStructure, DataOutputStream& dataOut, BooleanStream& bs ) {
+void MessageIdMarshaller::tightMarshal2( OpenWireFormat* wireFormat, DataStructure* dataStructure, DataOutputStream* dataOut, BooleanStream* bs ) throw( io::IOException ){
 
     BaseDataStreamMarshaller::tightMarshal2( wireFormat, dataStructure, dataOut, bs );
 
     MessageId* info =
         dynamic_cast<MessageId*>( dataStructure );
-    DataStructure* data = 
-        dynamic_cast< DataStructure* >( info->getProducerId() );
-
-    tightMarshalCachedObject2( wireFormat, data, dataOut, bs );
+    tightMarshalCachedObject2( wireFormat, info->getProducerId(), dataOut, bs );
     tightMarshalLong2( wireFormat, info->getProducerSequenceId(), dataOut, bs );
     tightMarshalLong2( wireFormat, info->getBrokerSequenceId(), dataOut, bs );
 }
 
 ///////////////////////////////////////////////////////////////////////////////
-void MessageIdMarshaller::looseUnmarshal( OpenWireFormat& wireFormat, DataStructure* dataStructure, DataInputStream& dataIn ) {
+void MessageIdMarshaller::looseUnmarshal( OpenWireFormat* wireFormat, DataStructure* dataStructure, DataInputStream* dataIn ) throw( io::IOException ){
     BaseDataStreamMarshaller::looseUnmarshal( wireFormat, dataStructure, dataIn );
     MessageId* info = 
         dynamic_cast<MessageId*>( dataStructure );
-   info->setProducerId( dynamic_cast<ProducerId* >( 
-       looseUnmarshalCachedObject( wireFormat, dataIn ) ) );
+    info->setProducerId( dynamic_cast< ProducerId* >( 
+        looseUnmarshalCachedObject( wireFormat, dataIn ) ) );
     info->setProducerSequenceId( looseUnmarshalLong( wireFormat, dataIn ) );
     info->setBrokerSequenceId( looseUnmarshalLong( wireFormat, dataIn ) );
 }
 
 ///////////////////////////////////////////////////////////////////////////////
-void MessageIdMarshaller::looseMarshal( OpenWireFormat& wireFormat, DataStructure* dataStructure, DataOutputStream& dataOut ) {
+void MessageIdMarshaller::looseMarshal( OpenWireFormat* wireFormat, DataStructure* dataStructure, DataOutputStream* dataOut ) throw( io::IOException ){
     MessageId* info =
         dynamic_cast<MessageId*>( dataStructure );
     BaseDataStreamMarshaller::looseMarshal( wireFormat, dataStructure, dataOut );
 
-    DataStructure* data = 
-        dynamic_cast< DataStructure* >( info->getProducerId() );
-
-    looseMarshalCachedObject( wireFormat, data, dataOut );
+    looseMarshalCachedObject( wireFormat, info->getProducerId(), dataOut );
     looseMarshalLong( wireFormat, info->getProducerSequenceId(), dataOut );
     looseMarshalLong( wireFormat, info->getBrokerSequenceId(), dataOut );
 }

Modified: incubator/activemq/activemq-cpp/trunk/activemq-cpp/src/main/activemq/connector/openwire/marshal/v2/MessageIdMarshaller.h
URL: http://svn.apache.org/viewvc/incubator/activemq/activemq-cpp/trunk/activemq-cpp/src/main/activemq/connector/openwire/marshal/v2/MessageIdMarshaller.h?view=diff&rev=474108&r1=474107&r2=474108
==============================================================================
--- incubator/activemq/activemq-cpp/trunk/activemq-cpp/src/main/activemq/connector/openwire/marshal/v2/MessageIdMarshaller.h (original)
+++ incubator/activemq/activemq-cpp/trunk/activemq-cpp/src/main/activemq/connector/openwire/marshal/v2/MessageIdMarshaller.h Sun Nov 12 16:46:23 2006
@@ -23,13 +23,14 @@
 #pragma warning( disable : 4290 )
 #endif
 
-#include <activemq/connector/openwire/marshal/V2/BaseDataStreamMarshaller.h>
+#include <activemq/connector/openwire/marshal/BaseDataStreamMarshaller.h>
 
 #include <activemq/io/DataInputStream.h>
 #include <activemq/io/DataOutputStream.h>
 #include <activemq/io/IOException.h>
+#include <activemq/connector/openwire/OpenWireFormat.h>
 #include <activemq/connector/openwire/commands/DataStructure.h>
-#include <activemq/connector/openwire/util/BooleanStream.h>
+#include <activemq/connector/openwire/utils/BooleanStream.h>
 
 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/MessageMarshaller.cpp
URL: http://svn.apache.org/viewvc/incubator/activemq/activemq-cpp/trunk/activemq-cpp/src/main/activemq/connector/openwire/marshal/v2/MessageMarshaller.cpp?view=diff&rev=474108&r1=474107&r2=474108
==============================================================================
--- incubator/activemq/activemq-cpp/trunk/activemq-cpp/src/main/activemq/connector/openwire/marshal/v2/MessageMarshaller.cpp (original)
+++ incubator/activemq/activemq-cpp/trunk/activemq-cpp/src/main/activemq/connector/openwire/marshal/v2/MessageMarshaller.cpp Sun Nov 12 16:46:23 2006
@@ -32,117 +32,89 @@
 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;
 
 ///////////////////////////////////////////////////////////////////////////////
-void MessageMarshaller::tightUnmarshal( OpenWireFormat* wireFormat, DataStructure* dataStructure, DataInputStream* dataIn, BooleanStream* bs ) {
+void MessageMarshaller::tightUnmarshal( OpenWireFormat* wireFormat, DataStructure* dataStructure, DataInputStream* dataIn, BooleanStream* bs ) throw( io::IOException ){
    BaseCommandMarshaller::tightUnmarshal( wireFormat, dataStructure, dataIn, bs );
 
     Message* info =
         dynamic_cast<Message*>( dataStructure );
     info->setProducerId( dynamic_cast< ProducerId* >(
-        tightUnmarsalCachedObject( wireFormat, dataIn, bs ) );
+        tightUnmarshalCachedObject( wireFormat, dataIn, bs ) ) );
     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->setOriginalDestination( dynamic_cast< ActiveMQDestination* >(
-        tightUnmarsalCachedObject( wireFormat, dataIn, bs ) );
+        tightUnmarshalCachedObject( wireFormat, dataIn, bs ) ) );
     info->setMessageId( dynamic_cast< MessageId* >(
-        tightUnmarsalNestedObject( wireFormat, dataIn, bs ) );
+        tightUnmarshalNestedObject( wireFormat, dataIn, bs ) ) );
     info->setOriginalTransactionId( dynamic_cast< TransactionId* >(
-        tightUnmarsalCachedObject( wireFormat, dataIn, bs ) );
-    info->setGroupID( TightUnmarshalString( dataIn, bs ) );
+        tightUnmarshalCachedObject( wireFormat, dataIn, bs ) ) );
+    info->setGroupID( tightUnmarshalString( dataIn, bs ) );
     info->setGroupSequence( dataIn->readInt() );
-    info->setCorrelationId( TightUnmarshalString( dataIn, bs ) );
+    info->setCorrelationId( tightUnmarshalString( dataIn, bs ) );
     info->setPersistent( bs->readBoolean() );
-    info->setExpiration( TightUnmarshalLong( wireFormat, dataIn, bs ) );
+    info->setExpiration( tightUnmarshalLong( wireFormat, dataIn, bs ) );
     info->setPriority( dataIn->readByte() );
     info->setReplyTo( dynamic_cast< ActiveMQDestination* >(
-        tightUnmarsalNestedObject( wireFormat, dataIn, bs ) );
-    info->setTimestamp( TightUnmarshalLong( wireFormat, dataIn, bs ) );
-    info->setType( TightUnmarshalString( dataIn, bs ) );
+        tightUnmarshalNestedObject( wireFormat, dataIn, bs ) ) );
+    info->setTimestamp( tightUnmarshalLong( wireFormat, dataIn, bs ) );
+    info->setType( tightUnmarshalString( dataIn, bs ) );
     info->setContent( tightUnmarshalByteArray( dataIn, bs ) );
     info->setMarshalledProperties( tightUnmarshalByteArray( dataIn, bs ) );
     info->setDataStructure( dynamic_cast< DataStructure* >(
-        tightUnmarsalNestedObject( wireFormat, dataIn, bs ) );
+        tightUnmarshalNestedObject( wireFormat, dataIn, bs ) ) );
     info->setTargetConsumerId( dynamic_cast< ConsumerId* >(
-        tightUnmarsalCachedObject( wireFormat, dataIn, bs ) );
+        tightUnmarshalCachedObject( wireFormat, dataIn, bs ) ) );
     info->setCompressed( bs->readBoolean() );
     info->setRedeliveryCounter( dataIn->readInt() );
 
     if( bs->readBoolean() ) {
         short size = dataIn->readShort();
-        BrokerId* value = new BrokerId[size];
+        info->getBrokerPath().reserve( size );
         for( int i = 0; i < size; i++ ) {
-            value[i] = dynamic_cast< BrokerId* >(
-                tightUnmarsalNestedObject( wireFormat, dataIn, bs ) );
+            info->getBrokerPath().push_back( dynamic_cast< BrokerId* >(
+                tightUnmarshalNestedObject( wireFormat, dataIn, bs ) ) );
         }
-        info->setBrokerPath( value );
     }
     else {
-        info->setBrokerPath( NULL );
+        info->getBrokerPath().clear();
     }
-    info->setArrival( TightUnmarshalLong( wireFormat, dataIn, bs ) );
-    info->setUserID( TightUnmarshalString( dataIn, bs ) );
+    info->setArrival( tightUnmarshalLong( wireFormat, dataIn, bs ) );
+    info->setUserID( tightUnmarshalString( dataIn, bs ) );
     info->setRecievedByDFBridge( bs->readBoolean() );
     info->setDroppable( bs->readBoolean() );
 }
 
 ///////////////////////////////////////////////////////////////////////////////
-int MessageMarshaller::tightMarshal1( OpenWireFormat& wireFormat, DataStructure* dataStructure, BooleanStream& bs ) {
+int MessageMarshaller::tightMarshal1( OpenWireFormat* wireFormat, DataStructure* dataStructure, BooleanStream* bs ) throw( io::IOException ){
 
     Message* info =
         dynamic_cast<Message*>( dataStructure );
 
     int rc = BaseCommandMarshaller::tightMarshal1( wireFormat, dataStructure, bs );
-    DataStructure* data = 
-        dynamic_cast< DataStructure* >( info->getProducerId() );
-
-    rc += tightMarshalCachedObject1( wireFormat, data, 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->getOriginalDestination() );
-
-    rc += tightMarshalCachedObject1( wireFormat, data, bs );
-    DataStructure* data = 
-        dynamic_cast< DataStructure* >( info->getMessageId() );
-
-    rc += tightMarshalNestedObject1( wireFormat, data, bs );
-    DataStructure* data = 
-        dynamic_cast< DataStructure* >( info->getOriginalTransactionId() );
-
-    rc += tightMarshalCachedObject1( wireFormat, data, bs );
+    rc += tightMarshalCachedObject1( wireFormat, info->getProducerId(), bs );
+    rc += tightMarshalCachedObject1( wireFormat, info->getDestination(), bs );
+    rc += tightMarshalCachedObject1( wireFormat, info->getTransactionId(), bs );
+    rc += tightMarshalCachedObject1( wireFormat, info->getOriginalDestination(), bs );
+    rc += tightMarshalNestedObject1( wireFormat, info->getMessageId(), bs );
+    rc += tightMarshalCachedObject1( wireFormat, info->getOriginalTransactionId(), bs );
     rc += tightMarshalString1( info->getGroupID(), bs );
     rc += tightMarshalString1( info->getCorrelationId(), bs );
     bs->writeBoolean( info->isPersistent() );
     rc += tightMarshalLong1( wireFormat, info->getExpiration(), bs );
-    DataStructure* data = 
-        dynamic_cast< DataStructure* >( info->getReplyTo() );
-
-    rc += tightMarshalNestedObject1( wireFormat, data, bs );
+    rc += tightMarshalNestedObject1( wireFormat, info->getReplyTo(), bs );
     rc += tightMarshalLong1( wireFormat, info->getTimestamp(), bs );
     rc += tightMarshalString1( info->getType(), bs );
     bs->writeBoolean( info->getContent() != NULL );
     rc += info->getContent()() == NULL ? 0 : info->getContent().Length + 4;
     bs->writeBoolean( info->getMarshalledProperties() != NULL );
     rc += info->getMarshalledProperties()() == NULL ? 0 : info->getMarshalledProperties().Length + 4;
-    DataStructure* data = 
-        dynamic_cast< DataStructure* >( info->getDataStructure() );
-
-    rc += tightMarshalNestedObject1( wireFormat, data, bs );
-    DataStructure* data = 
-        dynamic_cast< DataStructure* >( info->getTargetConsumerId() );
-
-    rc += tightMarshalCachedObject1( wireFormat, data, bs );
+    rc += tightMarshalNestedObject1( wireFormat, info->getDataStructure(), bs );
+    rc += tightMarshalCachedObject1( wireFormat, info->getTargetConsumerId(), bs );
     bs->writeBoolean( info->isCompressed() );
     rc += tightMarshalObjectArray1( wireFormat, info->getBrokerPath(), bs );
     rc += tightMarshalLong1( wireFormat, info->getArrival(), bs );
@@ -154,46 +126,25 @@
 }
 
 ///////////////////////////////////////////////////////////////////////////////
-void MessageMarshaller::tightMarshal2( OpenWireFormat& wireFormat, DataStructure* dataStructure, DataOutputStream& dataOut, BooleanStream& bs ) {
+void MessageMarshaller::tightMarshal2( OpenWireFormat* wireFormat, DataStructure* dataStructure, DataOutputStream* dataOut, BooleanStream* bs ) throw( io::IOException ){
 
     BaseCommandMarshaller::tightMarshal2( wireFormat, dataStructure, dataOut, bs );
 
     Message* info =
         dynamic_cast<Message*>( dataStructure );
-    DataStructure* data = 
-        dynamic_cast< DataStructure* >( info->getProducerId() );
-
-    tightMarshalCachedObject2( wireFormat, data, dataOut, bs );
-    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->getOriginalDestination() );
-
-    tightMarshalCachedObject2( wireFormat, data, dataOut, bs );
-    DataStructure* data = 
-        dynamic_cast< DataStructure* >( info->getMessageId() );
-
-    tightMarshalNestedObject2( wireFormat, data, dataOut, bs );
-    DataStructure* data = 
-        dynamic_cast< DataStructure* >( info->getOriginalTransactionId() );
-
-    tightMarshalCachedObject2( wireFormat, data, dataOut, bs );
+    tightMarshalCachedObject2( wireFormat, info->getProducerId(), dataOut, bs );
+    tightMarshalCachedObject2( wireFormat, info->getDestination(), dataOut, bs );
+    tightMarshalCachedObject2( wireFormat, info->getTransactionId(), dataOut, bs );
+    tightMarshalCachedObject2( wireFormat, info->getOriginalDestination(), dataOut, bs );
+    tightMarshalNestedObject2( wireFormat, info->getMessageId(), dataOut, bs );
+    tightMarshalCachedObject2( wireFormat, info->getOriginalTransactionId(), dataOut, bs );
     tightMarshalString2( info->getGroupID(), dataOut, bs );
     dataOut->write( info->getGroupSequence() );
     tightMarshalString2( info->getCorrelationId(), dataOut, bs );
     bs->readBoolean();
     tightMarshalLong2( wireFormat, info->getExpiration(), dataOut, bs );
     dataOut->write( info->getPriority() );
-    DataStructure* data = 
-        dynamic_cast< DataStructure* >( info->getReplyTo() );
-
-    tightMarshalNestedObject2( wireFormat, data, dataOut, bs );
+    tightMarshalNestedObject2( wireFormat, info->getReplyTo(), dataOut, bs );
     tightMarshalLong2( wireFormat, info->getTimestamp(), dataOut, bs );
     tightMarshalString2( info->getType(), dataOut, bs );
     if( bs->readBoolean() ) {
@@ -204,14 +155,8 @@
         dataOut->write( info->getMarshalledProperties().Length );
         dataOut->write( info->getMarshalledProperties() );
     }
-    DataStructure* data = 
-        dynamic_cast< DataStructure* >( info->getDataStructure() );
-
-    tightMarshalNestedObject2( wireFormat, data, dataOut, bs );
-    DataStructure* data = 
-        dynamic_cast< DataStructure* >( info->getTargetConsumerId() );
-
-    tightMarshalCachedObject2( wireFormat, data, dataOut, bs );
+    tightMarshalNestedObject2( wireFormat, info->getDataStructure(), dataOut, bs );
+    tightMarshalCachedObject2( wireFormat, info->getTargetConsumerId(), dataOut, bs );
     bs->readBoolean();
     dataOut->write( info->getRedeliveryCounter() );
     tightMarshalObjectArray2( wireFormat, info->getBrokerPath(), dataOut, bs );
@@ -222,52 +167,51 @@
 }
 
 ///////////////////////////////////////////////////////////////////////////////
-void MessageMarshaller::looseUnmarshal( OpenWireFormat& wireFormat, DataStructure* dataStructure, DataInputStream& dataIn ) {
+void MessageMarshaller::looseUnmarshal( OpenWireFormat* wireFormat, DataStructure* dataStructure, DataInputStream* dataIn ) throw( io::IOException ){
     BaseCommandMarshaller::looseUnmarshal( wireFormat, dataStructure, dataIn );
     Message* info = 
         dynamic_cast<Message*>( dataStructure );
-   info->setProducerId( dynamic_cast<ProducerId* >( 
-       looseUnmarshalCachedObject( wireFormat, dataIn ) ) );
-   info->setDestination( dynamic_cast<ActiveMQDestination* >( 
-       looseUnmarshalCachedObject( wireFormat, dataIn ) ) );
-   info->setTransactionId( dynamic_cast<TransactionId* >( 
-       looseUnmarshalCachedObject( wireFormat, dataIn ) ) );
-   info->setOriginalDestination( dynamic_cast<ActiveMQDestination* >( 
-       looseUnmarshalCachedObject( wireFormat, dataIn ) ) );
-   info->setMessageId( dynamic_cast<MessageId* >( 
-       looseUnmarshalNestedObject( wireFormat, dataIn ) ) );
-   info->setOriginalTransactionId( dynamic_cast<TransactionId* >( 
-       looseUnmarshalCachedObject( wireFormat, dataIn ) ) );
+    info->setProducerId( dynamic_cast< ProducerId* >( 
+        looseUnmarshalCachedObject( wireFormat, dataIn ) ) );
+    info->setDestination( dynamic_cast< ActiveMQDestination* >( 
+        looseUnmarshalCachedObject( wireFormat, dataIn ) ) );
+    info->setTransactionId( dynamic_cast< TransactionId* >( 
+        looseUnmarshalCachedObject( wireFormat, dataIn ) ) );
+    info->setOriginalDestination( dynamic_cast< ActiveMQDestination* >( 
+        looseUnmarshalCachedObject( wireFormat, dataIn ) ) );
+    info->setMessageId( dynamic_cast< MessageId* >( 
+        looseUnmarshalNestedObject( wireFormat, dataIn ) ) );
+    info->setOriginalTransactionId( dynamic_cast< TransactionId* >( 
+        looseUnmarshalCachedObject( wireFormat, dataIn ) ) );
     info->setGroupID( looseUnmarshalString( dataIn ) );
     info->setGroupSequence( dataIn->readInt() );
     info->setCorrelationId( looseUnmarshalString( dataIn ) );
     info->setPersistent( dataIn->readBoolean() );
     info->setExpiration( looseUnmarshalLong( wireFormat, dataIn ) );
     info->setPriority( dataIn->readByte() );
-   info->setReplyTo( dynamic_cast<ActiveMQDestination* >( 
-       looseUnmarshalNestedObject( wireFormat, dataIn ) ) );
+    info->setReplyTo( dynamic_cast< ActiveMQDestination* >( 
+        looseUnmarshalNestedObject( wireFormat, dataIn ) ) );
     info->setTimestamp( looseUnmarshalLong( wireFormat, dataIn ) );
     info->setType( looseUnmarshalString( dataIn ) );
     info->setContent( looseUnmarshalByteArray( dataIn ) );
     info->setMarshalledProperties( looseUnmarshalByteArray( dataIn ) );
-   info->setDataStructure( dynamic_cast<DataStructure* >( 
-       looseUnmarshalNestedObject( wireFormat, dataIn ) ) );
-   info->setTargetConsumerId( dynamic_cast<ConsumerId* >( 
-       looseUnmarshalCachedObject( wireFormat, dataIn ) ) );
+    info->setDataStructure( dynamic_cast< DataStructure* >( 
+        looseUnmarshalNestedObject( wireFormat, dataIn ) ) );
+    info->setTargetConsumerId( dynamic_cast< ConsumerId* >( 
+        looseUnmarshalCachedObject( wireFormat, dataIn ) ) );
     info->setCompressed( dataIn->readBoolean() );
     info->setRedeliveryCounter( dataIn->readInt() );
 
     if( dataIn->readBoolean() ) {
         short size = dataIn->readShort();
-        BrokerId* value = new BrokerId[size];
+        info->getBrokerPath().reserve( size );
         for( int i = 0; i < size; i++ ) {
-            value[i] = dynamic_cast<BrokerId* >(
-                looseUnmarshalNestedObject( wireFormat,dataIn ) );
+            info->getBrokerPath().push_back( dynamic_cast<BrokerId* >(
+                looseUnmarshalNestedObject( wireFormat, dataIn ) ) );
         }
-        info->setBrokerPath( value );
     }
     else {
-        info->setBrokerPath( NULL );
+        info->getBrokerPath().clear();
     }
     info->setArrival( looseUnmarshalLong( wireFormat, dataIn ) );
     info->setUserID( looseUnmarshalString( dataIn ) );
@@ -276,45 +220,24 @@
 }
 
 ///////////////////////////////////////////////////////////////////////////////
-void MessageMarshaller::looseMarshal( OpenWireFormat& wireFormat, DataStructure* dataStructure, DataOutputStream& dataOut ) {
+void MessageMarshaller::looseMarshal( OpenWireFormat* wireFormat, DataStructure* dataStructure, DataOutputStream* dataOut ) throw( io::IOException ){
     Message* info =
         dynamic_cast<Message*>( dataStructure );
     BaseCommandMarshaller::looseMarshal( wireFormat, dataStructure, dataOut );
 
-    DataStructure* data = 
-        dynamic_cast< DataStructure* >( info->getProducerId() );
-
-    looseMarshalCachedObject( wireFormat, data, 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->getOriginalDestination() );
-
-    looseMarshalCachedObject( wireFormat, data, dataOut );
-    DataStructure* data = 
-        dynamic_cast< DataStructure* >( info->getMessageId() );
-
-    looseMarshalNestedObject( wireFormat, data, dataOut );
-    DataStructure* data = 
-        dynamic_cast< DataStructure* >( info->getOriginalTransactionId() );
-
-    looseMarshalCachedObject( wireFormat, data, dataOut );
+    looseMarshalCachedObject( wireFormat, info->getProducerId(), dataOut );
+    looseMarshalCachedObject( wireFormat, info->getDestination(), dataOut );
+    looseMarshalCachedObject( wireFormat, info->getTransactionId(), dataOut );
+    looseMarshalCachedObject( wireFormat, info->getOriginalDestination(), dataOut );
+    looseMarshalNestedObject( wireFormat, info->getMessageId(), dataOut );
+    looseMarshalCachedObject( wireFormat, info->getOriginalTransactionId(), dataOut );
     looseMarshalString( info->getGroupID(), dataOut );
     dataOut->write( info->getGroupSequence() );
     looseMarshalString( info->getCorrelationId(), dataOut );
     dataOut->write( info->isPersistent() );
     looseMarshalLong( wireFormat, info->getExpiration(), dataOut );
     dataOut->write( info->getPriority() );
-    DataStructure* data = 
-        dynamic_cast< DataStructure* >( info->getReplyTo() );
-
-    looseMarshalNestedObject( wireFormat, data, dataOut );
+    looseMarshalNestedObject( wireFormat, info->getReplyTo(), dataOut );
     looseMarshalLong( wireFormat, info->getTimestamp(), dataOut );
     looseMarshalString( info->getType(), dataOut );
     dataOut->write( info->getContent() != NULL );
@@ -327,14 +250,8 @@
         dataOut->write( info->getMarshalledProperties().Length );
         dataOut->write( info->getMarshalledProperties() );
     }
-    DataStructure* data = 
-        dynamic_cast< DataStructure* >( info->getDataStructure() );
-
-    looseMarshalNestedObject( wireFormat, data, dataOut );
-    DataStructure* data = 
-        dynamic_cast< DataStructure* >( info->getTargetConsumerId() );
-
-    looseMarshalCachedObject( wireFormat, data, dataOut );
+    looseMarshalNestedObject( wireFormat, info->getDataStructure(), dataOut );
+    looseMarshalCachedObject( wireFormat, info->getTargetConsumerId(), dataOut );
     dataOut->write( info->isCompressed() );
     dataOut->write( info->getRedeliveryCounter() );
     looseMarshalObjectArray( wireFormat, info->getBrokerPath(), dataOut );

Modified: incubator/activemq/activemq-cpp/trunk/activemq-cpp/src/main/activemq/connector/openwire/marshal/v2/MessageMarshaller.h
URL: http://svn.apache.org/viewvc/incubator/activemq/activemq-cpp/trunk/activemq-cpp/src/main/activemq/connector/openwire/marshal/v2/MessageMarshaller.h?view=diff&rev=474108&r1=474107&r2=474108
==============================================================================
--- incubator/activemq/activemq-cpp/trunk/activemq-cpp/src/main/activemq/connector/openwire/marshal/v2/MessageMarshaller.h (original)
+++ incubator/activemq/activemq-cpp/trunk/activemq-cpp/src/main/activemq/connector/openwire/marshal/v2/MessageMarshaller.h Sun Nov 12 16:46:23 2006
@@ -23,13 +23,14 @@
 #pragma warning( disable : 4290 )
 #endif
 
-#include <activemq/connector/openwire/marshal/V2/BaseCommandMarshaller.h>
+#include <activemq/connector/openwire/marshal/v2/BaseCommandMarshaller.h>
 
 #include <activemq/io/DataInputStream.h>
 #include <activemq/io/DataOutputStream.h>
 #include <activemq/io/IOException.h>
+#include <activemq/connector/openwire/OpenWireFormat.h>
 #include <activemq/connector/openwire/commands/DataStructure.h>
-#include <activemq/connector/openwire/util/BooleanStream.h>
+#include <activemq/connector/openwire/utils/BooleanStream.h>
 
 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/MessagePullMarshaller.cpp
URL: http://svn.apache.org/viewvc/incubator/activemq/activemq-cpp/trunk/activemq-cpp/src/main/activemq/connector/openwire/marshal/v2/MessagePullMarshaller.cpp?view=diff&rev=474108&r1=474107&r2=474108
==============================================================================
--- incubator/activemq/activemq-cpp/trunk/activemq-cpp/src/main/activemq/connector/openwire/marshal/v2/MessagePullMarshaller.cpp (original)
+++ incubator/activemq/activemq-cpp/trunk/activemq-cpp/src/main/activemq/connector/openwire/marshal/v2/MessagePullMarshaller.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,82 +46,64 @@
 }
 
 ///////////////////////////////////////////////////////////////////////////////
-void MessagePullMarshaller::tightUnmarshal( OpenWireFormat* wireFormat, DataStructure* dataStructure, DataInputStream* dataIn, BooleanStream* bs ) {
+void MessagePullMarshaller::tightUnmarshal( OpenWireFormat* wireFormat, DataStructure* dataStructure, DataInputStream* dataIn, BooleanStream* bs ) throw( io::IOException ){
    BaseCommandMarshaller::tightUnmarshal( wireFormat, dataStructure, dataIn, bs );
 
     MessagePull* info =
         dynamic_cast<MessagePull*>( dataStructure );
     info->setConsumerId( dynamic_cast< ConsumerId* >(
-        tightUnmarsalCachedObject( wireFormat, dataIn, bs ) );
+        tightUnmarshalCachedObject( wireFormat, dataIn, bs ) ) );
     info->setDestination( dynamic_cast< ActiveMQDestination* >(
-        tightUnmarsalCachedObject( wireFormat, dataIn, bs ) );
-    info->setTimeout( TightUnmarshalLong( wireFormat, dataIn, bs ) );
+        tightUnmarshalCachedObject( wireFormat, dataIn, bs ) ) );
+    info->setTimeout( tightUnmarshalLong( wireFormat, dataIn, bs ) );
 }
 
 ///////////////////////////////////////////////////////////////////////////////
-int MessagePullMarshaller::tightMarshal1( OpenWireFormat& wireFormat, DataStructure* dataStructure, BooleanStream& bs ) {
+int MessagePullMarshaller::tightMarshal1( OpenWireFormat* wireFormat, DataStructure* dataStructure, BooleanStream* bs ) throw( io::IOException ){
 
     MessagePull* info =
         dynamic_cast<MessagePull*>( 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 );
+    rc += tightMarshalCachedObject1( wireFormat, info->getConsumerId(), bs );
+    rc += tightMarshalCachedObject1( wireFormat, info->getDestination(), bs );
     rc += tightMarshalLong1( wireFormat, info->getTimeout(), bs );
 
     return rc + 0;
 }
 
 ///////////////////////////////////////////////////////////////////////////////
-void MessagePullMarshaller::tightMarshal2( OpenWireFormat& wireFormat, DataStructure* dataStructure, DataOutputStream& dataOut, BooleanStream& bs ) {
+void MessagePullMarshaller::tightMarshal2( OpenWireFormat* wireFormat, DataStructure* dataStructure, DataOutputStream* dataOut, BooleanStream* bs ) throw( io::IOException ){
 
     BaseCommandMarshaller::tightMarshal2( wireFormat, dataStructure, dataOut, bs );
 
     MessagePull* info =
         dynamic_cast<MessagePull*>( 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 );
+    tightMarshalCachedObject2( wireFormat, info->getConsumerId(), dataOut, bs );
+    tightMarshalCachedObject2( wireFormat, info->getDestination(), dataOut, bs );
     tightMarshalLong2( wireFormat, info->getTimeout(), dataOut, bs );
 }
 
 ///////////////////////////////////////////////////////////////////////////////
-void MessagePullMarshaller::looseUnmarshal( OpenWireFormat& wireFormat, DataStructure* dataStructure, DataInputStream& dataIn ) {
+void MessagePullMarshaller::looseUnmarshal( OpenWireFormat* wireFormat, DataStructure* dataStructure, DataInputStream* dataIn ) throw( io::IOException ){
     BaseCommandMarshaller::looseUnmarshal( wireFormat, dataStructure, dataIn );
     MessagePull* info = 
         dynamic_cast<MessagePull*>( dataStructure );
-   info->setConsumerId( dynamic_cast<ConsumerId* >( 
-       looseUnmarshalCachedObject( wireFormat, dataIn ) ) );
-   info->setDestination( dynamic_cast<ActiveMQDestination* >( 
-       looseUnmarshalCachedObject( wireFormat, dataIn ) ) );
+    info->setConsumerId( dynamic_cast< ConsumerId* >( 
+        looseUnmarshalCachedObject( wireFormat, dataIn ) ) );
+    info->setDestination( dynamic_cast< ActiveMQDestination* >( 
+        looseUnmarshalCachedObject( wireFormat, dataIn ) ) );
     info->setTimeout( looseUnmarshalLong( wireFormat, dataIn ) );
 }
 
 ///////////////////////////////////////////////////////////////////////////////
-void MessagePullMarshaller::looseMarshal( OpenWireFormat& wireFormat, DataStructure* dataStructure, DataOutputStream& dataOut ) {
+void MessagePullMarshaller::looseMarshal( OpenWireFormat* wireFormat, DataStructure* dataStructure, DataOutputStream* dataOut ) throw( io::IOException ){
     MessagePull* info =
         dynamic_cast<MessagePull*>( 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 );
+    looseMarshalCachedObject( wireFormat, info->getConsumerId(), dataOut );
+    looseMarshalCachedObject( wireFormat, info->getDestination(), dataOut );
     looseMarshalLong( wireFormat, info->getTimeout(), dataOut );
 }
 

Modified: incubator/activemq/activemq-cpp/trunk/activemq-cpp/src/main/activemq/connector/openwire/marshal/v2/MessagePullMarshaller.h
URL: http://svn.apache.org/viewvc/incubator/activemq/activemq-cpp/trunk/activemq-cpp/src/main/activemq/connector/openwire/marshal/v2/MessagePullMarshaller.h?view=diff&rev=474108&r1=474107&r2=474108
==============================================================================
--- incubator/activemq/activemq-cpp/trunk/activemq-cpp/src/main/activemq/connector/openwire/marshal/v2/MessagePullMarshaller.h (original)
+++ incubator/activemq/activemq-cpp/trunk/activemq-cpp/src/main/activemq/connector/openwire/marshal/v2/MessagePullMarshaller.h Sun Nov 12 16:46:23 2006
@@ -23,13 +23,14 @@
 #pragma warning( disable : 4290 )
 #endif
 
-#include <activemq/connector/openwire/marshal/V2/BaseCommandMarshaller.h>
+#include <activemq/connector/openwire/marshal/v2/BaseCommandMarshaller.h>
 
 #include <activemq/io/DataInputStream.h>
 #include <activemq/io/DataOutputStream.h>
 #include <activemq/io/IOException.h>
+#include <activemq/connector/openwire/OpenWireFormat.h>
 #include <activemq/connector/openwire/commands/DataStructure.h>
-#include <activemq/connector/openwire/util/BooleanStream.h>
+#include <activemq/connector/openwire/utils/BooleanStream.h>
 
 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/NetworkBridgeFilterMarshaller.cpp
URL: http://svn.apache.org/viewvc/incubator/activemq/activemq-cpp/trunk/activemq-cpp/src/main/activemq/connector/openwire/marshal/v2/NetworkBridgeFilterMarshaller.cpp?view=diff&rev=474108&r1=474107&r2=474108
==============================================================================
--- incubator/activemq/activemq-cpp/trunk/activemq-cpp/src/main/activemq/connector/openwire/marshal/v2/NetworkBridgeFilterMarshaller.cpp (original)
+++ incubator/activemq/activemq-cpp/trunk/activemq-cpp/src/main/activemq/connector/openwire/marshal/v2/NetworkBridgeFilterMarshaller.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,65 +46,56 @@
 }
 
 ///////////////////////////////////////////////////////////////////////////////
-void NetworkBridgeFilterMarshaller::tightUnmarshal( OpenWireFormat* wireFormat, DataStructure* dataStructure, DataInputStream* dataIn, BooleanStream* bs ) {
+void NetworkBridgeFilterMarshaller::tightUnmarshal( OpenWireFormat* wireFormat, DataStructure* dataStructure, DataInputStream* dataIn, BooleanStream* bs ) throw( io::IOException ){
    BaseDataStreamMarshaller::tightUnmarshal( wireFormat, dataStructure, dataIn, bs );
 
     NetworkBridgeFilter* info =
         dynamic_cast<NetworkBridgeFilter*>( dataStructure );
     info->setNetworkTTL( dataIn->readInt() );
     info->setNetworkBrokerId( dynamic_cast< BrokerId* >(
-        tightUnmarsalCachedObject( wireFormat, dataIn, bs ) );
+        tightUnmarshalCachedObject( wireFormat, dataIn, bs ) ) );
 }
 
 ///////////////////////////////////////////////////////////////////////////////
-int NetworkBridgeFilterMarshaller::tightMarshal1( OpenWireFormat& wireFormat, DataStructure* dataStructure, BooleanStream& bs ) {
+int NetworkBridgeFilterMarshaller::tightMarshal1( OpenWireFormat* wireFormat, DataStructure* dataStructure, BooleanStream* bs ) throw( io::IOException ){
 
     NetworkBridgeFilter* info =
         dynamic_cast<NetworkBridgeFilter*>( dataStructure );
 
     int rc = BaseDataStreamMarshaller::tightMarshal1( wireFormat, dataStructure, bs );
-    DataStructure* data = 
-        dynamic_cast< DataStructure* >( info->getNetworkBrokerId() );
-
-    rc += tightMarshalCachedObject1( wireFormat, data, bs );
+    rc += tightMarshalCachedObject1( wireFormat, info->getNetworkBrokerId(), bs );
 
     return rc + 4;
 }
 
 ///////////////////////////////////////////////////////////////////////////////
-void NetworkBridgeFilterMarshaller::tightMarshal2( OpenWireFormat& wireFormat, DataStructure* dataStructure, DataOutputStream& dataOut, BooleanStream& bs ) {
+void NetworkBridgeFilterMarshaller::tightMarshal2( OpenWireFormat* wireFormat, DataStructure* dataStructure, DataOutputStream* dataOut, BooleanStream* bs ) throw( io::IOException ){
 
     BaseDataStreamMarshaller::tightMarshal2( wireFormat, dataStructure, dataOut, bs );
 
     NetworkBridgeFilter* info =
         dynamic_cast<NetworkBridgeFilter*>( dataStructure );
     dataOut->write( info->getNetworkTTL() );
-    DataStructure* data = 
-        dynamic_cast< DataStructure* >( info->getNetworkBrokerId() );
-
-    tightMarshalCachedObject2( wireFormat, data, dataOut, bs );
+    tightMarshalCachedObject2( wireFormat, info->getNetworkBrokerId(), dataOut, bs );
 }
 
 ///////////////////////////////////////////////////////////////////////////////
-void NetworkBridgeFilterMarshaller::looseUnmarshal( OpenWireFormat& wireFormat, DataStructure* dataStructure, DataInputStream& dataIn ) {
+void NetworkBridgeFilterMarshaller::looseUnmarshal( OpenWireFormat* wireFormat, DataStructure* dataStructure, DataInputStream* dataIn ) throw( io::IOException ){
     BaseDataStreamMarshaller::looseUnmarshal( wireFormat, dataStructure, dataIn );
     NetworkBridgeFilter* info = 
         dynamic_cast<NetworkBridgeFilter*>( dataStructure );
     info->setNetworkTTL( dataIn->readInt() );
-   info->setNetworkBrokerId( dynamic_cast<BrokerId* >( 
-       looseUnmarshalCachedObject( wireFormat, dataIn ) ) );
+    info->setNetworkBrokerId( dynamic_cast< BrokerId* >( 
+        looseUnmarshalCachedObject( wireFormat, dataIn ) ) );
 }
 
 ///////////////////////////////////////////////////////////////////////////////
-void NetworkBridgeFilterMarshaller::looseMarshal( OpenWireFormat& wireFormat, DataStructure* dataStructure, DataOutputStream& dataOut ) {
+void NetworkBridgeFilterMarshaller::looseMarshal( OpenWireFormat* wireFormat, DataStructure* dataStructure, DataOutputStream* dataOut ) throw( io::IOException ){
     NetworkBridgeFilter* info =
         dynamic_cast<NetworkBridgeFilter*>( dataStructure );
     BaseDataStreamMarshaller::looseMarshal( wireFormat, dataStructure, dataOut );
 
     dataOut->write( info->getNetworkTTL() );
-    DataStructure* data = 
-        dynamic_cast< DataStructure* >( info->getNetworkBrokerId() );
-
-    looseMarshalCachedObject( wireFormat, data, dataOut );
+    looseMarshalCachedObject( wireFormat, info->getNetworkBrokerId(), dataOut );
 }
 

Modified: incubator/activemq/activemq-cpp/trunk/activemq-cpp/src/main/activemq/connector/openwire/marshal/v2/NetworkBridgeFilterMarshaller.h
URL: http://svn.apache.org/viewvc/incubator/activemq/activemq-cpp/trunk/activemq-cpp/src/main/activemq/connector/openwire/marshal/v2/NetworkBridgeFilterMarshaller.h?view=diff&rev=474108&r1=474107&r2=474108
==============================================================================
--- incubator/activemq/activemq-cpp/trunk/activemq-cpp/src/main/activemq/connector/openwire/marshal/v2/NetworkBridgeFilterMarshaller.h (original)
+++ incubator/activemq/activemq-cpp/trunk/activemq-cpp/src/main/activemq/connector/openwire/marshal/v2/NetworkBridgeFilterMarshaller.h Sun Nov 12 16:46:23 2006
@@ -23,13 +23,14 @@
 #pragma warning( disable : 4290 )
 #endif
 
-#include <activemq/connector/openwire/marshal/V2/BaseDataStreamMarshaller.h>
+#include <activemq/connector/openwire/marshal/BaseDataStreamMarshaller.h>
 
 #include <activemq/io/DataInputStream.h>
 #include <activemq/io/DataOutputStream.h>
 #include <activemq/io/IOException.h>
+#include <activemq/connector/openwire/OpenWireFormat.h>
 #include <activemq/connector/openwire/commands/DataStructure.h>
-#include <activemq/connector/openwire/util/BooleanStream.h>
+#include <activemq/connector/openwire/utils/BooleanStream.h>
 
 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/PartialCommandMarshaller.cpp
URL: http://svn.apache.org/viewvc/incubator/activemq/activemq-cpp/trunk/activemq-cpp/src/main/activemq/connector/openwire/marshal/v2/PartialCommandMarshaller.cpp?view=diff&rev=474108&r1=474107&r2=474108
==============================================================================
--- incubator/activemq/activemq-cpp/trunk/activemq-cpp/src/main/activemq/connector/openwire/marshal/v2/PartialCommandMarshaller.cpp (original)
+++ incubator/activemq/activemq-cpp/trunk/activemq-cpp/src/main/activemq/connector/openwire/marshal/v2/PartialCommandMarshaller.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,7 +46,7 @@
 }
 
 ///////////////////////////////////////////////////////////////////////////////
-void PartialCommandMarshaller::tightUnmarshal( OpenWireFormat* wireFormat, DataStructure* dataStructure, DataInputStream* dataIn, BooleanStream* bs ) {
+void PartialCommandMarshaller::tightUnmarshal( OpenWireFormat* wireFormat, DataStructure* dataStructure, DataInputStream* dataIn, BooleanStream* bs ) throw( io::IOException ){
    BaseDataStreamMarshaller::tightUnmarshal( wireFormat, dataStructure, dataIn, bs );
 
     PartialCommand* info =
@@ -56,7 +56,7 @@
 }
 
 ///////////////////////////////////////////////////////////////////////////////
-int PartialCommandMarshaller::tightMarshal1( OpenWireFormat& wireFormat, DataStructure* dataStructure, BooleanStream& bs ) {
+int PartialCommandMarshaller::tightMarshal1( OpenWireFormat* wireFormat, DataStructure* dataStructure, BooleanStream* bs ) throw( io::IOException ){
 
     PartialCommand* info =
         dynamic_cast<PartialCommand*>( dataStructure );
@@ -69,7 +69,7 @@
 }
 
 ///////////////////////////////////////////////////////////////////////////////
-void PartialCommandMarshaller::tightMarshal2( OpenWireFormat& wireFormat, DataStructure* dataStructure, DataOutputStream& dataOut, BooleanStream& bs ) {
+void PartialCommandMarshaller::tightMarshal2( OpenWireFormat* wireFormat, DataStructure* dataStructure, DataOutputStream* dataOut, BooleanStream* bs ) throw( io::IOException ){
 
     BaseDataStreamMarshaller::tightMarshal2( wireFormat, dataStructure, dataOut, bs );
 
@@ -83,7 +83,7 @@
 }
 
 ///////////////////////////////////////////////////////////////////////////////
-void PartialCommandMarshaller::looseUnmarshal( OpenWireFormat& wireFormat, DataStructure* dataStructure, DataInputStream& dataIn ) {
+void PartialCommandMarshaller::looseUnmarshal( OpenWireFormat* wireFormat, DataStructure* dataStructure, DataInputStream* dataIn ) throw( io::IOException ){
     BaseDataStreamMarshaller::looseUnmarshal( wireFormat, dataStructure, dataIn );
     PartialCommand* info = 
         dynamic_cast<PartialCommand*>( dataStructure );
@@ -92,7 +92,7 @@
 }
 
 ///////////////////////////////////////////////////////////////////////////////
-void PartialCommandMarshaller::looseMarshal( OpenWireFormat& wireFormat, DataStructure* dataStructure, DataOutputStream& dataOut ) {
+void PartialCommandMarshaller::looseMarshal( OpenWireFormat* wireFormat, DataStructure* dataStructure, DataOutputStream* dataOut ) throw( io::IOException ){
     PartialCommand* info =
         dynamic_cast<PartialCommand*>( dataStructure );
     BaseDataStreamMarshaller::looseMarshal( wireFormat, dataStructure, dataOut );

Modified: incubator/activemq/activemq-cpp/trunk/activemq-cpp/src/main/activemq/connector/openwire/marshal/v2/PartialCommandMarshaller.h
URL: http://svn.apache.org/viewvc/incubator/activemq/activemq-cpp/trunk/activemq-cpp/src/main/activemq/connector/openwire/marshal/v2/PartialCommandMarshaller.h?view=diff&rev=474108&r1=474107&r2=474108
==============================================================================
--- incubator/activemq/activemq-cpp/trunk/activemq-cpp/src/main/activemq/connector/openwire/marshal/v2/PartialCommandMarshaller.h (original)
+++ incubator/activemq/activemq-cpp/trunk/activemq-cpp/src/main/activemq/connector/openwire/marshal/v2/PartialCommandMarshaller.h Sun Nov 12 16:46:23 2006
@@ -23,13 +23,14 @@
 #pragma warning( disable : 4290 )
 #endif
 
-#include <activemq/connector/openwire/marshal/V2/BaseDataStreamMarshaller.h>
+#include <activemq/connector/openwire/marshal/BaseDataStreamMarshaller.h>
 
 #include <activemq/io/DataInputStream.h>
 #include <activemq/io/DataOutputStream.h>
 #include <activemq/io/IOException.h>
+#include <activemq/connector/openwire/OpenWireFormat.h>
 #include <activemq/connector/openwire/commands/DataStructure.h>
-#include <activemq/connector/openwire/util/BooleanStream.h>
+#include <activemq/connector/openwire/utils/BooleanStream.h>
 
 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/ProducerIdMarshaller.cpp
URL: http://svn.apache.org/viewvc/incubator/activemq/activemq-cpp/trunk/activemq-cpp/src/main/activemq/connector/openwire/marshal/v2/ProducerIdMarshaller.cpp?view=diff&rev=474108&r1=474107&r2=474108
==============================================================================
--- incubator/activemq/activemq-cpp/trunk/activemq-cpp/src/main/activemq/connector/openwire/marshal/v2/ProducerIdMarshaller.cpp (original)
+++ incubator/activemq/activemq-cpp/trunk/activemq-cpp/src/main/activemq/connector/openwire/marshal/v2/ProducerIdMarshaller.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,18 +46,18 @@
 }
 
 ///////////////////////////////////////////////////////////////////////////////
-void ProducerIdMarshaller::tightUnmarshal( OpenWireFormat* wireFormat, DataStructure* dataStructure, DataInputStream* dataIn, BooleanStream* bs ) {
+void ProducerIdMarshaller::tightUnmarshal( OpenWireFormat* wireFormat, DataStructure* dataStructure, DataInputStream* dataIn, BooleanStream* bs ) throw( io::IOException ){
    BaseDataStreamMarshaller::tightUnmarshal( wireFormat, dataStructure, dataIn, bs );
 
     ProducerId* info =
         dynamic_cast<ProducerId*>( dataStructure );
-    info->setConnectionId( TightUnmarshalString( dataIn, bs ) );
-    info->setValue( TightUnmarshalLong( wireFormat, dataIn, bs ) );
-    info->setSessionId( TightUnmarshalLong( wireFormat, dataIn, bs ) );
+    info->setConnectionId( tightUnmarshalString( dataIn, bs ) );
+    info->setValue( tightUnmarshalLong( wireFormat, dataIn, bs ) );
+    info->setSessionId( tightUnmarshalLong( wireFormat, dataIn, bs ) );
 }
 
 ///////////////////////////////////////////////////////////////////////////////
-int ProducerIdMarshaller::tightMarshal1( OpenWireFormat& wireFormat, DataStructure* dataStructure, BooleanStream& bs ) {
+int ProducerIdMarshaller::tightMarshal1( OpenWireFormat* wireFormat, DataStructure* dataStructure, BooleanStream* bs ) throw( io::IOException ){
 
     ProducerId* info =
         dynamic_cast<ProducerId*>( dataStructure );
@@ -71,7 +71,7 @@
 }
 
 ///////////////////////////////////////////////////////////////////////////////
-void ProducerIdMarshaller::tightMarshal2( OpenWireFormat& wireFormat, DataStructure* dataStructure, DataOutputStream& dataOut, BooleanStream& bs ) {
+void ProducerIdMarshaller::tightMarshal2( OpenWireFormat* wireFormat, DataStructure* dataStructure, DataOutputStream* dataOut, BooleanStream* bs ) throw( io::IOException ){
 
     BaseDataStreamMarshaller::tightMarshal2( wireFormat, dataStructure, dataOut, bs );
 
@@ -83,7 +83,7 @@
 }
 
 ///////////////////////////////////////////////////////////////////////////////
-void ProducerIdMarshaller::looseUnmarshal( OpenWireFormat& wireFormat, DataStructure* dataStructure, DataInputStream& dataIn ) {
+void ProducerIdMarshaller::looseUnmarshal( OpenWireFormat* wireFormat, DataStructure* dataStructure, DataInputStream* dataIn ) throw( io::IOException ){
     BaseDataStreamMarshaller::looseUnmarshal( wireFormat, dataStructure, dataIn );
     ProducerId* info = 
         dynamic_cast<ProducerId*>( dataStructure );
@@ -93,7 +93,7 @@
 }
 
 ///////////////////////////////////////////////////////////////////////////////
-void ProducerIdMarshaller::looseMarshal( OpenWireFormat& wireFormat, DataStructure* dataStructure, DataOutputStream& dataOut ) {
+void ProducerIdMarshaller::looseMarshal( OpenWireFormat* wireFormat, DataStructure* dataStructure, DataOutputStream* dataOut ) throw( io::IOException ){
     ProducerId* info =
         dynamic_cast<ProducerId*>( dataStructure );
     BaseDataStreamMarshaller::looseMarshal( wireFormat, dataStructure, dataOut );

Modified: incubator/activemq/activemq-cpp/trunk/activemq-cpp/src/main/activemq/connector/openwire/marshal/v2/ProducerIdMarshaller.h
URL: http://svn.apache.org/viewvc/incubator/activemq/activemq-cpp/trunk/activemq-cpp/src/main/activemq/connector/openwire/marshal/v2/ProducerIdMarshaller.h?view=diff&rev=474108&r1=474107&r2=474108
==============================================================================
--- incubator/activemq/activemq-cpp/trunk/activemq-cpp/src/main/activemq/connector/openwire/marshal/v2/ProducerIdMarshaller.h (original)
+++ incubator/activemq/activemq-cpp/trunk/activemq-cpp/src/main/activemq/connector/openwire/marshal/v2/ProducerIdMarshaller.h Sun Nov 12 16:46:23 2006
@@ -23,13 +23,14 @@
 #pragma warning( disable : 4290 )
 #endif
 
-#include <activemq/connector/openwire/marshal/V2/BaseDataStreamMarshaller.h>
+#include <activemq/connector/openwire/marshal/BaseDataStreamMarshaller.h>
 
 #include <activemq/io/DataInputStream.h>
 #include <activemq/io/DataOutputStream.h>
 #include <activemq/io/IOException.h>
+#include <activemq/connector/openwire/OpenWireFormat.h>
 #include <activemq/connector/openwire/commands/DataStructure.h>
-#include <activemq/connector/openwire/util/BooleanStream.h>
+#include <activemq/connector/openwire/utils/BooleanStream.h>
 
 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 );
 
     };