activemq-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From tab...@apache.org
Subject svn commit: r774811 - /activemq/activemq-cpp/trunk/activemq-cpp/src/main/cms/MapMessage.h
Date Thu, 14 May 2009 15:16:06 GMT
Author: tabish
Date: Thu May 14 15:15:53 2009
New Revision: 774811

URL: http://svn.apache.org/viewvc?rev=774811&view=rev
Log:
Update the CMS API MapMessage documentation.

Modified:
    activemq/activemq-cpp/trunk/activemq-cpp/src/main/cms/MapMessage.h

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?rev=774811&r1=774810&r2=774811&view=diff
==============================================================================
--- activemq/activemq-cpp/trunk/activemq-cpp/src/main/cms/MapMessage.h (original)
+++ activemq/activemq-cpp/trunk/activemq-cpp/src/main/cms/MapMessage.h Thu May 14 15:15:53
2009
@@ -25,29 +25,51 @@
 {
 
     /**
-     * A MapMessage object is used to send a set of name-value pairs. The 
-     * names are String objects, and the values are primitive data types in 
-     * the Java programming language. The names must have a value that is 
-     * not null, and not an empty string. The entries can be accessed 
-     * sequentially or randomly by name. The order of the entries is 
-     * undefined. MapMessage inherits from the Message interface and adds 
+     * A MapMessage object is used to send a set of name-value pairs. The
+     * names are String objects, and the values are primitive data types in
+     * the Java programming language. The names must have a value that is
+     * not null, and not an empty string. The entries can be accessed
+     * sequentially or randomly by name. The order of the entries is
+     * undefined. MapMessage inherits from the Message interface and adds
      * a message body that contains a Map.
-     * 
-     * When a client receives a MapMessage, it is in read-only mode. If a 
-     * client attempts to write to the message at this point, a 
+     *
+     * When a client receives a MapMessage, it is in read-only mode. If a
+     * client attempts to write to the message at this point, a
      * CMSException is thrown.
+     *
+     * MapMessage objects support the following conversion table. The marked
+     * cases must be supported. The unmarked cases must throw a CMSException.
+     * The String-to-primitive conversions may throw a CMSException if the
+     * primitive's valueOf() method does not accept it as a valid String
+     * representation of the primitive.
+     *
+     * A value written as the row type can be read as the column type.
+     *
+     *  |        | boolean byte short char int long float double String byte[]
+     *  |----------------------------------------------------------------------
+     *  |boolean |    X                                            X
+     *  |byte    |          X     X         X   X                  X
+     *  |short   |                X         X   X                  X
+     *  |char    |                     X                           X
+     *  |int     |                          X   X                  X
+     *  |long    |                              X                  X
+     *  |float   |                                    X     X      X
+     *  |double  |                                          X      X
+     *  |String  |    X     X     X         X   X     X     X      X
+     *  |byte[]  |                                                        X
+     *  |----------------------------------------------------------------------
+     *
      */
-    class CMS_API MapMessage : public Message
-    {
+    class CMS_API MapMessage : public Message {
     public:
 
         virtual ~MapMessage() {}
-        
+
         /**
-         * Returns an Enumeration of all the names in the MapMessage 
+         * Returns an Enumeration of all the names in the MapMessage
          * object.
-         * 
-         * @return STL Vector of String values, each of which is the 
+         *
+         * @return STL Vector of String values, each of which is the
          *         name of an item in the MapMessage
          * @throws CMSException
          */
@@ -55,26 +77,26 @@
 
         /**
          * Indicates whether an item exists in this MapMessage object.
-         * 
+         *
          * @param name
          *      String name of the Object in question
          * @return boolean value indicating if the name is in the map
          */
         virtual bool itemExists( const std::string& name ) const = 0;
-        
+
         /**
          * Returns the Boolean value of the Specified name
-         * 
+         *
          * @param name
          *      Name of the value to fetch from the map
          * @throws CMSException
          */
-        virtual bool getBoolean( const std::string& name ) const 
+        virtual bool getBoolean( const std::string& name ) const
             throw( CMSException ) = 0;
-        
-        /** 
+
+        /**
          * Sets a boolean value with the specified name into the Map.
-         * 
+         *
          * @param name
          *      the name of the boolean
          * @param value
@@ -86,17 +108,17 @@
 
         /**
          * Returns the Byte value of the Specified name
-         * 
+         *
          * @param name
          *      Name of the value to fetch from the map
          * @throws CMSException
          */
-        virtual unsigned char getByte( const std::string& name ) const 
+        virtual unsigned char getByte( const std::string& name ) const
             throw( CMSException ) = 0;
-        
-        /** 
+
+        /**
          * Sets a Byte value with the specified name into the Map.
-         * 
+         *
          * @param name
          *      the name of the Byte
          * @param value
@@ -108,17 +130,17 @@
 
         /**
          * Returns the Bytes value of the Specified name
-         * 
-         * @param name 
+         *
+         * @param name
          *      Name of the value to fetch from the map
          * @throws CMSException
          */
         virtual std::vector<unsigned char> getBytes( const std::string& name )
const
             throw( CMSException ) = 0;
-        
-        /** 
+
+        /**
          * Sets a Bytes value with the specified name into the Map.
-         * 
+         *
          * @param name
          *      The name of the Bytes
          * @param value
@@ -126,44 +148,44 @@
          * @throws CMSException
          */
         virtual void setBytes( const std::string& name,
-                               const std::vector<unsigned char>& value ) 
+                               const std::vector<unsigned char>& value )
                                     throw( CMSException ) = 0;
 
         /**
          * Returns the Char value of the Specified name
-         * 
+         *
          * @param name
          *      name of the value to fetch from the map
          * @throws CMSException
          */
-        virtual char getChar( const std::string& name ) const 
+        virtual char getChar( const std::string& name ) const
             throw( CMSException ) = 0;
-        
-        /** 
+
+        /**
          * Sets a Char value with the specified name into the Map.
-         * 
+         *
          * @param name
          *      the name of the Char
          * @param value
          *      the Char value to set in the Map
          * @throws CMSException
          */
-        virtual void setChar( const std::string& name, char value ) 
+        virtual void setChar( const std::string& name, char value )
             throw( CMSException ) = 0;
 
         /**
          * Returns the Double value of the Specified name
-         * 
-         * @param name 
+         *
+         * @param name
          *      Name of the value to fetch from the map
          * @throws CMSException
          */
-        virtual double getDouble( const std::string& name ) const 
+        virtual double getDouble( const std::string& name ) const
             throw( CMSException ) = 0;
-        
-        /** 
+
+        /**
          * Sets a Double value with the specified name into the Map.
-         * 
+         *
          * @param name
          *      The name of the Double
          * @param value
@@ -175,113 +197,113 @@
 
         /**
          * Returns the Float value of the Specified name
-         * 
-         * @param name 
+         *
+         * @param name
          *      Name of the value to fetch from the map
          * @throws CMSException
          */
-        virtual float getFloat( const std::string& name ) const 
+        virtual float getFloat( const std::string& name ) const
             throw( CMSException ) = 0;
-        
-        /** 
+
+        /**
          * Sets a Float value with the specified name into the Map.
-         * 
+         *
          * @param name
          *      The name of the Float
          * @param value
          *      The Float value to set in the Map
          * @throws CMSException
          */
-        virtual void setFloat( const std::string& name, float value ) 
+        virtual void setFloat( const std::string& name, float value )
             throw( CMSException ) = 0;
 
         /**
          * Returns the Int value of the Specified name
-         * 
+         *
          * @param name
          *      Name of the value to fetch from the map
          * @throws CMSException
          */
         virtual int getInt( const std::string& name ) const
             throw( CMSException ) = 0;
-        
-        /** 
+
+        /**
          * Sets a Int value with the specified name into the Map.
-         * 
+         *
          * @param name
          *      The name of the Int
          * @param value
          *      The Int value to set in the Map
          * @throws CMSException
          */
-        virtual void setInt( const std::string& name, int value ) 
+        virtual void setInt( const std::string& name, int value )
             throw( CMSException ) = 0;
 
         /**
          * Returns the Long value of the Specified name
-         * 
-         * @param name 
+         *
+         * @param name
          *      Name of the value to fetch from the map
          * @throws CMSException
          */
-        virtual long long getLong( const std::string& name ) const 
+        virtual long long getLong( const std::string& name ) const
             throw( CMSException ) = 0;
-        
-        /** 
+
+        /**
          * Sets a Long value with the specified name into the Map.
-         * 
+         *
          * @param name
          *      The name of the Long
          * @param value
          *      The Long value to set in the Map
          * @throws CMSException
          */
-        virtual void setLong( const std::string& name, long long value ) 
+        virtual void setLong( const std::string& name, long long value )
             throw( CMSException ) = 0;
 
         /**
          * Returns the Short value of the Specified name
-         * 
-         * @param name 
+         *
+         * @param name
          *      Name of the value to fetch from the map
          * @throws CMSException
          */
         virtual short getShort( const std::string& name ) const
             throw( CMSException ) = 0;
-        
-        /** 
+
+        /**
          * Sets a Short value with the specified name into the Map.
-         * 
+         *
          * @param name
          *      The name of the Short
          * @param value
          *      The Short value to set in the Map
          * @throws CMSException
          */
-        virtual void setShort( const std::string& name, short value ) 
+        virtual void setShort( const std::string& name, short value )
             throw( CMSException ) = 0;
 
         /**
          * Returns the String value of the Specified name
-         * 
-         * @param name 
+         *
+         * @param name
          *      Name of the value to fetch from the map
          * @throws CMSException
          */
-        virtual std::string getString( const std::string& name ) const 
+        virtual std::string getString( const std::string& name ) const
             throw( CMSException ) = 0;
-        
-        /** 
+
+        /**
          * Sets a String value with the specified name into the Map.
-         * 
+         *
          * @param name
          *      The name of the String
          * @param value
          *      The String value to set in the Map
          * @throws CMSException
          */
-        virtual void setString( const std::string& name, 
-                                const std::string& value ) 
+        virtual void setString( const std::string& name,
+                                const std::string& value )
                                     throw( CMSException ) = 0;
 
     };



Mime
View raw message