Scarab  2.8.1
Project 8 C++ Utility Library
Public Member Functions | Static Public Member Functions | List of all members
Index Class Reference
Inheritance diagram for Index:
Inheritance graph

Public Member Functions

def __del__ (self)
 
def read (self, path)
 
def parse (self, path, args=None, unsaved_files=None, options=0)
 
- Public Member Functions inherited from ClangObject
def __init__ (self, obj)
 
def from_param (self)
 

Static Public Member Functions

def create (excludeDecls=False)
 

Additional Inherited Members

- Public Attributes inherited from ClangObject
 obj
 

Detailed Description

The Index type provides the primary interface to the Clang CIndex library,
primarily by providing an interface for reading and parsing translation
units.

Definition at line 2382 of file cindex.py.

Constructor & Destructor Documentation

◆ __del__()

def __del__ (   self)

Definition at line 2398 of file cindex.py.

Member Function Documentation

◆ create()

def create (   excludeDecls = False)
static
Create a new Index.
Parameters:
excludeDecls -- Exclude local declarations from translation units.

Definition at line 2390 of file cindex.py.

◆ parse()

def parse (   self,
  path,
  args = None,
  unsaved_files = None,
  options = 0 
)
Load the translation unit from the given source code file by running
clang and generating the AST before loading. Additional command line
parameters can be passed to clang via the args parameter.

In-memory contents for files can be provided by passing a list of pairs
to as unsaved_files, the first item should be the filenames to be mapped
and the second should be the contents to be substituted for the
file. The contents may be passed as strings or file objects.

If an error was encountered during parsing, a TranslationUnitLoadError
will be raised.

Definition at line 2405 of file cindex.py.

◆ read()

def read (   self,
  path 
)
Load a TranslationUnit from the given AST file.

Definition at line 2401 of file cindex.py.


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