Scarab  v2.9.0
Project 8 C++ Utility Library
Public Member Functions | Static Public Member Functions | Private Member Functions | Static Private Attributes | List of all members
SourceLocation Class Reference
Inheritance diagram for SourceLocation:
Inheritance graph

Public Member Functions

def file (self)
 
def line (self)
 
def column (self)
 
def offset (self)
 
def __eq__ (self, other)
 
def __ne__ (self, other)
 
def __repr__ (self)
 

Static Public Member Functions

def from_position (tu, file, line, column)
 
def from_offset (tu, file, offset)
 

Private Member Functions

def _get_instantiation (self)
 

Static Private Attributes

list _fields_ = [("ptr_data", c_void_p * 2), ("int_data", c_uint)]
 
 _data = None
 

Detailed Description

A SourceLocation represents a particular location within a source file.

Definition at line 160 of file cindex.py.

Member Function Documentation

◆ __eq__()

def __eq__ (   self,
  other 
)

Definition at line 217 of file cindex.py.

◆ __ne__()

def __ne__ (   self,
  other 
)

Definition at line 220 of file cindex.py.

◆ __repr__()

def __repr__ (   self)

Definition at line 223 of file cindex.py.

◆ _get_instantiation()

def _get_instantiation (   self)
private

Definition at line 167 of file cindex.py.

◆ column()

def column (   self)
Get the column represented by this source location.

Definition at line 208 of file cindex.py.

◆ file()

def file (   self)
Get the file represented by this source location.

Definition at line 198 of file cindex.py.

◆ from_offset()

def from_offset (   tu,
  file,
  offset 
)
static
Retrieve a SourceLocation from a given character offset.

tu -- TranslationUnit file belongs to
file -- File instance to obtain offset from
offset -- Integer character offset within file

Definition at line 188 of file cindex.py.

◆ from_position()

def from_position (   tu,
  file,
  line,
  column 
)
static
Retrieve the source location associated with a given file/line/column in
a particular translation unit.

Definition at line 180 of file cindex.py.

◆ line()

def line (   self)
Get the line represented by this source location.

Definition at line 203 of file cindex.py.

◆ offset()

def offset (   self)
Get the file offset represented by this source location.

Definition at line 213 of file cindex.py.

Member Data Documentation

◆ _data

_data = None
staticprivate

Definition at line 165 of file cindex.py.

◆ _fields_

list _fields_ = [("ptr_data", c_void_p * 2), ("int_data", c_uint)]
staticprivate

Definition at line 164 of file cindex.py.


The documentation for this class was generated from the following file: