You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@activemq.apache.org by ta...@apache.org on 2010/03/23 21:50:36 UTC

svn commit: r926770 - in /activemq/activemq-cpp/trunk/activemq-cpp-openwire-generator/src/main/java/org/apache/activemq/openwire/tool/commands: CommandCodeGenerator.java CommandSourceGenerator.java

Author: tabish
Date: Tue Mar 23 20:50:36 2010
New Revision: 926770

URL: http://svn.apache.org/viewvc?rev=926770&view=rev
Log:
Generate the correct initialization default for STL vectors

Modified:
    activemq/activemq-cpp/trunk/activemq-cpp-openwire-generator/src/main/java/org/apache/activemq/openwire/tool/commands/CommandCodeGenerator.java
    activemq/activemq-cpp/trunk/activemq-cpp-openwire-generator/src/main/java/org/apache/activemq/openwire/tool/commands/CommandSourceGenerator.java

Modified: activemq/activemq-cpp/trunk/activemq-cpp-openwire-generator/src/main/java/org/apache/activemq/openwire/tool/commands/CommandCodeGenerator.java
URL: http://svn.apache.org/viewvc/activemq/activemq-cpp/trunk/activemq-cpp-openwire-generator/src/main/java/org/apache/activemq/openwire/tool/commands/CommandCodeGenerator.java?rev=926770&r1=926769&r2=926770&view=diff
==============================================================================
--- activemq/activemq-cpp/trunk/activemq-cpp-openwire-generator/src/main/java/org/apache/activemq/openwire/tool/commands/CommandCodeGenerator.java (original)
+++ activemq/activemq-cpp/trunk/activemq-cpp-openwire-generator/src/main/java/org/apache/activemq/openwire/tool/commands/CommandCodeGenerator.java Tue Mar 23 20:50:36 2010
@@ -214,6 +214,10 @@ public abstract class CommandCodeGenerat
             return "false";
         } else if( name.equals("String") ) {
             return "\"\"";
+        } else if( name.equals("ByteSequence") ) {
+            return "";
+        } else if( type.isArrayType() ) {
+            return "";
         } else if( !type.isPrimitiveType() ) {
             return "NULL";
         } else {

Modified: 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=926770&r1=926769&r2=926770&view=diff
==============================================================================
--- activemq/activemq-cpp/trunk/activemq-cpp-openwire-generator/src/main/java/org/apache/activemq/openwire/tool/commands/CommandSourceGenerator.java (original)
+++ activemq/activemq-cpp/trunk/activemq-cpp-openwire-generator/src/main/java/org/apache/activemq/openwire/tool/commands/CommandSourceGenerator.java Tue Mar 23 20:50:36 2010
@@ -199,18 +199,6 @@ public class CommandSourceGenerator exte
     }
 
     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 String generateInitializerList(String current) {