Class: Clang::Rbind::Type

Inherits:
FFI::Struct
  • Object
show all
Defined in:
lib/rbind/clang/clang.rb,
lib/rbind/clang/clang_types.rb

Overview

The type of an element in the abstract syntax tree.

Fields:

:kind

(Symbol from enum_type_kind)

:data

(Array<FFI::Pointer(*Void)>)

Instance Method Summary collapse

Instance Method Details

#array_element_typeObject



318
319
320
# File 'lib/rbind/clang/clang_types.rb', line 318

def array_element_type
    Rbind::get_array_element_type self
end

#array_sizeObject



314
315
316
# File 'lib/rbind/clang/clang_types.rb', line 314

def array_size
    Rbind::get_array_size self
end

#canonical_typeObject



298
299
300
# File 'lib/rbind/clang/clang_types.rb', line 298

def canonical_type
    Rbind::get_canonical_type self
end

#const_qualified?Boolean

Returns:



294
295
296
# File 'lib/rbind/clang/clang_types.rb', line 294

def const_qualified?
    1 == Rbind::is_const_qualified_type(self)
end

#declarationObject



290
291
292
# File 'lib/rbind/clang/clang_types.rb', line 290

def declaration
    Rbind::get_type_declaration self
end

#kindObject



322
323
324
# File 'lib/rbind/clang/clang_types.rb', line 322

def kind
    self[:kind]
end

#null?Boolean

Returns:



286
287
288
# File 'lib/rbind/clang/clang_types.rb', line 286

def null?
    kind == :invalid
end

#pod?Boolean

Returns:



310
311
312
# File 'lib/rbind/clang/clang_types.rb', line 310

def pod?
    1 == Rbind::is_pod_type(self)
end

#pointee_typeObject



306
307
308
# File 'lib/rbind/clang/clang_types.rb', line 306

def pointee_type
    Rbind::get_pointee_type self
end

#result_typeObject



302
303
304
# File 'lib/rbind/clang/clang_types.rb', line 302

def result_type
    Rbind::get_result_type self
end