summaryrefslogtreecommitdiff
path: root/qpid/gentools
diff options
context:
space:
mode:
authorKim van der Riet <kpvdr@apache.org>2006-12-11 15:15:02 +0000
committerKim van der Riet <kpvdr@apache.org>2006-12-11 15:15:02 +0000
commitacb39791df3ee1a510e6a3d4106193d3e395543b (patch)
tree83ed5e6579a968a3e43d31d7e6215333f68c9eb7 /qpid/gentools
parentd7c3d07b662a0e75bd6126646104d5facd917bc2 (diff)
downloadqpid-python-acb39791df3ee1a510e6a3d4106193d3e395543b.tar.gz
Added generation for (yet to be written) Content class which will be a part of the 0-9 AMQP spec.
git-svn-id: https://svn.apache.org/repos/asf/incubator/qpid/trunk@485698 13f79535-47bb-0310-9956-ffa450edef68
Diffstat (limited to 'qpid/gentools')
-rw-r--r--qpid/gentools/src/org/apache/qpid/gentools/CppGenerator.java5
-rw-r--r--qpid/gentools/src/org/apache/qpid/gentools/JavaGenerator.java5
2 files changed, 10 insertions, 0 deletions
diff --git a/qpid/gentools/src/org/apache/qpid/gentools/CppGenerator.java b/qpid/gentools/src/org/apache/qpid/gentools/CppGenerator.java
index cf97e01877..0963f39883 100644
--- a/qpid/gentools/src/org/apache/qpid/gentools/CppGenerator.java
+++ b/qpid/gentools/src/org/apache/qpid/gentools/CppGenerator.java
@@ -94,6 +94,11 @@ public class CppGenerator extends Generator
"~", // size
"", // encodeExpression
"")); // decodeExpression
+ typeMap.put("content", new DomainInfo(
+ "Content", // type
+ "#.size()", // size
+ "buffer.putContent(#)", // encodeExpression
+ "buffer.getContent(#)")); // decodeExpression
typeMap.put("long", new DomainInfo(
"u_int32_t", // type
"4", // size
diff --git a/qpid/gentools/src/org/apache/qpid/gentools/JavaGenerator.java b/qpid/gentools/src/org/apache/qpid/gentools/JavaGenerator.java
index c465677bff..1067e385c4 100644
--- a/qpid/gentools/src/org/apache/qpid/gentools/JavaGenerator.java
+++ b/qpid/gentools/src/org/apache/qpid/gentools/JavaGenerator.java
@@ -285,6 +285,11 @@ public class JavaGenerator extends Generator
"~", // size
"EncodingUtils.writeBooleans(buffer, #)", // encode expression
"# = EncodingUtils.readBooleans(buffer)")); // decode expression
+ typeMap.put("content", new DomainInfo(
+ "Content", // Java code type
+ "EncodingUtils.encodedContentLength(#)", // size
+ "EncodingUtils.writeContentBytes(buffer, #)", // encode expression
+ "# = EncodingUtils.readContent(buffer)")); // decode expression
typeMap.put("long", new DomainInfo(
"long", // Java code type
"4", // size