class RbPlusPlus::Builders::ImplicitCasterNode

Public Class Methods

new(constructor, parent) click to toggle source
# File lib/rbplusplus/builders/implicit_caster.rb, line 6
def initialize(constructor, parent)
  super(constructor, parent)

  @to = parent.code.qualified_name
  @from = constructor.arguments[0].cpp_type.base_type.qualified_name
end

Public Instance Methods

build() click to toggle source
# File lib/rbplusplus/builders/implicit_caster.rb, line 13
def build
end
write() click to toggle source
# File lib/rbplusplus/builders/implicit_caster.rb, line 16
def write
  if @from != @to
    registrations << "\tRice::define_implicit_cast< #{@from}, #{@to} >();"
  end
end