class Bindgen::Call::OutArgument

Overview

An out argument, see Parser::Method#out_arguments: the caller passes a pointer to a local variable, local, which the callee writes through. The prologue declares the local, before the call, and the epilogue hands its value back after it; either is nil where another part of the body does so, like the TupleResult of a Crystal wrapper. An in_out argument, a C++ reference, is initialized from the argument's value; an out-only one, a C++ pointer, isn't passed by the caller at all.

Defined in:

bindgen/call.cr

Constructors

Class Method Summary

Instance Method Summary

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

call : String call, default_value : Parser::DefaultValueTypes | Nil default_value, name : String name

Constructor methods inherited from class Bindgen::Call::Argument

new(type, type_name, name : String, call : String, reference = false, pointer = 0, default_value : Bool | Float64 | Int64 | String | UInt64 | Nil = nil, nilable = false) new

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

==(other : self) ==, hash(hasher) hash, nilable? : Bool nilable?, pointer : Int32 pointer, reference : Bool reference, type : Parser::Type type, type_name : String type_name

Constructor methods inherited from class Bindgen::Call::Expression

new(type : Bindgen::Parser::Type, reference : Bool, pointer : Int32, type_name : String, nilable : Bool) new

Constructor Detail

def self.new(type, type_name, name, call, in_out : Bool, local : String, prologue : Nil | String = nil, epilogue : Nil | String = nil, reference = false, pointer = 1, default_value = nil, nilable = false) #

[View source]

Class Method Detail

def self.local_name(name : String) : String #

Name of the local variable of the argument name.


[View source]

Instance Method Detail

def epilogue : String | Nil #

[View source]
def in_out? : Bool #

[View source]
def local : String #

[View source]
def prologue : String | Nil #

[View source]