Class: FFI::Clang::IndexAction::EntityReference
- Inherits:
-
Object
- Object
- FFI::Clang::IndexAction::EntityReference
- Defined in:
- lib/ffi/clang/index_action.rb
Overview
Represents a reference event reported during indexing.
Instance Attribute Summary collapse
- #container ⇒ Object readonly
- #cursor ⇒ Object readonly
- #kind ⇒ Object readonly
- #location ⇒ Object readonly
- #parent_entity ⇒ Object readonly
- #referenced_entity ⇒ Object readonly
-
#roles ⇒ Object
readonly
Returns the value of attribute roles.
Instance Method Summary collapse
-
#initialize(info, translation_unit) ⇒ EntityReference
constructor
Build a reference wrapper from low-level info.
Constructor Details
#initialize(info, translation_unit) ⇒ EntityReference
Build a reference wrapper from low-level info.
257 258 259 260 261 262 263 264 265 |
# File 'lib/ffi/clang/index_action.rb', line 257 def initialize(info, translation_unit) @kind = info[:kind] @cursor = Cursor.new(info[:cursor], translation_unit) @location = ExpansionLocation.new(Lib.index_loc_get_source_location(info[:loc])) @referenced_entity = Declaration.entity_from_pointer(info[:referenced_entity], translation_unit) @parent_entity = Declaration.entity_from_pointer(info[:parent_entity], translation_unit) @container = Declaration.container_from_pointer(info[:container], translation_unit) @roles = Lib.opts_from(Lib::SymbolRole, info[:role]) end |
Instance Attribute Details
#container ⇒ Object (readonly)
252 |
# File 'lib/ffi/clang/index_action.rb', line 252 attr_reader :kind, :cursor, :location, :referenced_entity, :parent_entity, :container, :roles |
#cursor ⇒ Object (readonly)
252 |
# File 'lib/ffi/clang/index_action.rb', line 252 attr_reader :kind, :cursor, :location, :referenced_entity, :parent_entity, :container, :roles |
#kind ⇒ Object (readonly)
252 253 254 |
# File 'lib/ffi/clang/index_action.rb', line 252 def kind @kind end |
#location ⇒ Object (readonly)
252 |
# File 'lib/ffi/clang/index_action.rb', line 252 attr_reader :kind, :cursor, :location, :referenced_entity, :parent_entity, :container, :roles |
#parent_entity ⇒ Object (readonly)
252 |
# File 'lib/ffi/clang/index_action.rb', line 252 attr_reader :kind, :cursor, :location, :referenced_entity, :parent_entity, :container, :roles |
#referenced_entity ⇒ Object (readonly)
252 |
# File 'lib/ffi/clang/index_action.rb', line 252 attr_reader :kind, :cursor, :location, :referenced_entity, :parent_entity, :container, :roles |
#roles ⇒ Object (readonly)
Returns the value of attribute roles.
252 |
# File 'lib/ffi/clang/index_action.rb', line 252 attr_reader :kind, :cursor, :location, :referenced_entity, :parent_entity, :container, :roles |