activemq-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From tab...@apache.org
Subject svn commit: r747816 [2/5] - in /activemq/activemq-cpp/trunk: activemq-cpp-openwire-generator/src/main/java/org/apache/activemq/openwire/tool/ activemq-cpp-openwire-generator/src/main/java/org/apache/activemq/openwire/tool/commands/ activemq-cpp-openwir...
Date Wed, 25 Feb 2009 15:23:51 GMT
Added: activemq/activemq-cpp/trunk/activemq-cpp-openwire-generator/src/main/java/org/apache/activemq/openwire/tool/commands/CommandSourceGenerator.java
URL: http://svn.apache.org/viewvc/activemq/activemq-cpp/trunk/activemq-cpp-openwire-generator/src/main/java/org/apache/activemq/openwire/tool/commands/CommandSourceGenerator.java?rev=747816&view=auto
==============================================================================
--- activemq/activemq-cpp/trunk/activemq-cpp-openwire-generator/src/main/java/org/apache/activemq/openwire/tool/commands/CommandSourceGenerator.java (added)
+++ activemq/activemq-cpp/trunk/activemq-cpp-openwire-generator/src/main/java/org/apache/activemq/openwire/tool/commands/CommandSourceGenerator.java Wed Feb 25 15:23:48 2009
@@ -0,0 +1,426 @@
+/**
+ * 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.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License.  You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package org.apache.activemq.openwire.tool.commands;
+
+import java.io.PrintWriter;
+import java.util.Set;
+
+import org.codehaus.jam.JProperty;
+
+public class CommandSourceGenerator extends CommandCodeGenerator {
+
+    public void generate( PrintWriter out ) {
+
+        // Start with the license.
+        generateLicence(out);
+
+        populateIncludeFilesSet();
+        for( String include : getIncludeFiles() ) {
+            if( include != null ) {
+                out.println("#include "+include);
+            }
+        }
+        out.println("");
+        out.println("using namespace std;");
+        out.println("using namespace activemq;");
+        out.println("using namespace activemq::exceptions;");
+        out.println("using namespace activemq::commands;");
+        out.println("using namespace decaf::lang;");
+        out.println("using namespace decaf::lang::exceptions;");
+        out.println("");
+        out.println("/*");
+        out.println(" *");
+        out.println(" *  Command code for OpenWire format for "+getClassName() );
+        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 in the");
+        out.println(" *         activemq-cpp-openwire-generator module");
+        out.println(" *");
+        out.println(" */");
+        out.println("");
+        out.println("////////////////////////////////////////////////////////////////////////////////");
+        out.println(""+getClassName()+"::"+getClassName()+"() {");
+        out.println("");
+        generateDefaultConstructorBody(out);
+        out.println("}");
+        out.println("");
+        if( isAssignable() ) {
+            out.println("////////////////////////////////////////////////////////////////////////////////");
+            out.println(""+getClassName()+"::"+getClassName()+"( const "+getClassName()+"& other ) {");
+            out.println("    this->copyDataStructure( &other );");
+            out.println("}");
+            out.println("");
+        }
+        generateAdditionalConstructors(out);
+        out.println("////////////////////////////////////////////////////////////////////////////////");
+        out.println(""+getClassName()+"::~"+getClassName()+"() {");
+        generateDestructorBody(out);
+        out.println("}");
+        out.println("");
+        out.println("////////////////////////////////////////////////////////////////////////////////");
+        out.println(getClassName()+"* "+getClassName()+"::cloneDataStructure() const {");
+        generateCloneDataStructureBody(out);
+        out.println("}");
+        out.println("");
+        out.println("////////////////////////////////////////////////////////////////////////////////");
+        out.println("void "+getClassName()+"::copyDataStructure( const DataStructure* src ) {");
+        out.println("");
+        out.println("    // Protect against invalid self assignment.");
+        out.println("    if( this == src ) {");
+        out.println("        return;");
+        out.println("    }");
+        out.println("");
+        out.println("    const "+getClassName()+"* srcPtr = dynamic_cast<const "+getClassName()+"*>( src );");
+        out.println("");
+        out.println("    if( srcPtr == NULL || src == NULL ) {");
+        out.println("        throw decaf::lang::exceptions::NullPointerException(");
+        out.println("            __FILE__, __LINE__,");
+        out.println("            \""+getClassName()+"::copyDataStructure - src is NULL or invalid\" );");
+        out.println("    }");
+        out.println("");
+        if( getBaseClassName() != null ) {
+            out.println("    // Copy the data of the base class or classes");
+            out.println("    "+ getBaseClassName() +"::copyDataStructure( src );");
+            out.println("");
+        }
+        generateCopyDataStructureBody(out);
+        out.println("}");
+        out.println("");
+        out.println("////////////////////////////////////////////////////////////////////////////////");
+        out.println("unsigned char "+getClassName()+"::getDataStructureType() const {");
+        out.println("    return "+getClassName()+"::ID_" + getClassName().toUpperCase() + ";");
+        out.println("}");
+        out.println("");
+        out.println("////////////////////////////////////////////////////////////////////////////////");
+        out.println("std::string "+getClassName()+"::toString() const {");
+        out.println("");
+        out.println("    ostringstream stream;" );
+        out.println("");
+        out.println("    stream << \"Begin Class = "+getClassName()+"\" << std::endl;" );
+        out.println("    stream << \" Value of "+getClassName()+"::ID_" + getClassName().toUpperCase() + " = "+getOpenWireOpCode()+"\" << std::endl;");
+        generateToStringBody(out);
+        if( getBaseClassName() != null ) {
+            out.println("    stream << "+ getBaseClassName() +"::toString();");
+        }
+        out.println("    stream << \"End Class = "+getClassName()+"\" << std::endl;" );
+        out.println("");
+        out.println("    return stream.str();");
+        out.println("}");
+        out.println("");
+        out.println("////////////////////////////////////////////////////////////////////////////////");
+        out.println("bool "+getClassName()+"::equals( const DataStructure* value ) const {");
+        out.println("");
+        out.println("    if( this == value ) {");
+        out.println("        return true;");
+        out.println("    }");
+        out.println("");
+        out.println("    const "+getClassName()+"* valuePtr = dynamic_cast<const "+getClassName()+"*>( value );");
+        out.println("");
+        out.println("    if( valuePtr == NULL || value == NULL ) {");
+        out.println("        return false;");
+        out.println("    }");
+        out.println("");
+        generateEqualsBody(out);
+        if( getBaseClassName() != null ) {
+            out.println("    if( !"+ getBaseClassName() +"::equals( value ) ) {");
+            out.println("        return false;");
+            out.println("    }");
+        }
+        out.println("    return true;" );
+        out.println("}");
+        out.println("");
+        generatePropertyAccessors(out);
+        if( isComparable() ) {
+            out.println("////////////////////////////////////////////////////////////////////////////////");
+            out.println("int " + getClassName() + "::compareTo( const "+getClassName()+"& value ) const {");
+            out.println("");
+            out.println("    if( this == &value ) {");
+            out.println("        return 0;");
+            out.println("    }");
+            out.println("");
+            generateCompareToBody(out);
+            out.println("    return 0;");
+            out.println("}");
+            out.println("");
+            out.println("////////////////////////////////////////////////////////////////////////////////");
+            out.println("bool " + getClassName() + "::equals( const "+getClassName()+"& value ) const {");
+            out.println("    return this->equals( &value );");
+            out.println("}");
+            out.println("");
+            out.println("////////////////////////////////////////////////////////////////////////////////");
+            out.println("bool " + getClassName() + "::operator==( const "+getClassName()+"& value ) const {");
+            out.println("    return this->compareTo( value ) == 0;");
+            out.println("}");
+            out.println("");
+            out.println("////////////////////////////////////////////////////////////////////////////////");
+            out.println("bool " + getClassName() + "::operator<( const "+getClassName()+"& value ) const {");
+            out.println("    return this->compareTo( value ) < 0;");
+            out.println("}");
+            out.println("");
+        }
+
+        if( isAssignable() ) {
+            out.println("////////////////////////////////////////////////////////////////////////////////");
+            out.println(""+getClassName()+"& "+getClassName()+"::operator= ( const "+getClassName()+"& other ) {");
+            out.println("    this->copyDataStructure( &other );");
+            out.println("}");
+            out.println("");
+        }
+
+        if( getBaseClassName().equals( "BaseCommand" ) ) {
+            out.println("////////////////////////////////////////////////////////////////////////////////");
+            out.println("decaf::lang::Pointer<commands::Command> "+getClassName()+"::visit( activemq::state::CommandVisitor* visitor ) ");
+            out.println("    throw( exceptions::ActiveMQException ) {");
+            out.println("");
+            out.println("    return visitor->process"+getClassName()+"( this );");
+            out.println("}");
+        }
+
+        generateAdditionalMethods(out);
+    }
+
+    protected void populateIncludeFilesSet() {
+        Set<String> includes = getIncludeFiles();
+        includes.add("<activemq/commands/"+getClassName()+".h>");
+        includes.add("<activemq/state/CommandVisitor.h>");
+        includes.add("<activemq/exceptions/ActiveMQException.h>");
+        includes.add("<decaf/lang/exceptions/NullPointerException.h>");
+        if( isComparable() ) {
+            includes.add("<apr_strings.h>");
+        }
+    }
+
+    protected void generateDefaultConstructorBody( PrintWriter out ) {
+        for( JProperty property : getProperties() ) {
+            String type = toCppType(property.getType());
+            String value = toCppDefaultValue(property.getType());
+            String propertyName = property.getSimpleName();
+            String parameterName = decapitalize(propertyName);
+
+            if( property.getType().isPrimitiveType() ||
+                type.startsWith("std::string") ) {
+
+                out.println("    this->"+parameterName+" = "+value+";");
+            }
+        }
+    }
+
+    protected void generateDestructorBody( PrintWriter out ) {
+    }
+
+    protected void generateAdditionalConstructors( PrintWriter out ) {
+    }
+
+    protected void generateCloneDataStructureBody( PrintWriter out ) {
+        String newInstance = decapitalize( getClassName() );
+
+        out.println("    std::auto_ptr<"+getClassName()+"> "+newInstance+"( new "+getClassName()+"() );");
+        out.println("");
+        out.println("    // Copy the data from the base class or classes");
+        out.println("    "+newInstance+"->copyDataStructure( this );");
+        out.println("");
+        out.println("    return "+newInstance+".release();");
+    }
+
+    protected void generateCopyDataStructureBody( PrintWriter out ) {
+        for( JProperty property : getProperties() ) {
+            String getter = property.getGetter().getSimpleName();
+            String setter = property.getSetter().getSimpleName();
+            out.println("    this->"+setter+"( srcPtr->"+getter+"() );");
+        }
+    }
+
+    protected void generateToStringBody( PrintWriter out ) {
+        for( JProperty property : getProperties() ) {
+            String type = toCppType(property.getType());
+            String propertyName = property.getSimpleName();
+            String parameterName = decapitalize(propertyName);
+            String getter = property.getGetter().getSimpleName();
+
+            if( property.getType().getSimpleName().equals("ByteSequence") ) {
+                out.println("    for( size_t i" + parameterName + " = 0; i" + parameterName + " < this->"+getter+"().size(); ++i" + parameterName + " ) {");
+                out.println("        stream << \" Value of "+propertyName+"[\" << i" + parameterName+" << \"] = \" << this->"+getter+"()[i"+parameterName+"] << std::endl;" );
+                out.println("    }" );
+            } else if( type.equals("unsigned char") ){
+                out.println("    stream << \" Value of "+propertyName+" = \" << (int)this->"+getter+"() << std::endl;");
+            } else if( property.getType().isPrimitiveType() ||
+                       type.equals("std::string") ){
+
+                out.println("    stream << \" Value of "+propertyName+" = \" << this->"+getter+"() << std::endl;");
+            } else if( property.getType().isArrayType() &&
+                       !property.getType().getArrayComponentType().isPrimitiveType() ) {
+
+                out.println("    for( size_t i" + parameterName + " = 0; i" + parameterName + " < this->"+getter+"().size(); ++i" + parameterName + " ) {");
+                out.println("        stream << \" Value of "+propertyName+"[\" << i" + parameterName+" << \"] is Below:\" << std::endl;" );
+                out.println("        if( this->"+getter+"()[i"+parameterName+"] != NULL ) {");
+                out.println("            stream << this->"+getter+"()[i"+parameterName+"]->toString() << std::endl;");
+                out.println("        } else {");
+                out.println("            stream << \"   Object is NULL\" << std::endl;");
+                out.println("        }");
+                out.println("    }");
+            } else if( property.getType().isArrayType() &&
+                       property.getType().getArrayComponentType().isPrimitiveType() ) {
+
+                out.println("    for( size_t i" + parameterName + " = 0; i" + parameterName + " < this->"+getter+"().size(); ++i" + parameterName + " ) {");
+                out.println("        stream << \" Value of "+propertyName+"[\" << i"+parameterName+" << \"] = \" << this->"+getter+"()[i"+parameterName+"] << std::endl;");
+                out.println("    }");
+            } else {
+                out.println("    stream << \" Value of "+propertyName+" is Below:\" << std::endl;" );
+                out.println("    if( this->"+getter+"() != NULL ) {");
+                out.println("        stream << this->"+getter+"()->toString() << std::endl;");
+                out.println("    } else {");
+                out.println("        stream << \"   Object is NULL\" << std::endl;");
+                out.println("    }");
+            }
+        }
+    }
+
+    protected void generateEqualsBody( PrintWriter out ) {
+        for( JProperty property : getProperties() ) {
+            String type = toCppType(property.getType());
+            String propertyName = property.getSimpleName();
+            String parameterName = decapitalize(propertyName);
+            String getter = property.getGetter().getSimpleName();
+
+            if( property.getType().getSimpleName().equals("ByteSequence") ) {
+                out.println("    for( size_t i" + parameterName + " = 0; i" + parameterName + " < this->"+getter+"().size(); ++i" + parameterName + " ) {");
+                out.println("        if( this->"+getter+"()[i" + parameterName+"] != valuePtr->"+getter+"()[i"+parameterName+"] ) {" );
+                out.println("            return false;" );
+                out.println("        }" );
+                out.println("    }" );
+            } else if( property.getType().isPrimitiveType() || type.equals("std::string") ){
+                out.println("    if( this->"+getter+"() != valuePtr->"+getter+"() ) {");
+                out.println("        return false;" );
+                out.println("    }" );
+            } else if( property.getType().isArrayType() &&
+                       !property.getType().getArrayComponentType().isPrimitiveType() ) {
+
+                out.println("    for( size_t i" + parameterName + " = 0; i" + parameterName + " < this->"+getter+"().size(); ++i" + parameterName + " ) {");
+                out.println("        if( this->"+getter+"()[i"+parameterName+"] != NULL ) {" );
+                out.println("            if( !this->"+getter+"()[i"+parameterName+"]->equals( valuePtr->"+getter+"()[i"+parameterName+"].get() ) ) {" );
+                out.println("                return false;");
+                out.println("            }");
+                out.println("        } else if( valuePtr->"+getter+"()[i"+parameterName+"] != NULL ) {");
+                out.println("            return false;");
+                out.println("        }");
+                out.println("    }");
+            } else if( property.getType().isArrayType() &&
+                       property.getType().getArrayComponentType().isPrimitiveType() ) {
+
+                out.println("    for( size_t i" + parameterName + " = 0; i" + parameterName + " < this->"+getter+"().size(); ++i" + parameterName + " ) {");
+                out.println("        if( this->"+getter+"()[i"+parameterName+"] != valuePtr->"+getter+"()[i"+parameterName+"] ) {");
+                out.println("            return false;");
+                out.println("        }");
+                out.println("    }");
+            } else {
+                out.println("    if( this->"+getter+"() != NULL ) {");
+                out.println("        if( !this->"+getter+"()->equals( valuePtr->"+getter+"().get() ) ) {" );
+                out.println("            return false;");
+                out.println("        }");
+                out.println("    } else if( valuePtr->"+getter+"() != NULL ) {");
+                out.println("        return false;");
+                out.println("    }");
+            }
+        }
+    }
+
+    protected void generatePropertyAccessors( PrintWriter out ) {
+        for( JProperty property : getProperties() ) {
+
+            String type = toCppType(property.getType());
+            String propertyName = property.getSimpleName();
+            String parameterName = decapitalize(propertyName);
+            String getter = property.getGetter().getSimpleName();
+            String setter = property.getSetter().getSimpleName();
+            String constNess = "";
+
+            if( !property.getType().isPrimitiveType() &&
+                !property.getType().getSimpleName().equals("ByteSequence") &&
+                !property.getType().getSimpleName().equals("String") &&
+                !type.startsWith("std::vector") ) {
+
+                type = "decaf::lang::Pointer<" + type + ">&";
+                constNess = "const ";
+            } else if( property.getType().getSimpleName().equals("String") ||
+                       type.startsWith( "std::vector") ) {
+                type = type + "&";
+                constNess = "const ";
+            }
+
+            if( property.getType().isPrimitiveType() ) {
+                out.println("////////////////////////////////////////////////////////////////////////////////");
+                out.println(type+" "+getClassName()+"::"+getter+"() const {");
+                out.println("    return "+parameterName+";");
+                out.println("}");
+                out.println("");
+            } else {
+                out.println("////////////////////////////////////////////////////////////////////////////////");
+                out.println("const "+type+" "+getClassName()+"::"+getter+"() const {");
+                out.println("    return "+parameterName+";");
+                out.println("}");
+                out.println("");
+                out.println("////////////////////////////////////////////////////////////////////////////////");
+                out.println(""+type+" "+getClassName()+"::"+getter+"() {");
+                out.println("    return "+parameterName+";");
+                out.println("}");
+                out.println("");
+            }
+            out.println("////////////////////////////////////////////////////////////////////////////////");
+            out.println("void " + getClassName() + "::" + setter+"( " + constNess + type+ " " + parameterName +" ) {");
+            out.println("    this->"+parameterName+" = "+parameterName+";");
+            out.println("}");
+            out.println("");
+        }
+    }
+
+    protected void generateCompareToBody( PrintWriter out ) {
+        for( JProperty property : getProperties() ) {
+
+            String type = toCppType(property.getType());
+            String propertyName = property.getSimpleName();
+            String parameterName = decapitalize(propertyName);
+
+            if( !property.getType().isPrimitiveType() &&
+                !property.getType().getSimpleName().equals("ByteSequence") &&
+                !property.getType().getSimpleName().equals("String") &&
+                !type.startsWith("std::vector") ) {
+
+                out.println("    int "+parameterName+"Comp = this->"+parameterName+"->compareTo( *( value."+parameterName+" ) );");
+                out.println("    if( "+parameterName+"Comp != 0 ) {");
+                out.println("        return "+parameterName+"Comp;");
+                out.println("    }");
+                out.println("");
+            } else if( property.getType().getSimpleName().equals("String") ) {
+                out.println("    int "+parameterName+"Comp = apr_strnatcasecmp( this->"+parameterName+".c_str(), value."+parameterName+".c_str() );");
+                out.println("    if( "+parameterName+"Comp != 0 ) {");
+                out.println("        return "+parameterName+"Comp;");
+                out.println("    }");
+                out.println("");
+            } else {
+                out.println("    if( this->"+parameterName+" > value."+parameterName+" ) {");
+                out.println("        return 1;");
+                out.println("    } else if( this->"+parameterName+" < value."+parameterName+" ) {");
+                out.println("        return -1;");
+                out.println("    }");
+                out.println("");
+            }
+        }
+    }
+
+    protected void generateAdditionalMethods( PrintWriter out ) {}
+
+}

Propchange: activemq/activemq-cpp/trunk/activemq-cpp-openwire-generator/src/main/java/org/apache/activemq/openwire/tool/commands/CommandSourceGenerator.java
------------------------------------------------------------------------------
    svn:eol-style = native

Added: activemq/activemq-cpp/trunk/activemq-cpp-openwire-generator/src/main/java/org/apache/activemq/openwire/tool/commands/MessageHeaderGenerator.java
URL: http://svn.apache.org/viewvc/activemq/activemq-cpp/trunk/activemq-cpp-openwire-generator/src/main/java/org/apache/activemq/openwire/tool/commands/MessageHeaderGenerator.java?rev=747816&view=auto
==============================================================================
--- activemq/activemq-cpp/trunk/activemq-cpp-openwire-generator/src/main/java/org/apache/activemq/openwire/tool/commands/MessageHeaderGenerator.java (added)
+++ activemq/activemq-cpp/trunk/activemq-cpp-openwire-generator/src/main/java/org/apache/activemq/openwire/tool/commands/MessageHeaderGenerator.java Wed Feb 25 15:23:48 2009
@@ -0,0 +1,183 @@
+/**
+ * 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.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License.  You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package org.apache.activemq.openwire.tool.commands;
+
+import java.io.PrintWriter;
+import java.util.Set;
+
+public class MessageHeaderGenerator extends CommandHeaderGenerator {
+
+    protected void populateIncludeFilesSet() {
+
+        super.populateIncludeFilesSet();
+
+        Set<String> includes = getIncludeFiles();
+        includes.add("<activemq/util/PrimitiveMap.h>");
+        includes.add("<decaf/util/Date.h>");
+    }
+
+    protected void generateNamespaceWrapper( PrintWriter out ) {
+        out.println("namespace activemq{");
+        out.println("namespace core{");
+        out.println("    class ActiveMQAckHandler;");
+        out.println("}");
+        out.println("namespace commands{");
+        out.println("");
+    }
+
+    protected void generateProperties( PrintWriter out ) {
+
+        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("");
+        out.println("        static const unsigned int DEFAULT_MESSAGE_SIZE = 1024;");
+        out.println("");
+
+        super.generateProperties( out );
+    }
+
+    protected void generateAdditonalMembers( PrintWriter out ) {
+
+        super.generateAdditonalMembers(out);
+
+        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("");
+    }
+
+}

Propchange: activemq/activemq-cpp/trunk/activemq-cpp-openwire-generator/src/main/java/org/apache/activemq/openwire/tool/commands/MessageHeaderGenerator.java
------------------------------------------------------------------------------
    svn:eol-style = native

Added: activemq/activemq-cpp/trunk/activemq-cpp-openwire-generator/src/main/java/org/apache/activemq/openwire/tool/commands/MessageSourceGenerator.java
URL: http://svn.apache.org/viewvc/activemq/activemq-cpp/trunk/activemq-cpp-openwire-generator/src/main/java/org/apache/activemq/openwire/tool/commands/MessageSourceGenerator.java?rev=747816&view=auto
==============================================================================
--- activemq/activemq-cpp/trunk/activemq-cpp-openwire-generator/src/main/java/org/apache/activemq/openwire/tool/commands/MessageSourceGenerator.java (added)
+++ activemq/activemq-cpp/trunk/activemq-cpp-openwire-generator/src/main/java/org/apache/activemq/openwire/tool/commands/MessageSourceGenerator.java Wed Feb 25 15:23:48 2009
@@ -0,0 +1,130 @@
+/**
+ * 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.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License.  You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package org.apache.activemq.openwire.tool.commands;
+
+import java.io.PrintWriter;
+import java.util.Set;
+
+public class MessageSourceGenerator extends CommandSourceGenerator {
+
+    protected void populateIncludeFilesSet() {
+        super.populateIncludeFilesSet();
+        Set<String> includes = getIncludeFiles();
+        includes.add("<activemq/wireformat/openwire/marshal/BaseDataStreamMarshaller.h>");
+        includes.add("<activemq/wireformat/openwire/marshal/PrimitiveMapMarshaller.h>");
+    }
+
+    protected void generateDefaultConstructorBody( PrintWriter out ) {
+
+        out.println("    this->ackHandler = NULL;");
+        out.println("    this->readOnlyBody = false;");
+        out.println("    this->readOnlyProperties = false;");
+
+        super.generateDefaultConstructorBody(out);
+    }
+
+    protected void generateCopyDataStructureBody( PrintWriter out ) {
+        super.generateCopyDataStructureBody(out);
+
+        out.println("    this->properties.copy( srcPtr->properties );");
+        out.println("    this->setAckHandler( srcPtr->getAckHandler() );");
+        out.println("    this->setReadOnlyBody( srcPtr->isReadOnlyBody() );");
+        out.println("    this->setReadOnlyProperties( srcPtr->isReadOnlyProperties() );");
+    }
+
+    protected void generateToStringBody( PrintWriter out ) {
+        super.generateToStringBody(out);
+
+        out.println("    stream << \" Value of ackHandler = \" << ackHandler << std::endl;");
+        out.println("    stream << \" Value of properties = \" << this->properties.toString() << std::endl;");
+        out.println("    stream << \" Value of readOnlyBody = \" << this->readOnlyBody << std::endl;");
+        out.println("    stream << \" Value of readOnlyProperties = \" << this->readOnlyBody << std::endl;");
+    }
+
+    protected void generateEqualsBody( PrintWriter out ) {
+        super.generateEqualsBody(out);
+
+        out.println("    if( ackHandler != valuePtr->getAckHandler() ){");
+        out.println("        return false;");
+        out.println("    }");
+        out.println("");
+        out.println("    if( !properties.equals( valuePtr->properties ) ) {");
+        out.println("        return false;");
+        out.println("    }");
+        out.println("");
+        out.println("    if( readOnlyBody != valuePtr->isReadOnlyBody() ){");
+        out.println("        return false;");
+        out.println("    }");
+        out.println("");
+        out.println("    if( readOnlyProperties != valuePtr->isReadOnlyProperties() ){");
+        out.println("        return false;");
+        out.println("    }");
+        out.println("");
+    }
+
+    protected void generateCompareToBody( PrintWriter out ) {
+        super.generateCompareToBody(out);
+    }
+
+    protected void generateAdditionalMethods( PrintWriter out ) {
+        super.generateAdditionalMethods(out);
+
+        out.println("////////////////////////////////////////////////////////////////////////////////");
+        out.println("unsigned int Message::getSize() const {");
+        out.println("");
+        out.println("    unsigned int size = DEFAULT_MESSAGE_SIZE;");
+        out.println("");
+        out.println("    size += (unsigned int)this->getContent().size();");
+        out.println("    size += (unsigned int)this->getMarshalledProperties().size();");
+        out.println("");
+        out.println("    return size;");
+        out.println("}");
+        out.println("");
+        out.println("////////////////////////////////////////////////////////////////////////////////");
+        out.println("void Message::beforeMarshal( wireformat::WireFormat* wireFormat AMQCPP_UNUSED )");
+        out.println("    throw ( decaf::io::IOException ) {");
+        out.println("");
+        out.println("    try{");
+        out.println("");
+        out.println("        marshalledProperties.clear();");
+        out.println("        if( !properties.isEmpty() ) {");
+        out.println("            wireformat::openwire::marshal::PrimitiveMapMarshaller::marshal(");
+        out.println("                &properties, marshalledProperties );");
+        out.println("        }");
+        out.println("    }");
+        out.println("    AMQ_CATCH_RETHROW( decaf::io::IOException )");
+        out.println("    AMQ_CATCH_EXCEPTION_CONVERT( decaf::lang::Exception, decaf::io::IOException )");
+        out.println("    AMQ_CATCHALL_THROW( decaf::io::IOException )");
+        out.println("}");
+        out.println("");
+        out.println("////////////////////////////////////////////////////////////////////////////////");
+        out.println("void Message::afterUnmarshal( wireformat::WireFormat* wireFormat AMQCPP_UNUSED )");
+        out.println("    throw ( decaf::io::IOException ) {");
+        out.println("");
+        out.println("    try{");
+        out.println("");
+        out.println("        wireformat::openwire::marshal::PrimitiveMapMarshaller::unmarshal(");
+        out.println("            &properties, marshalledProperties );");
+        out.println("    }");
+        out.println("    AMQ_CATCH_RETHROW( decaf::io::IOException )");
+        out.println("    AMQ_CATCH_EXCEPTION_CONVERT( decaf::lang::Exception, decaf::io::IOException )");
+        out.println("    AMQ_CATCHALL_THROW( decaf::io::IOException )");
+        out.println("}");
+        out.println("");
+    }
+
+}

Propchange: activemq/activemq-cpp/trunk/activemq-cpp-openwire-generator/src/main/java/org/apache/activemq/openwire/tool/commands/MessageSourceGenerator.java
------------------------------------------------------------------------------
    svn:eol-style = native

Copied: activemq/activemq-cpp/trunk/activemq-cpp-openwire-generator/src/main/java/org/apache/activemq/openwire/tool/makefiles/AmqCppMakefileGenerator.java (from r746846, 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/makefiles/AmqCppMakefileGenerator.java?p2=activemq/activemq-cpp/trunk/activemq-cpp-openwire-generator/src/main/java/org/apache/activemq/openwire/tool/makefiles/AmqCppMakefileGenerator.java&p1=activemq/activemq-cpp/trunk/activemq-cpp-openwire-generator/src/main/java/org/apache/activemq/openwire/tool/AmqCppMakefileGenerator.java&r1=746846&r2=747816&rev=747816&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/makefiles/AmqCppMakefileGenerator.java Wed Feb 25 15:23:48 2009
@@ -15,7 +15,7 @@
  * See the License for the specific language governing permissions and
  * limitations under the License.
  */
-package org.apache.activemq.openwire.tool;
+package org.apache.activemq.openwire.tool.makefiles;
 
 import java.io.File;
 import java.io.FileWriter;

Copied: activemq/activemq-cpp/trunk/activemq-cpp-openwire-generator/src/main/java/org/apache/activemq/openwire/tool/marshallers/AmqCppMarshallingClassesGenerator.java (from r746846, activemq/activemq-cpp/trunk/activemq-cpp-openwire-generator/src/main/java/org/apache/activemq/openwire/tool/AmqCppMarshallingClassesGenerator.java)
URL: http://svn.apache.org/viewvc/activemq/activemq-cpp/trunk/activemq-cpp-openwire-generator/src/main/java/org/apache/activemq/openwire/tool/marshallers/AmqCppMarshallingClassesGenerator.java?p2=activemq/activemq-cpp/trunk/activemq-cpp-openwire-generator/src/main/java/org/apache/activemq/openwire/tool/marshallers/AmqCppMarshallingClassesGenerator.java&p1=activemq/activemq-cpp/trunk/activemq-cpp-openwire-generator/src/main/java/org/apache/activemq/openwire/tool/AmqCppMarshallingClassesGenerator.java&r1=746846&r2=747816&rev=747816&view=diff
==============================================================================
--- activemq/activemq-cpp/trunk/activemq-cpp-openwire-generator/src/main/java/org/apache/activemq/openwire/tool/AmqCppMarshallingClassesGenerator.java (original)
+++ activemq/activemq-cpp/trunk/activemq-cpp-openwire-generator/src/main/java/org/apache/activemq/openwire/tool/marshallers/AmqCppMarshallingClassesGenerator.java Wed Feb 25 15:23:48 2009
@@ -15,7 +15,7 @@
  * See the License for the specific language governing permissions and
  * limitations under the License.
  */
-package org.apache.activemq.openwire.tool;
+package org.apache.activemq.openwire.tool.marshallers;
 
 import org.codehaus.jam.JAnnotation;
 import org.codehaus.jam.JAnnotationValue;

Copied: activemq/activemq-cpp/trunk/activemq-cpp-openwire-generator/src/main/java/org/apache/activemq/openwire/tool/marshallers/AmqCppMarshallingHeadersGenerator.java (from r746846, 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/marshallers/AmqCppMarshallingHeadersGenerator.java?p2=activemq/activemq-cpp/trunk/activemq-cpp-openwire-generator/src/main/java/org/apache/activemq/openwire/tool/marshallers/AmqCppMarshallingHeadersGenerator.java&p1=activemq/activemq-cpp/trunk/activemq-cpp-openwire-generator/src/main/java/org/apache/activemq/openwire/tool/AmqCppMarshallingHeadersGenerator.java&r1=746846&r2=747816&rev=747816&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/marshallers/AmqCppMarshallingHeadersGenerator.java Wed Feb 25 15:23:48 2009
@@ -15,11 +15,12 @@
  * See the License for the specific language governing permissions and
  * limitations under the License.
  */
-package org.apache.activemq.openwire.tool;
+package org.apache.activemq.openwire.tool.marshallers;
 
 import java.io.File;
 import java.io.PrintWriter;
 
+import org.apache.activemq.openwire.tool.JavaMarshallingGenerator;
 import org.codehaus.jam.JClass;
 
 /**

Copied: activemq/activemq-cpp/trunk/activemq-cpp-openwire-generator/src/main/java/org/apache/activemq/openwire/tool/tests/AmqCppTestMarshallingClassesGenerator.java (from r746846, 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/tests/AmqCppTestMarshallingClassesGenerator.java?p2=activemq/activemq-cpp/trunk/activemq-cpp-openwire-generator/src/main/java/org/apache/activemq/openwire/tool/tests/AmqCppTestMarshallingClassesGenerator.java&p1=activemq/activemq-cpp/trunk/activemq-cpp-openwire-generator/src/main/java/org/apache/activemq/openwire/tool/AmqCppTestMarshallingClassesGenerator.java&r1=746846&r2=747816&rev=747816&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/tests/AmqCppTestMarshallingClassesGenerator.java Wed Feb 25 15:23:48 2009
@@ -15,7 +15,7 @@
  * See the License for the specific language governing permissions and
  * limitations under the License.
  */
-package org.apache.activemq.openwire.tool;
+package org.apache.activemq.openwire.tool.tests;
 
 import java.io.PrintWriter;
 

Copied: activemq/activemq-cpp/trunk/activemq-cpp-openwire-generator/src/main/java/org/apache/activemq/openwire/tool/tests/AmqCppTestMarshallingHeadersGenerator.java (from r746846, 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/tests/AmqCppTestMarshallingHeadersGenerator.java?p2=activemq/activemq-cpp/trunk/activemq-cpp-openwire-generator/src/main/java/org/apache/activemq/openwire/tool/tests/AmqCppTestMarshallingHeadersGenerator.java&p1=activemq/activemq-cpp/trunk/activemq-cpp-openwire-generator/src/main/java/org/apache/activemq/openwire/tool/AmqCppTestMarshallingHeadersGenerator.java&r1=746846&r2=747816&rev=747816&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/tests/AmqCppTestMarshallingHeadersGenerator.java Wed Feb 25 15:23:48 2009
@@ -14,11 +14,12 @@
  * See the License for the specific language governing permissions and
  * limitations under the License.
  */
-package org.apache.activemq.openwire.tool;
+package org.apache.activemq.openwire.tool.tests;
 
 import java.io.File;
 import java.io.PrintWriter;
 
+import org.apache.activemq.openwire.tool.JavaMarshallingGenerator;
 import org.codehaus.jam.JClass;
 
 /**

Modified: activemq/activemq-cpp/trunk/src/main/activemq/commands/BrokerId.cpp
URL: http://svn.apache.org/viewvc/activemq/activemq-cpp/trunk/src/main/activemq/commands/BrokerId.cpp?rev=747816&r1=747815&r2=747816&view=diff
==============================================================================
--- activemq/activemq-cpp/trunk/src/main/activemq/commands/BrokerId.cpp (original)
+++ activemq/activemq-cpp/trunk/src/main/activemq/commands/BrokerId.cpp Wed Feb 25 15:23:48 2009
@@ -14,11 +14,12 @@
  * See the License for the specific language governing permissions and
  * limitations under the License.
  */
+
+#include <activemq/exceptions/ActiveMQException.h>
 #include <activemq/commands/BrokerId.h>
+#include <apr_strings.h>
 #include <activemq/state/CommandVisitor.h>
-#include <activemq/exceptions/ActiveMQException.h>
 #include <decaf/lang/exceptions/NullPointerException.h>
-#include <apr_strings.h>
 
 using namespace std;
 using namespace activemq;
@@ -29,14 +30,14 @@
 
 /*
  *
- *  Command and marshaling code for OpenWire format for BrokerId
- *
+ *  Command code for OpenWire format for BrokerId
  *
  *  NOTE!: This file is auto generated - do not modify!
  *         if you need to make a change, please see the Java Classes in the
- *         activemq-core module
+ *         activemq-cpp-openwire-generator module
  *
  */
+
 ////////////////////////////////////////////////////////////////////////////////
 BrokerId::BrokerId() {
 
@@ -50,7 +51,6 @@
 
 ////////////////////////////////////////////////////////////////////////////////
 BrokerId::~BrokerId() {
-
 }
 
 ////////////////////////////////////////////////////////////////////////////////
@@ -170,6 +170,7 @@
 bool BrokerId::operator<( const BrokerId& value ) const {
     return this->compareTo( value ) < 0;
 }
+
 ////////////////////////////////////////////////////////////////////////////////
 BrokerId& BrokerId::operator= ( const BrokerId& other ) {
     this->copyDataStructure( &other );

Modified: activemq/activemq-cpp/trunk/src/main/activemq/commands/BrokerId.h
URL: http://svn.apache.org/viewvc/activemq/activemq-cpp/trunk/src/main/activemq/commands/BrokerId.h?rev=747816&r1=747815&r2=747816&view=diff
==============================================================================
--- activemq/activemq-cpp/trunk/src/main/activemq/commands/BrokerId.h (original)
+++ activemq/activemq-cpp/trunk/src/main/activemq/commands/BrokerId.h Wed Feb 25 15:23:48 2009
@@ -15,6 +15,7 @@
  * limitations under the License.
  */
 
+
 #ifndef _ACTIVEMQ_COMMANDS_BROKERID_H_
 #define _ACTIVEMQ_COMMANDS_BROKERID_H_
 
@@ -23,24 +24,23 @@
 #pragma warning( disable : 4290 )
 #endif
 
-#include <activemq/util/Config.h>
-#include <activemq/commands/BaseDataStructure.h>
 #include <decaf/lang/Pointer.h>
 #include <decaf/lang/Comparable.h>
-#include <vector>
+#include <activemq/util/Config.h>
 #include <string>
+#include <activemq/commands/BaseDataStructure.h>
+#include <vector>
 
 namespace activemq{
 namespace commands{
 
     /*
      *
-     *  Command and marshaling code for OpenWire format for BrokerId
-     *
+     *  Command code for OpenWire format for BrokerId
      *
      *  NOTE!: This file is auto generated - do not modify!
      *         if you need to make a change, please see the Java Classes
-     *         in the activemq-openwire-generator module
+     *         in the activemq-cpp-openwire-generator module
      *
      */
     class AMQCPP_API BrokerId : public BaseDataStructure, public decaf::lang::Comparable<BrokerId> {
@@ -57,7 +57,9 @@
     public:
 
         BrokerId();
+
         BrokerId( const BrokerId& other );
+
         virtual ~BrokerId();
 
         /**
@@ -109,6 +111,7 @@
         virtual bool operator<( const BrokerId& value ) const;
 
         BrokerId& operator= ( const BrokerId& other );
+
     };
 
 }}

Modified: activemq/activemq-cpp/trunk/src/main/activemq/commands/BrokerInfo.cpp
URL: http://svn.apache.org/viewvc/activemq/activemq-cpp/trunk/src/main/activemq/commands/BrokerInfo.cpp?rev=747816&r1=747815&r2=747816&view=diff
==============================================================================
--- activemq/activemq-cpp/trunk/src/main/activemq/commands/BrokerInfo.cpp (original)
+++ activemq/activemq-cpp/trunk/src/main/activemq/commands/BrokerInfo.cpp Wed Feb 25 15:23:48 2009
@@ -14,10 +14,11 @@
  * See the License for the specific language governing permissions and
  * limitations under the License.
  */
-#include <activemq/commands/BrokerInfo.h>
-#include <activemq/state/CommandVisitor.h>
+
 #include <activemq/exceptions/ActiveMQException.h>
+#include <activemq/state/CommandVisitor.h>
 #include <decaf/lang/exceptions/NullPointerException.h>
+#include <activemq/commands/BrokerInfo.h>
 
 using namespace std;
 using namespace activemq;
@@ -28,14 +29,14 @@
 
 /*
  *
- *  Command and marshaling code for OpenWire format for BrokerInfo
- *
+ *  Command code for OpenWire format for BrokerInfo
  *
  *  NOTE!: This file is auto generated - do not modify!
  *         if you need to make a change, please see the Java Classes in the
- *         activemq-core module
+ *         activemq-cpp-openwire-generator module
  *
  */
+
 ////////////////////////////////////////////////////////////////////////////////
 BrokerInfo::BrokerInfo() {
 
@@ -53,7 +54,6 @@
 
 ////////////////////////////////////////////////////////////////////////////////
 BrokerInfo::~BrokerInfo() {
-
 }
 
 ////////////////////////////////////////////////////////////////////////////////
@@ -207,13 +207,6 @@
 }
 
 ////////////////////////////////////////////////////////////////////////////////
-decaf::lang::Pointer<commands::Command> BrokerInfo::visit( activemq::state::CommandVisitor* visitor ) 
-    throw( exceptions::ActiveMQException ) {
-
-    return visitor->processBrokerInfo( this );
-}
-
-////////////////////////////////////////////////////////////////////////////////
 const decaf::lang::Pointer<BrokerId>& BrokerInfo::getBrokerId() const {
     return brokerId;
 }
@@ -363,3 +356,9 @@
     this->networkProperties = networkProperties;
 }
 
+////////////////////////////////////////////////////////////////////////////////
+decaf::lang::Pointer<commands::Command> BrokerInfo::visit( activemq::state::CommandVisitor* visitor ) 
+    throw( exceptions::ActiveMQException ) {
+
+    return visitor->processBrokerInfo( this );
+}

Modified: activemq/activemq-cpp/trunk/src/main/activemq/commands/BrokerInfo.h
URL: http://svn.apache.org/viewvc/activemq/activemq-cpp/trunk/src/main/activemq/commands/BrokerInfo.h?rev=747816&r1=747815&r2=747816&view=diff
==============================================================================
--- activemq/activemq-cpp/trunk/src/main/activemq/commands/BrokerInfo.h (original)
+++ activemq/activemq-cpp/trunk/src/main/activemq/commands/BrokerInfo.h Wed Feb 25 15:23:48 2009
@@ -15,6 +15,7 @@
  * limitations under the License.
  */
 
+
 #ifndef _ACTIVEMQ_COMMANDS_BROKERINFO_H_
 #define _ACTIVEMQ_COMMANDS_BROKERINFO_H_
 
@@ -23,25 +24,24 @@
 #pragma warning( disable : 4290 )
 #endif
 
+#include <activemq/commands/BrokerId.h>
+#include <decaf/lang/Pointer.h>
 #include <activemq/util/Config.h>
+#include <string>
 #include <activemq/commands/BaseCommand.h>
-#include <decaf/lang/Pointer.h>
-#include <activemq/commands/BrokerId.h>
-#include <activemq/commands/BrokerInfo.h>
 #include <vector>
-#include <string>
+#include <activemq/commands/BrokerInfo.h>
 
 namespace activemq{
 namespace commands{
 
     /*
      *
-     *  Command and marshaling code for OpenWire format for BrokerInfo
-     *
+     *  Command code for OpenWire format for BrokerInfo
      *
      *  NOTE!: This file is auto generated - do not modify!
      *         if you need to make a change, please see the Java Classes
-     *         in the activemq-openwire-generator module
+     *         in the activemq-cpp-openwire-generator module
      *
      */
     class AMQCPP_API BrokerInfo : public BaseCommand {
@@ -60,6 +60,10 @@
         std::string brokerUploadUrl;
         std::string networkProperties;
 
+    public:
+
+        const static unsigned char ID_BROKERINFO = 2;
+
     protected:
 
         BrokerInfo( const BrokerInfo& other );
@@ -67,11 +71,8 @@
 
     public:
 
-        const static unsigned char ID_BROKERINFO = 2;
-
-    public:
-
         BrokerInfo();
+
         virtual ~BrokerInfo();
 
         /**
@@ -110,23 +111,6 @@
          */
         virtual bool equals( const DataStructure* value ) const;
 
-        /**
-         * @return an answer of true to the isBrokerInfo() query.
-         */
-        virtual bool isBrokerInfo() const {
-            return true;
-        }
-
-        /**
-         * 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.
-         * 
-         * @return a Response to the visitor being called or NULL if no response.
-         */
-        virtual decaf::lang::Pointer<commands::Command> visit( activemq::state::CommandVisitor* visitor )
-            throw( exceptions::ActiveMQException );
-
         virtual const decaf::lang::Pointer<BrokerId>& getBrokerId() const;
         virtual decaf::lang::Pointer<BrokerId>& getBrokerId();
         virtual void setBrokerId( const decaf::lang::Pointer<BrokerId>& brokerId );
@@ -169,6 +153,23 @@
         virtual std::string& getNetworkProperties();
         virtual void setNetworkProperties( const std::string& networkProperties );
 
+        /**
+         * @return an answer of true to the isBrokerInfo() query.
+         */
+        virtual bool isBrokerInfo() const {
+            return true;
+        }
+
+        /**
+         * 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.
+         * 
+         * @return a Response to the visitor being called or NULL if no response.
+         */
+        virtual decaf::lang::Pointer<commands::Command> visit( activemq::state::CommandVisitor* visitor )
+            throw( exceptions::ActiveMQException );
+
     };
 
 }}

Modified: activemq/activemq-cpp/trunk/src/main/activemq/commands/ConnectionControl.cpp
URL: http://svn.apache.org/viewvc/activemq/activemq-cpp/trunk/src/main/activemq/commands/ConnectionControl.cpp?rev=747816&r1=747815&r2=747816&view=diff
==============================================================================
--- activemq/activemq-cpp/trunk/src/main/activemq/commands/ConnectionControl.cpp (original)
+++ activemq/activemq-cpp/trunk/src/main/activemq/commands/ConnectionControl.cpp Wed Feb 25 15:23:48 2009
@@ -14,10 +14,11 @@
  * See the License for the specific language governing permissions and
  * limitations under the License.
  */
-#include <activemq/commands/ConnectionControl.h>
-#include <activemq/state/CommandVisitor.h>
+
 #include <activemq/exceptions/ActiveMQException.h>
+#include <activemq/state/CommandVisitor.h>
 #include <decaf/lang/exceptions/NullPointerException.h>
+#include <activemq/commands/ConnectionControl.h>
 
 using namespace std;
 using namespace activemq;
@@ -28,14 +29,14 @@
 
 /*
  *
- *  Command and marshaling code for OpenWire format for ConnectionControl
- *
+ *  Command code for OpenWire format for ConnectionControl
  *
  *  NOTE!: This file is auto generated - do not modify!
  *         if you need to make a change, please see the Java Classes in the
- *         activemq-core module
+ *         activemq-cpp-openwire-generator module
  *
  */
+
 ////////////////////////////////////////////////////////////////////////////////
 ConnectionControl::ConnectionControl() {
 
@@ -48,7 +49,6 @@
 
 ////////////////////////////////////////////////////////////////////////////////
 ConnectionControl::~ConnectionControl() {
-
 }
 
 ////////////////////////////////////////////////////////////////////////////////
@@ -145,13 +145,6 @@
 }
 
 ////////////////////////////////////////////////////////////////////////////////
-decaf::lang::Pointer<commands::Command> ConnectionControl::visit( activemq::state::CommandVisitor* visitor ) 
-    throw( exceptions::ActiveMQException ) {
-
-    return visitor->processConnectionControl( this );
-}
-
-////////////////////////////////////////////////////////////////////////////////
 bool ConnectionControl::isClose() const {
     return close;
 }
@@ -201,3 +194,9 @@
     this->suspend = suspend;
 }
 
+////////////////////////////////////////////////////////////////////////////////
+decaf::lang::Pointer<commands::Command> ConnectionControl::visit( activemq::state::CommandVisitor* visitor ) 
+    throw( exceptions::ActiveMQException ) {
+
+    return visitor->processConnectionControl( this );
+}

Modified: activemq/activemq-cpp/trunk/src/main/activemq/commands/ConnectionControl.h
URL: http://svn.apache.org/viewvc/activemq/activemq-cpp/trunk/src/main/activemq/commands/ConnectionControl.h?rev=747816&r1=747815&r2=747816&view=diff
==============================================================================
--- activemq/activemq-cpp/trunk/src/main/activemq/commands/ConnectionControl.h (original)
+++ activemq/activemq-cpp/trunk/src/main/activemq/commands/ConnectionControl.h Wed Feb 25 15:23:48 2009
@@ -15,6 +15,7 @@
  * limitations under the License.
  */
 
+
 #ifndef _ACTIVEMQ_COMMANDS_CONNECTIONCONTROL_H_
 #define _ACTIVEMQ_COMMANDS_CONNECTIONCONTROL_H_
 
@@ -23,23 +24,22 @@
 #pragma warning( disable : 4290 )
 #endif
 
+#include <decaf/lang/Pointer.h>
 #include <activemq/util/Config.h>
+#include <string>
 #include <activemq/commands/BaseCommand.h>
-#include <decaf/lang/Pointer.h>
 #include <vector>
-#include <string>
 
 namespace activemq{
 namespace commands{
 
     /*
      *
-     *  Command and marshaling code for OpenWire format for ConnectionControl
-     *
+     *  Command code for OpenWire format for ConnectionControl
      *
      *  NOTE!: This file is auto generated - do not modify!
      *         if you need to make a change, please see the Java Classes
-     *         in the activemq-openwire-generator module
+     *         in the activemq-cpp-openwire-generator module
      *
      */
     class AMQCPP_API ConnectionControl : public BaseCommand {
@@ -51,6 +51,10 @@
         bool resume;
         bool suspend;
 
+    public:
+
+        const static unsigned char ID_CONNECTIONCONTROL = 18;
+
     protected:
 
         ConnectionControl( const ConnectionControl& other );
@@ -58,11 +62,8 @@
 
     public:
 
-        const static unsigned char ID_CONNECTIONCONTROL = 18;
-
-    public:
-
         ConnectionControl();
+
         virtual ~ConnectionControl();
 
         /**
@@ -101,16 +102,6 @@
          */
         virtual bool equals( const DataStructure* value ) const;
 
-        /**
-         * 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.
-         * 
-         * @return a Response to the visitor being called or NULL if no response.
-         */
-        virtual decaf::lang::Pointer<commands::Command> visit( activemq::state::CommandVisitor* visitor )
-            throw( exceptions::ActiveMQException );
-
         virtual bool isClose() const;
         virtual void setClose( bool close );
 
@@ -126,6 +117,16 @@
         virtual bool isSuspend() const;
         virtual void setSuspend( bool suspend );
 
+        /**
+         * 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.
+         * 
+         * @return a Response to the visitor being called or NULL if no response.
+         */
+        virtual decaf::lang::Pointer<commands::Command> visit( activemq::state::CommandVisitor* visitor )
+            throw( exceptions::ActiveMQException );
+
     };
 
 }}

Modified: activemq/activemq-cpp/trunk/src/main/activemq/commands/ConnectionError.cpp
URL: http://svn.apache.org/viewvc/activemq/activemq-cpp/trunk/src/main/activemq/commands/ConnectionError.cpp?rev=747816&r1=747815&r2=747816&view=diff
==============================================================================
--- activemq/activemq-cpp/trunk/src/main/activemq/commands/ConnectionError.cpp (original)
+++ activemq/activemq-cpp/trunk/src/main/activemq/commands/ConnectionError.cpp Wed Feb 25 15:23:48 2009
@@ -14,9 +14,10 @@
  * See the License for the specific language governing permissions and
  * limitations under the License.
  */
+
+#include <activemq/exceptions/ActiveMQException.h>
 #include <activemq/commands/ConnectionError.h>
 #include <activemq/state/CommandVisitor.h>
-#include <activemq/exceptions/ActiveMQException.h>
 #include <decaf/lang/exceptions/NullPointerException.h>
 
 using namespace std;
@@ -28,14 +29,14 @@
 
 /*
  *
- *  Command and marshaling code for OpenWire format for ConnectionError
- *
+ *  Command code for OpenWire format for ConnectionError
  *
  *  NOTE!: This file is auto generated - do not modify!
  *         if you need to make a change, please see the Java Classes in the
- *         activemq-core module
+ *         activemq-cpp-openwire-generator module
  *
  */
+
 ////////////////////////////////////////////////////////////////////////////////
 ConnectionError::ConnectionError() {
 
@@ -43,7 +44,6 @@
 
 ////////////////////////////////////////////////////////////////////////////////
 ConnectionError::~ConnectionError() {
-
 }
 
 ////////////////////////////////////////////////////////////////////////////////
@@ -143,13 +143,6 @@
 }
 
 ////////////////////////////////////////////////////////////////////////////////
-decaf::lang::Pointer<commands::Command> ConnectionError::visit( activemq::state::CommandVisitor* visitor ) 
-    throw( exceptions::ActiveMQException ) {
-
-    return visitor->processConnectionError( this );
-}
-
-////////////////////////////////////////////////////////////////////////////////
 const decaf::lang::Pointer<BrokerError>& ConnectionError::getException() const {
     return exception;
 }
@@ -179,3 +172,9 @@
     this->connectionId = connectionId;
 }
 
+////////////////////////////////////////////////////////////////////////////////
+decaf::lang::Pointer<commands::Command> ConnectionError::visit( activemq::state::CommandVisitor* visitor ) 
+    throw( exceptions::ActiveMQException ) {
+
+    return visitor->processConnectionError( this );
+}

Modified: activemq/activemq-cpp/trunk/src/main/activemq/commands/ConnectionError.h
URL: http://svn.apache.org/viewvc/activemq/activemq-cpp/trunk/src/main/activemq/commands/ConnectionError.h?rev=747816&r1=747815&r2=747816&view=diff
==============================================================================
--- activemq/activemq-cpp/trunk/src/main/activemq/commands/ConnectionError.h (original)
+++ activemq/activemq-cpp/trunk/src/main/activemq/commands/ConnectionError.h Wed Feb 25 15:23:48 2009
@@ -15,6 +15,7 @@
  * limitations under the License.
  */
 
+
 #ifndef _ACTIVEMQ_COMMANDS_CONNECTIONERROR_H_
 #define _ACTIVEMQ_COMMANDS_CONNECTIONERROR_H_
 
@@ -23,25 +24,24 @@
 #pragma warning( disable : 4290 )
 #endif
 
-#include <activemq/util/Config.h>
-#include <activemq/commands/BaseCommand.h>
 #include <decaf/lang/Pointer.h>
 #include <activemq/commands/ConnectionId.h>
+#include <activemq/util/Config.h>
+#include <string>
+#include <activemq/commands/BaseCommand.h>
 #include <activemq/commands/BrokerError.h>
 #include <vector>
-#include <string>
 
 namespace activemq{
 namespace commands{
 
     /*
      *
-     *  Command and marshaling code for OpenWire format for ConnectionError
-     *
+     *  Command code for OpenWire format for ConnectionError
      *
      *  NOTE!: This file is auto generated - do not modify!
      *         if you need to make a change, please see the Java Classes
-     *         in the activemq-openwire-generator module
+     *         in the activemq-cpp-openwire-generator module
      *
      */
     class AMQCPP_API ConnectionError : public BaseCommand {
@@ -50,6 +50,10 @@
         decaf::lang::Pointer<BrokerError> exception;
         decaf::lang::Pointer<ConnectionId> connectionId;
 
+    public:
+
+        const static unsigned char ID_CONNECTIONERROR = 16;
+
     protected:
 
         ConnectionError( const ConnectionError& other );
@@ -57,11 +61,8 @@
 
     public:
 
-        const static unsigned char ID_CONNECTIONERROR = 16;
-
-    public:
-
         ConnectionError();
+
         virtual ~ConnectionError();
 
         /**
@@ -100,6 +101,14 @@
          */
         virtual bool equals( const DataStructure* value ) const;
 
+        virtual const decaf::lang::Pointer<BrokerError>& getException() const;
+        virtual decaf::lang::Pointer<BrokerError>& getException();
+        virtual void setException( const decaf::lang::Pointer<BrokerError>& exception );
+
+        virtual const decaf::lang::Pointer<ConnectionId>& getConnectionId() const;
+        virtual decaf::lang::Pointer<ConnectionId>& getConnectionId();
+        virtual void setConnectionId( const decaf::lang::Pointer<ConnectionId>& connectionId );
+
         /**
          * 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
@@ -110,14 +119,6 @@
         virtual decaf::lang::Pointer<commands::Command> visit( activemq::state::CommandVisitor* visitor )
             throw( exceptions::ActiveMQException );
 
-        virtual const decaf::lang::Pointer<BrokerError>& getException() const;
-        virtual decaf::lang::Pointer<BrokerError>& getException();
-        virtual void setException( const decaf::lang::Pointer<BrokerError>& exception );
-
-        virtual const decaf::lang::Pointer<ConnectionId>& getConnectionId() const;
-        virtual decaf::lang::Pointer<ConnectionId>& getConnectionId();
-        virtual void setConnectionId( const decaf::lang::Pointer<ConnectionId>& connectionId );
-
     };
 
 }}

Modified: activemq/activemq-cpp/trunk/src/main/activemq/commands/ConnectionId.cpp
URL: http://svn.apache.org/viewvc/activemq/activemq-cpp/trunk/src/main/activemq/commands/ConnectionId.cpp?rev=747816&r1=747815&r2=747816&view=diff
==============================================================================
--- activemq/activemq-cpp/trunk/src/main/activemq/commands/ConnectionId.cpp (original)
+++ activemq/activemq-cpp/trunk/src/main/activemq/commands/ConnectionId.cpp Wed Feb 25 15:23:48 2009
@@ -14,11 +14,12 @@
  * See the License for the specific language governing permissions and
  * limitations under the License.
  */
+
+#include <activemq/exceptions/ActiveMQException.h>
+#include <apr_strings.h>
 #include <activemq/commands/ConnectionId.h>
 #include <activemq/state/CommandVisitor.h>
-#include <activemq/exceptions/ActiveMQException.h>
 #include <decaf/lang/exceptions/NullPointerException.h>
-#include <apr_strings.h>
 
 using namespace std;
 using namespace activemq;
@@ -29,14 +30,14 @@
 
 /*
  *
- *  Command and marshaling code for OpenWire format for ConnectionId
- *
+ *  Command code for OpenWire format for ConnectionId
  *
  *  NOTE!: This file is auto generated - do not modify!
  *         if you need to make a change, please see the Java Classes in the
- *         activemq-core module
+ *         activemq-cpp-openwire-generator module
  *
  */
+
 ////////////////////////////////////////////////////////////////////////////////
 ConnectionId::ConnectionId() {
 
@@ -50,7 +51,6 @@
 
 ////////////////////////////////////////////////////////////////////////////////
 ConnectionId::~ConnectionId() {
-
 }
 
 ////////////////////////////////////////////////////////////////////////////////
@@ -170,6 +170,7 @@
 bool ConnectionId::operator<( const ConnectionId& value ) const {
     return this->compareTo( value ) < 0;
 }
+
 ////////////////////////////////////////////////////////////////////////////////
 ConnectionId& ConnectionId::operator= ( const ConnectionId& other ) {
     this->copyDataStructure( &other );

Modified: activemq/activemq-cpp/trunk/src/main/activemq/commands/ConnectionId.h
URL: http://svn.apache.org/viewvc/activemq/activemq-cpp/trunk/src/main/activemq/commands/ConnectionId.h?rev=747816&r1=747815&r2=747816&view=diff
==============================================================================
--- activemq/activemq-cpp/trunk/src/main/activemq/commands/ConnectionId.h (original)
+++ activemq/activemq-cpp/trunk/src/main/activemq/commands/ConnectionId.h Wed Feb 25 15:23:48 2009
@@ -15,6 +15,7 @@
  * limitations under the License.
  */
 
+
 #ifndef _ACTIVEMQ_COMMANDS_CONNECTIONID_H_
 #define _ACTIVEMQ_COMMANDS_CONNECTIONID_H_
 
@@ -23,24 +24,23 @@
 #pragma warning( disable : 4290 )
 #endif
 
-#include <activemq/util/Config.h>
-#include <activemq/commands/BaseDataStructure.h>
 #include <decaf/lang/Pointer.h>
 #include <decaf/lang/Comparable.h>
-#include <vector>
+#include <activemq/util/Config.h>
 #include <string>
+#include <activemq/commands/BaseDataStructure.h>
+#include <vector>
 
 namespace activemq{
 namespace commands{
 
     /*
      *
-     *  Command and marshaling code for OpenWire format for ConnectionId
-     *
+     *  Command code for OpenWire format for ConnectionId
      *
      *  NOTE!: This file is auto generated - do not modify!
      *         if you need to make a change, please see the Java Classes
-     *         in the activemq-openwire-generator module
+     *         in the activemq-cpp-openwire-generator module
      *
      */
     class AMQCPP_API ConnectionId : public BaseDataStructure, public decaf::lang::Comparable<ConnectionId> {
@@ -57,7 +57,9 @@
     public:
 
         ConnectionId();
+
         ConnectionId( const ConnectionId& other );
+
         virtual ~ConnectionId();
 
         /**
@@ -109,6 +111,7 @@
         virtual bool operator<( const ConnectionId& value ) const;
 
         ConnectionId& operator= ( const ConnectionId& other );
+
     };
 
 }}

Modified: activemq/activemq-cpp/trunk/src/main/activemq/commands/ConnectionInfo.cpp
URL: http://svn.apache.org/viewvc/activemq/activemq-cpp/trunk/src/main/activemq/commands/ConnectionInfo.cpp?rev=747816&r1=747815&r2=747816&view=diff
==============================================================================
--- activemq/activemq-cpp/trunk/src/main/activemq/commands/ConnectionInfo.cpp (original)
+++ activemq/activemq-cpp/trunk/src/main/activemq/commands/ConnectionInfo.cpp Wed Feb 25 15:23:48 2009
@@ -14,9 +14,10 @@
  * See the License for the specific language governing permissions and
  * limitations under the License.
  */
+
+#include <activemq/exceptions/ActiveMQException.h>
 #include <activemq/commands/ConnectionInfo.h>
 #include <activemq/state/CommandVisitor.h>
-#include <activemq/exceptions/ActiveMQException.h>
 #include <decaf/lang/exceptions/NullPointerException.h>
 
 using namespace std;
@@ -28,14 +29,14 @@
 
 /*
  *
- *  Command and marshaling code for OpenWire format for ConnectionInfo
- *
+ *  Command code for OpenWire format for ConnectionInfo
  *
  *  NOTE!: This file is auto generated - do not modify!
  *         if you need to make a change, please see the Java Classes in the
- *         activemq-core module
+ *         activemq-cpp-openwire-generator module
  *
  */
+
 ////////////////////////////////////////////////////////////////////////////////
 ConnectionInfo::ConnectionInfo() {
 
@@ -49,7 +50,6 @@
 
 ////////////////////////////////////////////////////////////////////////////////
 ConnectionInfo::~ConnectionInfo() {
-
 }
 
 ////////////////////////////////////////////////////////////////////////////////
@@ -183,13 +183,6 @@
 }
 
 ////////////////////////////////////////////////////////////////////////////////
-decaf::lang::Pointer<commands::Command> ConnectionInfo::visit( activemq::state::CommandVisitor* visitor ) 
-    throw( exceptions::ActiveMQException ) {
-
-    return visitor->processConnectionInfo( this );
-}
-
-////////////////////////////////////////////////////////////////////////////////
 const decaf::lang::Pointer<ConnectionId>& ConnectionInfo::getConnectionId() const {
     return connectionId;
 }
@@ -294,3 +287,9 @@
     this->clientMaster = clientMaster;
 }
 
+////////////////////////////////////////////////////////////////////////////////
+decaf::lang::Pointer<commands::Command> ConnectionInfo::visit( activemq::state::CommandVisitor* visitor ) 
+    throw( exceptions::ActiveMQException ) {
+
+    return visitor->processConnectionInfo( this );
+}

Modified: activemq/activemq-cpp/trunk/src/main/activemq/commands/ConnectionInfo.h
URL: http://svn.apache.org/viewvc/activemq/activemq-cpp/trunk/src/main/activemq/commands/ConnectionInfo.h?rev=747816&r1=747815&r2=747816&view=diff
==============================================================================
--- activemq/activemq-cpp/trunk/src/main/activemq/commands/ConnectionInfo.h (original)
+++ activemq/activemq-cpp/trunk/src/main/activemq/commands/ConnectionInfo.h Wed Feb 25 15:23:48 2009
@@ -15,6 +15,7 @@
  * limitations under the License.
  */
 
+
 #ifndef _ACTIVEMQ_COMMANDS_CONNECTIONINFO_H_
 #define _ACTIVEMQ_COMMANDS_CONNECTIONINFO_H_
 
@@ -23,25 +24,24 @@
 #pragma warning( disable : 4290 )
 #endif
 
-#include <activemq/util/Config.h>
-#include <activemq/commands/BaseCommand.h>
-#include <decaf/lang/Pointer.h>
 #include <activemq/commands/BrokerId.h>
+#include <decaf/lang/Pointer.h>
 #include <activemq/commands/ConnectionId.h>
-#include <vector>
+#include <activemq/util/Config.h>
 #include <string>
+#include <activemq/commands/BaseCommand.h>
+#include <vector>
 
 namespace activemq{
 namespace commands{
 
     /*
      *
-     *  Command and marshaling code for OpenWire format for ConnectionInfo
-     *
+     *  Command code for OpenWire format for ConnectionInfo
      *
      *  NOTE!: This file is auto generated - do not modify!
      *         if you need to make a change, please see the Java Classes
-     *         in the activemq-openwire-generator module
+     *         in the activemq-cpp-openwire-generator module
      *
      */
     class AMQCPP_API ConnectionInfo : public BaseCommand {
@@ -56,6 +56,10 @@
         bool manageable;
         bool clientMaster;
 
+    public:
+
+        const static unsigned char ID_CONNECTIONINFO = 3;
+
     protected:
 
         ConnectionInfo( const ConnectionInfo& other );
@@ -63,11 +67,8 @@
 
     public:
 
-        const static unsigned char ID_CONNECTIONINFO = 3;
-
-    public:
-
         ConnectionInfo();
+
         virtual ~ConnectionInfo();
 
         /**
@@ -106,16 +107,6 @@
          */
         virtual bool equals( const DataStructure* value ) const;
 
-        /**
-         * 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.
-         * 
-         * @return a Response to the visitor being called or NULL if no response.
-         */
-        virtual decaf::lang::Pointer<commands::Command> visit( activemq::state::CommandVisitor* visitor )
-            throw( exceptions::ActiveMQException );
-
         virtual const decaf::lang::Pointer<ConnectionId>& getConnectionId() const;
         virtual decaf::lang::Pointer<ConnectionId>& getConnectionId();
         virtual void setConnectionId( const decaf::lang::Pointer<ConnectionId>& connectionId );
@@ -145,6 +136,16 @@
         virtual bool isClientMaster() const;
         virtual void setClientMaster( bool clientMaster );
 
+        /**
+         * 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.
+         * 
+         * @return a Response to the visitor being called or NULL if no response.
+         */
+        virtual decaf::lang::Pointer<commands::Command> visit( activemq::state::CommandVisitor* visitor )
+            throw( exceptions::ActiveMQException );
+
     };
 
 }}

Modified: activemq/activemq-cpp/trunk/src/main/activemq/commands/ConsumerControl.cpp
URL: http://svn.apache.org/viewvc/activemq/activemq-cpp/trunk/src/main/activemq/commands/ConsumerControl.cpp?rev=747816&r1=747815&r2=747816&view=diff
==============================================================================
--- activemq/activemq-cpp/trunk/src/main/activemq/commands/ConsumerControl.cpp (original)
+++ activemq/activemq-cpp/trunk/src/main/activemq/commands/ConsumerControl.cpp Wed Feb 25 15:23:48 2009
@@ -14,10 +14,11 @@
  * See the License for the specific language governing permissions and
  * limitations under the License.
  */
-#include <activemq/commands/ConsumerControl.h>
-#include <activemq/state/CommandVisitor.h>
+
 #include <activemq/exceptions/ActiveMQException.h>
+#include <activemq/state/CommandVisitor.h>
 #include <decaf/lang/exceptions/NullPointerException.h>
+#include <activemq/commands/ConsumerControl.h>
 
 using namespace std;
 using namespace activemq;
@@ -28,14 +29,14 @@
 
 /*
  *
- *  Command and marshaling code for OpenWire format for ConsumerControl
- *
+ *  Command code for OpenWire format for ConsumerControl
  *
  *  NOTE!: This file is auto generated - do not modify!
  *         if you need to make a change, please see the Java Classes in the
- *         activemq-core module
+ *         activemq-cpp-openwire-generator module
  *
  */
+
 ////////////////////////////////////////////////////////////////////////////////
 ConsumerControl::ConsumerControl() {
 
@@ -48,7 +49,6 @@
 
 ////////////////////////////////////////////////////////////////////////////////
 ConsumerControl::~ConsumerControl() {
-
 }
 
 ////////////////////////////////////////////////////////////////////////////////
@@ -159,13 +159,6 @@
 }
 
 ////////////////////////////////////////////////////////////////////////////////
-decaf::lang::Pointer<commands::Command> ConsumerControl::visit( activemq::state::CommandVisitor* visitor ) 
-    throw( exceptions::ActiveMQException ) {
-
-    return visitor->processConsumerControl( this );
-}
-
-////////////////////////////////////////////////////////////////////////////////
 bool ConsumerControl::isClose() const {
     return close;
 }
@@ -230,3 +223,9 @@
     this->stop = stop;
 }
 
+////////////////////////////////////////////////////////////////////////////////
+decaf::lang::Pointer<commands::Command> ConsumerControl::visit( activemq::state::CommandVisitor* visitor ) 
+    throw( exceptions::ActiveMQException ) {
+
+    return visitor->processConsumerControl( this );
+}

Modified: activemq/activemq-cpp/trunk/src/main/activemq/commands/ConsumerControl.h
URL: http://svn.apache.org/viewvc/activemq/activemq-cpp/trunk/src/main/activemq/commands/ConsumerControl.h?rev=747816&r1=747815&r2=747816&view=diff
==============================================================================
--- activemq/activemq-cpp/trunk/src/main/activemq/commands/ConsumerControl.h (original)
+++ activemq/activemq-cpp/trunk/src/main/activemq/commands/ConsumerControl.h Wed Feb 25 15:23:48 2009
@@ -15,6 +15,7 @@
  * limitations under the License.
  */
 
+
 #ifndef _ACTIVEMQ_COMMANDS_CONSUMERCONTROL_H_
 #define _ACTIVEMQ_COMMANDS_CONSUMERCONTROL_H_
 
@@ -23,24 +24,23 @@
 #pragma warning( disable : 4290 )
 #endif
 
+#include <decaf/lang/Pointer.h>
 #include <activemq/util/Config.h>
+#include <string>
 #include <activemq/commands/BaseCommand.h>
-#include <decaf/lang/Pointer.h>
-#include <activemq/commands/ConsumerId.h>
 #include <vector>
-#include <string>
+#include <activemq/commands/ConsumerId.h>
 
 namespace activemq{
 namespace commands{
 
     /*
      *
-     *  Command and marshaling code for OpenWire format for ConsumerControl
-     *
+     *  Command code for OpenWire format for ConsumerControl
      *
      *  NOTE!: This file is auto generated - do not modify!
      *         if you need to make a change, please see the Java Classes
-     *         in the activemq-openwire-generator module
+     *         in the activemq-cpp-openwire-generator module
      *
      */
     class AMQCPP_API ConsumerControl : public BaseCommand {
@@ -53,6 +53,10 @@
         bool start;
         bool stop;
 
+    public:
+
+        const static unsigned char ID_CONSUMERCONTROL = 17;
+
     protected:
 
         ConsumerControl( const ConsumerControl& other );
@@ -60,11 +64,8 @@
 
     public:
 
-        const static unsigned char ID_CONSUMERCONTROL = 17;
-
-    public:
-
         ConsumerControl();
+
         virtual ~ConsumerControl();
 
         /**
@@ -103,16 +104,6 @@
          */
         virtual bool equals( const DataStructure* value ) const;
 
-        /**
-         * 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.
-         * 
-         * @return a Response to the visitor being called or NULL if no response.
-         */
-        virtual decaf::lang::Pointer<commands::Command> visit( activemq::state::CommandVisitor* visitor )
-            throw( exceptions::ActiveMQException );
-
         virtual bool isClose() const;
         virtual void setClose( bool close );
 
@@ -132,6 +123,16 @@
         virtual bool isStop() const;
         virtual void setStop( bool stop );
 
+        /**
+         * 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.
+         * 
+         * @return a Response to the visitor being called or NULL if no response.
+         */
+        virtual decaf::lang::Pointer<commands::Command> visit( activemq::state::CommandVisitor* visitor )
+            throw( exceptions::ActiveMQException );
+
     };
 
 }}

Modified: activemq/activemq-cpp/trunk/src/main/activemq/commands/ConsumerId.cpp
URL: http://svn.apache.org/viewvc/activemq/activemq-cpp/trunk/src/main/activemq/commands/ConsumerId.cpp?rev=747816&r1=747815&r2=747816&view=diff
==============================================================================
--- activemq/activemq-cpp/trunk/src/main/activemq/commands/ConsumerId.cpp (original)
+++ activemq/activemq-cpp/trunk/src/main/activemq/commands/ConsumerId.cpp Wed Feb 25 15:23:48 2009
@@ -14,11 +14,12 @@
  * See the License for the specific language governing permissions and
  * limitations under the License.
  */
-#include <activemq/commands/ConsumerId.h>
-#include <activemq/state/CommandVisitor.h>
+
 #include <activemq/exceptions/ActiveMQException.h>
-#include <decaf/lang/exceptions/NullPointerException.h>
 #include <apr_strings.h>
+#include <activemq/state/CommandVisitor.h>
+#include <decaf/lang/exceptions/NullPointerException.h>
+#include <activemq/commands/ConsumerId.h>
 
 using namespace std;
 using namespace activemq;
@@ -29,14 +30,14 @@
 
 /*
  *
- *  Command and marshaling code for OpenWire format for ConsumerId
- *
+ *  Command code for OpenWire format for ConsumerId
  *
  *  NOTE!: This file is auto generated - do not modify!
  *         if you need to make a change, please see the Java Classes in the
- *         activemq-core module
+ *         activemq-cpp-openwire-generator module
  *
  */
+
 ////////////////////////////////////////////////////////////////////////////////
 ConsumerId::ConsumerId() {
 
@@ -52,7 +53,6 @@
 
 ////////////////////////////////////////////////////////////////////////////////
 ConsumerId::~ConsumerId() {
-
 }
 
 ////////////////////////////////////////////////////////////////////////////////
@@ -214,6 +214,7 @@
 bool ConsumerId::operator<( const ConsumerId& value ) const {
     return this->compareTo( value ) < 0;
 }
+
 ////////////////////////////////////////////////////////////////////////////////
 ConsumerId& ConsumerId::operator= ( const ConsumerId& other ) {
     this->copyDataStructure( &other );



Mime
View raw message