class Bindgen::Parser::Field

Overview

A C++ struct/class field.

Included Modules

Defined in:

bindgen/parser/field.cr

Constructors

Instance Method Summary

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) : Type
substitute(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

def self.new(pull : JSON::PullParser) #

A C++ struct/class field.


[View source]

Instance Method Detail

def access : AccessSpecifier #

Visibility of the field.


[View source]
def bit_field : Int32 #

The size of this field, if it is a bitfield.


[View source]
def bit_field? : Int32 | Nil #

The size of this field, if it is a bitfield.


[View source]
def bit_offset : Int64 | Nil #

Offset of this non-static field in its class, in bits.


[View source]
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.


[View source]
def crystal_name : String #

Suitable name for Crystal code


[View source]
def doc : String | Nil #

Documentation comment from the C++ source, without comment markers.


[View source]
def has_default? : Bool #

Does this field have a default value?


[View source]
def name : String #

Name of the field.


[View source]
def private?(*args, **options) #

[View source]
def private?(*args, **options, &) #

[View source]
def protected?(*args, **options) #

[View source]
def protected?(*args, **options, &) #

[View source]
def public?(*args, **options) #

[View source]
def public?(*args, **options, &) #

[View source]
def static? : Bool #

Is this field a static data member?


[View source]
def value : DefaultValueTypes | Nil #

Default value for this field, if an initializer literal is found.


[View source]