activemq-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From jstrac...@apache.org
Subject svn commit: r380181 - /incubator/activemq/trunk/activemq-core/src/gram/java/org/apache/activemq/openwire/tool/OpenWireCSharpMarshallingScript.java
Date Thu, 23 Feb 2006 18:13:12 GMT
Author: jstrachan
Date: Thu Feb 23 10:13:09 2006
New Revision: 380181

URL: http://svn.apache.org/viewcvs?rev=380181&view=rev
Log:
migrated the code generator to the latest .Net code

Modified:
    incubator/activemq/trunk/activemq-core/src/gram/java/org/apache/activemq/openwire/tool/OpenWireCSharpMarshallingScript.java

Modified: incubator/activemq/trunk/activemq-core/src/gram/java/org/apache/activemq/openwire/tool/OpenWireCSharpMarshallingScript.java
URL: http://svn.apache.org/viewcvs/incubator/activemq/trunk/activemq-core/src/gram/java/org/apache/activemq/openwire/tool/OpenWireCSharpMarshallingScript.java?rev=380181&r1=380180&r2=380181&view=diff
==============================================================================
--- incubator/activemq/trunk/activemq-core/src/gram/java/org/apache/activemq/openwire/tool/OpenWireCSharpMarshallingScript.java
(original)
+++ incubator/activemq/trunk/activemq-core/src/gram/java/org/apache/activemq/openwire/tool/OpenWireCSharpMarshallingScript.java
Thu Feb 23 10:13:09 2006
@@ -49,16 +49,16 @@
             out.println("info." + propertyName + " = bs.ReadBoolean();");
         }
         else if (type.equals("byte")) {
-            out.println("info." + propertyName + " = dataIn.ReadByte();");
+            out.println("info." + propertyName + " = DataStreamMarshaller.ReadByte(dataIn);");
         }
         else if (type.equals("char")) {
-            out.println("info." + propertyName + " = dataIn.ReadChar();");
+            out.println("info." + propertyName + " = DataStreamMarshaller.ReadChar(dataIn);");
         }
         else if (type.equals("short")) {
-            out.println("info." + propertyName + " = dataIn.ReadInt16();");
+            out.println("info." + propertyName + " = DataStreamMarshaller.ReadShort(dataIn);");
         }
         else if (type.equals("int")) {
-            out.println("info." + propertyName + " = dataIn.ReadInt32();");
+            out.println("info." + propertyName + " = DataStreamMarshaller.ReadInt(dataIn);");
         }
         else if (type.equals("long")) {
             out.println("info." + propertyName + " = UnmarshalLong(wireFormat, dataIn, bs);");
@@ -101,7 +101,7 @@
         }
         else {
             out.println("        if (bs.ReadBoolean()) {");
-            out.println("            short size = dataIn.ReadInt16();");
+            out.println("            short size = DataStreamMarshaller.ReadShort(dataIn);");
             out.println("            " + arrayType + "[] value = new " + arrayType + "[size];");
             out.println("            for( int i=0; i < size; i++ ) {");
             out.println("                value[i] = (" + arrayType + ") UnmarshalNestedObject(wireFormat,dataIn,
bs);");
@@ -194,16 +194,16 @@
                 out.println("bs.ReadBoolean();");
             }
             else if (type.equals("byte")) {
-                out.println("dataOut.Write((byte) " + getter + ");");
+                out.println("DataStreamMarshaller.WriteByte(" + getter + ", dataOut);");
             }
             else if (type.equals("char")) {
-                out.println("dataOut.Write((char) " + getter + ");");
+                out.println("DataStreamMarshaller.WriteChar(" + getter + ", dataOut);");
             }
             else if (type.equals("short")) {
-                out.println("dataOut.Write((short)" + getter + ");");
+                out.println("DataStreamMarshaller.WriteShort(" + getter + ", dataOut);");
             }
             else if (type.equals("int")) {
-                out.println("dataOut.Write((int) " + getter + ");");
+                out.println("DataStreamMarshaller.WriteInt(" + getter + ", dataOut);");
             }
             else if (type.equals("long")) {
                 out.println("Marshal2Long(wireFormat, " + getter + ", dataOut, bs);");
@@ -217,7 +217,7 @@
                 }
                 else {
                     out.println("if(bs.ReadBoolean()) {");
-                    out.println("           dataOut.Write((int)" + getter + ".Length);");
+                    out.println("           DataStreamMarshaller.WriteInt(" + getter + ".Length,
dataOut);");
                     out.println("           dataOut.Write(" + getter + ");");
                     out.println("        }");
                 }



Mime
View raw message