class FFI::Clang::File
Attributes
translation_unit[R]
Public Class Methods
new(pointer, translation_unit)
click to toggle source
Calls superclass method
# File lib/ffi/clang/file.rb, line 28 def initialize(pointer, translation_unit) super pointer @translation_unit = translation_unit pointer = MemoryPointer.new(Lib::CXFileUniqueID) Lib.get_file_unique_id(self, pointer) @unique_id = Lib::CXFileUniqueID.new(pointer) end
Public Instance Methods
device()
click to toggle source
# File lib/ffi/clang/file.rb, line 53 def device @unique_id[:device] end
include_guarded?()
click to toggle source
# File lib/ffi/clang/file.rb, line 49 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 57 def inode @unique_id[:inode] end
modification()
click to toggle source
# File lib/ffi/clang/file.rb, line 61 def modification Time.at(@unique_id[:modification]) end
name()
click to toggle source
# File lib/ffi/clang/file.rb, line 41 def name Lib.extract_string Lib.get_file_name(self) end
time()
click to toggle source
# File lib/ffi/clang/file.rb, line 45 def time Time.at(Lib.get_file_time(self)) end
to_s()
click to toggle source
# File lib/ffi/clang/file.rb, line 37 def to_s name end