class Bindgen::Processor::Inheritance

Overview

Processor wrapping single- and multiple-inheritance.

Only non-private wrapped classes are possible candidates for this. Of all candidates, the first one is chosen as parent class in Crystal. All others get a #as_X() : X casting method.

Take this C++ class: class Foo : public Bar, public Baz If both Bar and Baz are wrapped, the resulting Crystal wrapper will look like this:

class Foo < Bar # First one is inherited
  def as_baz : Baz
    ...
  end # Later ones converted
end

Defined in:

bindgen/processor/inheritance.cr

Instance Method Summary

Instance methods inherited from class Bindgen::Processor::Base

process(graph : Graph::Container, doc : Parser::Document) process

Constructor methods inherited from class Bindgen::Processor::Base

new(config : Configuration, db : TypeDatabase) new

Instance methods inherited from module Bindgen::Graph::Visitor

visit_alias(alias_name) visit_alias, visit_children(container : Container) visit_children, visit_class(klass) visit_class, visit_constant(constant) visit_constant, visit_enum(enumeration) visit_enum, visit_library(library) visit_library, visit_method(method) visit_method, visit_namespace(ns) visit_namespace, visit_node(node : Node) visit_node, visit_node?(node : Node) visit_node?, visit_platform_specific(specific) visit_platform_specific, visit_struct(structure) visit_struct

Instance Method Detail

def visit_class(klass : Graph::Class) #

[View source]