Class: FFI::Clang::FileLocation
- Inherits:
-
SourceLocation
- Object
- SourceLocation
- FFI::Clang::FileLocation
- Defined in:
- lib/ffi/clang/source_location.rb
Instance Attribute Summary collapse
-
#column ⇒ Object
readonly
Returns the value of attribute column.
-
#file ⇒ Object
readonly
Returns the value of attribute file.
-
#line ⇒ Object
readonly
Returns the value of attribute line.
-
#offset ⇒ Object
readonly
Returns the value of attribute offset.
Attributes inherited from SourceLocation
Instance Method Summary collapse
-
#initialize(location) ⇒ FileLocation
constructor
A new instance of FileLocation.
Methods inherited from SourceLocation
#==, #expansion_location, #file_location, #from_main_file?, #in_system_header?, #null?, null_location, #presumed_location, #spelling_location
Constructor Details
#initialize(location) ⇒ FileLocation
Returns a new instance of FileLocation.
132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 |
# File 'lib/ffi/clang/source_location.rb', line 132 def initialize(location) super(location) cxfile = MemoryPointer.new :pointer line = MemoryPointer.new :uint column = MemoryPointer.new :uint offset = MemoryPointer.new :uint Lib::get_file_location(@location, cxfile, line, column, offset) @file = Lib.extract_string Lib.get_file_name(cxfile.read_pointer) @line = line.get_uint(0) @column = column.get_uint(0) @offset = offset.get_uint(0) end |
Instance Attribute Details
#column ⇒ Object (readonly)
Returns the value of attribute column.
130 131 132 |
# File 'lib/ffi/clang/source_location.rb', line 130 def column @column end |
#file ⇒ Object (readonly)
Returns the value of attribute file.
130 131 132 |
# File 'lib/ffi/clang/source_location.rb', line 130 def file @file end |
#line ⇒ Object (readonly)
Returns the value of attribute line.
130 131 132 |
# File 'lib/ffi/clang/source_location.rb', line 130 def line @line end |
#offset ⇒ Object (readonly)
Returns the value of attribute offset.
130 131 132 |
# File 'lib/ffi/clang/source_location.rb', line 130 def offset @offset end |