summaryrefslogtreecommitdiff
path: root/cpp/rubygen/cppgen.rb
diff options
context:
space:
mode:
Diffstat (limited to 'cpp/rubygen/cppgen.rb')
-rwxr-xr-xcpp/rubygen/cppgen.rb7
1 files changed, 7 insertions, 0 deletions
diff --git a/cpp/rubygen/cppgen.rb b/cpp/rubygen/cppgen.rb
index c09ed66b29..17805e679b 100755
--- a/cpp/rubygen/cppgen.rb
+++ b/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