activemq-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From tab...@apache.org
Subject svn commit: r498495 - in /incubator/activemq/activemq-cpp/trunk/activemq-cpp/src/main/activemq: connector/openwire/commands/ connector/openwire/marshal/v2/ util/
Date Sun, 21 Jan 2007 23:54:07 GMT
Author: tabish
Date: Sun Jan 21 15:54:06 2007
New Revision: 498495

URL: http://svn.apache.org/viewvc?view=rev&rev=498495
Log:
http://issues.apache.org/activemq/browse/AMQCPP-30

Modified:
    incubator/activemq/activemq-cpp/trunk/activemq-cpp/src/main/activemq/connector/openwire/commands/ActiveMQMessage.cpp
    incubator/activemq/activemq-cpp/trunk/activemq-cpp/src/main/activemq/connector/openwire/commands/ActiveMQMessage.h
    incubator/activemq/activemq-cpp/trunk/activemq-cpp/src/main/activemq/connector/openwire/marshal/v2/ConnectionControlMarshaller.cpp
    incubator/activemq/activemq-cpp/trunk/activemq-cpp/src/main/activemq/connector/openwire/marshal/v2/IntegerResponseMarshaller.cpp
    incubator/activemq/activemq-cpp/trunk/activemq-cpp/src/main/activemq/connector/openwire/marshal/v2/ReplayCommandMarshaller.cpp
    incubator/activemq/activemq-cpp/trunk/activemq-cpp/src/main/activemq/connector/openwire/marshal/v2/ResponseMarshaller.cpp
    incubator/activemq/activemq-cpp/trunk/activemq-cpp/src/main/activemq/util/PrimitiveMap.cpp
    incubator/activemq/activemq-cpp/trunk/activemq-cpp/src/main/activemq/util/PrimitiveMap.h

Modified: incubator/activemq/activemq-cpp/trunk/activemq-cpp/src/main/activemq/connector/openwire/commands/ActiveMQMessage.cpp
URL: http://svn.apache.org/viewvc/incubator/activemq/activemq-cpp/trunk/activemq-cpp/src/main/activemq/connector/openwire/commands/ActiveMQMessage.cpp?view=diff&rev=498495&r1=498494&r2=498495
==============================================================================
--- incubator/activemq/activemq-cpp/trunk/activemq-cpp/src/main/activemq/connector/openwire/commands/ActiveMQMessage.cpp
(original)
+++ incubator/activemq/activemq-cpp/trunk/activemq-cpp/src/main/activemq/connector/openwire/commands/ActiveMQMessage.cpp
Sun Jan 21 15:54:06 2007
@@ -17,12 +17,15 @@
 #include <activemq/connector/openwire/commands/ActiveMQMessage.h>
 #include <activemq/connector/openwire/OpenWireFormat.h>
 #include <activemq/util/Config.h>
+#include <activemq/connector/openwire/marshal/PrimitiveMapMarshaller.h>
 
 using namespace std;
 using namespace activemq;
+using namespace activemq::util;
 using namespace activemq::connector;
 using namespace activemq::connector::openwire;
 using namespace activemq::connector::openwire::commands;
+using namespace activemq::connector::openwire::marshal;
 
 ////////////////////////////////////////////////////////////////////////////////
 ActiveMQMessage::ActiveMQMessage()
@@ -40,9 +43,10 @@
 ////////////////////////////////////////////////////////////////////////////////
 void ActiveMQMessage::beforeMarshall( OpenWireFormat* wireFormat ACTIVEMQ_ATTRIBUTE_UNUSED
)
 {
-//    marshalledProperties.clear();
-//    if( !properties.empty() )
-//    {
-//        properties.Marshal( marshalledProperties );
-//    }
+    marshalledProperties.clear();
+    if( !properties.isEmpty() )
+    {
+        PrimitiveMapMarshaller::marshal( 
+            &properties, marshalledProperties );
+    }
 }

Modified: incubator/activemq/activemq-cpp/trunk/activemq-cpp/src/main/activemq/connector/openwire/commands/ActiveMQMessage.h
URL: http://svn.apache.org/viewvc/incubator/activemq/activemq-cpp/trunk/activemq-cpp/src/main/activemq/connector/openwire/commands/ActiveMQMessage.h?view=diff&rev=498495&r1=498494&r2=498495
==============================================================================
--- incubator/activemq/activemq-cpp/trunk/activemq-cpp/src/main/activemq/connector/openwire/commands/ActiveMQMessage.h
(original)
+++ incubator/activemq/activemq-cpp/trunk/activemq-cpp/src/main/activemq/connector/openwire/commands/ActiveMQMessage.h
Sun Jan 21 15:54:06 2007
@@ -23,6 +23,7 @@
 #include <activemq/connector/openwire/marshal/BaseDataStreamMarshaller.h>
 #include <activemq/core/ActiveMQAckHandler.h>
 #include <activemq/util/Date.h>
+#include <activemq/util/PrimitiveMap.h>
 
 namespace activemq{
 namespace connector{
@@ -120,6 +121,7 @@
    
         core::ActiveMQAckHandler* ackHandler;
         int redeliveryCount;
+        util::PrimitiveMap properties;
 
     };
 

Modified: incubator/activemq/activemq-cpp/trunk/activemq-cpp/src/main/activemq/connector/openwire/marshal/v2/ConnectionControlMarshaller.cpp
URL: http://svn.apache.org/viewvc/incubator/activemq/activemq-cpp/trunk/activemq-cpp/src/main/activemq/connector/openwire/marshal/v2/ConnectionControlMarshaller.cpp?view=diff&rev=498495&r1=498494&r2=498495
==============================================================================
--- incubator/activemq/activemq-cpp/trunk/activemq-cpp/src/main/activemq/connector/openwire/marshal/v2/ConnectionControlMarshaller.cpp
(original)
+++ incubator/activemq/activemq-cpp/trunk/activemq-cpp/src/main/activemq/connector/openwire/marshal/v2/ConnectionControlMarshaller.cpp
Sun Jan 21 15:54:06 2007
@@ -79,8 +79,8 @@
 
     BaseCommandMarshaller::tightMarshal2( wireFormat, dataStructure, dataOut, bs );
 
-    /*ConnectionControl* info =
-        dynamic_cast<ConnectionControl*>( dataStructure );*/
+    ConnectionControl* info =
+        dynamic_cast<ConnectionControl*>( dataStructure );
     bs->readBoolean();
     bs->readBoolean();
     bs->readBoolean();

Modified: incubator/activemq/activemq-cpp/trunk/activemq-cpp/src/main/activemq/connector/openwire/marshal/v2/IntegerResponseMarshaller.cpp
URL: http://svn.apache.org/viewvc/incubator/activemq/activemq-cpp/trunk/activemq-cpp/src/main/activemq/connector/openwire/marshal/v2/IntegerResponseMarshaller.cpp?view=diff&rev=498495&r1=498494&r2=498495
==============================================================================
--- incubator/activemq/activemq-cpp/trunk/activemq-cpp/src/main/activemq/connector/openwire/marshal/v2/IntegerResponseMarshaller.cpp
(original)
+++ incubator/activemq/activemq-cpp/trunk/activemq-cpp/src/main/activemq/connector/openwire/marshal/v2/IntegerResponseMarshaller.cpp
Sun Jan 21 15:54:06 2007
@@ -57,8 +57,8 @@
 ///////////////////////////////////////////////////////////////////////////////
 int IntegerResponseMarshaller::tightMarshal1( OpenWireFormat* wireFormat, DataStructure*
dataStructure, BooleanStream* bs ) throw( io::IOException ){
 
-    /*IntegerResponse* info =
-        dynamic_cast<IntegerResponse*>( dataStructure );*/
+    IntegerResponse* info =
+        dynamic_cast<IntegerResponse*>( dataStructure );
 
     int rc = ResponseMarshaller::tightMarshal1( wireFormat, dataStructure, bs );
 

Modified: incubator/activemq/activemq-cpp/trunk/activemq-cpp/src/main/activemq/connector/openwire/marshal/v2/ReplayCommandMarshaller.cpp
URL: http://svn.apache.org/viewvc/incubator/activemq/activemq-cpp/trunk/activemq-cpp/src/main/activemq/connector/openwire/marshal/v2/ReplayCommandMarshaller.cpp?view=diff&rev=498495&r1=498494&r2=498495
==============================================================================
--- incubator/activemq/activemq-cpp/trunk/activemq-cpp/src/main/activemq/connector/openwire/marshal/v2/ReplayCommandMarshaller.cpp
(original)
+++ incubator/activemq/activemq-cpp/trunk/activemq-cpp/src/main/activemq/connector/openwire/marshal/v2/ReplayCommandMarshaller.cpp
Sun Jan 21 15:54:06 2007
@@ -58,8 +58,8 @@
 ///////////////////////////////////////////////////////////////////////////////
 int ReplayCommandMarshaller::tightMarshal1( OpenWireFormat* wireFormat, DataStructure* dataStructure,
BooleanStream* bs ) throw( io::IOException ){
 
-    /*ReplayCommand* info =
-        dynamic_cast<ReplayCommand*>( dataStructure );*/
+    ReplayCommand* info =
+        dynamic_cast<ReplayCommand*>( dataStructure );
 
     int rc = BaseCommandMarshaller::tightMarshal1( wireFormat, dataStructure, bs );
 

Modified: incubator/activemq/activemq-cpp/trunk/activemq-cpp/src/main/activemq/connector/openwire/marshal/v2/ResponseMarshaller.cpp
URL: http://svn.apache.org/viewvc/incubator/activemq/activemq-cpp/trunk/activemq-cpp/src/main/activemq/connector/openwire/marshal/v2/ResponseMarshaller.cpp?view=diff&rev=498495&r1=498494&r2=498495
==============================================================================
--- incubator/activemq/activemq-cpp/trunk/activemq-cpp/src/main/activemq/connector/openwire/marshal/v2/ResponseMarshaller.cpp
(original)
+++ incubator/activemq/activemq-cpp/trunk/activemq-cpp/src/main/activemq/connector/openwire/marshal/v2/ResponseMarshaller.cpp
Sun Jan 21 15:54:06 2007
@@ -57,8 +57,8 @@
 ///////////////////////////////////////////////////////////////////////////////
 int ResponseMarshaller::tightMarshal1( OpenWireFormat* wireFormat, DataStructure* dataStructure,
BooleanStream* bs ) throw( io::IOException ){
 
-    /*Response* info =
-        dynamic_cast<Response*>( dataStructure );*/
+    Response* info =
+        dynamic_cast<Response*>( dataStructure );
 
     int rc = BaseCommandMarshaller::tightMarshal1( wireFormat, dataStructure, bs );
 

Modified: incubator/activemq/activemq-cpp/trunk/activemq-cpp/src/main/activemq/util/PrimitiveMap.cpp
URL: http://svn.apache.org/viewvc/incubator/activemq/activemq-cpp/trunk/activemq-cpp/src/main/activemq/util/PrimitiveMap.cpp?view=diff&rev=498495&r1=498494&r2=498495
==============================================================================
--- incubator/activemq/activemq-cpp/trunk/activemq-cpp/src/main/activemq/util/PrimitiveMap.cpp
(original)
+++ incubator/activemq/activemq-cpp/trunk/activemq-cpp/src/main/activemq/util/PrimitiveMap.cpp
Sun Jan 21 15:54:06 2007
@@ -50,6 +50,12 @@
 }
 
 ////////////////////////////////////////////////////////////////////////////////
+bool PrimitiveMap::isEmpty() const{
+    
+    return valueNodeMap.isEmpty();
+}
+
+////////////////////////////////////////////////////////////////////////////////
 bool PrimitiveMap::getBool( const string& key ) const 
     throw(NoSuchElementException){
         

Modified: incubator/activemq/activemq-cpp/trunk/activemq-cpp/src/main/activemq/util/PrimitiveMap.h
URL: http://svn.apache.org/viewvc/incubator/activemq/activemq-cpp/trunk/activemq-cpp/src/main/activemq/util/PrimitiveMap.h?view=diff&rev=498495&r1=498494&r2=498495
==============================================================================
--- incubator/activemq/activemq-cpp/trunk/activemq-cpp/src/main/activemq/util/PrimitiveMap.h
(original)
+++ incubator/activemq/activemq-cpp/trunk/activemq-cpp/src/main/activemq/util/PrimitiveMap.h
Sun Jan 21 15:54:06 2007
@@ -356,7 +356,11 @@
          * @return The number of elements (key/value pairs) in this map.
          */
         virtual unsigned int size() const;
-        
+
+        /**
+         * @returns if there are any entries in the map.
+         */
+        virtual bool isEmpty() const;        
 
         virtual bool getBool( const std::string& key ) const 
             throw(activemq::exceptions::NoSuchElementException);



Mime
View raw message