class FFI::Clang::Type
Attributes
type[R]
Public Class Methods
new(type, translation_unit)
click to toggle source
# File lib/ffi/clang/type.rb, line 27 def initialize(type, translation_unit) @type = type @translation_unit = translation_unit end
Public Instance Methods
==(other)
click to toggle source
# File lib/ffi/clang/type.rb, line 128 def ==(other) Lib.equal_types(@type, other.type) != 0 end
alignof()
click to toggle source
# File lib/ffi/clang/type.rb, line 104 def alignof Lib.type_get_align_of(@type) end
arg_type(i)
click to toggle source
# File lib/ffi/clang/type.rb, line 80 def arg_type(i) Type.new Lib.get_arg_type(@type, i), @translation_unit end
array_element_type()
click to toggle source
# File lib/ffi/clang/type.rb, line 96 def array_element_type Type.new Lib.get_array_element_type(@type), @translation_unit end
array_size()
click to toggle source
# File lib/ffi/clang/type.rb, line 100 def array_size Lib.get_array_size(@type) end
calling_conv()
click to toggle source
# File lib/ffi/clang/type.rb, line 120 def calling_conv Lib.get_fuction_type_calling_conv(@type) end
canonical()
click to toggle source
# File lib/ffi/clang/type.rb, line 60 def canonical Type.new Lib.get_canonical_type(@type), @translation_unit end
class_type()
click to toggle source
# File lib/ffi/clang/type.rb, line 64 def class_type Type.new Lib.type_get_class_type(@type), @translation_unit end
const_qualified?()
click to toggle source
# File lib/ffi/clang/type.rb, line 68 def const_qualified? Lib.is_const_qualified_type(@type) != 0 end
declaration()
click to toggle source
# File lib/ffi/clang/type.rb, line 124 def declaration Cursor.new Lib.get_type_declaration(@type), @translation_unit end
element_type()
click to toggle source
# File lib/ffi/clang/type.rb, line 88 def element_type Type.new Lib.get_element_type(@type), @translation_unit end
kind()
click to toggle source
# File lib/ffi/clang/type.rb, line 32 def kind @type[:kind] end
kind_spelling()
click to toggle source
# File lib/ffi/clang/type.rb, line 36 def kind_spelling Lib.extract_string Lib.get_type_kind_spelling @type[:kind] end
num_arg_types()
click to toggle source
# File lib/ffi/clang/type.rb, line 52 def num_arg_types Lib.get_num_arg_types(@type) end
num_elements()
click to toggle source
# File lib/ffi/clang/type.rb, line 92 def num_elements Lib.get_num_elements(@type) end
offsetof(field)
click to toggle source
# File lib/ffi/clang/type.rb, line 112 def offsetof(field) Lib.type_get_offset_of(@type, field) end
pod?()
click to toggle source
# File lib/ffi/clang/type.rb, line 48 def pod? Lib.is_pod_type(@type) != 0 end
pointee()
click to toggle source
# File lib/ffi/clang/type.rb, line 56 def pointee Type.new Lib.get_pointee_type(@type), @translation_unit end
ref_qualifier()
click to toggle source
# File lib/ffi/clang/type.rb, line 116 def ref_qualifier Lib.type_get_cxx_ref_qualifier(@type) end
restrict_qualified?()
click to toggle source
# File lib/ffi/clang/type.rb, line 76 def restrict_qualified? Lib.is_restrict_qualified_type(@type) != 0 end
result_type()
click to toggle source
# File lib/ffi/clang/type.rb, line 84 def result_type Type.new Lib.get_result_type(@type), @translation_unit end
sizeof()
click to toggle source
# File lib/ffi/clang/type.rb, line 108 def sizeof Lib.type_get_size_of(@type) end
spelling()
click to toggle source
# File lib/ffi/clang/type.rb, line 40 def spelling Lib.extract_string Lib.get_type_spelling(@type) end
variadic?()
click to toggle source
# File lib/ffi/clang/type.rb, line 44 def variadic? Lib.is_function_type_variadic(@type) != 0 end
volatile_qualified?()
click to toggle source
# File lib/ffi/clang/type.rb, line 72 def volatile_qualified? Lib.is_volatile_qualified_type(@type) != 0 end