activemq-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From tab...@apache.org
Subject svn commit: r503716 - in /activemq/activemq-cpp/trunk/activemq-cpp/src: main/activemq/connector/openwire/commands/ main/cms/ test/activemq/connector/openwire/commands/
Date Mon, 05 Feb 2007 15:11:19 GMT
Author: tabish
Date: Mon Feb  5 07:11:17 2007
New Revision: 503716

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

Modified:
    activemq/activemq-cpp/trunk/activemq-cpp/src/main/activemq/connector/openwire/commands/ActiveMQMapMessage.cpp
    activemq/activemq-cpp/trunk/activemq-cpp/src/main/activemq/connector/openwire/commands/ActiveMQMapMessage.h
    activemq/activemq-cpp/trunk/activemq-cpp/src/main/cms/MapMessage.h
    activemq/activemq-cpp/trunk/activemq-cpp/src/test/activemq/connector/openwire/commands/ActiveMQMapMessageTest.cpp

Modified: activemq/activemq-cpp/trunk/activemq-cpp/src/main/activemq/connector/openwire/commands/ActiveMQMapMessage.cpp
URL: http://svn.apache.org/viewvc/activemq/activemq-cpp/trunk/activemq-cpp/src/main/activemq/connector/openwire/commands/ActiveMQMapMessage.cpp?view=diff&rev=503716&r1=503715&r2=503716
==============================================================================
--- activemq/activemq-cpp/trunk/activemq-cpp/src/main/activemq/connector/openwire/commands/ActiveMQMapMessage.cpp
(original)
+++ activemq/activemq-cpp/trunk/activemq-cpp/src/main/activemq/connector/openwire/commands/ActiveMQMapMessage.cpp
Mon Feb  5 07:11:17 2007
@@ -179,11 +179,11 @@
 }
 
 ////////////////////////////////////////////////////////////////////////////////
-const unsigned char* ActiveMQMapMessage::getBytes( const std::string& name ) const 
+std::vector<unsigned char> ActiveMQMapMessage::getBytes( const std::string& name
) const 
     throw( cms::CMSException ) {
 
     try{
-        return NULL; // TODO getMap().getByteArray( name );
+        return getMap().getByteArray( name );
     }
     AMQ_CATCH_RETHROW( exceptions::ActiveMQException )
     AMQ_CATCHALL_THROW( exceptions::ActiveMQException )

Modified: activemq/activemq-cpp/trunk/activemq-cpp/src/main/activemq/connector/openwire/commands/ActiveMQMapMessage.h
URL: http://svn.apache.org/viewvc/activemq/activemq-cpp/trunk/activemq-cpp/src/main/activemq/connector/openwire/commands/ActiveMQMapMessage.h?view=diff&rev=503716&r1=503715&r2=503716
==============================================================================
--- activemq/activemq-cpp/trunk/activemq-cpp/src/main/activemq/connector/openwire/commands/ActiveMQMapMessage.h
(original)
+++ activemq/activemq-cpp/trunk/activemq-cpp/src/main/activemq/connector/openwire/commands/ActiveMQMapMessage.h
Mon Feb  5 07:11:17 2007
@@ -154,7 +154,7 @@
          * @param name of the value to fetch from the map
          * @throws CMSException
          */
-        virtual const unsigned char* getBytes( const std::string& name ) const 
+        virtual std::vector<unsigned char> getBytes( const std::string& name )
const 
             throw( cms::CMSException );
         
         /** 

Modified: activemq/activemq-cpp/trunk/activemq-cpp/src/main/cms/MapMessage.h
URL: http://svn.apache.org/viewvc/activemq/activemq-cpp/trunk/activemq-cpp/src/main/cms/MapMessage.h?view=diff&rev=503716&r1=503715&r2=503716
==============================================================================
--- activemq/activemq-cpp/trunk/activemq-cpp/src/main/cms/MapMessage.h (original)
+++ activemq/activemq-cpp/trunk/activemq-cpp/src/main/cms/MapMessage.h Mon Feb  5 07:11:17
2007
@@ -97,7 +97,7 @@
          * @param name of the value to fetch from the map
          * @throws CMSException
          */
-        virtual const unsigned char* getBytes( const std::string& name ) const
+        virtual std::vector<unsigned char> getBytes( const std::string& name )
const
             throw( CMSException ) = 0;
         
         /** 

Modified: activemq/activemq-cpp/trunk/activemq-cpp/src/test/activemq/connector/openwire/commands/ActiveMQMapMessageTest.cpp
URL: http://svn.apache.org/viewvc/activemq/activemq-cpp/trunk/activemq-cpp/src/test/activemq/connector/openwire/commands/ActiveMQMapMessageTest.cpp?view=diff&rev=503716&r1=503715&r2=503716
==============================================================================
--- activemq/activemq-cpp/trunk/activemq-cpp/src/test/activemq/connector/openwire/commands/ActiveMQMapMessageTest.cpp
(original)
+++ activemq/activemq-cpp/trunk/activemq-cpp/src/test/activemq/connector/openwire/commands/ActiveMQMapMessageTest.cpp
Mon Feb  5 07:11:17 2007
@@ -39,6 +39,14 @@
     CPPUNIT_ASSERT( myMessage.getMapNames().size() == 0 );
     CPPUNIT_ASSERT( myMessage.itemExists( "Something" ) == false );
     
+    std::vector<unsigned char> data;
+    
+    data.push_back( 2 );
+    data.push_back( 4 );
+    data.push_back( 8 );
+    data.push_back( 16 );
+    data.push_back( 32 );
+    
     myMessage.setBoolean( "boolean", false );
     myMessage.setByte( "byte", 127 );
     myMessage.setChar( "char", 'a' );
@@ -47,6 +55,7 @@
     myMessage.setLong( "long", 0xFFFAAA33345LL );
     myMessage.setFloat( "float", 0.000012f );
     myMessage.setDouble( "double", 64.54654 );
+    myMessage.setBytes( "bytes", data );
 
     CPPUNIT_ASSERT( myMessage.getBoolean( "boolean" ) == false );
     CPPUNIT_ASSERT( myMessage.getByte( "byte" ) == 127 );
@@ -56,4 +65,5 @@
     CPPUNIT_ASSERT( myMessage.getLong( "long" ) == 0xFFFAAA33345LL );
     CPPUNIT_ASSERT( myMessage.getFloat( "float" ) == 0.000012f );
     CPPUNIT_ASSERT( myMessage.getDouble( "double" ) == 64.54654 );
+    CPPUNIT_ASSERT( myMessage.getBytes( "bytes" ) == data );
 }



Mime
View raw message