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



329
330
331
# File 'lib/rbind/clang/clang_types.rb', line 329

def array_element_type
    Rbind::get_array_element_type self
end

#array_sizeObject



325
326
327
# File 'lib/rbind/clang/clang_types.rb', line 325

def array_size
    Rbind::get_array_size self
end

#canonical_typeObject



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

def canonical_type
    Rbind::get_canonical_type self
end

#const_qualified?Boolean

Returns:

  • (Boolean)


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

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

#declarationObject



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

def declaration
    Rbind::get_type_declaration self
end

#kindObject



333
334
335
# File 'lib/rbind/clang/clang_types.rb', line 333

def kind
    self[:kind]
end

#null?Boolean

Returns:

  • (Boolean)


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

def null?
    kind == :invalid
end

#pod?Boolean

Returns:

  • (Boolean)


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

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

#pointee_typeObject



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

def pointee_type
    Rbind::get_pointee_type self
end

#result_typeObject



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

def result_type
    Rbind::get_result_type self
end