activemq-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From tab...@apache.org
Subject svn commit: r593560 - in /activemq/activemq-cpp/trunk/src/main/java/org/apache/activemq/openwire/tool: AmqCppMarshallingClassesGenerator.java AmqCppMarshallingHeadersGenerator.java
Date Fri, 09 Nov 2007 15:23:56 GMT
Author: tabish
Date: Fri Nov  9 07:23:56 2007
New Revision: 593560

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

Modified:
    activemq/activemq-cpp/trunk/src/main/java/org/apache/activemq/openwire/tool/AmqCppMarshallingClassesGenerator.java
    activemq/activemq-cpp/trunk/src/main/java/org/apache/activemq/openwire/tool/AmqCppMarshallingHeadersGenerator.java

Modified: activemq/activemq-cpp/trunk/src/main/java/org/apache/activemq/openwire/tool/AmqCppMarshallingClassesGenerator.java
URL: http://svn.apache.org/viewvc/activemq/activemq-cpp/trunk/src/main/java/org/apache/activemq/openwire/tool/AmqCppMarshallingClassesGenerator.java?rev=593560&r1=593559&r2=593560&view=diff
==============================================================================
--- activemq/activemq-cpp/trunk/src/main/java/org/apache/activemq/openwire/tool/AmqCppMarshallingClassesGenerator.java
(original)
+++ activemq/activemq-cpp/trunk/src/main/java/org/apache/activemq/openwire/tool/AmqCppMarshallingClassesGenerator.java
Fri Nov  9 07:23:56 2007
@@ -291,12 +291,12 @@
             }
             else if (type.equals("byte[]") || type.equals("ByteSequence")) {
                 if (size != null) {
-                    out.println("        dataOut->write( (const unsigned char*)(&"
+ getter + "[0]), " + size.asInt() + " );");
+                    out.println("        dataOut->write( (const unsigned char*)(&"
+ getter + "[0]), 0, " + size.asInt() + " );");
                 }
                 else {
                     out.println("        if( bs->readBoolean() ) {");
                     out.println("            dataOut->writeInt( (int)" + getter + ".size()
);");
-                    out.println("            dataOut->write( (const unsigned char*)(&"
+ getter + "[0]), (int)" + getter + ".size() );");
+                    out.println("            dataOut->write( (const unsigned char*)(&"
+ getter + "[0]), 0, (int)" + getter + ".size() );");
                     out.println("        }");
                 }
             }
@@ -442,13 +442,13 @@
             }
             else if( type.equals("byte[]") || type.equals("ByteSequence") ) {
                 if(size != null) {
-                    out.println("        dataOut->write( (const unsigned char*)(&"
+ getter + "[0]), (int)" + size.asInt() + " );");
+                    out.println("        dataOut->write( (const unsigned char*)(&"
+ getter + "[0]), 0, (int)" + size.asInt() + " );");
                 }
                 else {
                     out.println("        dataOut->write( " + getter + ".size() != 0 );");
                     out.println("        if( " + getter + ".size() != 0 ) {");
                     out.println("            dataOut->writeInt( (int)" + getter + ".size()
);");
-                    out.println("            dataOut->write( (const unsigned char*)(&"
+ getter + "[0]), (int)" + getter + ".size() );");
+                    out.println("            dataOut->write( (const unsigned char*)(&"
+ getter + "[0]), 0, (int)" + getter + ".size() );");
                     out.println("        }");
                 }
             }
@@ -482,6 +482,7 @@
 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("#include <activemq/exceptions/ActiveMQException.h>");
 out.println("");
 out.println("//");
 out.println("//     NOTE!: This file is autogenerated - do not modify!");
@@ -491,6 +492,7 @@
 out.println("");
 out.println("using namespace std;");
 out.println("using namespace activemq;");
+out.println("using namespace activemq::exceptions;");
 out.println("using namespace activemq::connector;");
 out.println("using namespace activemq::connector::openwire;");
 out.println("using namespace activemq::connector::openwire::commands;");
@@ -575,9 +577,9 @@
 out.println("");
 out.println("        return rc + "+baseSize+";");
 out.println("    }");
-out.println("    AMQ_CATCH_RETHROW( decaf::decaf::io::IOException )" );
-out.println("    AMQ_CATCH_EXCEPTION_CONVERT( exceptions::ActiveMQException, decaf::decaf::io::IOException
)" );
-out.println("    AMQ_CATCHALL_THROW( decaf::decaf::io::IOException )" );
+out.println("    AMQ_CATCH_RETHROW( decaf::io::IOException )" );
+out.println("    AMQ_CATCH_EXCEPTION_CONVERT( exceptions::ActiveMQException, decaf::io::IOException
)" );
+out.println("    AMQ_CATCHALL_THROW( decaf::io::IOException )" );
 out.println("}");
 out.println("");
 out.println("///////////////////////////////////////////////////////////////////////////////");
@@ -651,7 +653,7 @@
 out.println("        info->beforeMarshal( wireFormat );");
     }
 
-out.println("         "+baseClass+"::looseMarshal( wireFormat, dataStructure, dataOut );");
+out.println("        "+baseClass+"::looseMarshal( wireFormat, dataStructure, dataOut );");
 out.println("");
 
     generateLooseMarshalBody(out);

Modified: activemq/activemq-cpp/trunk/src/main/java/org/apache/activemq/openwire/tool/AmqCppMarshallingHeadersGenerator.java
URL: http://svn.apache.org/viewvc/activemq/activemq-cpp/trunk/src/main/java/org/apache/activemq/openwire/tool/AmqCppMarshallingHeadersGenerator.java?rev=593560&r1=593559&r2=593560&view=diff
==============================================================================
--- activemq/activemq-cpp/trunk/src/main/java/org/apache/activemq/openwire/tool/AmqCppMarshallingHeadersGenerator.java
(original)
+++ activemq/activemq-cpp/trunk/src/main/java/org/apache/activemq/openwire/tool/AmqCppMarshallingHeadersGenerator.java
Fri Nov  9 07:23:56 2007
@@ -224,7 +224,7 @@
 out.println("        virtual void tightUnmarshal( OpenWireFormat* wireFormat,");
 out.println("                                     commands::DataStructure* dataStructure,");
 out.println("                                     decaf::io::DataInputStream* dataIn,");
-out.println("                                     utils::BooleanStream* bs ) throw( io::IOException
);");
+out.println("                                     utils::BooleanStream* bs ) throw( decaf::io::IOException
);");
 out.println("");
 out.println("        /**");
 out.println("         * Write the booleans that this object uses to a BooleanStream");
@@ -235,7 +235,7 @@
 out.println("         */");
 out.println("        virtual int tightMarshal1( OpenWireFormat* wireFormat,");
 out.println("                                   commands::DataStructure* dataStructure,");
-out.println("                                   utils::BooleanStream* bs ) throw( io::IOException
);");
+out.println("                                   utils::BooleanStream* bs ) throw( decaf::io::IOException
);");
 out.println("");
 out.println("        /**");
 out.println("         * Write a object instance to data output stream");
@@ -247,7 +247,7 @@
 out.println("        virtual void tightMarshal2( OpenWireFormat* wireFormat,");
 out.println("                                    commands::DataStructure* dataStructure,");
 out.println("                                    decaf::io::DataOutputStream* dataOut,");
-out.println("                                    utils::BooleanStream* bs ) throw( io::IOException
);");
+out.println("                                    utils::BooleanStream* bs ) throw( decaf::io::IOException
);");
 out.println("");
 out.println("        /**");
 out.println("         * Un-marshal an object instance from the data input stream");
@@ -257,7 +257,7 @@
 out.println("         */");
 out.println("        virtual void looseUnmarshal( OpenWireFormat* wireFormat,");
 out.println("                                     commands::DataStructure* dataStructure,");
-out.println("                                     decaf::io::DataInputStream* dataIn ) throw(
io::IOException );");
+out.println("                                     decaf::io::DataInputStream* dataIn ) throw(
decaf::io::IOException );");
 out.println("");
 out.println("        /**");
 out.println("         * Write a object instance to data output stream");
@@ -267,7 +267,7 @@
 out.println("         */");
 out.println("        virtual void looseMarshal( OpenWireFormat* wireFormat,");
 out.println("                                   commands::DataStructure* dataStructure,");
-out.println("                                   decaf::io::DataOutputStream* dataOut ) throw(
io::IOException );");
+out.println("                                   decaf::io::DataOutputStream* dataOut ) throw(
decaf::io::IOException );");
 out.println("");
 out.println("    };");
 out.println("");



Mime
View raw message