abstract class Bindgen::CallBuilder::CrystalWrapper::Body

Direct Known Subclasses

Defined in:

bindgen/call_builder/crystal_wrapper.cr

Constructors

Instance Method Summary

Instance methods inherited from class Bindgen::Call::HookableBody

add_post_hook(hook : Body) : Nil add_post_hook, post_hook : Body | Nil post_hook, post_hook=(post_hook : Body | Nil) post_hook=, post_hook?(type : T.class) : Bool forall T post_hook?, pre_hook : Body | Nil pre_hook, pre_hook=(pre_hook : Body | Nil) pre_hook=

Instance methods inherited from class Bindgen::Call::Body

to_code(call : Call, platform : Graph::Platform) : String to_code

Constructor Detail

def self.new(db : TypeDatabase, target : Call) #

[View source]

Instance Method Detail

abstract def encapsulate(call, code) #

Generates the call itself.


[View source]
def encapsulate_into_variable(call, code) #

[View source]
def super_forwarder=(super_forwarder : Bool) #

Does the method forward to #superclass on an instance of a Crystal subclass? Set by Processor::VirtualOverride for the virtual methods with a Superclass forwarder: a Crystal subclass, which the BindgenWrapper annotation of the generated classes tells apart, reaches the wrapper method by super, or by not overriding it, so Crystal's dispatch ran its overrides already. Calling the C++ implementation under the shadow class then, instead of the virtual method, doesn't re-enter the override: super works.


[View source]
def super_forwarder? : Bool #

Does the method forward to #superclass on an instance of a Crystal subclass? Set by Processor::VirtualOverride for the virtual methods with a Superclass forwarder: a Crystal subclass, which the BindgenWrapper annotation of the generated classes tells apart, reaches the wrapper method by super, or by not overriding it, so Crystal's dispatch ran its overrides already. Calling the C++ implementation under the shadow class then, instead of the virtual method, doesn't re-enter the override: super works.


[View source]
def to_code(call : Call, platform : Graph::Platform) : String #
Description copied from class Bindgen::Call::Body

Will be called by a Generator later on, passing in the call and the target platform.


[View source]