Class IndexerCallbacks

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

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

    Layout

    
     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);
     }
    • Field Detail

      • SIZEOF

        The struct size in bytes.
      • ALIGNOF

        The struct alignment in bytes.
      • ABORTQUERY, DIAGNOSTIC, ENTEREDMAINFILE, PPINCLUDEDFILE, IMPORTEDASTFILE, STARTEDTRANSLATIONUNIT, INDEXDECLARATION, INDEXENTITYREFERENCE

        The struct member offsets.
    • Constructor Detail

      • IndexerCallbacks

        public IndexerCallbacks​(java.nio.ByteBuffer container)
        Creates a IndexerCallbacks instance at the current position of the specified ByteBuffer container. Changes to the buffer's content will be visible to the struct instance and vice versa.

        The created instance holds a strong reference to the container object.

    • Method Detail

      • sizeof

        public int sizeof()
        Specified by:
        sizeof in class org.lwjgl.system.Struct
      • abortQuery

        public IndexerAbortQuery abortQuery()
        called periodically to check whether indexing should be aborted. Should return 0 to continue, and non-zero to abort.
      • diagnostic

        public IndexerDiagnostic diagnostic()
        called at the end of indexing; passes the complete diagnostic set.
      • enteredMainFile

        public IndexerEnteredMainFile enteredMainFile()
        Returns:
        the value of the enteredMainFile field.
      • ppIncludedFile

        public IndexerIncludedFile ppIncludedFile()
        called when a file gets #included/#imported
      • importedASTFile

        public IndexerImportedASTFile 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.

      • indexDeclaration

        public IndexerIndexDeclaration indexDeclaration()
        Returns:
        the value of the indexDeclaration field.
      • malloc

        public static IndexerCallbacks malloc()
        Returns a new IndexerCallbacks instance allocated with memAlloc. The instance must be explicitly freed.
      • calloc

        public static IndexerCallbacks calloc()
        Returns a new IndexerCallbacks instance allocated with memCalloc. The instance must be explicitly freed.
      • create

        public static IndexerCallbacks create()
        Returns a new IndexerCallbacks instance allocated with BufferUtils.
      • create

        public static IndexerCallbacks create​(long address)
        Returns a new IndexerCallbacks instance for the specified memory address.
      • createSafe

        @Nullable
        public static IndexerCallbacks createSafe​(long address)
        Like create, but returns null if address is NULL.
      • createSafe

        @Nullable
        public static IndexerCallbacks.Buffer createSafe​(long address,
                                                         int capacity)
        Like create, but returns null if address is NULL.
      • mallocStack

        @Deprecated
        public static IndexerCallbacks mallocStack​(org.lwjgl.system.MemoryStack stack)
        Deprecated.
        Deprecated for removal in 3.4.0. Use malloc(MemoryStack) instead.
      • callocStack

        @Deprecated
        public static IndexerCallbacks callocStack​(org.lwjgl.system.MemoryStack stack)
        Deprecated.
        Deprecated for removal in 3.4.0. Use calloc(MemoryStack) instead.
      • malloc

        public static IndexerCallbacks malloc​(org.lwjgl.system.MemoryStack stack)
        Returns a new IndexerCallbacks instance allocated on the specified MemoryStack.
        Parameters:
        stack - the stack from which to allocate
      • calloc

        public static IndexerCallbacks calloc​(org.lwjgl.system.MemoryStack stack)
        Returns a new IndexerCallbacks instance allocated on the specified MemoryStack and initializes all its bits to zero.
        Parameters:
        stack - the stack from which to allocate
      • malloc

        public static IndexerCallbacks.Buffer malloc​(int capacity,
                                                     org.lwjgl.system.MemoryStack stack)
        Returns a new IndexerCallbacks.Buffer instance allocated on the specified MemoryStack.
        Parameters:
        stack - the stack from which to allocate
        capacity - the buffer capacity
      • calloc

        public static IndexerCallbacks.Buffer calloc​(int capacity,
                                                     org.lwjgl.system.MemoryStack stack)
        Returns a new IndexerCallbacks.Buffer instance allocated on the specified MemoryStack and initializes all its bits to zero.
        Parameters:
        stack - the stack from which to allocate
        capacity - the buffer capacity