class Bindgen::Parser::Argument
- Bindgen::Parser::Argument
- Bindgen::Parser::Type
- Reference
- Object
Overview
Describes a method argument.
Defined in:
bindgen/parser/argument.crConstructors
- .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)
- .new(name : String, type : Type, hasDefault : Bool = false, value : DefaultValueTypes | Nil = nil)
- .new(__temp_69 : JSON::PullParser)
Instance Method Summary
-
#==(other : self)
Returns
true
if this reference is the same as other. - #baseName : String
- #baseName=(_baseName : String)
-
#defaults_to_nil? : Bool
If this is a pointer-type, does it default to
nullptr
in C++? - #fullName : String
- #fullName=(_fullName : String)
-
#has_default? : Bool
Does this argument have a default value?
-
#has_exposed_default?
Does this argument have an exposed default value?
- #hasDefault : Bool
- #hasDefault=(_hasDefault : Bool)
-
#hash(hasher)
See
Object#hash(hasher)
- #isBuiltin : Bool
- #isBuiltin=(_isBuiltin : Bool)
- #isConst : Bool
- #isConst=(_isConst : Bool)
- #isMove : Bool
- #isMove=(_isMove : Bool)
- #isReference : Bool
- #isReference=(_isReference : Bool)
- #isVariadic : Bool
- #isVariadic=(_isVariadic : Bool)
- #isVoid : Bool
- #isVoid=(_isVoid : Bool)
- #kind : Kind
- #kind=(_kind : Kind)
-
#merge(other : Argument)
Merges this argument with other.
- #name : String
- #name=(_name : String)
- #nilable : Bool
- #nilable=(_nilable : Bool)
-
#nilable? : Bool
Assume that if the argument defaults to
nullptr
, that it is nilable. - #pointer : Int32
- #pointer=(_pointer : Int32)
- #template : Template | Nil
- #template=(_template : Template | Nil)
- #to_json(json : JSON::Builder)
-
#type_equals?(other : Type)
Checks if the type-part of this equals the type-part of other.
- #value : DefaultValueTypes | Nil
- #value=(_value : DefaultValueTypes | Nil)
-
#variadic? : Bool
Is this the vararg (
...
) argument? -
#without_default : Argument
Returns a copy of this argument without a default value.
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
Instance Method Detail
Returns true
if this reference is the same as other. Invokes same?
.
Merges this argument with other. Only merges defaultness, its value and nil-ability. For the value, this argument takes precedence over other.
Checks if the type-part of this equals the type-part of other.
Returns a copy of this argument without a default value.