Package org.lwjgl.llvm
Class IndexerCallbacks
- java.lang.Object
-
- org.lwjgl.system.Pointer.Default
-
- org.lwjgl.system.Struct
-
- org.lwjgl.llvm.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 byindexSourceFile
andindexTranslationUnit
.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 unitindexEntityReference
– called to index a reference of an entity
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); }
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static class
IndexerCallbacks.Buffer
An array ofIndexerCallbacks
structs.
-
Field Summary
Fields Modifier and Type Field Description static int
ABORTQUERY
The struct member offsets.static int
ALIGNOF
The struct alignment in bytes.static int
DIAGNOSTIC
ENTEREDMAINFILE
IMPORTEDASTFILE
INDEXDECLARATION
INDEXENTITYREFERENCE
PPINCLUDEDFILEThe struct member offsets.static int
SIZEOF
The struct size in bytes.static int
STARTEDTRANSLATIONUNIT
The struct member offsets.
-
Constructor Summary
Constructors Constructor Description IndexerCallbacks(java.nio.ByteBuffer container)
Creates aIndexerCallbacks
instance at the current position of the specifiedByteBuffer
container.
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description IndexerAbortQuery
abortQuery()
Returns the value of theabortQuery
field.static IndexerCallbacks
calloc()
Returns a newIndexerCallbacks
instance allocated withmemCalloc
.static IndexerCallbacks.Buffer
calloc(int capacity)
Returns a newIndexerCallbacks.Buffer
instance allocated withmemCalloc
.static IndexerCallbacks
callocStack()
Returns a newIndexerCallbacks
instance allocated on the thread-localMemoryStack
and initializes all its bits to zero.static IndexerCallbacks.Buffer
callocStack(int capacity)
Returns a newIndexerCallbacks.Buffer
instance allocated on the thread-localMemoryStack
and initializes all its bits to zero.static IndexerCallbacks.Buffer
callocStack(int capacity, org.lwjgl.system.MemoryStack stack)
Returns a newIndexerCallbacks.Buffer
instance allocated on the specifiedMemoryStack
and initializes all its bits to zero.static IndexerCallbacks
callocStack(org.lwjgl.system.MemoryStack stack)
Returns a newIndexerCallbacks
instance allocated on the specifiedMemoryStack
and initializes all its bits to zero.static IndexerCallbacks
create()
Returns a newIndexerCallbacks
instance allocated withBufferUtils
.static IndexerCallbacks.Buffer
create(int capacity)
Returns a newIndexerCallbacks.Buffer
instance allocated withBufferUtils
.static IndexerCallbacks
create(long address)
Returns a newIndexerCallbacks
instance for the specified memory address.static IndexerCallbacks.Buffer
create(long address, int capacity)
Create aIndexerCallbacks.Buffer
instance at the specified memory.static IndexerCallbacks
createSafe(long address)
static IndexerCallbacks.Buffer
createSafe(long address, int capacity)
IndexerDiagnostic
diagnostic()
Returns the value of thediagnostic
field.IndexerEnteredMainFile
enteredMainFile()
Returns the value of theenteredMainFile
field.IndexerImportedASTFile
importedASTFile()
Returns the value of theimportedASTFile
field.IndexerIndexDeclaration
indexDeclaration()
Returns the value of theindexDeclaration
field.IndexerIndexEntityReference
indexEntityReference()
Returns the value of theindexEntityReference
field.static IndexerCallbacks
malloc()
Returns a newIndexerCallbacks
instance allocated withmemAlloc
.static IndexerCallbacks.Buffer
malloc(int capacity)
Returns a newIndexerCallbacks.Buffer
instance allocated withmemAlloc
.static IndexerCallbacks
mallocStack()
Returns a newIndexerCallbacks
instance allocated on the thread-localMemoryStack
.static IndexerCallbacks.Buffer
mallocStack(int capacity)
Returns a newIndexerCallbacks.Buffer
instance allocated on the thread-localMemoryStack
.static IndexerCallbacks.Buffer
mallocStack(int capacity, org.lwjgl.system.MemoryStack stack)
Returns a newIndexerCallbacks.Buffer
instance allocated on the specifiedMemoryStack
.static IndexerCallbacks
mallocStack(org.lwjgl.system.MemoryStack stack)
Returns a newIndexerCallbacks
instance allocated on the specifiedMemoryStack
.static IndexerAbortQuery
nabortQuery(long struct)
Unsafe version ofabortQuery()
.static IndexerDiagnostic
ndiagnostic(long struct)
Unsafe version ofdiagnostic()
.static IndexerEnteredMainFile
nenteredMainFile(long struct)
Unsafe version ofenteredMainFile()
.static IndexerImportedASTFile
nimportedASTFile(long struct)
Unsafe version ofimportedASTFile()
.static IndexerIndexDeclaration
nindexDeclaration(long struct)
Unsafe version ofindexDeclaration()
.static IndexerIndexEntityReference
nindexEntityReference(long struct)
Unsafe version ofindexEntityReference()
.static IndexerIncludedFile
nppIncludedFile(long struct)
Unsafe version ofppIncludedFile()
.static IndexerStartedTranslationUnit
nstartedTranslationUnit(long struct)
Unsafe version ofstartedTranslationUnit()
.IndexerIncludedFile
ppIncludedFile()
Returns the value of theppIncludedFile
field.int
sizeof()
IndexerStartedTranslationUnit
startedTranslationUnit()
Returns the value of thestartedTranslationUnit
field.
-
-
-
Constructor Detail
-
IndexerCallbacks
public IndexerCallbacks(java.nio.ByteBuffer container)
Creates aIndexerCallbacks
instance at the current position of the specifiedByteBuffer
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 classorg.lwjgl.system.Struct
-
abortQuery
public IndexerAbortQuery abortQuery()
Returns the value of theabortQuery
field.
-
diagnostic
public IndexerDiagnostic diagnostic()
Returns the value of thediagnostic
field.
-
enteredMainFile
public IndexerEnteredMainFile enteredMainFile()
Returns the value of theenteredMainFile
field.
-
ppIncludedFile
public IndexerIncludedFile ppIncludedFile()
Returns the value of theppIncludedFile
field.
-
importedASTFile
public IndexerImportedASTFile importedASTFile()
Returns the value of theimportedASTFile
field.
-
startedTranslationUnit
public IndexerStartedTranslationUnit startedTranslationUnit()
Returns the value of thestartedTranslationUnit
field.
-
indexDeclaration
public IndexerIndexDeclaration indexDeclaration()
Returns the value of theindexDeclaration
field.
-
indexEntityReference
public IndexerIndexEntityReference indexEntityReference()
Returns the value of theindexEntityReference
field.
-
malloc
public static IndexerCallbacks malloc()
Returns a newIndexerCallbacks
instance allocated withmemAlloc
. The instance must be explicitly freed.
-
calloc
public static IndexerCallbacks calloc()
Returns a newIndexerCallbacks
instance allocated withmemCalloc
. The instance must be explicitly freed.
-
create
public static IndexerCallbacks create()
Returns a newIndexerCallbacks
instance allocated withBufferUtils
.
-
create
public static IndexerCallbacks create(long address)
Returns a newIndexerCallbacks
instance for the specified memory address.
-
createSafe
@Nullable public static IndexerCallbacks createSafe(long address)
-
malloc
public static IndexerCallbacks.Buffer malloc(int capacity)
Returns a newIndexerCallbacks.Buffer
instance allocated withmemAlloc
. The instance must be explicitly freed.- Parameters:
capacity
- the buffer capacity
-
calloc
public static IndexerCallbacks.Buffer calloc(int capacity)
Returns a newIndexerCallbacks.Buffer
instance allocated withmemCalloc
. The instance must be explicitly freed.- Parameters:
capacity
- the buffer capacity
-
create
public static IndexerCallbacks.Buffer create(int capacity)
Returns a newIndexerCallbacks.Buffer
instance allocated withBufferUtils
.- Parameters:
capacity
- the buffer capacity
-
create
public static IndexerCallbacks.Buffer create(long address, int capacity)
Create aIndexerCallbacks.Buffer
instance at the specified memory.- Parameters:
address
- the memory addresscapacity
- the buffer capacity
-
createSafe
@Nullable public static IndexerCallbacks.Buffer createSafe(long address, int capacity)
-
mallocStack
public static IndexerCallbacks mallocStack()
Returns a newIndexerCallbacks
instance allocated on the thread-localMemoryStack
.
-
callocStack
public static IndexerCallbacks callocStack()
Returns a newIndexerCallbacks
instance allocated on the thread-localMemoryStack
and initializes all its bits to zero.
-
mallocStack
public static IndexerCallbacks mallocStack(org.lwjgl.system.MemoryStack stack)
Returns a newIndexerCallbacks
instance allocated on the specifiedMemoryStack
.- Parameters:
stack
- the stack from which to allocate
-
callocStack
public static IndexerCallbacks callocStack(org.lwjgl.system.MemoryStack stack)
Returns a newIndexerCallbacks
instance allocated on the specifiedMemoryStack
and initializes all its bits to zero.- Parameters:
stack
- the stack from which to allocate
-
mallocStack
public static IndexerCallbacks.Buffer mallocStack(int capacity)
Returns a newIndexerCallbacks.Buffer
instance allocated on the thread-localMemoryStack
.- Parameters:
capacity
- the buffer capacity
-
callocStack
public static IndexerCallbacks.Buffer callocStack(int capacity)
Returns a newIndexerCallbacks.Buffer
instance allocated on the thread-localMemoryStack
and initializes all its bits to zero.- Parameters:
capacity
- the buffer capacity
-
mallocStack
public static IndexerCallbacks.Buffer mallocStack(int capacity, org.lwjgl.system.MemoryStack stack)
Returns a newIndexerCallbacks.Buffer
instance allocated on the specifiedMemoryStack
.- Parameters:
stack
- the stack from which to allocatecapacity
- the buffer capacity
-
callocStack
public static IndexerCallbacks.Buffer callocStack(int capacity, org.lwjgl.system.MemoryStack stack)
Returns a newIndexerCallbacks.Buffer
instance allocated on the specifiedMemoryStack
and initializes all its bits to zero.- Parameters:
stack
- the stack from which to allocatecapacity
- the buffer capacity
-
nabortQuery
public static IndexerAbortQuery nabortQuery(long struct)
Unsafe version ofabortQuery()
.
-
ndiagnostic
public static IndexerDiagnostic ndiagnostic(long struct)
Unsafe version ofdiagnostic()
.
-
nenteredMainFile
public static IndexerEnteredMainFile nenteredMainFile(long struct)
Unsafe version ofenteredMainFile()
.
-
nppIncludedFile
public static IndexerIncludedFile nppIncludedFile(long struct)
Unsafe version ofppIncludedFile()
.
-
nimportedASTFile
public static IndexerImportedASTFile nimportedASTFile(long struct)
Unsafe version ofimportedASTFile()
.
-
nstartedTranslationUnit
public static IndexerStartedTranslationUnit nstartedTranslationUnit(long struct)
Unsafe version ofstartedTranslationUnit()
.
-
nindexDeclaration
public static IndexerIndexDeclaration nindexDeclaration(long struct)
Unsafe version ofindexDeclaration()
.
-
nindexEntityReference
public static IndexerIndexEntityReference nindexEntityReference(long struct)
Unsafe version ofindexEntityReference()
.
-
-