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 2009/02/23 00:13:17 UTC

svn commit: r746846 - in /activemq/activemq-cpp/trunk: activemq-cpp-openwire-generator/src/main/java/org/apache/activemq/openwire/tool/ src/main/activemq/commands/

Author: tabish
Date: Sun Feb 22 23:13:16 2009
New Revision: 746846

URL: http://svn.apache.org/viewvc?rev=746846&view=rev
Log: (empty)

Modified:
    activemq/activemq-cpp/trunk/activemq-cpp-openwire-generator/src/main/java/org/apache/activemq/openwire/tool/AmqCppClassesGenerator.java
    activemq/activemq-cpp/trunk/activemq-cpp-openwire-generator/src/main/java/org/apache/activemq/openwire/tool/AmqCppGeneratorTask.java
    activemq/activemq-cpp/trunk/activemq-cpp-openwire-generator/src/main/java/org/apache/activemq/openwire/tool/AmqCppHeadersGenerator.java
    activemq/activemq-cpp/trunk/activemq-cpp-openwire-generator/src/main/java/org/apache/activemq/openwire/tool/AmqCppMakefileGenerator.java
    activemq/activemq-cpp/trunk/activemq-cpp-openwire-generator/src/main/java/org/apache/activemq/openwire/tool/AmqCppMarshallingHeadersGenerator.java
    activemq/activemq-cpp/trunk/activemq-cpp-openwire-generator/src/main/java/org/apache/activemq/openwire/tool/AmqCppTestMarshallingClassesGenerator.java
    activemq/activemq-cpp/trunk/activemq-cpp-openwire-generator/src/main/java/org/apache/activemq/openwire/tool/AmqCppTestMarshallingHeadersGenerator.java
    activemq/activemq-cpp/trunk/src/main/activemq/commands/Message.h

Modified: activemq/activemq-cpp/trunk/activemq-cpp-openwire-generator/src/main/java/org/apache/activemq/openwire/tool/AmqCppClassesGenerator.java
URL: http://svn.apache.org/viewvc/activemq/activemq-cpp/trunk/activemq-cpp-openwire-generator/src/main/java/org/apache/activemq/openwire/tool/AmqCppClassesGenerator.java?rev=746846&r1=746845&r2=746846&view=diff
==============================================================================
--- activemq/activemq-cpp/trunk/activemq-cpp-openwire-generator/src/main/java/org/apache/activemq/openwire/tool/AmqCppClassesGenerator.java (original)
+++ activemq/activemq-cpp/trunk/activemq-cpp-openwire-generator/src/main/java/org/apache/activemq/openwire/tool/AmqCppClassesGenerator.java Sun Feb 22 23:13:16 2009
@@ -1,5 +1,4 @@
-/*
- *
+/**
  * Licensed to the Apache Software Foundation (ASF) under one or more
  * contributor license agreements.  See the NOTICE file distributed with
  * this work for additional information regarding copyright ownership.
@@ -21,8 +20,6 @@
 import java.io.PrintWriter;
 import java.util.Iterator;
 import java.util.List;
-import java.util.ArrayList;
-import java.util.Set;
 
 import org.codehaus.jam.JClass;
 import org.codehaus.jam.JProperty;

Modified: activemq/activemq-cpp/trunk/activemq-cpp-openwire-generator/src/main/java/org/apache/activemq/openwire/tool/AmqCppGeneratorTask.java
URL: http://svn.apache.org/viewvc/activemq/activemq-cpp/trunk/activemq-cpp-openwire-generator/src/main/java/org/apache/activemq/openwire/tool/AmqCppGeneratorTask.java?rev=746846&r1=746845&r2=746846&view=diff
==============================================================================
--- activemq/activemq-cpp/trunk/activemq-cpp-openwire-generator/src/main/java/org/apache/activemq/openwire/tool/AmqCppGeneratorTask.java (original)
+++ activemq/activemq-cpp/trunk/activemq-cpp-openwire-generator/src/main/java/org/apache/activemq/openwire/tool/AmqCppGeneratorTask.java Sun Feb 22 23:13:16 2009
@@ -18,7 +18,6 @@
 package org.apache.activemq.openwire.tool;
 
 import java.io.File;
-import java.util.ArrayList;
 
 import org.apache.tools.ant.BuildException;
 import org.apache.tools.ant.Project;

Modified: activemq/activemq-cpp/trunk/activemq-cpp-openwire-generator/src/main/java/org/apache/activemq/openwire/tool/AmqCppHeadersGenerator.java
URL: http://svn.apache.org/viewvc/activemq/activemq-cpp/trunk/activemq-cpp-openwire-generator/src/main/java/org/apache/activemq/openwire/tool/AmqCppHeadersGenerator.java?rev=746846&r1=746845&r2=746846&view=diff
==============================================================================
--- activemq/activemq-cpp/trunk/activemq-cpp-openwire-generator/src/main/java/org/apache/activemq/openwire/tool/AmqCppHeadersGenerator.java (original)
+++ activemq/activemq-cpp/trunk/activemq-cpp-openwire-generator/src/main/java/org/apache/activemq/openwire/tool/AmqCppHeadersGenerator.java Sun Feb 22 23:13:16 2009
@@ -23,10 +23,8 @@
 import java.util.Set;
 import java.util.HashSet;
 
-import org.codehaus.jam.JClass;
 import org.codehaus.jam.JProperty;
 
-
 /**
  *
  * @version $Revision: 379734 $
@@ -78,25 +76,27 @@
         boolean comparable = className.endsWith( "Id" );
         boolean assignable = className.endsWith( "Id" );
 
-out.println("");
-out.println("#ifndef _ACTIVEMQ_COMMANDS_"+className.toUpperCase()+"_H_");
-out.println("#define _ACTIVEMQ_COMMANDS_"+className.toUpperCase()+"_H_");
-out.println("");
-out.println("// Turn off warning message for ignored exception specification");
-out.println("#ifdef _MSC_VER");
-out.println("#pragma warning( disable : 4290 )");
-out.println("#endif");
-out.println("");
-out.println("#include <activemq/util/Config.h>");
-out.println("#include <activemq/commands/"+baseClass+".h>");
+        out.println("");
+        out.println("#ifndef _ACTIVEMQ_COMMANDS_"+className.toUpperCase()+"_H_");
+        out.println("#define _ACTIVEMQ_COMMANDS_"+className.toUpperCase()+"_H_");
+        out.println("");
+        out.println("// Turn off warning message for ignored exception specification");
+        out.println("#ifdef _MSC_VER");
+        out.println("#pragma warning( disable : 4290 )");
+        out.println("#endif");
+        out.println("");
+        out.println("#include <activemq/util/Config.h>");
+        out.println("#include <activemq/commands/"+baseClass+".h>");
+
         if( className.equals( "Message" ) ) {
-out.println("#include <activemq/util/PrimitiveMap.h>");
-out.println("#include <decaf/util/Date.h>");
+            out.println("#include <activemq/util/PrimitiveMap.h>");
+            out.println("#include <decaf/util/Date.h>");
         }
-out.println("#include <decaf/lang/Pointer.h>");
+
+        out.println("#include <decaf/lang/Pointer.h>");
 
         if( comparable ) {
-out.println("#include <decaf/lang/Comparable.h>");
+            out.println("#include <decaf/lang/Comparable.h>");
         }
 
         List properties = getProperties();
@@ -117,60 +117,66 @@
             }
         }
 
-out.println("#include <vector>");
-out.println("#include <string>");
-out.println("");
-out.println("namespace activemq{");
+        out.println("#include <vector>");
+        out.println("#include <string>");
+        out.println("");
+        out.println("namespace activemq{");
+
         if( className.equals( "Message" ) ) {
-out.println("namespace core{");
-out.println("    class ActiveMQAckHandler;");
-out.println("}");
-        }
-out.println("namespace commands{");
-out.println("");
-out.println("    /*");
-out.println("     *");
-out.println("     *  Command and marshaling code for OpenWire format for "+className );
-out.println("     *");
-out.println("     *");
-out.println("     *  NOTE!: This file is auto generated - do not modify!");
-out.println("     *         if you need to make a change, please see the Java Classes");
-out.println("     *         in the activemq-openwire-generator module");
-out.println("     *");
-out.println("     */");
-out.print("    class AMQCPP_API "+className+" : " );
+            out.println("namespace core{");
+            out.println("    class ActiveMQAckHandler;");
+            out.println("}");
+        }
+
+        out.println("namespace commands{");
+        out.println("");
+        out.println("    /*");
+        out.println("     *");
+        out.println("     *  Command and marshaling code for OpenWire format for "+className );
+        out.println("     *");
+        out.println("     *");
+        out.println("     *  NOTE!: This file is auto generated - do not modify!");
+        out.println("     *         if you need to make a change, please see the Java Classes");
+        out.println("     *         in the activemq-openwire-generator module");
+        out.println("     *");
+        out.println("     */");
+        out.print("    class AMQCPP_API "+className+" : " );
 
         if( comparable ) {
-out.println("public "+ baseClass +", public decaf::lang::Comparable<"+className+"> {" );
+            out.println("public "+ baseClass +", public decaf::lang::Comparable<"+className+"> {" );
         } else {
-out.print("public "+ baseClass +" {" );
-out.println("");
+            out.print("public "+ baseClass +" {" );
+            out.println("");
         }
 
         if( className.equals( "Message" ) ) {
-out.println("    private:");
-out.println("");
-out.println("        // Used to allow a client to call Message::acknowledge when in the Client");
-out.println("        // Ack mode.");
-out.println("        core::ActiveMQAckHandler* ackHandler;");
-out.println("");
-out.println("        // Message properties, these are Marshaled and Unmarshaled from the Message");
-out.println("        // Command's marshaledProperties vector.");
-out.println("        activemq::util::PrimitiveMap properties;");
-out.println("");
+            out.println("    private:");
+            out.println("");
+            out.println("        // Used to allow a client to call Message::acknowledge when in the Client");
+            out.println("        // Ack mode.");
+            out.println("        core::ActiveMQAckHandler* ackHandler;");
+            out.println("");
+            out.println("        // Message properties, these are Marshaled and Unmarshaled from the Message");
+            out.println("        // Command's marshaledProperties vector.");
+            out.println("        activemq::util::PrimitiveMap properties;");
+            out.println("");
+            out.println("        // Indicates if the Message Properties are Read Only");
+            out.println("        bool readOnlyProperties;");
+            out.println("");
+            out.println("        // Indicates if the Message Body are Read Only");
+            out.println("        bool readOnlyBody;");
+            out.println("");
         }
 
-out.println("    protected:");
-out.println("");
-
-            if( className.equals( "Message" ) ) {
-
-out.println("        static const unsigned int DEFAULT_MESSAGE_SIZE = 1024;");
-out.println("");
+        out.println("    protected:");
+        out.println("");
 
-            }
+        if( className.equals( "Message" ) ) {
+            out.println("        static const unsigned int DEFAULT_MESSAGE_SIZE = 1024;");
+            out.println("");
+        }
 
-       for (Iterator iter = properties.iterator(); iter.hasNext();) {
+        for (Iterator iter = properties.iterator(); iter.hasNext();) {
             JProperty property = (JProperty) iter.next();
             String type = toCppType(property.getType());
             String name = decapitalize(property.getSimpleName());
@@ -184,155 +190,190 @@
             }
 
             out.println("        "+type+" "+name+";");
+        }
 
-       }
+        String typeName = className.toUpperCase();
 
-       String typeName = className.toUpperCase();
+        if( !assignable ) {
+            out.println("");
+            out.println("    protected:");
+            out.println("");
+            out.println("        "+className+"( const "+className+"& other );");
+            out.println("        "+className+"& operator= ( const "+className+"& other );");
+        }
+
+        out.println("");
+        out.println("    public:");
+        out.println("");
+        out.println("        const static unsigned char ID_"+typeName+" = "+getOpenWireOpCode(jclass)+";");
+        out.println("");
 
-       if( !assignable ) {
-out.println("");
-out.println("    protected:");
-out.println("");
-out.println("        "+className+"( const "+className+"& other );");
-out.println("        "+className+"& operator= ( const "+className+"& other );");
-       }
-out.println("");
-out.println("    public:");
-out.println("");
-out.println("        const static unsigned char ID_"+typeName+" = "+getOpenWireOpCode(jclass)+";");
-out.println("");
         if( comparable ) {
-out.println("        typedef decaf::lang::PointerComparator<"+className+"> COMPARATOR;");
-out.println("");
+            out.println("        typedef decaf::lang::PointerComparator<"+className+"> COMPARATOR;");
+            out.println("");
         }
-out.println("    public:");
-out.println("");
-out.println("        "+className+"();");
-            if( assignable ) {
-out.println("        "+className+"( const "+className+"& other );");
-            }
-out.println("        virtual ~"+className+"();");
-out.println("");
-out.println("        /**");
-out.println("         * Get the unique identifier that this object and its own");
-out.println("         * Marshaler share.");
-out.println("         * @returns new DataStructure type copy.");
-out.println("         */");
-out.println("        virtual unsigned char getDataStructureType() const;");
-out.println("");
-out.println("        /**");
-out.println("         * Clone this object and return a new instance that the");
-out.println("         * caller now owns, this will be an exact copy of this one");
-out.println("         * @returns new copy of this object.");
-out.println("         */");
-out.println("        virtual "+className+"* cloneDataStructure() const;");
-out.println("");
-out.println("        /**");
-out.println("         * Copy the contents of the passed object into this object's");
-out.println("         * members, overwriting any existing data.");
-out.println("         * @param src - Source Object");
-out.println("         */");
-out.println("        virtual void copyDataStructure( const DataStructure* src );");
-out.println("");
-out.println("        /**");
-out.println("         * Returns a string containing the information for this DataStructure");
-out.println("         * such as its type and value of its elements.");
-out.println("         * @return formatted string useful for debugging.");
-out.println("         */");
-out.println("        virtual std::string toString() const;");
-out.println("");
-out.println("        /**" );
-out.println("         * Compares the DataStructure passed in to this one, and returns if" );
-out.println("         * they are equivalent.  Equivalent here means that they are of the" );
-out.println("         * same type, and that each element of the objects are the same." );
-out.println("         * @returns true if DataStructure's are Equal." );
-out.println("         */" );
-out.println("        virtual bool equals( const DataStructure* value ) const;" );
-out.println("");
+
+        out.println("    public:");
+        out.println("");
+        out.println("        "+className+"();");
+
+        if( assignable ) {
+            out.println("        "+className+"( const "+className+"& other );");
+        }
+
+        out.println("        virtual ~"+className+"();");
+        out.println("");
+        out.println("        /**");
+        out.println("         * Get the unique identifier that this object and its own");
+        out.println("         * Marshaler share.");
+        out.println("         * @returns new DataStructure type copy.");
+        out.println("         */");
+        out.println("        virtual unsigned char getDataStructureType() const;");
+        out.println("");
+        out.println("        /**");
+        out.println("         * Clone this object and return a new instance that the");
+        out.println("         * caller now owns, this will be an exact copy of this one");
+        out.println("         * @returns new copy of this object.");
+        out.println("         */");
+        out.println("        virtual "+className+"* cloneDataStructure() const;");
+        out.println("");
+        out.println("        /**");
+        out.println("         * Copy the contents of the passed object into this object's");
+        out.println("         * members, overwriting any existing data.");
+        out.println("         * @param src - Source Object");
+        out.println("         */");
+        out.println("        virtual void copyDataStructure( const DataStructure* src );");
+        out.println("");
+        out.println("        /**");
+        out.println("         * Returns a string containing the information for this DataStructure");
+        out.println("         * such as its type and value of its elements.");
+        out.println("         * @return formatted string useful for debugging.");
+        out.println("         */");
+        out.println("        virtual std::string toString() const;");
+        out.println("");
+        out.println("        /**" );
+        out.println("         * Compares the DataStructure passed in to this one, and returns if" );
+        out.println("         * they are equivalent.  Equivalent here means that they are of the" );
+        out.println("         * same type, and that each element of the objects are the same." );
+        out.println("         * @returns true if DataStructure's are Equal." );
+        out.println("         */" );
+        out.println("        virtual bool equals( const DataStructure* value ) const;" );
+        out.println("");
 
         // Check if a isXXX object shorcut should be generated and add it if so.
         checkNeedsShortcut( className, out );
 
         if( className.equals( "Message" ) ) {
 
-out.println("        /**");
-out.println("         * Handles the marshaling of the objects properties into the");
-out.println("         * internal byte array before the object is marshaled to the");
-out.println("         * wire");
-out.println("         * @param wireFormat - the wireformat controller");
-out.println("         */");
-out.println("        virtual void beforeMarshal( wireformat::WireFormat* wireFormat AMQCPP_UNUSED )");
-out.println("            throw ( decaf::io::IOException );");
-out.println("");
-out.println("        /**");
-out.println("         * Called after unmarshaling is started to cleanup the object being");
-out.println("         * unmarshaled.");
-out.println("         * @param wireFormat - the wireformat object to control unmarshaling");
-out.println("         */");
-out.println("        virtual void afterUnmarshal( wireformat::WireFormat* wireFormat AMQCPP_UNUSED )");
-out.println("            throw ( decaf::io::IOException );");
-out.println("");
-out.println("        /**");
-out.println("         * Indicates that this command is aware of Marshaling, and needs");
-out.println("         * to have its Marshaling methods invoked.");
-out.println("         * @returns boolean indicating desire to be in marshaling stages");
-out.println("         */");
-out.println("        virtual bool isMarshalAware() const {");
-out.println("            return true;");
-out.println("        }");
-out.println("");
-out.println("        /**");
-out.println("         * Sets the Acknowledgment Handler that this Message will use");
-out.println("         * when the Acknowledge method is called.");
-out.println("         * @param handler ActiveMQAckHandler to call");
-out.println("         */");
-out.println("        virtual void setAckHandler( core::ActiveMQAckHandler* handler ) {");
-out.println("            this->ackHandler = handler;");
-out.println("        }");
-out.println("");
-out.println("        /**");
-out.println("         * Gets the Acknowledgment Handler that this Message will use");
-out.println("         * when the Acknowledge method is called.");
-out.println("         * @returns handler ActiveMQAckHandler to call or NULL if not set");
-out.println("         */");
-out.println("        virtual core::ActiveMQAckHandler* getAckHandler() const {");
-out.println("            return this->ackHandler;");
-out.println("        }");
-out.println("");
-out.println("        /**");
-out.println("         * Returns the Size of this message in Bytes.");
-out.println("         * @returns number of bytes this message equates to.");
-out.println("         */");
-out.println("        virtual unsigned int getSize() const;");
-out.println("");
-out.println("        /**");
-out.println("         * Returns if this message has expired, meaning that its");
-out.println("         * Expiration time has elapsed.");
-out.println("         * @returns true if message is expired.");
-out.println("         */");
-out.println("        virtual bool isExpired() const {");
-out.println("            long long expireTime = this->getExpiration();");
-out.println("            long long currentTime = decaf::util::Date::getCurrentTimeMilliseconds();");
-out.println("            if( expireTime > 0 && currentTime > expireTime ) {");
-out.println("                return true;");
-out.println("            }");
-out.println("            return false;");
-out.println("        }");
-out.println("");
-out.println("        /**");
-out.println("         * Gets a reference to the Message's Properties object, allows the derived");
-out.println("         * classes to get and set their own specific properties.");
-out.println("         *");
-out.println("         * @return a reference to the Primitive Map that holds message properties.");
-out.println("         */");
-out.println("        util::PrimitiveMap& getMessageProperties() {");
-out.println("            return this->properties;");
-out.println("        }");
-out.println("        const util::PrimitiveMap& getMessageProperties() const {");
-out.println("            return this->properties;");
-out.println("        }");
-out.println("");
-
+            out.println("        /**");
+            out.println("         * Handles the marshaling of the objects properties into the");
+            out.println("         * internal byte array before the object is marshaled to the");
+            out.println("         * wire");
+            out.println("         * @param wireFormat - the wireformat controller");
+            out.println("         */");
+            out.println("        virtual void beforeMarshal( wireformat::WireFormat* wireFormat AMQCPP_UNUSED )");
+            out.println("            throw ( decaf::io::IOException );");
+            out.println("");
+            out.println("        /**");
+            out.println("         * Called after unmarshaling is started to cleanup the object being");
+            out.println("         * unmarshaled.");
+            out.println("         * @param wireFormat - the wireformat object to control unmarshaling");
+            out.println("         */");
+            out.println("        virtual void afterUnmarshal( wireformat::WireFormat* wireFormat AMQCPP_UNUSED )");
+            out.println("            throw ( decaf::io::IOException );");
+            out.println("");
+            out.println("        /**");
+            out.println("         * Indicates that this command is aware of Marshaling, and needs");
+            out.println("         * to have its Marshaling methods invoked.");
+            out.println("         * @returns boolean indicating desire to be in marshaling stages");
+            out.println("         */");
+            out.println("        virtual bool isMarshalAware() const {");
+            out.println("            return true;");
+            out.println("        }");
+            out.println("");
+            out.println("        /**");
+            out.println("         * Sets the Acknowledgment Handler that this Message will use");
+            out.println("         * when the Acknowledge method is called.");
+            out.println("         * @param handler ActiveMQAckHandler to call");
+            out.println("         */");
+            out.println("        virtual void setAckHandler( core::ActiveMQAckHandler* handler ) {");
+            out.println("            this->ackHandler = handler;");
+            out.println("        }");
+            out.println("");
+            out.println("        /**");
+            out.println("         * Gets the Acknowledgment Handler that this Message will use");
+            out.println("         * when the Acknowledge method is called.");
+            out.println("         * @returns handler ActiveMQAckHandler to call or NULL if not set");
+            out.println("         */");
+            out.println("        virtual core::ActiveMQAckHandler* getAckHandler() const {");
+            out.println("            return this->ackHandler;");
+            out.println("        }");
+            out.println("");
+            out.println("        /**");
+            out.println("         * Returns the Size of this message in Bytes.");
+            out.println("         * @returns number of bytes this message equates to.");
+            out.println("         */");
+            out.println("        virtual unsigned int getSize() const;");
+            out.println("");
+            out.println("        /**");
+            out.println("         * Returns if this message has expired, meaning that its");
+            out.println("         * Expiration time has elapsed.");
+            out.println("         * @returns true if message is expired.");
+            out.println("         */");
+            out.println("        virtual bool isExpired() const {");
+            out.println("            long long expireTime = this->getExpiration();");
+            out.println("            long long currentTime = decaf::util::Date::getCurrentTimeMilliseconds();");
+            out.println("            if( expireTime > 0 && currentTime > expireTime ) {");
+            out.println("                return true;");
+            out.println("            }");
+            out.println("            return false;");
+            out.println("        }");
+            out.println("");
+            out.println("        /**");
+            out.println("         * Gets a reference to the Message's Properties object, allows the derived");
+            out.println("         * classes to get and set their own specific properties.");
+            out.println("         *");
+            out.println("         * @return a reference to the Primitive Map that holds message properties.");
+            out.println("         */");
+            out.println("        util::PrimitiveMap& getMessageProperties() {");
+            out.println("            return this->properties;");
+            out.println("        }");
+            out.println("        const util::PrimitiveMap& getMessageProperties() const {");
+            out.println("            return this->properties;");
+            out.println("        }");
+            out.println("");
+            out.println("        /**");
+            out.println("         * Returns if the Message Properties Are Read Only");
+            out.println("         * @return true if Message Properties are Read Only.");
+            out.println("         */");
+            out.println("        bool isReadOnlyProperties() const {");
+            out.println("            return this->readOnlyProperties;");
+            out.println("        }");
+            out.println("");
+            out.println("        /**");
+            out.println("         * Set the Read Only State of the Message Properties.");
+            out.println("         * @param value - true if Properties should be read only.");
+            out.println("         */");
+            out.println("        void setReadOnlyProperties( bool value ) {");
+            out.println("            this->readOnlyProperties = value;");
+            out.println("        }");
+            out.println("");
+            out.println("        /**");
+            out.println("         * Returns if the Message Body is Read Only");
+            out.println("         * @return true if Message Content is Read Only.");
+            out.println("         */");
+            out.println("        bool isReadOnlyBody() const {");
+            out.println("            return this->readOnlyBody;");
+            out.println("        }");
+            out.println("");
+            out.println("        /**");
+            out.println("         * Set the Read Only State of the Message Content.");
+            out.println("         * @param value - true if Content should be read only.");
+            out.println("         */");
+            out.println("        void setReadOnlyBody( bool value ) {");
+            out.println("            this->readOnlyBody = value;");
+            out.println("        }");
+            out.println("");
         }
 
         if( baseClass.equals( "BaseCommand" ) ) {
@@ -372,37 +413,36 @@
             }
 
             if( property.getType().isPrimitiveType() ) {
-out.println("        virtual "+type+" "+property.getGetter().getSimpleName()+"() const;");
+                out.println("        virtual "+type+" "+property.getGetter().getSimpleName()+"() const;");
             } else {
-out.println("        virtual const "+type+" "+property.getGetter().getSimpleName()+"() const;");
-out.println("        virtual "+type+" "+property.getGetter().getSimpleName()+"();");
+                out.println("        virtual const "+type+" "+property.getGetter().getSimpleName()+"() const;");
+                out.println("        virtual "+type+" "+property.getGetter().getSimpleName()+"();");
             }
 
-out.println("        virtual void "+property.getSetter().getSimpleName()+"( "+constness+type+" "+parameterName+" );");
-out.println("");
+            out.println("        virtual void "+property.getSetter().getSimpleName()+"( "+constness+type+" "+parameterName+" );");
+            out.println("");
         }
 
         if( comparable ) {
-out.println("        virtual int compareTo( const "+className+"& value ) const;");
-out.println("");
-out.println("        virtual bool equals( const "+className+"& value ) const;");
-out.println("");
-out.println("        virtual bool operator==( const "+className+"& value ) const;");
-out.println("");
-out.println("        virtual bool operator<( const "+className+"& value ) const;");
-out.println("");
+            out.println("        virtual int compareTo( const "+className+"& value ) const;");
+            out.println("");
+            out.println("        virtual bool equals( const "+className+"& value ) const;");
+            out.println("");
+            out.println("        virtual bool operator==( const "+className+"& value ) const;");
+            out.println("");
+            out.println("        virtual bool operator<( const "+className+"& value ) const;");
+            out.println("");
         }
 
         if( assignable ) {
-out.println("        "+className+"& operator= ( const "+className+"& other );");
+            out.println("        "+className+"& operator= ( const "+className+"& other );");
         }
 
-out.println("    };");
-out.println("");
-out.println("}}");
-out.println("");
-out.println("#endif /*_ACTIVEMQ_COMMANDS_"+className.toUpperCase()+"_H_*/");
+        out.println("    };");
+        out.println("");
+        out.println("}}");
+        out.println("");
+        out.println("#endif /*_ACTIVEMQ_COMMANDS_"+className.toUpperCase()+"_H_*/");
 
     }
-
 }

Modified: activemq/activemq-cpp/trunk/activemq-cpp-openwire-generator/src/main/java/org/apache/activemq/openwire/tool/AmqCppMakefileGenerator.java
URL: http://svn.apache.org/viewvc/activemq/activemq-cpp/trunk/activemq-cpp-openwire-generator/src/main/java/org/apache/activemq/openwire/tool/AmqCppMakefileGenerator.java?rev=746846&r1=746845&r2=746846&view=diff
==============================================================================
--- activemq/activemq-cpp/trunk/activemq-cpp-openwire-generator/src/main/java/org/apache/activemq/openwire/tool/AmqCppMakefileGenerator.java (original)
+++ activemq/activemq-cpp/trunk/activemq-cpp-openwire-generator/src/main/java/org/apache/activemq/openwire/tool/AmqCppMakefileGenerator.java Sun Feb 22 23:13:16 2009
@@ -17,7 +17,6 @@
  */
 package org.apache.activemq.openwire.tool;
 
-import java.util.Iterator;
 import java.io.File;
 import java.io.FileWriter;
 import java.io.PrintWriter;

Modified: activemq/activemq-cpp/trunk/activemq-cpp-openwire-generator/src/main/java/org/apache/activemq/openwire/tool/AmqCppMarshallingHeadersGenerator.java
URL: http://svn.apache.org/viewvc/activemq/activemq-cpp/trunk/activemq-cpp-openwire-generator/src/main/java/org/apache/activemq/openwire/tool/AmqCppMarshallingHeadersGenerator.java?rev=746846&r1=746845&r2=746846&view=diff
==============================================================================
--- activemq/activemq-cpp/trunk/activemq-cpp-openwire-generator/src/main/java/org/apache/activemq/openwire/tool/AmqCppMarshallingHeadersGenerator.java (original)
+++ activemq/activemq-cpp/trunk/activemq-cpp-openwire-generator/src/main/java/org/apache/activemq/openwire/tool/AmqCppMarshallingHeadersGenerator.java Sun Feb 22 23:13:16 2009
@@ -19,7 +19,6 @@
 
 import java.io.File;
 import java.io.PrintWriter;
-import java.util.ArrayList;
 
 import org.codehaus.jam.JClass;
 

Modified: activemq/activemq-cpp/trunk/activemq-cpp-openwire-generator/src/main/java/org/apache/activemq/openwire/tool/AmqCppTestMarshallingClassesGenerator.java
URL: http://svn.apache.org/viewvc/activemq/activemq-cpp/trunk/activemq-cpp-openwire-generator/src/main/java/org/apache/activemq/openwire/tool/AmqCppTestMarshallingClassesGenerator.java?rev=746846&r1=746845&r2=746846&view=diff
==============================================================================
--- activemq/activemq-cpp/trunk/activemq-cpp-openwire-generator/src/main/java/org/apache/activemq/openwire/tool/AmqCppTestMarshallingClassesGenerator.java (original)
+++ activemq/activemq-cpp/trunk/activemq-cpp-openwire-generator/src/main/java/org/apache/activemq/openwire/tool/AmqCppTestMarshallingClassesGenerator.java Sun Feb 22 23:13:16 2009
@@ -17,17 +17,7 @@
  */
 package org.apache.activemq.openwire.tool;
 
-import org.codehaus.jam.JAnnotation;
-import org.codehaus.jam.JAnnotationValue;
-import org.codehaus.jam.JClass;
-import org.codehaus.jam.JProperty;
-
 import java.io.PrintWriter;
-import java.util.ArrayList;
-import java.util.Collections;
-import java.util.Comparator;
-import java.util.Iterator;
-import java.util.List;
 
 /**
  *

Modified: activemq/activemq-cpp/trunk/activemq-cpp-openwire-generator/src/main/java/org/apache/activemq/openwire/tool/AmqCppTestMarshallingHeadersGenerator.java
URL: http://svn.apache.org/viewvc/activemq/activemq-cpp/trunk/activemq-cpp-openwire-generator/src/main/java/org/apache/activemq/openwire/tool/AmqCppTestMarshallingHeadersGenerator.java?rev=746846&r1=746845&r2=746846&view=diff
==============================================================================
--- activemq/activemq-cpp/trunk/activemq-cpp-openwire-generator/src/main/java/org/apache/activemq/openwire/tool/AmqCppTestMarshallingHeadersGenerator.java (original)
+++ activemq/activemq-cpp/trunk/activemq-cpp-openwire-generator/src/main/java/org/apache/activemq/openwire/tool/AmqCppTestMarshallingHeadersGenerator.java Sun Feb 22 23:13:16 2009
@@ -1,5 +1,4 @@
 /**
- *
  * Licensed to the Apache Software Foundation (ASF) under one or more
  * contributor license agreements.  See the NOTICE file distributed with
  * this work for additional information regarding copyright ownership.
@@ -19,7 +18,6 @@
 
 import java.io.File;
 import java.io.PrintWriter;
-import java.util.ArrayList;
 
 import org.codehaus.jam.JClass;
 

Modified: activemq/activemq-cpp/trunk/src/main/activemq/commands/Message.h
URL: http://svn.apache.org/viewvc/activemq/activemq-cpp/trunk/src/main/activemq/commands/Message.h?rev=746846&r1=746845&r2=746846&view=diff
==============================================================================
--- activemq/activemq-cpp/trunk/src/main/activemq/commands/Message.h (original)
+++ activemq/activemq-cpp/trunk/src/main/activemq/commands/Message.h Sun Feb 22 23:13:16 2009
@@ -65,6 +65,12 @@
         // Command's marshaledProperties vector.
         activemq::util::PrimitiveMap properties;
 
+        // Indicates if the Message Properties are Read Only
+        bool readOnlyProperties;
+
+        // Indicates if the Message Body are Read Only
+        bool readOnlyBody;
+
     protected:
 
         static const unsigned int DEFAULT_MESSAGE_SIZE = 1024;
@@ -234,6 +240,38 @@
         }
 
         /**
+         * Returns if the Message Properties Are Read Only
+         * @return true if Message Properties are Read Only.
+         */
+        bool isReadOnlyProperties() const {
+            return this->readOnlyProperties;
+        }
+
+        /**
+         * Set the Read Only State of the Message Properties.
+         * @param value - true if Properties should be read only.
+         */
+        void setReadOnlyProperties( bool value ) {
+            this->readOnlyProperties = value;
+        }
+
+        /**
+         * Returns if the Message Body is Read Only
+         * @return true if Message Content is Read Only.
+         */
+        bool isReadOnlyBody() const {
+            return this->readOnlyBody;
+        }
+
+        /**
+         * Set the Read Only State of the Message Content.
+         * @param value - true if Content should be read only.
+         */
+        void setReadOnlyBody( bool value ) {
+            this->readOnlyBody = value;
+        }
+
+        /**
          * Allows a Visitor to visit this command and return a response to the
          * command based on the command type being visited.  The command will call
          * the proper processXXX method in the visitor.