activemq-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From tab...@apache.org
Subject svn commit: r882767 - /activemq/activemq-cpp/trunk/activemq-cpp-openwire-generator/src/main/java/org/apache/activemq/openwire/tool/tests/AmqCppTestMarshallingClassesGenerator.java
Date Fri, 20 Nov 2009 23:16:46 GMT
Author: tabish
Date: Fri Nov 20 23:16:46 2009
New Revision: 882767

URL: http://svn.apache.org/viewvc?rev=882767&view=rev
Log:
Update the marshalers test generator to create passing tests again.

Modified:
    activemq/activemq-cpp/trunk/activemq-cpp-openwire-generator/src/main/java/org/apache/activemq/openwire/tool/tests/AmqCppTestMarshallingClassesGenerator.java

Modified: activemq/activemq-cpp/trunk/activemq-cpp-openwire-generator/src/main/java/org/apache/activemq/openwire/tool/tests/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?rev=882767&r1=882766&r2=882767&view=diff
==============================================================================
--- activemq/activemq-cpp/trunk/activemq-cpp-openwire-generator/src/main/java/org/apache/activemq/openwire/tool/tests/AmqCppTestMarshallingClassesGenerator.java
(original)
+++ activemq/activemq-cpp/trunk/activemq-cpp-openwire-generator/src/main/java/org/apache/activemq/openwire/tool/tests/AmqCppTestMarshallingClassesGenerator.java
Fri Nov 20 23:16:46 2009
@@ -42,6 +42,8 @@
 out.println("");
 out.println("#include <activemq/wireformat/openwire/OpenWireFormat.h>");
 out.println("#include <activemq/commands/DataStructure.h>");
+out.println("#include <activemq/commands/MessageId.h>");
+out.println("#include <activemq/commands/ProducerId.h>");
 out.println("#include <activemq/wireformat/openwire/utils/BooleanStream.h>");
 out.println("#include <decaf/io/DataInputStream.h>");
 out.println("#include <decaf/io/DataOutputStream.h>");
@@ -49,6 +51,7 @@
 out.println("#include <decaf/io/ByteArrayOutputStream.h>");
 out.println("#include <decaf/io/ByteArrayInputStream.h>");
 out.println("#include <decaf/util/Properties.h>");
+out.println("#include <decaf/lang/Pointer.h>");
 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");
@@ -96,6 +99,22 @@
 out.println("    "+jclass.getSimpleName()+" outCommand;");
 out.println("    "+jclass.getSimpleName()+" inCommand;");
 out.println("");
+
+    if( jclass.getSimpleName().endsWith("Message") ) {
+
+out.println("    Pointer<ProducerId> producerId( new ProducerId() );");
+out.println("    producerId->setConnectionId( \"ConnectionId\" );");
+out.println("    producerId->setSessionId( 123 );");
+out.println("    producerId->setValue( 42 );");
+out.println("");
+out.println("    Pointer<MessageId> messageId( new MessageId() );");
+out.println("    messageId->setBrokerSequenceId( 1 );");
+out.println("    messageId->setProducerSequenceId( 3 );");
+out.println("    messageId->setProducerId( producerId );");
+out.println("");
+out.println("    outCommand.setMessageId( messageId );");
+out.println("");
+    }
 out.println("    try {");
 out.println("");
 out.println("        // Marshal the dataStructure to a byte array.");
@@ -135,6 +154,22 @@
 out.println("    "+jclass.getSimpleName()+" outCommand;");
 out.println("    "+jclass.getSimpleName()+" inCommand;");
 out.println("");
+
+    if( jclass.getSimpleName().endsWith("Message") ) {
+
+out.println("    Pointer<ProducerId> producerId( new ProducerId() );");
+out.println("    producerId->setConnectionId( \"ConnectionId\" );");
+out.println("    producerId->setSessionId( 123 );");
+out.println("    producerId->setValue( 42 );");
+out.println("");
+out.println("    Pointer<MessageId> messageId( new MessageId() );");
+out.println("    messageId->setBrokerSequenceId( 1 );");
+out.println("    messageId->setProducerSequenceId( 3 );");
+out.println("    messageId->setProducerId( producerId );");
+out.println("");
+out.println("    outCommand.setMessageId( messageId );");
+out.println("");
+    }
 out.println("    try {");
 out.println("");
 out.println("        // Marshal the dataStructure to a byte array.");



Mime
View raw message