Class: FFI::Clang::SourceLocation

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

Instance Attribute Summary collapse

Class Method Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(location) ⇒ SourceLocation

Returns a new instance of SourceLocation.



22
23
24
# File 'lib/ffi/clang/source_location.rb', line 22

def initialize(location)
	@location = location
end

Instance Attribute Details

#locationObject (readonly)

Returns the value of attribute location.



21
22
23
# File 'lib/ffi/clang/source_location.rb', line 21

def location
  @location
end

Class Method Details

.null_locationObject



17
18
19
# File 'lib/ffi/clang/source_location.rb', line 17

def self.null_location
	ExpansionLocation.new Lib.get_null_location
end

Instance Method Details

#==(other) ⇒ Object



38
39
40
# File 'lib/ffi/clang/source_location.rb', line 38

def ==(other)
	Lib.equal_locations(@location, other.location) != 0
end

#from_main_file?Boolean

Returns:

  • (Boolean)


30
31
32
# File 'lib/ffi/clang/source_location.rb', line 30

def from_main_file?
	Lib.location_is_from_main_file(@location) != 0
end

#in_system_header?Boolean

Returns:

  • (Boolean)


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

def in_system_header?
	Lib.location_in_system_header(@location) != 0
end

#null?Boolean

Returns:

  • (Boolean)


34
35
36
# File 'lib/ffi/clang/source_location.rb', line 34

def null?
	Lib.equal_locations(@location, Lib.get_null_location) != 0
end