class FFI::Clang::File
Attributes
translation_unit[R]
Public Class Methods
new(pointer, tu)
click to toggle source
Calls superclass method
# File lib/ffi/clang/file.rb, line 29 def initialize(pointer, tu) super pointer @translation_unit = tu if FFI::Clang::Utils.satisfy_version?('3.3') pointer = MemoryPointer.new(Lib::CXFileUniqueID) Lib.get_file_unique_id(self, pointer) @unique_id = Lib::CXFileUniqueID.new(pointer) end end
Public Instance Methods
device()
click to toggle source
# File lib/ffi/clang/file.rb, line 56 def device @unique_id[:device] end
include_guarded?()
click to toggle source
# File lib/ffi/clang/file.rb, line 52 def include_guarded? Lib.is_file_multiple_include_guarded(@translation_unit, self) != 0 end
inode()
click to toggle source
# File lib/ffi/clang/file.rb, line 60 def inode @unique_id[:inode] end
modification()
click to toggle source
# File lib/ffi/clang/file.rb, line 64 def modification Time.at(@unique_id[:modification]) end
name()
click to toggle source
# File lib/ffi/clang/file.rb, line 44 def name Lib.extract_string Lib.get_file_name(self) end
time()
click to toggle source
# File lib/ffi/clang/file.rb, line 48 def time Time.at(Lib.get_file_time(self)) end
to_s()
click to toggle source
# File lib/ffi/clang/file.rb, line 40 def to_s name end