summaryrefslogtreecommitdiff
path: root/qpid/cpp/rubygen/99-0/frame_body_lists.rb
blob: b20e4550f3c9957f093e390ab984e92fa35e0683 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
$: << ".."                      # Include .. in load path
require 'cppgen'

class FrameBodyListsGen < CppGen
    
  def initialize(outdir, amqp) 
    super(outdir, amqp); 
  end

  def generate
    h_file("qpid/framing/frame_body_lists.h") {
      gen <<EOS
/**@file
 * Macro lists of frame body classes, used to generate Visitors
 */
EOS
      gen "#define METHOD_BODIES() "
      @amqp.methods_.each { |m| gen "\\\n    (#{m.body_name}) " }
      gen <<EOS


#define OTHER_BODIES() (AMQContentBody)(AMQHeaderBody)(AMQHeartbeatBody))

EOS
    }
  end
end

FrameBodyListsGen.new(ARGV[0], $amqp).generate;