Class: FFI::Clang::IndexAction::Entity
- Inherits:
-
Object
- Object
- FFI::Clang::IndexAction::Entity
- Defined in:
- lib/ffi/clang/index_action.rb
Overview
Represents an indexed entity.
Instance Attribute Summary collapse
-
#cursor ⇒ Object
readonly
Returns the value of attribute cursor.
- #kind ⇒ Object readonly
- #language ⇒ Object readonly
- #name ⇒ Object readonly
- #template_kind ⇒ Object readonly
- #usr ⇒ Object readonly
Class Method Summary collapse
Instance Method Summary collapse
-
#initialize(info, translation_unit) ⇒ Entity
constructor
Build an entity wrapper from a libclang entity info pointer.
Constructor Details
#initialize(info, translation_unit) ⇒ Entity
Build an entity wrapper from a libclang entity info pointer.
73 74 75 76 77 78 79 80 |
# File 'lib/ffi/clang/index_action.rb', line 73 def initialize(info, translation_unit) @kind = info[:kind] @template_kind = info[:template_kind] @language = info[:language] @name = self.class.string_from_pointer(info[:name]) @usr = self.class.string_from_pointer(info[:usr]) @cursor = Cursor.new(info[:cursor], translation_unit) end |
Instance Attribute Details
#cursor ⇒ Object (readonly)
Returns the value of attribute cursor.
68 |
# File 'lib/ffi/clang/index_action.rb', line 68 attr_reader :kind, :template_kind, :language, :name, :usr, :cursor |
#kind ⇒ Object (readonly)
68 69 70 |
# File 'lib/ffi/clang/index_action.rb', line 68 def kind @kind end |
#language ⇒ Object (readonly)
68 |
# File 'lib/ffi/clang/index_action.rb', line 68 attr_reader :kind, :template_kind, :language, :name, :usr, :cursor |
#name ⇒ Object (readonly)
68 |
# File 'lib/ffi/clang/index_action.rb', line 68 attr_reader :kind, :template_kind, :language, :name, :usr, :cursor |
#template_kind ⇒ Object (readonly)
68 |
# File 'lib/ffi/clang/index_action.rb', line 68 attr_reader :kind, :template_kind, :language, :name, :usr, :cursor |
#usr ⇒ Object (readonly)
68 |
# File 'lib/ffi/clang/index_action.rb', line 68 attr_reader :kind, :template_kind, :language, :name, :usr, :cursor |
Class Method Details
.string_from_pointer(pointer) ⇒ Object
83 84 85 86 87 |
# File 'lib/ffi/clang/index_action.rb', line 83 def self.string_from_pointer(pointer) return nil if pointer.null? pointer.read_string end |