Interface IIndex
Unit
Neslib.Clang
Declaration
type IIndex = interface(IInterface)
Description
An "index" that consists of a set of translation units that would typically be linked together into an executable or library. Use TIndex to create an instance.
Attributes
- GUID['{F432C0B8-2E5F-459E-8514-BE601317F6F3}']
Hierarchy
Overview
Methods
Properties
Description
Methods
 |
procedure SetInvocationEmissionPath(const AValue: String); |
|
 |
function GetHandle: TCXIndex; |
|
 |
function CreateTranslationUnitFromSource(const ASourceFilename: String; const AClangCommandLineArgs: array of String; const AUnsavedFiles: TArray<TUnsavedFile> = nil): ITranslationUnit; overload; |
 |
function CreateTranslationUnitFromSource(const ASourceFilename: String; const AUnsavedFiles: TArray<TUnsavedFile> = nil): ITranslationUnit; overload; |
Return the ITranslationUnit for a given source file and the provided command line arguments one would pass to the compiler.
Note: The ASourceFilename argument is optional. If the caller provides an empty string, the name of the source file is expected to reside in the specified command line arguments.
Note: When encountered in AClangCommandLineArgs, the following options are ignored:
Parameters
- ASourceFilename
- The name of the source file to load, or an empty string if the source file is included in AClangCommandLineArgs.
- AClangCommandLineArgs
- (optional) command-line arguments that would be passed to the clang executable if it were being invoked out-of-process. These command-line options will be parsed and will affect how the translation unit is parsed. Note that the following options are
- ignored
- '-c', '-emit-ast', '-fsyntax-only' (which is the default), and '-o <output file>'.
- AUnsavedFiles
- (optional) array of files that have not yet been saved to disk but may be required for code completion, including the contents of those files.
Returns
The translation unit or nil in case of an error (eg. file does not exist or parse error) |
 |
function CreateTranslationUnit(const AAstFilename: String): ITranslationUnit; |
Create a translation unit from an AST file (-emit-ast).
Parameters
- AAstFilename
- name of the AST file to load.
Returns
The translation unit or nil in case of an error (eg. file does not exist or in invalid format) |
 |
function ParseTranslationUnit(const ASourceFilename: String; const AClangCommandLineArgs: array of String; const AUnsavedFiles: TArray<TUnsavedFile> = nil; const AOptions: TTranslationUnitFlags = []): ITranslationUnit; |
Parse the given source file and the translation unit corresponding to that file.
This routine is the main entry point for the Clang C API, providing the ability to parse a source file into a translation unit that can then be queried by other functions in the API. This routine accepts a set of command-line arguments so that the compilation can be configured in the same way that the compiler is configured on the command line.
Parameters
- ASourceFilename
- The name of the source file to load, or an empty string if the source file is included in AClangCommandLineArgs.
- AClangCommandLineArgs
- (optional) command-line arguments that would be passed to the clang executable if it were being invoked out-of-process. These command-line options will be parsed and will affect how the translation unit is parsed. Note that the following options are
- ignored
- '-c', '-emit-ast', '-fsyntax-only' (which is the default), and '-o <output file>'.
- AUnsavedFiles
- (optional) array of files that have not yet been saved to disk but may be required for code completion, including the contents of those files.
- AOptions
- (optional) options that affects how the translation unit is managed but not its compilation.
Returns
The translation unit or nil in case of an error (eg. file does not exist or parse error) |
 |
function CreateIndexAction: IIndexAction; |
Create an indexing action/session, to be applied to one or multiple translation units.
Returns
The index action or nil in case of an error. |
Properties
 |
property InvocationEmissionPath: String write SetInvocationEmissionPath; |
The invocation emission path. Specifies a path which will contain log files for certain libclang invocations. An empty string (default) implies that libclang invocations are not logged.
|
 |
property Handle: TCXIndex read GetHandle; |
Internal handle to C API
|
Generated by PasDocEx, based on PasDoc 0.14.0.
|