Class: FFI::Clang::Lib::TokensPointer

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

Overview

FFI pointer wrapper for token arrays that tracks size and translation unit.

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(ptr, token_size, translation_unit) ⇒ TokensPointer

Create a new tokens pointer.



33
34
35
36
37
# File 'lib/ffi/clang/lib/token.rb', line 33

def initialize(ptr, token_size, translation_unit)
  super ptr
  @token_size = token_size
  @translation_unit = translation_unit
end

Instance Attribute Details

#token_sizeObject (readonly)

Returns the value of attribute token_size.



26
27
28
# File 'lib/ffi/clang/lib/token.rb', line 26

def token_size
  @token_size
end

#translation_unitObject (readonly)

Returns the value of attribute translation_unit.



26
# File 'lib/ffi/clang/lib/token.rb', line 26

attr_reader :token_size