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/01/27 17:53:51 UTC

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

Author: tabish
Date: Wed Jan 27 16:53:49 2010
New Revision: 903734

URL: http://svn.apache.org/viewvc?rev=903734&view=rev
Log:
Additions for https://issues.apache.org/activemq/browse/AMQCPP-284

Added:
    activemq/activemq-cpp/trunk/activemq-cpp-openwire-generator/src/main/java/org/apache/activemq/openwire/tool/commands/ConnectionInfoHeaderGenerator.java   (with props)
    activemq/activemq-cpp/trunk/activemq-cpp-openwire-generator/src/main/java/org/apache/activemq/openwire/tool/commands/ConnectionInfoSourceGenerator.java   (with props)
    activemq/activemq-cpp/trunk/activemq-cpp-openwire-generator/src/main/java/org/apache/activemq/openwire/tool/commands/ConsumerInfoHeaderGenerator.java   (with props)
    activemq/activemq-cpp/trunk/activemq-cpp-openwire-generator/src/main/java/org/apache/activemq/openwire/tool/commands/ConsumerInfoSourceGenerator.java   (with props)
    activemq/activemq-cpp/trunk/activemq-cpp-openwire-generator/src/main/java/org/apache/activemq/openwire/tool/commands/ProducerInfoHeaderGenerator.java   (with props)
    activemq/activemq-cpp/trunk/activemq-cpp-openwire-generator/src/main/java/org/apache/activemq/openwire/tool/commands/ProducerInfoSourceGenerator.java   (with props)
Modified:
    activemq/activemq-cpp/trunk/activemq-cpp-openwire-generator/src/main/java/org/apache/activemq/openwire/tool/AmqCppGeneratorTask.java
    activemq/activemq-cpp/trunk/activemq-cpp-openwire-generator/src/main/java/org/apache/activemq/openwire/tool/commands/SessionInfoHeaderGenerator.java
    activemq/activemq-cpp/trunk/activemq-cpp-openwire-generator/src/main/java/org/apache/activemq/openwire/tool/commands/SessionInfoSourceGenerator.java

Modified: activemq/activemq-cpp/trunk/activemq-cpp-openwire-generator/src/main/java/org/apache/activemq/openwire/tool/AmqCppGeneratorTask.java
URL: http://svn.apache.org/viewvc/activemq/activemq-cpp/trunk/activemq-cpp-openwire-generator/src/main/java/org/apache/activemq/openwire/tool/AmqCppGeneratorTask.java?rev=903734&r1=903733&r2=903734&view=diff
==============================================================================
--- activemq/activemq-cpp/trunk/activemq-cpp-openwire-generator/src/main/java/org/apache/activemq/openwire/tool/AmqCppGeneratorTask.java (original)
+++ activemq/activemq-cpp/trunk/activemq-cpp-openwire-generator/src/main/java/org/apache/activemq/openwire/tool/AmqCppGeneratorTask.java Wed Jan 27 16:53:49 2010
@@ -25,7 +25,6 @@
 import org.apache.activemq.openwire.tool.marshallers.AmqCppMarshallingHeadersGenerator;
 import org.apache.activemq.openwire.tool.tests.AmqCppTestMarshallingClassesGenerator;
 import org.apache.activemq.openwire.tool.tests.AmqCppTestMarshallingHeadersGenerator;
-import org.apache.activemq.openwire.tool.tests.AmqCppTestRegistryGenerator;
 import org.apache.tools.ant.BuildException;
 import org.apache.tools.ant.Project;
 import org.apache.tools.ant.Task;

Added: activemq/activemq-cpp/trunk/activemq-cpp-openwire-generator/src/main/java/org/apache/activemq/openwire/tool/commands/ConnectionInfoHeaderGenerator.java
URL: http://svn.apache.org/viewvc/activemq/activemq-cpp/trunk/activemq-cpp-openwire-generator/src/main/java/org/apache/activemq/openwire/tool/commands/ConnectionInfoHeaderGenerator.java?rev=903734&view=auto
==============================================================================
--- activemq/activemq-cpp/trunk/activemq-cpp-openwire-generator/src/main/java/org/apache/activemq/openwire/tool/commands/ConnectionInfoHeaderGenerator.java (added)
+++ activemq/activemq-cpp/trunk/activemq-cpp-openwire-generator/src/main/java/org/apache/activemq/openwire/tool/commands/ConnectionInfoHeaderGenerator.java Wed Jan 27 16:53:49 2010
@@ -0,0 +1,38 @@
+/**
+ * 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 ConnectionInfoHeaderGenerator extends CommandHeaderGenerator {
+
+    protected void populateIncludeFilesSet() {
+
+        Set<String> includes = getIncludeFiles();
+        includes.add("<activemq/commands/RemoveInfo.h>");
+
+        super.populateIncludeFilesSet();
+    }
+
+    protected void generateAdditonalMembers( PrintWriter out ) {
+        out.println("        Pointer<RemoveInfo> createRemoveCommand() const;");
+        out.println("");
+
+        super.generateAdditonalMembers( out );
+    }
+}

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

Added: activemq/activemq-cpp/trunk/activemq-cpp-openwire-generator/src/main/java/org/apache/activemq/openwire/tool/commands/ConnectionInfoSourceGenerator.java
URL: http://svn.apache.org/viewvc/activemq/activemq-cpp/trunk/activemq-cpp-openwire-generator/src/main/java/org/apache/activemq/openwire/tool/commands/ConnectionInfoSourceGenerator.java?rev=903734&view=auto
==============================================================================
--- activemq/activemq-cpp/trunk/activemq-cpp-openwire-generator/src/main/java/org/apache/activemq/openwire/tool/commands/ConnectionInfoSourceGenerator.java (added)
+++ activemq/activemq-cpp/trunk/activemq-cpp-openwire-generator/src/main/java/org/apache/activemq/openwire/tool/commands/ConnectionInfoSourceGenerator.java Wed Jan 27 16:53:49 2010
@@ -0,0 +1,36 @@
+/**
+ * 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 ConnectionInfoSourceGenerator extends CommandSourceGenerator {
+
+    protected void generateAdditionalMethods( PrintWriter out ) {
+        out.println("////////////////////////////////////////////////////////////////////////////////");
+        out.println("Pointer<RemoveInfo> ConnectionInfo::createRemoveCommand() const {");
+        out.println("    Pointer<RemoveInfo> info( new RemoveInfo() );");
+        out.println("    info->setResponseRequired( this->isResponseRequired() );");
+        out.println("    info->setObjectId( this->getConnectionId() );");
+        out.println("    return info;");
+        out.println("}");
+        out.println("");
+
+        super.generateAdditionalMethods(out);
+    }
+}

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

Added: activemq/activemq-cpp/trunk/activemq-cpp-openwire-generator/src/main/java/org/apache/activemq/openwire/tool/commands/ConsumerInfoHeaderGenerator.java
URL: http://svn.apache.org/viewvc/activemq/activemq-cpp/trunk/activemq-cpp-openwire-generator/src/main/java/org/apache/activemq/openwire/tool/commands/ConsumerInfoHeaderGenerator.java?rev=903734&view=auto
==============================================================================
--- activemq/activemq-cpp/trunk/activemq-cpp-openwire-generator/src/main/java/org/apache/activemq/openwire/tool/commands/ConsumerInfoHeaderGenerator.java (added)
+++ activemq/activemq-cpp/trunk/activemq-cpp-openwire-generator/src/main/java/org/apache/activemq/openwire/tool/commands/ConsumerInfoHeaderGenerator.java Wed Jan 27 16:53:49 2010
@@ -0,0 +1,38 @@
+/**
+ * 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 ConsumerInfoHeaderGenerator extends CommandHeaderGenerator {
+
+    protected void populateIncludeFilesSet() {
+
+        Set<String> includes = getIncludeFiles();
+        includes.add("<activemq/commands/RemoveInfo.h>");
+
+        super.populateIncludeFilesSet();
+    }
+
+    protected void generateAdditonalMembers( PrintWriter out ) {
+        out.println("        Pointer<RemoveInfo> createRemoveCommand() const;");
+        out.println("");
+
+        super.generateAdditonalMembers( out );
+    }
+}

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

Added: activemq/activemq-cpp/trunk/activemq-cpp-openwire-generator/src/main/java/org/apache/activemq/openwire/tool/commands/ConsumerInfoSourceGenerator.java
URL: http://svn.apache.org/viewvc/activemq/activemq-cpp/trunk/activemq-cpp-openwire-generator/src/main/java/org/apache/activemq/openwire/tool/commands/ConsumerInfoSourceGenerator.java?rev=903734&view=auto
==============================================================================
--- activemq/activemq-cpp/trunk/activemq-cpp-openwire-generator/src/main/java/org/apache/activemq/openwire/tool/commands/ConsumerInfoSourceGenerator.java (added)
+++ activemq/activemq-cpp/trunk/activemq-cpp-openwire-generator/src/main/java/org/apache/activemq/openwire/tool/commands/ConsumerInfoSourceGenerator.java Wed Jan 27 16:53:49 2010
@@ -0,0 +1,35 @@
+/**
+ * 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;
+
+public class ConsumerInfoSourceGenerator extends CommandSourceGenerator {
+
+    protected void generateAdditionalMethods( PrintWriter out ) {
+        out.println("////////////////////////////////////////////////////////////////////////////////");
+        out.println("Pointer<RemoveInfo> ConsumerInfo::createRemoveCommand() const {");
+        out.println("    Pointer<RemoveInfo> info( new RemoveInfo() );");
+        out.println("    info->setResponseRequired( this->isResponseRequired() );");
+        out.println("    info->setObjectId( this->getConsumerId() );");
+        out.println("    return info;");
+        out.println("}");
+        out.println("");
+
+        super.generateAdditionalMethods(out);
+    }
+}

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

Added: activemq/activemq-cpp/trunk/activemq-cpp-openwire-generator/src/main/java/org/apache/activemq/openwire/tool/commands/ProducerInfoHeaderGenerator.java
URL: http://svn.apache.org/viewvc/activemq/activemq-cpp/trunk/activemq-cpp-openwire-generator/src/main/java/org/apache/activemq/openwire/tool/commands/ProducerInfoHeaderGenerator.java?rev=903734&view=auto
==============================================================================
--- activemq/activemq-cpp/trunk/activemq-cpp-openwire-generator/src/main/java/org/apache/activemq/openwire/tool/commands/ProducerInfoHeaderGenerator.java (added)
+++ activemq/activemq-cpp/trunk/activemq-cpp-openwire-generator/src/main/java/org/apache/activemq/openwire/tool/commands/ProducerInfoHeaderGenerator.java Wed Jan 27 16:53:49 2010
@@ -0,0 +1,38 @@
+/**
+ * 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 ProducerInfoHeaderGenerator extends CommandHeaderGenerator {
+
+    protected void populateIncludeFilesSet() {
+
+        Set<String> includes = getIncludeFiles();
+        includes.add("<activemq/commands/RemoveInfo.h>");
+
+        super.populateIncludeFilesSet();
+    }
+
+    protected void generateAdditonalMembers( PrintWriter out ) {
+        out.println("        Pointer<RemoveInfo> createRemoveCommand() const;");
+        out.println("");
+
+        super.generateAdditonalMembers( out );
+    }
+}

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

Added: activemq/activemq-cpp/trunk/activemq-cpp-openwire-generator/src/main/java/org/apache/activemq/openwire/tool/commands/ProducerInfoSourceGenerator.java
URL: http://svn.apache.org/viewvc/activemq/activemq-cpp/trunk/activemq-cpp-openwire-generator/src/main/java/org/apache/activemq/openwire/tool/commands/ProducerInfoSourceGenerator.java?rev=903734&view=auto
==============================================================================
--- activemq/activemq-cpp/trunk/activemq-cpp-openwire-generator/src/main/java/org/apache/activemq/openwire/tool/commands/ProducerInfoSourceGenerator.java (added)
+++ activemq/activemq-cpp/trunk/activemq-cpp-openwire-generator/src/main/java/org/apache/activemq/openwire/tool/commands/ProducerInfoSourceGenerator.java Wed Jan 27 16:53:49 2010
@@ -0,0 +1,35 @@
+/**
+ * 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;
+
+public class ProducerInfoSourceGenerator extends CommandSourceGenerator {
+
+    protected void generateAdditionalMethods( PrintWriter out ) {
+        out.println("////////////////////////////////////////////////////////////////////////////////");
+        out.println("Pointer<RemoveInfo> ProducerInfo::createRemoveCommand() const {");
+        out.println("    Pointer<RemoveInfo> info( new RemoveInfo() );");
+        out.println("    info->setResponseRequired( this->isResponseRequired() );");
+        out.println("    info->setObjectId( this->getProducerId() );");
+        out.println("    return info;");
+        out.println("}");
+        out.println("");
+
+        super.generateAdditionalMethods(out);
+    }
+}

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

Modified: activemq/activemq-cpp/trunk/activemq-cpp-openwire-generator/src/main/java/org/apache/activemq/openwire/tool/commands/SessionInfoHeaderGenerator.java
URL: http://svn.apache.org/viewvc/activemq/activemq-cpp/trunk/activemq-cpp-openwire-generator/src/main/java/org/apache/activemq/openwire/tool/commands/SessionInfoHeaderGenerator.java?rev=903734&r1=903733&r2=903734&view=diff
==============================================================================
--- activemq/activemq-cpp/trunk/activemq-cpp-openwire-generator/src/main/java/org/apache/activemq/openwire/tool/commands/SessionInfoHeaderGenerator.java (original)
+++ activemq/activemq-cpp/trunk/activemq-cpp-openwire-generator/src/main/java/org/apache/activemq/openwire/tool/commands/SessionInfoHeaderGenerator.java Wed Jan 27 16:53:49 2010
@@ -17,9 +17,18 @@
 package org.apache.activemq.openwire.tool.commands;
 
 import java.io.PrintWriter;
+import java.util.Set;
 
 public class SessionInfoHeaderGenerator extends CommandHeaderGenerator {
 
+    protected void populateIncludeFilesSet() {
+
+        Set<String> includes = getIncludeFiles();
+        includes.add("<activemq/commands/RemoveInfo.h>");
+
+        super.populateIncludeFilesSet();
+    }
+
     protected void generateProperties( PrintWriter out ) {
 
         out.println("    private:");
@@ -40,6 +49,8 @@
         out.println("            this->ackMode = mode;");
         out.println("        }");
         out.println("");
+        out.println("        Pointer<RemoveInfo> createRemoveCommand() const;");
+        out.println("");
 
         super.generateAdditonalMembers( out );
     }

Modified: activemq/activemq-cpp/trunk/activemq-cpp-openwire-generator/src/main/java/org/apache/activemq/openwire/tool/commands/SessionInfoSourceGenerator.java
URL: http://svn.apache.org/viewvc/activemq/activemq-cpp/trunk/activemq-cpp-openwire-generator/src/main/java/org/apache/activemq/openwire/tool/commands/SessionInfoSourceGenerator.java?rev=903734&r1=903733&r2=903734&view=diff
==============================================================================
--- activemq/activemq-cpp/trunk/activemq-cpp-openwire-generator/src/main/java/org/apache/activemq/openwire/tool/commands/SessionInfoSourceGenerator.java (original)
+++ activemq/activemq-cpp/trunk/activemq-cpp-openwire-generator/src/main/java/org/apache/activemq/openwire/tool/commands/SessionInfoSourceGenerator.java Wed Jan 27 16:53:49 2010
@@ -34,4 +34,17 @@
         out.println( "    this->ackMode = (unsigned int)cms::Session::AUTO_ACKNOWLEDGE;" );
         super.generateDefaultConstructorBody(out);
     }
+
+    protected void generateAdditionalMethods( PrintWriter out ) {
+        out.println("////////////////////////////////////////////////////////////////////////////////");
+        out.println("Pointer<RemoveInfo> SessionInfo::createRemoveCommand() const {");
+        out.println("    Pointer<RemoveInfo> info( new RemoveInfo() );");
+        out.println("    info->setResponseRequired( this->isResponseRequired() );");
+        out.println("    info->setObjectId( this->getSessionId() );");
+        out.println("    return info;");
+        out.println("}");
+        out.println("");
+
+        super.generateAdditionalMethods(out);
+    }
 }