Class CXComment
- All Implemented Interfaces:
AutoCloseable, NativeResource, Pointer
struct CXComment {
void const * ASTNode;
CXTranslationUnit TranslationUnit;
}-
Nested Class Summary
Nested ClassesNested classes/interfaces inherited from class Struct
Struct.StructValidationNested classes/interfaces inherited from interface Pointer
Pointer.Default -
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final intThe struct alignment in bytes.static final intThe struct member offsets.static final intThe struct size in bytes.static final intThe struct member offsets.Fields inherited from interface Pointer
BITS32, BITS64, CLONG_SHIFT, CLONG_SIZE, POINTER_SHIFT, POINTER_SIZE -
Constructor Summary
ConstructorsConstructorDescriptionCXComment(ByteBuffer container) Creates aCXCommentinstance at the current position of the specifiedByteBuffercontainer. -
Method Summary
Modifier and TypeMethodDescriptionlongASTNode()static CXCommentcalloc()Returns a newCXCommentinstance allocated withmemCalloc.static CXComment.Buffercalloc(int capacity) Returns a newCXComment.Bufferinstance allocated withmemCalloc.static CXComment.Buffercalloc(int capacity, MemoryStack stack) Returns a newCXComment.Bufferinstance allocated on the specifiedMemoryStackand initializes all its bits to zero.static CXCommentcalloc(MemoryStack stack) Returns a newCXCommentinstance allocated on the specifiedMemoryStackand initializes all its bits to zero.static CXCommentcreate()Returns a newCXCommentinstance allocated withBufferUtils.static CXComment.Buffercreate(int capacity) Returns a newCXComment.Bufferinstance allocated withBufferUtils.static CXCommentcreate(long address) Returns a newCXCommentinstance for the specified memory address.static CXComment.Buffercreate(long address, int capacity) Create aCXComment.Bufferinstance at the specified memory.static @Nullable CXCommentcreateSafe(long address) static @Nullable CXComment.BuffercreateSafe(long address, int capacity) static CXCommentmalloc()Returns a newCXCommentinstance allocated withmemAlloc.static CXComment.Buffermalloc(int capacity) Returns a newCXComment.Bufferinstance allocated withmemAlloc.static CXComment.Buffermalloc(int capacity, MemoryStack stack) Returns a newCXComment.Bufferinstance allocated on the specifiedMemoryStack.static CXCommentmalloc(MemoryStack stack) Returns a newCXCommentinstance allocated on the specifiedMemoryStack.static longnASTNode(long struct) Unsafe version ofASTNode().static longnTranslationUnit(long struct) Unsafe version ofTranslationUnit().intsizeof()Returnssizeof(struct).longMethods inherited from class Pointer.Default
address, equals, hashCode, toStringMethods inherited from interface NativeResource
close, free
-
Field Details
-
SIZEOF
public static final int SIZEOFThe struct size in bytes. -
ALIGNOF
public static final int ALIGNOFThe struct alignment in bytes. -
ASTNODE
public static final int ASTNODEThe struct member offsets. -
TRANSLATIONUNIT
public static final int TRANSLATIONUNITThe struct member offsets.
-
-
Constructor Details
-
CXComment
Creates aCXCommentinstance at the current position of the specifiedByteBuffercontainer. 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 Details
-
sizeof
-
ASTNode
- Returns:
- the value of the
ASTNodefield.
-
TranslationUnit
- Returns:
- the value of the
TranslationUnitfield.
-
malloc
-
calloc
-
create
Returns a newCXCommentinstance allocated withBufferUtils. -
create
Returns a newCXCommentinstance for the specified memory address. -
createSafe
-
malloc
Returns a newCXComment.Bufferinstance allocated withmemAlloc. The instance must be explicitly freed.- Parameters:
capacity- the buffer capacity
-
calloc
Returns a newCXComment.Bufferinstance allocated withmemCalloc. The instance must be explicitly freed.- Parameters:
capacity- the buffer capacity
-
create
Returns a newCXComment.Bufferinstance allocated withBufferUtils.- Parameters:
capacity- the buffer capacity
-
create
Create aCXComment.Bufferinstance at the specified memory.- Parameters:
address- the memory addresscapacity- the buffer capacity
-
createSafe
-
malloc
Returns a newCXCommentinstance allocated on the specifiedMemoryStack.- Parameters:
stack- the stack from which to allocate
-
calloc
Returns a newCXCommentinstance allocated on the specifiedMemoryStackand initializes all its bits to zero.- Parameters:
stack- the stack from which to allocate
-
malloc
Returns a newCXComment.Bufferinstance allocated on the specifiedMemoryStack.- Parameters:
capacity- the buffer capacitystack- the stack from which to allocate
-
calloc
Returns a newCXComment.Bufferinstance allocated on the specifiedMemoryStackand initializes all its bits to zero.- Parameters:
capacity- the buffer capacitystack- the stack from which to allocate
-
nASTNode
public static long nASTNode(long struct) Unsafe version ofASTNode(). -
nTranslationUnit
public static long nTranslationUnit(long struct) Unsafe version ofTranslationUnit().
-