class
Bindgen::Parser::Field
- Bindgen::Parser::Field
- Bindgen::Parser::Type
- Reference
- Object
Overview
A C++ struct/class field.
Included Modules
- JSON::Serializable
Defined in:
bindgen/parser/field.crConstructors
-
.new(pull : JSON::PullParser)
A C++ struct/class field.
Instance Method Summary
-
#access : AccessSpecifier
Visibility of the field.
-
#bit_field : Int32
The size of this field, if it is a bitfield.
-
#bit_field? : Int32 | Nil
The size of this field, if it is a bitfield.
-
#bit_offset : Int64 | Nil
Offset of this non-static field in its class, in bits.
-
#bit_size : Int64 | Nil
Size of the type of this non-static field, in bits.
-
#crystal_name : String
Suitable name for Crystal code
-
#doc : String | Nil
Documentation comment from the C++ source, without comment markers.
-
#has_default? : Bool
Does this field have a default value?
-
#name : String
Name of the field.
- #private?(*args, **options)
- #private?(*args, **options, &)
- #protected?(*args, **options)
- #protected?(*args, **options, &)
- #public?(*args, **options)
- #public?(*args, **options, &)
-
#static? : Bool
Is this field a static data member?
-
#value : DefaultValueTypes | Nil
Default value for this field, if an initializer literal is found.
Instance methods inherited from class Bindgen::Parser::Type
==(other : self)
==,
array_element : Type
array_element,
array_pointer : Int32
array_pointer,
base_name : String
base_name,
builtin? : Bool
builtin?,
builtin_array_pointer? : Bool
builtin_array_pointer?,
c_array?
c_array?,
c_complete_array?
c_complete_array?,
const? : Bool
const?,
decayed : Type | Nil
decayed,
dereferenced : Type
dereferenced,
desugared : String | Nil
desugared,
equals_except_nil?(other : Type)
equals_except_nil?,
extents : Array(UInt64)
extents,
full_name : String
full_name,
function? : Bool
function?,
hash(hasher)
hash,
kind : Bindgen::Parser::Type::Kind
kind,
make_pointer_nilable : Type | Nil
make_pointer_nilable,
mangled_name
mangled_name,
move? : Bool
move?,
never_nil : Type
never_nil,
never_nil=(never_nil : Bool)
never_nil=,
never_nil? : Bool
never_nil?,
nilable? : Bool
nilable?,
pointee_array : Type
pointee_array,
pointer : Int32
pointer,
pointer_to_c_array? : Bool
pointer_to_c_array?,
pure_void?
pure_void?,
reference? : Bool
reference?,
reference_to_c_array? : Bool
reference_to_c_array?,
remove_all_extents : Type
remove_all_extents,
std_function? : Bool
std_function?,
substitute(name : String, with type : Type) : Typesubstitute(replacements : Hash(String, Type)) : Type
substitute(replacements : Tuple(String, Type)) : Type substitute, template : Template | Nil template, template_arguments : Array(Type) template_arguments, typedefs : Array(String) | Nil typedefs, uses_typename?(name : String) uses_typename?, void? : Bool void?, with_nilable(nilable : Bool) : self with_nilable
Constructor methods inherited from class Bindgen::Parser::Type
new(base_name : String, full_name : String, const : Bool, reference : Bool, pointer : Int32, move : Bool = false, builtin : Bool = false, void : Bool = false, kind : Bindgen::Parser::Type::Kind = Kind::Class, template : Nil | Bindgen::Parser::Template = nil, nilable : Bool = false, extents : Array(UInt64) = Array(UInt64).new, array_pointer : Int32 = 0, desugared : Nil | String = nil, typedefs : Nil | Array(String) = nil, never_nil : Bool = false)new(pull : 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
def bit_size : Int64 | Nil
#
Size of the type of this non-static field, in bits. For a bit-field, this is the size of its declared type.
def value : DefaultValueTypes | Nil
#
Default value for this field, if an initializer literal is found.