Class: FFI::Clang::SourceLocation
- Inherits:
-
Object
- Object
- FFI::Clang::SourceLocation
show all
- Defined in:
- lib/ffi/clang/source_location.rb
Instance Attribute Summary collapse
Class Method Summary
collapse
Instance Method Summary
collapse
Constructor Details
Returns a new instance of SourceLocation.
34
35
36
|
# File 'lib/ffi/clang/source_location.rb', line 34
def initialize(location)
@location = location
end
|
Instance Attribute Details
#location ⇒ Object
Returns the value of attribute location.
33
34
35
|
# File 'lib/ffi/clang/source_location.rb', line 33
def location
@location
end
|
Class Method Details
.null_location ⇒ Object
29
30
31
|
# File 'lib/ffi/clang/source_location.rb', line 29
def self.null_location
ExpansionLocation.new Lib.get_null_location
end
|
Instance Method Details
#==(other) ⇒ Object
66
67
68
|
# File 'lib/ffi/clang/source_location.rb', line 66
def ==(other)
Lib.equal_locations(@location, other.location) != 0
end
|
#expansion_location ⇒ Object
46
47
48
|
# File 'lib/ffi/clang/source_location.rb', line 46
def expansion_location
ExpansionLocation.new(@location)
end
|
#file_location ⇒ Object
58
59
60
|
# File 'lib/ffi/clang/source_location.rb', line 58
def file_location
FileLocation.new(@location)
end
|
#from_main_file? ⇒ Boolean
42
43
44
|
# File 'lib/ffi/clang/source_location.rb', line 42
def from_main_file?
Lib.location_is_from_main_file(@location) != 0
end
|
38
39
40
|
# File 'lib/ffi/clang/source_location.rb', line 38
def
Lib.(@location) != 0
end
|
#null? ⇒ Boolean
62
63
64
|
# File 'lib/ffi/clang/source_location.rb', line 62
def null?
Lib.equal_locations(@location, Lib.get_null_location) != 0
end
|
#presumed_location ⇒ Object
50
51
52
|
# File 'lib/ffi/clang/source_location.rb', line 50
def presumed_location
PresumedLocation.new(@location)
end
|
#spelling_location ⇒ Object
54
55
56
|
# File 'lib/ffi/clang/source_location.rb', line 54
def spelling_location
SpellingLocation.new(@location)
end
|