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 2007/03/07 16:52:18 UTC

svn commit: r515617 - in /activemq/activemq-cpp/trunk/activemq-cpp/openwire-scripts: AmqCppGeneratorTask.java AmqCppTestMarshallingClassesGenerator.java

Author: tabish
Date: Wed Mar  7 07:52:17 2007
New Revision: 515617

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

Added:
    activemq/activemq-cpp/trunk/activemq-cpp/openwire-scripts/AmqCppTestMarshallingClassesGenerator.java   (with props)
Modified:
    activemq/activemq-cpp/trunk/activemq-cpp/openwire-scripts/AmqCppGeneratorTask.java

Modified: activemq/activemq-cpp/trunk/activemq-cpp/openwire-scripts/AmqCppGeneratorTask.java
URL: http://svn.apache.org/viewvc/activemq/activemq-cpp/trunk/activemq-cpp/openwire-scripts/AmqCppGeneratorTask.java?view=diff&rev=515617&r1=515616&r2=515617
==============================================================================
--- activemq/activemq-cpp/trunk/activemq-cpp/openwire-scripts/AmqCppGeneratorTask.java (original)
+++ activemq/activemq-cpp/trunk/activemq-cpp/openwire-scripts/AmqCppGeneratorTask.java Wed Mar  7 07:52:17 2007
@@ -96,6 +96,13 @@
                 script.run();
             }
             {
+                AmqCppMarshallingClassesGenerator script = new AmqCppMarshallingClassesGenerator();
+                script.setJam(jam);
+                script.setTargetDir(target+"/src/main");
+                script.setOpenwireVersion(version);
+                script.run();
+            }
+            {
                 AmqCppTestMarshallingHeadersGenerator script = new AmqCppTestMarshallingHeadersGenerator();
                 script.setJam(jam);
                 script.setTargetDir(target+"/src/test");
@@ -103,9 +110,9 @@
                 script.run();
             }
             {
-                AmqCppMarshallingClassesGenerator script = new AmqCppMarshallingClassesGenerator();
+                AmqCppTestMarshallingClassesGenerator script = new AmqCppTestMarshallingClassesGenerator();
                 script.setJam(jam);
-                script.setTargetDir(target+"/src/main");
+                script.setTargetDir(target+"/src/test");
                 script.setOpenwireVersion(version);
                 script.run();
             }

Added: activemq/activemq-cpp/trunk/activemq-cpp/openwire-scripts/AmqCppTestMarshallingClassesGenerator.java
URL: http://svn.apache.org/viewvc/activemq/activemq-cpp/trunk/activemq-cpp/openwire-scripts/AmqCppTestMarshallingClassesGenerator.java?view=auto&rev=515617
==============================================================================
--- activemq/activemq-cpp/trunk/activemq-cpp/openwire-scripts/AmqCppTestMarshallingClassesGenerator.java (added)
+++ activemq/activemq-cpp/trunk/activemq-cpp/openwire-scripts/AmqCppTestMarshallingClassesGenerator.java Wed Mar  7 07:52:17 2007
@@ -0,0 +1,77 @@
+/**
+ *
+ * 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;
+
+import org.codehaus.jam.JAnnotation;
+import org.codehaus.jam.JAnnotationValue;
+import org.codehaus.jam.JClass;
+import org.codehaus.jam.JProperty;
+
+import java.io.PrintWriter;
+import java.util.ArrayList;
+import java.util.Collections;
+import java.util.Comparator;
+import java.util.Iterator;
+import java.util.List;
+
+/**
+ *
+ * @version $Revision: 381410 $
+ */
+public class AmqCppTestMarshallingClassesGenerator extends AmqCppTestMarshallingHeadersGenerator {
+
+    protected String getFilePostFix() {
+        return ".cpp";
+    }
+
+    protected void generateFile(PrintWriter out) throws Exception {
+        generateLicence(out);
+
+out.println("");
+out.println("#include <activemq/connector/openwire/marshal/v"+getOpenwireVersion()+"/"+className+".h>");
+out.println("");
+out.println("#include <activemq/connector/openwire/commands/"+jclass.getSimpleName()+".h>");
+out.println("");
+out.println("CPPUNIT_TEST_SUITE_REGISTRATION( activemq::connector::openwire::marshal::v"+getOpenwireVersion()+"::"+className+" );");
+out.println("");
+out.println("//");
+out.println("//     NOTE!: This file is autogenerated - 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("using namespace std;");
+out.println("using namespace activemq;");
+out.println("using namespace activemq::io;");
+out.println("using namespace activemq::connector;");
+out.println("using namespace activemq::connector::openwire;");
+out.println("using namespace activemq::connector::openwire::commands;");
+out.println("using namespace activemq::connector::openwire::marshal;");
+out.println("using namespace activemq::connector::openwire::utils;");
+out.println("using namespace activemq::connector::openwire::marshal::v"+getOpenwireVersion()+";");
+out.println("");
+
+    String typeName = jclass.getSimpleName().toUpperCase();
+
+out.println("///////////////////////////////////////////////////////////////////////////////");
+out.println("void "+className+"::test() {");
+out.println("");
+out.println("}");
+    }
+
+}

Propchange: activemq/activemq-cpp/trunk/activemq-cpp/openwire-scripts/AmqCppTestMarshallingClassesGenerator.java
------------------------------------------------------------------------------
    svn:eol-style = native