You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@activemq.apache.org by js...@apache.org on 2006/01/06 20:18:05 UTC

svn commit: r366551 - /incubator/activemq/trunk/activemq-core/src/gram/script/GenerateCSharpMarshalling.groovy

Author: jstrachan
Date: Fri Jan  6 11:18:02 2006
New Revision: 366551

URL: http://svn.apache.org/viewcvs?rev=366551&view=rev
Log:
use helper methods to read the primitive nested types like BrokerId

Modified:
    incubator/activemq/trunk/activemq-core/src/gram/script/GenerateCSharpMarshalling.groovy

Modified: incubator/activemq/trunk/activemq-core/src/gram/script/GenerateCSharpMarshalling.groovy
URL: http://svn.apache.org/viewcvs/incubator/activemq/trunk/activemq-core/src/gram/script/GenerateCSharpMarshalling.groovy?rev=366551&r1=366550&r2=366551&view=diff
==============================================================================
--- incubator/activemq/trunk/activemq-core/src/gram/script/GenerateCSharpMarshalling.groovy (original)
+++ incubator/activemq/trunk/activemq-core/src/gram/script/GenerateCSharpMarshalling.groovy Fri Jan  6 11:18:02 2006
@@ -106,16 +106,12 @@
                     }
                     out << "            info.${propertyName} = "
 
-                    type = property.type.qualifiedName
+                    type = property.type.simpleName
                     switch (type) {
-                        case "java.lang.String":
+                        case "String":
                             out << "dataIn.ReadString()"
                             break;
 
-                        case "org.apache.activemq.command.ActiveMQDestination":
-                            out << "ReadDestination(dataIn)"
-                            break;
-
                         case "boolean":
                             out << "dataIn.ReadBoolean()"
                             break;
@@ -147,9 +143,17 @@
                         case "double":
                             out << "dataIn.ReadDouble()"
                             break;
+                            
+                        case "ActiveMQDestination":
+                            out << "ReadDestination(dataIn)"
+                            break;
+
+                        case "BrokerId[]":
+                            out << "ReadBrokerIds(dataIn)"
+                            break;
 
                         default:
-                            out << "(${property.type.simpleName}) ReadCommand(dataIn, \"${type}\")"
+                            out << "Read${type}(dataIn)"
                     }
                     out << """;
 """
@@ -176,16 +180,12 @@
                     def getter = "info." + propertyName
                     out << "            "
 
-                    type = property.type.qualifiedName
+                    type = property.type.simpleName
                     switch (type) {
-                        case "java.lang.String":
+                        case "String":
                             out << "dataOut.Write($getter);"
                             break;
 
-                        case "org.apache.activemq.command.ActiveMQDestination":
-                            out << "WriteDestination($getter, dataOut);"
-                            break;
-
                         case "boolean":
                             out << "dataOut.Write($getter);"
                             break;
@@ -218,8 +218,16 @@
                             out << "dataOut.Write($getter);"
                             break;
 
+                        case "ActiveMQDestination":
+                            out << "WriteDestination($getter, dataOut);"
+                            break;
+
+                        case "BrokerId[]":
+                            out << "dataOut.WriteBrokerIds($getter);"
+                            break;
+
                         default:
-                            out << "WriteCommand($getter, dataOut, \"${type}\");"
+                            out << "Write${type}($getter, dataOut);"
                     }
                     out << """
 """