Class: FFI::Clang::IndexAction::ImportedASTFile

Inherits:
Object
  • Object
show all
Defined in:
lib/ffi/clang/index_action.rb

Overview

Represents an imported AST file encountered during indexing.

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(info, translation_unit) ⇒ ImportedASTFile

Build an imported AST file wrapper from low-level info.



149
150
151
152
153
# File 'lib/ffi/clang/index_action.rb', line 149

def initialize(info, translation_unit)
	@file = IncludedFile.file_from_pointer(info[:file], translation_unit)
	@location = ExpansionLocation.new(Lib.index_loc_get_source_location(info[:loc]))
	@implicit = info[:is_implicit] != 0
end

Instance Attribute Details

#fileObject (readonly)



144
145
146
# File 'lib/ffi/clang/index_action.rb', line 144

def file
  @file
end

#locationObject (readonly)

Returns the value of attribute location.



144
# File 'lib/ffi/clang/index_action.rb', line 144

attr_reader :file, :location

Instance Method Details

#implicit?Boolean

Check if this import was implicit.

Returns:

  • (Boolean)


157
158
159
# File 'lib/ffi/clang/index_action.rb', line 157

def implicit?
	@implicit
end