class

Bindgen::Processor::Inheritance::DiscoverCrystalBody

Inherits Bindgen::Call::Body < Reference < Object

Crystal body of the Graph::Class::DISCOVER_METHOD of a class, see #add_discovery_method: returns the Crystal object which constructed the object, see BindgenHelper.crystal_object, if it is one of the class. Else, with a binding fun_name, calls it and wraps the pointer it returns in the class it numbers, one of descendants, or in the class itself.

Constructors

new(db : TypeDatabase, fun_name : String | Nil, klass : Graph::Class, descendants : Array(Graph::Class))
Source

Instance methods

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

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

Source