Class NkBufferMarker
- All Implemented Interfaces:
Pointer
struct nk_buffer_marker {
nk_bool active;
nk_size offset;
}-
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 member offsets.static final intThe struct alignment in bytes.static final intThe struct member offsets.static final intThe struct size in bytes.Fields inherited from interface Pointer
BITS32, BITS64, CLONG_SHIFT, CLONG_SIZE, POINTER_SHIFT, POINTER_SIZE -
Constructor Summary
ConstructorsConstructorDescriptionNkBufferMarker(ByteBuffer container) Creates aNkBufferMarkerinstance at the current position of the specifiedByteBuffercontainer. -
Method Summary
Modifier and TypeMethodDescriptionbooleanactive()static NkBufferMarkercreate(long address) Returns a newNkBufferMarkerinstance for the specified memory address.static NkBufferMarker.Buffercreate(long address, int capacity) Create aNkBufferMarker.Bufferinstance at the specified memory.static @Nullable NkBufferMarkercreateSafe(long address) static @Nullable NkBufferMarker.BuffercreateSafe(long address, int capacity) static booleannactive(long struct) Unsafe version ofactive().static longnoffset(long struct) Unsafe version ofoffset().longoffset()intsizeof()Returnssizeof(struct).Methods inherited from class Pointer.Default
address, equals, hashCode, toString
-
Field Details
-
SIZEOF
public static final int SIZEOFThe struct size in bytes. -
ALIGNOF
public static final int ALIGNOFThe struct alignment in bytes. -
ACTIVE
public static final int ACTIVEThe struct member offsets. -
OFFSET
public static final int OFFSETThe struct member offsets.
-
-
Constructor Details
-
NkBufferMarker
Creates aNkBufferMarkerinstance 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
public int sizeof()Description copied from class:StructReturnssizeof(struct).- Specified by:
sizeofin classStruct<NkBufferMarker>
-
active
- Returns:
- the value of the
activefield.
-
offset
- Returns:
- the value of the
offsetfield.
-
create
Returns a newNkBufferMarkerinstance for the specified memory address. -
createSafe
-
create
Create aNkBufferMarker.Bufferinstance at the specified memory.- Parameters:
address- the memory addresscapacity- the buffer capacity
-
createSafe
-
nactive
public static boolean nactive(long struct) Unsafe version ofactive(). -
noffset
public static long noffset(long struct) Unsafe version ofoffset().
-