From 0a6761806f55ad18d65e2c22cd18a08e2ec5a149 Mon Sep 17 00:00:00 2001 From: Gordon Sim Date: Wed, 7 Nov 2007 20:55:35 +0000 Subject: Fix for QPID-639: c++ now includes sizes for all structs (enabled the same in python & java) git-svn-id: https://svn.apache.org/repos/asf/incubator/qpid/trunk/qpid@592895 13f79535-47bb-0310-9956-ffa450edef68 --- cpp/rubygen/templates/structs.rb | 61 +++++++++++++++++++++++++++++++++++----- 1 file changed, 54 insertions(+), 7 deletions(-) (limited to 'cpp/rubygen/templates') diff --git a/cpp/rubygen/templates/structs.rb b/cpp/rubygen/templates/structs.rb index d67a8925c4..edbadb01f6 100644 --- a/cpp/rubygen/templates/structs.rb +++ b/cpp/rubygen/templates/structs.rb @@ -260,7 +260,7 @@ EOS genl "}" end genl "bool #{s.cppname}::has#{f.name.caps}() const { return flags & #{flag_mask(s, i)}; }" - genl "void #{s.cppname}::clear#{f.name.caps}() { flags &= ~#{flag_mask(s, i)}; }" + genl "void #{s.cppname}::clear#{f.name.caps}Flag() { flags &= ~#{flag_mask(s, i)}; }" end genl "" end @@ -275,9 +275,11 @@ EOS if (f.cpptype.name == "FieldTable") genl "#{f.cpptype.name}& get#{f.name.caps}();" end - #extra 'accessors' for packed fields: - genl "bool has#{f.name.caps}() const;"; - genl "void clear#{f.name.caps}();"; + if (f.domain.type_ != "bit") + #extra 'accessors' for packed fields: + genl "bool has#{f.name.caps}() const;" + genl "void clear#{f.name.caps}Flag();" + end end def define_accessors(f) @@ -370,7 +372,10 @@ EOS gen <