activemq-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From tab...@apache.org
Subject svn commit: r790319 - in /activemq/activemq-cpp/trunk/activemq-cpp-openwire-generator/src/main/java/org/apache/activemq/openwire/tool/commands: MessageHeaderGenerator.java MessageSourceGenerator.java
Date Wed, 01 Jul 2009 19:15:38 GMT
Author: tabish
Date: Wed Jul  1 19:15:38 2009
New Revision: 790319

URL: http://svn.apache.org/viewvc?rev=790319&view=rev
Log:
Update for changes to Decaf API in 3.1

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=790319&r1=790318&r2=790319&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
Wed Jul  1 19:15:38 2009
@@ -27,7 +27,6 @@
 
         Set<String> includes = getIncludeFiles();
         includes.add("<activemq/util/PrimitiveMap.h>");
-        includes.add("<decaf/util/Date.h>");
     }
 
     protected void generateNamespaceWrapper( PrintWriter out ) {
@@ -124,14 +123,7 @@
         out.println("         * Expiration time has elapsed.");
         out.println("         * @returns true if message is expired.");
         out.println("         */");
-        out.println("        virtual bool isExpired() const {");
-        out.println("            long long expireTime = this->getExpiration();");
-        out.println("            long long currentTime = decaf::util::Date::getCurrentTimeMilliseconds();");
-        out.println("            if( expireTime > 0 && currentTime > expireTime
) {");
-        out.println("                return true;");
-        out.println("            }");
-        out.println("            return false;");
-        out.println("        }");
+        out.println("        virtual bool isExpired() const;");
         out.println("");
         out.println("        /**");
         out.println("         * Gets a reference to the Message's Properties object, allows
the derived");

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=790319&r1=790318&r2=790319&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
Wed Jul  1 19:15:38 2009
@@ -26,6 +26,7 @@
         Set<String> includes = getIncludeFiles();
         includes.add("<activemq/wireformat/openwire/marshal/BaseDataStreamMarshaller.h>");
         includes.add("<activemq/wireformat/openwire/marshal/PrimitiveTypesMarshaller.h>");
+        includes.add("<decaf/lang/System.h>");
     }
 
     protected void generateDefaultConstructorBody( PrintWriter out ) {
@@ -83,6 +84,17 @@
     protected void generateAdditionalMethods( PrintWriter out ) {
         super.generateAdditionalMethods(out);
 
+        out.println("");
+        out.println("////////////////////////////////////////////////////////////////////////////////");
+        out.println("bool Message::isExpired() const {");
+        out.println("    long long expireTime = this->getExpiration();");
+        out.println("    long long currentTime = decaf::lang::System::currentTimeMillis();");
+        out.println("    if( expireTime > 0 && currentTime > expireTime ) {");
+        out.println("        return true;");
+        out.println("    }");
+        out.println("    return false;");
+        out.println("}");
+        out.println("");
         out.println("////////////////////////////////////////////////////////////////////////////////");
         out.println("unsigned int Message::getSize() const {");
         out.println("");



Mime
View raw message