summaryrefslogtreecommitdiff
path: root/qpid/cpp/rubygen
diff options
context:
space:
mode:
authorAlan Conway <aconway@apache.org>2007-08-31 20:51:22 +0000
committerAlan Conway <aconway@apache.org>2007-08-31 20:51:22 +0000
commite5a82bf72fb1035163ec3c6dfd97f8b248cd6dd8 (patch)
tree4249c7f2a0d09db8b7c5ca06f51c7d80e0120aa7 /qpid/cpp/rubygen
parent0bc9a47a7c35f8cf67ef0e92cc53c91e66a6deec (diff)
downloadqpid-python-e5a82bf72fb1035163ec3c6dfd97f8b248cd6dd8.tar.gz
* Summary:
- Moved BrokerChannel functionality into Session. - Moved ChannelHandler methods handling into SessionAdapter. - Updated all handlers to use session. (We're still using AMQP channel methods in SessionAdapter) Roles & responsibilities: Session: - represents an _open_ session, may be active or suspended. - ows all session state including handler chains. - attahced to SessionAdapter when active, not when suspended. SessionAdapter: - reprents the association of a channel with a session. - owned by Connection, kept in the session map. - channel open == SessionAdapter.getSessio() != 0 Anything that depends on attachment to a channel, connection or protocol should be in SessionAdpater. Anything that suvives a session suspend belongs in Session. git-svn-id: https://svn.apache.org/repos/asf/incubator/qpid/trunk@571575 13f79535-47bb-0310-9956-ffa450edef68
Diffstat (limited to 'qpid/cpp/rubygen')
-rwxr-xr-xqpid/cpp/rubygen/templates/constants.rb6
1 files changed, 3 insertions, 3 deletions
diff --git a/qpid/cpp/rubygen/templates/constants.rb b/qpid/cpp/rubygen/templates/constants.rb
index 45efb35353..2ef6502772 100755
--- a/qpid/cpp/rubygen/templates/constants.rb
+++ b/qpid/cpp/rubygen/templates/constants.rb
@@ -13,14 +13,13 @@ class ConstantsGen < CppGen
def generate()
h_file("#{@dir}/constants") {
namespace(@namespace) {
- @amqp.constants.each { |c|
- genl "enum { #{c.name.shout} = #{c.value} };"
+ scope("enum AmqpConstant {","};") {
+ genl @amqp.constants.map { |c| "#{c.name.shout}=#{c.value}" }.join(",\n")
}
}
}
h_file("#{@dir}/reply_exceptions") {
- include "constants"
include "qpid/Exception"
namespace(@namespace) {
@amqp.constants.each { |c|
@@ -35,6 +34,7 @@ class ConstantsGen < CppGen
}
}
}
+
end
end