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 2009/11/12 18:05:59 UTC
svn commit: r835447 - in
/activemq/activemq-cpp/trunk/activemq-cpp-openwire-generator/src/main/java/org/apache/activemq/openwire/tool/commands:
MessageHeaderGenerator.java MessageSourceGenerator.java
Author: tabish
Date: Thu Nov 12 17:05:59 2009
New Revision: 835447
URL: http://svn.apache.org/viewvc?rev=835447&view=rev
Log:
Update the Message class generated code to make the AckHandler a Pointer type.
Modified:
activemq/activemq-cpp/trunk/activemq-cpp-openwire-generator/src/main/java/org/apache/activemq/openwire/tool/commands/MessageHeaderGenerator.java
activemq/activemq-cpp/trunk/activemq-cpp-openwire-generator/src/main/java/org/apache/activemq/openwire/tool/commands/MessageSourceGenerator.java
Modified: activemq/activemq-cpp/trunk/activemq-cpp-openwire-generator/src/main/java/org/apache/activemq/openwire/tool/commands/MessageHeaderGenerator.java
URL: http://svn.apache.org/viewvc/activemq/activemq-cpp/trunk/activemq-cpp-openwire-generator/src/main/java/org/apache/activemq/openwire/tool/commands/MessageHeaderGenerator.java?rev=835447&r1=835446&r2=835447&view=diff
==============================================================================
--- activemq/activemq-cpp/trunk/activemq-cpp-openwire-generator/src/main/java/org/apache/activemq/openwire/tool/commands/MessageHeaderGenerator.java (original)
+++ activemq/activemq-cpp/trunk/activemq-cpp-openwire-generator/src/main/java/org/apache/activemq/openwire/tool/commands/MessageHeaderGenerator.java Thu Nov 12 17:05:59 2009
@@ -27,6 +27,7 @@
Set<String> includes = getIncludeFiles();
includes.add("<activemq/util/PrimitiveMap.h>");
+ includes.add("<activemq/core/ActiveMQAckHandler.h>");
}
protected void generateNamespaceWrapper( PrintWriter out ) {
@@ -44,7 +45,7 @@
out.println("");
out.println(" // Used to allow a client to call Message::acknowledge when in the Client");
out.println(" // Ack mode.");
- out.println(" core::ActiveMQAckHandler* ackHandler;");
+ out.println(" Pointer<core::ActiveMQAckHandler> ackHandler;");
out.println("");
out.println(" // Message properties, these are Marshaled and Unmarshaled from the Message");
out.println(" // Command's marshaledProperties vector.");
@@ -99,7 +100,7 @@
out.println(" * when the Acknowledge method is called.");
out.println(" * @param handler ActiveMQAckHandler to call");
out.println(" */");
- out.println(" virtual void setAckHandler( core::ActiveMQAckHandler* handler ) {");
+ out.println(" virtual void setAckHandler( const Pointer<core::ActiveMQAckHandler>& handler ) {");
out.println(" this->ackHandler = handler;");
out.println(" }");
out.println("");
@@ -108,7 +109,7 @@
out.println(" * when the Acknowledge method is called.");
out.println(" * @returns handler ActiveMQAckHandler to call or NULL if not set");
out.println(" */");
- out.println(" virtual core::ActiveMQAckHandler* getAckHandler() const {");
+ out.println(" virtual Pointer<core::ActiveMQAckHandler> getAckHandler() const {");
out.println(" return this->ackHandler;");
out.println(" }");
out.println("");
Modified: activemq/activemq-cpp/trunk/activemq-cpp-openwire-generator/src/main/java/org/apache/activemq/openwire/tool/commands/MessageSourceGenerator.java
URL: http://svn.apache.org/viewvc/activemq/activemq-cpp/trunk/activemq-cpp-openwire-generator/src/main/java/org/apache/activemq/openwire/tool/commands/MessageSourceGenerator.java?rev=835447&r1=835446&r2=835447&view=diff
==============================================================================
--- activemq/activemq-cpp/trunk/activemq-cpp-openwire-generator/src/main/java/org/apache/activemq/openwire/tool/commands/MessageSourceGenerator.java (original)
+++ activemq/activemq-cpp/trunk/activemq-cpp-openwire-generator/src/main/java/org/apache/activemq/openwire/tool/commands/MessageSourceGenerator.java Thu Nov 12 17:05:59 2009
@@ -31,7 +31,6 @@
protected void generateDefaultConstructorBody( PrintWriter out ) {
- out.println(" this->ackHandler = NULL;");
out.println(" this->readOnlyBody = false;");
out.println(" this->readOnlyProperties = false;");
@@ -50,7 +49,7 @@
protected void generateToStringBody( PrintWriter out ) {
super.generateToStringBody(out);
- out.println(" stream << \" Value of ackHandler = \" << ackHandler << std::endl;");
+ out.println(" stream << \" Value of ackHandler = \" << ackHandler.get() << std::endl;");
out.println(" stream << \" Value of properties = \" << this->properties.toString() << std::endl;");
out.println(" stream << \" Value of readOnlyBody = \" << this->readOnlyBody << std::endl;");
out.println(" stream << \" Value of readOnlyProperties = \" << this->readOnlyBody << std::endl;");