class Bindgen::Parser::Argument

Overview

Describes a method argument.

Defined in:

bindgen/parser/argument.cr

Constructors

Instance Method Summary

Instance methods inherited from class Bindgen::Parser::Type

==(other : self) ==, base_name : String base_name, baseName : String baseName, baseName=(_baseName : String) baseName=, builtin? : Bool builtin?, const? : Bool const?, decayed : Type | Nil decayed, equals_except_nil?(other : Type) equals_except_nil?, full_name : String full_name, fullName : String fullName, fullName=(_fullName : String) fullName=, hash(hasher) hash, isBuiltin : Bool isBuiltin, isBuiltin=(_isBuiltin : Bool) isBuiltin=, isConst : Bool isConst, isConst=(_isConst : Bool) isConst=, isMove : Bool isMove, isMove=(_isMove : Bool) isMove=, isReference : Bool isReference, isReference=(_isReference : Bool) isReference=, isVoid : Bool isVoid, isVoid=(_isVoid : Bool) isVoid=, kind : Kind kind, kind=(_kind : Kind) kind=, mangled_name mangled_name, move? : Bool move?, nilable : Bool nilable, nilable=(_nilable : Bool) nilable=, nilable? : Bool nilable?, pointer : Int32 pointer, pointer=(_pointer : Int32) pointer=, pure_void? pure_void?, reference? : Bool reference?, template : Template | Nil template, template=(_template : Template | Nil) template=, to_json(json : JSON::Builder) to_json, void? : Bool void?

Constructor methods inherited from class Bindgen::Parser::Type

new(baseName : String, fullName : String, isConst : Bool, isReference : Bool, pointer : Int32, isMove : Bool = false, isBuiltin : Bool = false, isVoid : Bool = false, kind : Bindgen::Parser::Type::Kind = Kind::Class, template : Template | Nil = nil, nilable : Bool = false)
new(__temp_44 : JSON::PullParser)
new

Class methods inherited from class Bindgen::Parser::Type

builtin_type(cpp_name : String, pointer = 0, reference = false) builtin_type, parse(type_name : String, pointer_depth = 0) parse, proc(return_type : Type, arguments : Enumerable(Type)) proc

Constructor Detail

def self.new(name : String, baseName, fullName, isConst, isReference, isMove, isBuiltin, isVoid, pointer, kind = Type::Kind::Class, hasDefault : Bool = false, value : DefaultValueTypes | Nil = nil, nilable = false, isVariadic : Bool = false) #

[View source]
def self.new(name : String, type : Type, hasDefault : Bool = false, value : DefaultValueTypes | Nil = nil) #

[View source]
def self.new(__temp_69 : JSON::PullParser) #

Instance Method Detail

def ==(other : self) #
Description copied from class Reference

Returns true if this reference is the same as other. Invokes same?.


def baseName : String #

def baseName=(_baseName : String) #

def defaults_to_nil? : Bool #

If this is a pointer-type, does it default to nullptr in C++?


[View source]
def fullName : String #

def fullName=(_fullName : String) #

def has_default? : Bool #

Does this argument have a default value?


[View source]
def has_exposed_default? #

Does this argument have an exposed default value?


[View source]
def hasDefault : Bool #

def hasDefault=(_hasDefault : Bool) #

def hash(hasher) #
Description copied from class Reference

See Object#hash(hasher)


def isBuiltin : Bool #

def isBuiltin=(_isBuiltin : Bool) #

def isConst : Bool #

def isConst=(_isConst : Bool) #

def isMove : Bool #

def isMove=(_isMove : Bool) #

def isReference : Bool #

def isReference=(_isReference : Bool) #

def isVariadic : Bool #

def isVariadic=(_isVariadic : Bool) #

def isVoid : Bool #

def isVoid=(_isVoid : Bool) #

def kind : Kind #

def kind=(_kind : Kind) #

def merge(other : Argument) #

Merges this argument with other. Only merges defaultness, its value and nil-ability. For the value, this argument takes precedence over other.


[View source]
def name : String #

def name=(_name : String) #

def nilable : Bool #

def nilable=(_nilable : Bool) #

def nilable? : Bool #

Assume that if the argument defaults to nullptr, that it is nilable.


[View source]
def pointer : Int32 #

def pointer=(_pointer : Int32) #

def template : Template | Nil #

def template=(_template : Template | Nil) #

def to_json(json : JSON::Builder) #

def type_equals?(other : Type) #

Checks if the type-part of this equals the type-part of other.


[View source]
def value : DefaultValueTypes | Nil #

def value=(_value : DefaultValueTypes | Nil) #

def variadic? : Bool #

Is this the vararg (...) argument?


[View source]
def without_default : Argument #

Returns a copy of this argument without a default value.


[View source]