Class: FFI::Clang::IndexAction::CallbackAdapter

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

Overview

Adapter object that owns the callback procs for a single indexing run.

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(translation_unit, &block) ⇒ CallbackAdapter

Build callbacks that snapshot libclang indexing payloads.



433
434
435
436
437
438
439
# File 'lib/ffi/clang/index_action.rb', line 433

def initialize(translation_unit, &block)
	@translation_unit = translation_unit
	@block = block
	@aborted = false
	@callbacks = Lib::IndexerCallbacks.new
	initialize_callbacks
end

Instance Attribute Details

#callbacksObject (readonly)

Returns the value of attribute callbacks.



428
429
430
# File 'lib/ffi/clang/index_action.rb', line 428

def callbacks
  @callbacks
end

Instance Method Details

#aborted?Boolean

Check if indexing was aborted by the user callback.

Returns:

  • (Boolean)


443
444
445
# File 'lib/ffi/clang/index_action.rb', line 443

def aborted?
	@aborted
end