Class IndexerCallbacks

  • All Implemented Interfaces:
    java.lang.AutoCloseable, NativeResource, Pointer

    public class IndexerCallbacks
    extends Struct
    implements NativeResource
    A group of callbacks used by indexSourceFile and indexTranslationUnit.

    Member documentation

    • abortQuery – called periodically to check whether indexing should be aborted. Should return 0 to continue, and non-zero to abort.
    • diagnostic – called at the end of indexing; passes the complete diagnostic set.
    • ppIncludedFile – called when a file gets #included/#imported
    • importedASTFile – Called when a AST file (PCH or module) gets imported.

      AST files will not get indexed (there will not be callbacks to index all the entities in an AST file). The recommended action is that, if the AST file is not already indexed, to initiate a new indexing job specific to the AST file.

    • startedTranslationUnit – called at the beginning of indexing a translation unit
    • indexEntityReference – called to index a reference of an entity


     struct IndexerCallbacks {
         int (*abortQuery) (CXClientData client_data, void *reserved);
         void (*diagnostic) (CXClientData client_data, CXDiagnosticSet diagnosticSet, void *reserved);
         CXIdxClientFile (*enteredMainFile) (CXClientData client_data, CXFile mainFile, void *reserved);
         CXIdxClientFile (*ppIncludedFile) (CXClientData client_data, CXIdxIncludedFileInfo const *info);
         CXIdxClientASTFile (*importedASTFile) (CXClientData client_data, CXIdxImportedASTFileInfo const *info);
         CXIdxClientContainer (*startedTranslationUnit) (CXClientData client_data, void *reserved);
         void (*indexDeclaration) (CXClientData client_data, CXIdxDeclInfo const *info);
         void (*indexEntityReference) (CXClientData client_data, CXIdxEntityRefInfo const *info);