From d47950ff7a88e4684d1e07e334e705776ed569a7 Mon Sep 17 00:00:00 2001 From: Gordon Sim Date: Tue, 4 Mar 2008 20:42:19 +0000 Subject: Further updates to support final 0-10 spec git-svn-id: https://svn.apache.org/repos/asf/incubator/qpid/trunk/qpid@633627 13f79535-47bb-0310-9956-ffa450edef68 --- cpp/rubygen/99-0/Session.rb | 4 ++-- cpp/rubygen/99-0/structs.rb | 11 ++++++----- 2 files changed, 8 insertions(+), 7 deletions(-) (limited to 'cpp/rubygen') diff --git a/cpp/rubygen/99-0/Session.rb b/cpp/rubygen/99-0/Session.rb index 5a6f061937..1ec78f6167 100644 --- a/cpp/rubygen/99-0/Session.rb +++ b/cpp/rubygen/99-0/Session.rb @@ -6,9 +6,9 @@ require 'cppgen' class CppGen def session_methods - excludes = ["channel", "connection", "session", "execution", "connection010", "session010"] + excludes = ["channel", "connection", "session", "execution"] gen_methods=@amqp.methods_on(@chassis).reject { |m| - excludes.include? m.parent.name + excludes.include? m.parent.name or m.body_name.include?("010") } end diff --git a/cpp/rubygen/99-0/structs.rb b/cpp/rubygen/99-0/structs.rb index 4052befa2b..398ca660dd 100644 --- a/cpp/rubygen/99-0/structs.rb +++ b/cpp/rubygen/99-0/structs.rb @@ -39,7 +39,8 @@ class StructGen < CppGen end def execution_header?(s) - false and s.kind_of? AmqpMethod and s.parent.l4? + #false and s.kind_of? AmqpMethod and s.parent.l4? + s.kind_of? AmqpMethod and s.parent.name.include?("010") and not s.parent.control? end def has_bitfields_only(s) @@ -453,7 +454,7 @@ void #{classname}::encodeStructBody(Buffer& #{buffer}) const { EOS if (execution_header?(s)) - genl "ModelMethod::encode(buffer);" + genl "encodeHeader(buffer);" end if (is_packed(s)) @@ -473,7 +474,7 @@ EOS genl "buffer.put#{s.size.caps}(bodySize() + 2/*typecode*/);" if s.size genl "buffer.putShort(TYPE);" else - genl "buffer.put#{s.size.caps}(size());" if s.size + genl "buffer.put#{s.size.caps}(bodySize());" if s.size end end genl "encodeStructBody(buffer);" @@ -485,7 +486,7 @@ void #{classname}::decodeStructBody(Buffer& #{buffer}, uint32_t /*size*/) { EOS if (execution_header?(s)) - genl "ModelMethod::decode(buffer);" + genl "decodeHeader(buffer);" end if (is_packed(s)) @@ -514,7 +515,7 @@ uint32_t #{classname}::bodySize() const uint32_t total = 0; EOS if (execution_header?(s)) - genl "total += ModelMethod::size();" + genl "total += headerSize();" end if (is_packed(s)) -- cgit v1.2.1