struct Bindgen::Crystal::Pass

Overview

Methods for passing data from Crystal and Crystal bindings to C++.

This is a helper struct: Cheap to create and to pass around.

Included Modules

Defined in:

bindgen/crystal/pass.cr

Constructors

Instance Method Summary

Instance methods inherited from module Bindgen::TypeHelper

is_type_copied?(type) : Bool is_type_copied?, passthrough(type : Parser::Type) passthrough, reconfigure_pass_type(pass_by, is_ref, ptr) reconfigure_pass_type, type_pointer_depth(type : Parser::Type) : Int32 type_pointer_depth, variadic_argument : Call::VariadicArgument variadic_argument

Constructor Detail

def self.new(db : TypeDatabase) #

[View source]

Instance Method Detail

def arguments_to_binding(list : Enumerable(Parser::Argument)) #

Turns the list of arguments into a list of Call::Arguments.


[View source]
def arguments_to_wrapper(list : Enumerable(Parser::Argument)) #

Turns the list of arguments into a list of Call::Arguments.


[View source]
def from(type : Parser::Type, is_constructor = false, &) : Call::Result #

[View source]
def from_binding(type : Parser::Type, qualified = false, is_constructor = false) : Call::Result #

Computes a result for passing type from C++ to Crystal.

If qualified is true, the type is assumed to be used outside the lib Binding, and will be qualified if required.


[View source]
def from_wrapper(type : Parser::Type, is_constructor = false) : Call::Result #

Computes a result for passing type from the wrapper to the user.


[View source]
def to(type : Parser::Type, &) : Call::Result #

[View source]
def to_binding(type : Parser::Type, to_unsafe = false, qualified = false) : Call::Result #

Computes a result for passing type from Crystal to C++. If to_unsafe is true, and the type is not built-in, the result will be wrapped in a call to to_unsafe - Except if a user-defined conversion is set.


[View source]
def to_wrapper(type : Parser::Type) : Call::Result #

Computes a result for passing type to the wrapper.


[View source]