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 29
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 130
def ==(other)
        Lib.equal_types(@type, other.type) != 0
end
alignof() click to toggle source
# File lib/ffi/clang/type.rb, line 106
def alignof
        Lib.type_get_align_of(@type)
end
arg_type(i) click to toggle source
# File lib/ffi/clang/type.rb, line 82
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 98
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 102
def array_size
        Lib.get_array_size(@type)
end
calling_conv() click to toggle source
# File lib/ffi/clang/type.rb, line 122
def calling_conv
        Lib.get_fuction_type_calling_conv(@type)
end
canonical() click to toggle source
# File lib/ffi/clang/type.rb, line 62
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 66
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 70
def const_qualified?
        Lib.is_const_qualified_type(@type) != 0
end
declaration() click to toggle source
# File lib/ffi/clang/type.rb, line 126
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 90
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 34
def kind
        @type[:kind]
end
kind_spelling() click to toggle source
# File lib/ffi/clang/type.rb, line 38
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 54
def num_arg_types
        Lib.get_num_arg_types(@type)
end
num_elements() click to toggle source
# File lib/ffi/clang/type.rb, line 94
def num_elements
        Lib.get_num_elements(@type)
end
offsetof(field) click to toggle source
# File lib/ffi/clang/type.rb, line 114
def offsetof(field)
        Lib.type_get_offset_of(@type, field)
end
pod?() click to toggle source
# File lib/ffi/clang/type.rb, line 50
def pod?
        Lib.is_pod_type(@type) != 0
end
pointee() click to toggle source
# File lib/ffi/clang/type.rb, line 58
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 118
def ref_qualifier
        Lib.type_get_cxx_ref_qualifier(@type)
end
restrict_qualified?() click to toggle source
# File lib/ffi/clang/type.rb, line 78
def restrict_qualified?
        Lib.is_restrict_qualified_type(@type) != 0
end
result_type() click to toggle source
# File lib/ffi/clang/type.rb, line 86
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 110
def sizeof
        Lib.type_get_size_of(@type)
end
spelling() click to toggle source
# File lib/ffi/clang/type.rb, line 42
def spelling
        Lib.extract_string Lib.get_type_spelling(@type)
end
variadic?() click to toggle source
# File lib/ffi/clang/type.rb, line 46
def variadic?
        Lib.is_function_type_variadic(@type) != 0
end
volatile_qualified?() click to toggle source
# File lib/ffi/clang/type.rb, line 74
def volatile_qualified?
        Lib.is_volatile_qualified_type(@type) != 0
end