class Bindgen::Call::TupleResult

Overview

The result of a Crystal wrapper method with out arguments: the method's own result, inner, unless it returns void, followed by the values of the out arguments, as the expressions reading them from their locals. Written as a tuple, or as the value alone if it's the only element. The type is the method's return type, so pure_void? tells whether inner is set.

Defined in:

bindgen/call.cr

Constructors

Instance Method Summary

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

apply_conversion(code : String) : String apply_conversion, conversion : Template::Base conversion, copy_with(type : Parser::Type = @type, type_name : String = @type_name, reference : Bool = @reference, pointer : Int32 = @pointer, conversion : Template::Base = @conversion, nilable : Bool = @nilable) : Result copy_with, to_argument(name : String, default = nil) : Argument to_argument

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

new(type, type_name, reference, pointer, conversion : Bindgen::Template::Base = Template::None.new, 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, inner : Bindgen::Call::Result | Nil, values : Array(Bindgen::Call::Result), expressions : Array(String)) #

[View source]

Instance Method Detail

def expressions : Array(String) #

[View source]
def inner : Result | Nil #

[View source]
def literal(code : String | Nil) : String #

The expression of the result, with code being the method's own result, converted by inner. code is ignored for a void method, whose caller runs it as a statement before.


[View source]
def values : Array(Result) #

[View source]