Sha256: cf7f6c7dd30b9294a88964cbd86ded2ec68b25d0c7d0622968c0f2afec884973

Contents?: true

Size: 467 Bytes

Versions: 2

Compression:

Stored size: 467 Bytes

Contents

module RbPlusPlus
  module Builders

    # Wrap class constructor(s)
    class ConstructorNode < Base

      def build
        add_child IncludeNode.new(self, "rice/Constructor.hpp", :system)
      end

      def write
        args = [code.parent.qualified_name, code.arguments.map {|a| a.cpp_type.to_cpp }].flatten.compact
        registrations << "#{parent.rice_variable}.define_constructor(Rice::Constructor< #{args.join(",")} >());"
      end

    end

  end
end

Version data entries

2 entries across 2 versions & 1 rubygems

Version Path
rbplusplus-0.9.1 lib/rbplusplus/builders/constructor.rb
rbplusplus-0.9 lib/rbplusplus/builders/constructor.rb