activemq-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From tab...@apache.org
Subject svn commit: r738713 - in /activemq/activemq-cpp/trunk/src/main/java/org/apache/activemq/openwire/tool: AmqCppClassesGenerator.java AmqCppMarshallingHeadersGenerator.java
Date Thu, 29 Jan 2009 02:14:32 GMT
Author: tabish
Date: Thu Jan 29 02:14:32 2009
New Revision: 738713

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

Minor code cleanup and add a check in equals for comparison to self.

Modified:
    activemq/activemq-cpp/trunk/src/main/java/org/apache/activemq/openwire/tool/AmqCppClassesGenerator.java
    activemq/activemq-cpp/trunk/src/main/java/org/apache/activemq/openwire/tool/AmqCppMarshallingHeadersGenerator.java

Modified: activemq/activemq-cpp/trunk/src/main/java/org/apache/activemq/openwire/tool/AmqCppClassesGenerator.java
URL: http://svn.apache.org/viewvc/activemq/activemq-cpp/trunk/src/main/java/org/apache/activemq/openwire/tool/AmqCppClassesGenerator.java?rev=738713&r1=738712&r2=738713&view=diff
==============================================================================
--- activemq/activemq-cpp/trunk/src/main/java/org/apache/activemq/openwire/tool/AmqCppClassesGenerator.java
(original)
+++ activemq/activemq-cpp/trunk/src/main/java/org/apache/activemq/openwire/tool/AmqCppClassesGenerator.java
Thu Jan 29 02:14:32 2009
@@ -156,14 +156,14 @@
 out.println(" *  Command and marshaling code for OpenWire format for "+className );
 out.println(" *");
 out.println(" *");
-out.println(" *  NOTE!: This file is autogenerated - do not modify!");
+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-core module");
 out.println(" *");
 out.println(" */");
 out.println("////////////////////////////////////////////////////////////////////////////////");
-out.println(""+className+"::"+className+"()");
-out.println("{");
+out.println(""+className+"::"+className+"() {");
+out.println("");
 
         List properties = getProperties();
         for (Iterator iter = properties.iterator(); iter.hasNext();) {
@@ -180,8 +180,8 @@
 out.println("}");
 out.println("");
 out.println("////////////////////////////////////////////////////////////////////////////////");
-out.println(""+className+"::~"+className+"()");
-out.println("{");
+out.println(""+className+"::~"+className+"() {");
+out.println("");
 
     for( Iterator iter = properties.iterator(); iter.hasNext(); ) {
         JProperty property = (JProperty) iter.next();
@@ -232,7 +232,6 @@
 out.println("    const "+className+"* srcPtr = dynamic_cast<const "+className+"*>(
src );");
 out.println("");
 out.println("    if( srcPtr == NULL || src == NULL ) {");
-out.println("");
 out.println("        throw decaf::lang::exceptions::NullPointerException(");
 out.println("            __FILE__, __LINE__,");
 out.println("            \""+className+"::copyDataStructure - src is NULL or invalid\" );");
@@ -367,6 +366,11 @@
 out.println("////////////////////////////////////////////////////////////////////////////////");
 out.println("bool "+className+"::equals( const DataStructure* value ) const {");
 
+out.println("");
+out.println("    if( this == value ) {");
+out.println("        return true;");
+out.println("    }");
+out.println("");
 out.println("    const "+className+"* valuePtr = dynamic_cast<const "+className+"*>(
value );");
 out.println("");
 out.println("    if( valuePtr == NULL || value == NULL ) {");
@@ -510,14 +514,13 @@
     }
 
 out.println("////////////////////////////////////////////////////////////////////////////////");
-out.println("void " + className + "::" + setter+"(" + constNess + type+ " " + parameterName
+" ) {");
+out.println("void " + className + "::" + setter+"( " + constNess + type+ " " + parameterName
+" ) {");
 out.println("    this->"+parameterName+" = "+parameterName+";");
 out.println("}");
         }
 out.println("");
 
         if( comparable ) {
-out.println("");
 out.println("////////////////////////////////////////////////////////////////////////////////");
 out.println("int " + className + "::compareTo( const "+className+"& value ) const {");
 out.println("");

Modified: activemq/activemq-cpp/trunk/src/main/java/org/apache/activemq/openwire/tool/AmqCppMarshallingHeadersGenerator.java
URL: http://svn.apache.org/viewvc/activemq/activemq-cpp/trunk/src/main/java/org/apache/activemq/openwire/tool/AmqCppMarshallingHeadersGenerator.java?rev=738713&r1=738712&r2=738713&view=diff
==============================================================================
--- activemq/activemq-cpp/trunk/src/main/java/org/apache/activemq/openwire/tool/AmqCppMarshallingHeadersGenerator.java
(original)
+++ activemq/activemq-cpp/trunk/src/main/java/org/apache/activemq/openwire/tool/AmqCppMarshallingHeadersGenerator.java
Thu Jan 29 02:14:32 2009
@@ -188,9 +188,9 @@
 out.println("namespace v"+getOpenwireVersion()+"{");
 out.println("");
 out.println("    /**");
-out.println("     * Marshalling code for Open Wire Format for "+className);
+out.println("     * Marshaling code for Open Wire Format for "+className);
 out.println("     *");
-out.println("     *  NOTE!: This file is autogenerated - do not modify!");
+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("     */");
@@ -210,7 +210,7 @@
 out.println("        virtual commands::DataStructure* createObject() const;");
 out.println("");
 out.println("        /**");
-out.println("         * Get the Data Structure Type that identifies this Marshaller");
+out.println("         * Get the Data Structure Type that identifies this Marshaler");
 out.println("         * @return byte holding the data structure type value");
 out.println("         */");
 out.println("        virtual unsigned char getDataStructureType() const;");
@@ -218,7 +218,7 @@
     }
 out.println("        /**");
 out.println("         * Un-marshal an object instance from the data input stream");
-out.println("         * @param wireFormat - describs the wire format of the broker");
+out.println("         * @param wireFormat - describes the wire format of the broker");
 out.println("         * @param o - Object to be un-marshaled");
 out.println("         * @param dataIn - BinaryReader that provides that data");
 out.println("         * @param bs - BooleanStream");
@@ -230,7 +230,7 @@
 out.println("");
 out.println("        /**");
 out.println("         * Write the booleans that this object uses to a BooleanStream");
-out.println("         * @param wireFormat - describis the wire format of the broker");
+out.println("         * @param wireFormat - describes the wire format of the broker");
 out.println("         * @param o - Object to be marshaled");
 out.println("         * @param bs - BooleanStream");
 out.println("         * @returns int");
@@ -241,7 +241,7 @@
 out.println("");
 out.println("        /**");
 out.println("         * Write a object instance to data output stream");
-out.println("         * @param wireFormat - describs the wire format of the broker");
+out.println("         * @param wireFormat - describes the wire format of the broker");
 out.println("         * @param o - Object to be marshaled");
 out.println("         * @param dataOut - BinaryReader that provides that data sink");
 out.println("         * @param bs - BooleanStream");
@@ -253,7 +253,7 @@
 out.println("");
 out.println("        /**");
 out.println("         * Un-marshal an object instance from the data input stream");
-out.println("         * @param wireFormat - describs the wire format of the broker");
+out.println("         * @param wireFormat - describes the wire format of the broker");
 out.println("         * @param o - Object to be marshaled");
 out.println("         * @param dataIn - BinaryReader that provides that data source");
 out.println("         */");
@@ -301,7 +301,7 @@
 out.println("     * Used to create marshallers for a specific version of the wire");
 out.println("     * protocol.");
 out.println("     *");
-out.println("     *  NOTE!: This file is autogenerated - do not modify!");
+out.println("     *  NOTE!: This file is auto generated - do not modify!");
 out.println("     *         if you need to make a change, please see the Groovy scripts");
 out.println("     *         in the activemq-openwire-generator module");
 out.println("     */");



Mime
View raw message