qpid-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From acon...@apache.org
Subject svn commit: r673725 - in /incubator/qpid/trunk/qpid/cpp/rubygen: cppgen.rb framing.0-10/Session.rb
Date Thu, 03 Jul 2008 16:02:04 GMT
Author: aconway
Date: Thu Jul  3 09:02:03 2008
New Revision: 673725

URL: http://svn.apache.org/viewvc?rev=673725&view=rev
Log:
rubygen: Change default for client API accept-mode parameters to 1.

Modified:
    incubator/qpid/trunk/qpid/cpp/rubygen/cppgen.rb
    incubator/qpid/trunk/qpid/cpp/rubygen/framing.0-10/Session.rb

Modified: incubator/qpid/trunk/qpid/cpp/rubygen/cppgen.rb
URL: http://svn.apache.org/viewvc/incubator/qpid/trunk/qpid/cpp/rubygen/cppgen.rb?rev=673725&r1=673724&r2=673725&view=diff
==============================================================================
--- incubator/qpid/trunk/qpid/cpp/rubygen/cppgen.rb (original)
+++ incubator/qpid/trunk/qpid/cpp/rubygen/cppgen.rb Thu Jul  3 09:02:03 2008
@@ -206,6 +206,13 @@
     /^(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

Modified: incubator/qpid/trunk/qpid/cpp/rubygen/framing.0-10/Session.rb
URL: http://svn.apache.org/viewvc/incubator/qpid/trunk/qpid/cpp/rubygen/framing.0-10/Session.rb?rev=673725&r1=673724&r2=673725&view=diff
==============================================================================
--- incubator/qpid/trunk/qpid/cpp/rubygen/framing.0-10/Session.rb (original)
+++ incubator/qpid/trunk/qpid/cpp/rubygen/framing.0-10/Session.rb Thu Jul  3 09:02:03 2008
@@ -61,8 +61,8 @@
 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



Mime
View raw message