Class: FFI::Clang::Types::Elaborated

Inherits:
Type
  • Object
show all
Defined in:
lib/ffi/clang/types/elaborated.rb

Instance Attribute Summary

Attributes inherited from Type

#translation_unit, #type

Instance Method Summary collapse

Methods inherited from Type

#==, #alignof, #const_qualified?, create, #declaration, #initialize, #kind, #kind_spelling, #non_reference_type, #pod?, #ref_qualifier, #restrict_qualified?, #sizeof, #spelling, #to_s, #volatile_qualified?

Constructor Details

This class inherits a constructor from FFI::Clang::Types::Type

Instance Method Details

#anonymous?Boolean

Example anonymous union where ‘u` is an elaborated type

typedef struct {

union { int idata; } u;

} SomeStruct;

Returns:

  • (Boolean)


16
17
18
# File 'lib/ffi/clang/types/elaborated.rb', line 16

def anonymous?
	self.declaration.anonymous?
end

#canonicalObject



5
6
7
# File 'lib/ffi/clang/types/elaborated.rb', line 5

def canonical
	Type.create Lib.get_canonical_type(@type), @translation_unit
end

#pointer?Boolean

Returns:

  • (Boolean)


20
21
22
# File 'lib/ffi/clang/types/elaborated.rb', line 20

def pointer?
	self.canonical.is_a?(Pointer)
end