From d76d198de3b99feaf814986d1a0af6bfdad52b58 Mon Sep 17 00:00:00 2001 From: Alan Conway Date: Thu, 3 Jul 2008 16:02:03 +0000 Subject: 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 --- qpid/cpp/rubygen/cppgen.rb | 7 +++++++ 1 file changed, 7 insertions(+) (limited to 'qpid/cpp/rubygen/cppgen.rb') 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 -- cgit v1.2.1