summaryrefslogtreecommitdiff
path: root/qpid/cpp/rubygen
diff options
context:
space:
mode:
authorAlan Conway <aconway@apache.org>2008-07-03 16:02:03 +0000
committerAlan Conway <aconway@apache.org>2008-07-03 16:02:03 +0000
commitd76d198de3b99feaf814986d1a0af6bfdad52b58 (patch)
tree43f764780879dde39da1c430450a9a73f01a481d /qpid/cpp/rubygen
parente8627f39f81d5105c8afd532da48f2f2b98d86d8 (diff)
downloadqpid-python-d76d198de3b99feaf814986d1a0af6bfdad52b58.tar.gz
rubygen: Change default for client API accept-mode parameters to 1.
git-svn-id: https://svn.apache.org/repos/asf/incubator/qpid/trunk@673725 13f79535-47bb-0310-9956-ffa450edef68
Diffstat (limited to 'qpid/cpp/rubygen')
-rwxr-xr-xqpid/cpp/rubygen/cppgen.rb7
-rw-r--r--qpid/cpp/rubygen/framing.0-10/Session.rb4
2 files changed, 9 insertions, 2 deletions
diff --git a/qpid/cpp/rubygen/cppgen.rb b/qpid/cpp/rubygen/cppgen.rb
index c09ed66b29..17805e679b 100755
--- a/qpid/cpp/rubygen/cppgen.rb
+++ b/qpid/cpp/rubygen/cppgen.rb
@@ -206,6 +206,13 @@ class AmqpField
/^(int|uint|char|boolean|bit)/ === type_ ? fqtypename : "const #{fqtypename}&"
end
def param_default() "=#{fqtypename}()" end
+
+ # Default value is normally the C++ default but over-ridden for specific types.
+ def default_value()
+ defval = cpptype.default_value;
+ if type_ == "accept-mode" then defval = "1"; end
+ return defval
+ end
end
class AmqpMethod
diff --git a/qpid/cpp/rubygen/framing.0-10/Session.rb b/qpid/cpp/rubygen/framing.0-10/Session.rb
index d679b1c0bc..9f54ad1675 100644
--- a/qpid/cpp/rubygen/framing.0-10/Session.rb
+++ b/qpid/cpp/rubygen/framing.0-10/Session.rb
@@ -61,8 +61,8 @@ class ContentField # For extra content parameters
end
class AmqpField
- def unpack() "p[arg::#{cppname}|#{cpptype.default_value}]"; end
- def sig_default() signature+"="+cpptype.default_value; end
+ def unpack() "p[arg::#{cppname}|#{default_value}]"; end
+ def sig_default() signature+"="+default_value; end
end
class AmqpMethod