class Bindgen::Processor::Inheritance
- Bindgen::Processor::Inheritance
- Bindgen::Processor::Base
- Reference
- Object
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