Sha256: f4587f10d605227eb29f20e7bfdd309a2b0c178f836ed7c83bf460be3ccc6eef

Contents?: true

Size: 469 Bytes

Versions: 8

Compression:

Stored size: 469 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 << "\t#{parent.rice_variable}.define_constructor(Rice::Constructor< #{args.join(",")} >());"
      end

    end

  end
end

Version data entries

8 entries across 8 versions & 1 rubygems

Version Path
rbplusplus-1.4.0 lib/rbplusplus/builders/constructor.rb
rbplusplus-1.3.0 lib/rbplusplus/builders/constructor.rb
rbplusplus-1.2.1 lib/rbplusplus/builders/constructor.rb
rbplusplus-1.2.0 lib/rbplusplus/builders/constructor.rb
rbplusplus-1.1.0 lib/rbplusplus/builders/constructor.rb
rbplusplus-1.0.3 lib/rbplusplus/builders/constructor.rb
rbplusplus-1.0.1 lib/rbplusplus/builders/constructor.rb
rbplusplus-1.0 lib/rbplusplus/builders/constructor.rb