Package org.lwjgl.system.linux
Class EpollData
java.lang.Object
org.lwjgl.system.Pointer.Default
org.lwjgl.system.Struct
org.lwjgl.system.linux.EpollData
- All Implemented Interfaces:
AutoCloseable
,org.lwjgl.system.NativeResource
,org.lwjgl.system.Pointer
public class EpollData
extends org.lwjgl.system.Struct
implements org.lwjgl.system.NativeResource
Layout
union epoll_data_t {
void * ptr;
int fd;
uint32_t u32;
uint64_t u64;
}
-
Nested Class Summary
Nested classes/interfaces inherited from class org.lwjgl.system.Struct
org.lwjgl.system.Struct.StructValidation
Nested classes/interfaces inherited from interface org.lwjgl.system.Pointer
org.lwjgl.system.Pointer.Default
-
Field Summary
Modifier and TypeFieldDescriptionstatic final int
The struct alignment in bytes.static final int
The struct member offsets.static final int
The struct member offsets.static final int
The struct size in bytes.static final int
The struct member offsets.static final int
The struct member offsets.Fields inherited from interface org.lwjgl.system.Pointer
BITS32, BITS64, CLONG_SHIFT, CLONG_SIZE, POINTER_SHIFT, POINTER_SIZE
-
Constructor Summary
ConstructorDescriptionEpollData
(ByteBuffer container) Creates aEpollData
instance at the current position of the specifiedByteBuffer
container. -
Method Summary
Modifier and TypeMethodDescriptionstatic EpollData
calloc()
Returns a newEpollData
instance allocated withmemCalloc
.static EpollData.Buffer
calloc
(int capacity) Returns a newEpollData.Buffer
instance allocated withmemCalloc
.static EpollData.Buffer
calloc
(int capacity, org.lwjgl.system.MemoryStack stack) Returns a newEpollData.Buffer
instance allocated on the specifiedMemoryStack
and initializes all its bits to zero.static EpollData
calloc
(org.lwjgl.system.MemoryStack stack) Returns a newEpollData
instance allocated on the specifiedMemoryStack
and initializes all its bits to zero.static EpollData
create()
Returns a newEpollData
instance allocated withBufferUtils
.static EpollData.Buffer
create
(int capacity) Returns a newEpollData.Buffer
instance allocated withBufferUtils
.static EpollData
create
(long address) Returns a newEpollData
instance for the specified memory address.static EpollData.Buffer
create
(long address, int capacity) Create aEpollData.Buffer
instance at the specified memory.static EpollData
createSafe
(long address) static EpollData.Buffer
createSafe
(long address, int capacity) int
fd()
fd
(int value) Sets the specified value to thefd
field.static EpollData
malloc()
Returns a newEpollData
instance allocated withmemAlloc
.static EpollData.Buffer
malloc
(int capacity) Returns a newEpollData.Buffer
instance allocated withmemAlloc
.static EpollData.Buffer
malloc
(int capacity, org.lwjgl.system.MemoryStack stack) Returns a newEpollData.Buffer
instance allocated on the specifiedMemoryStack
.static EpollData
malloc
(org.lwjgl.system.MemoryStack stack) Returns a newEpollData
instance allocated on the specifiedMemoryStack
.static int
nfd
(long struct) Unsafe version offd()
.static void
nfd
(long struct, int value) Unsafe version offd
.static long
nptr
(long struct) Unsafe version ofptr()
.static void
nptr
(long struct, long value) Unsafe version ofptr
.static int
nu32
(long struct) Unsafe version ofu32()
.static void
nu32
(long struct, int value) Unsafe version ofu32
.static long
nu64
(long struct) Unsafe version ofu64()
.static void
nu64
(long struct, long value) Unsafe version ofu64
.long
ptr()
ptr
(long value) Sets the specified value to theptr
field.Copies the specified struct data to this struct.int
sizeof()
int
u32()
u32
(int value) Sets the specified value to theu32
field.long
u64()
u64
(long value) Sets the specified value to theu64
field.Methods inherited from class org.lwjgl.system.Struct
clear, free, isNull, validate
Methods inherited from class org.lwjgl.system.Pointer.Default
address, equals, hashCode, toString
Methods inherited from interface org.lwjgl.system.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. -
PTR
public static final int PTRThe struct member offsets. -
FD
public static final int FDThe struct member offsets. -
U32
public static final int U32The struct member offsets. -
U64
public static final int U64The struct member offsets.
-
-
Constructor Details
-
EpollData
Creates aEpollData
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 Details
-
sizeof
public int sizeof()- Specified by:
sizeof
in classorg.lwjgl.system.Struct
-
ptr
public long ptr()- Returns:
- the value of the
ptr
field.
-
fd
public int fd()- Returns:
- the value of the
fd
field.
-
u32
public int u32()- Returns:
- the value of the
u32
field.
-
u64
public long u64()- Returns:
- the value of the
u64
field.
-
ptr
Sets the specified value to theptr
field. -
fd
Sets the specified value to thefd
field. -
u32
Sets the specified value to theu32
field. -
u64
Sets the specified value to theu64
field. -
set
Copies the specified struct data to this struct.- Parameters:
src
- the source struct- Returns:
- this struct
-
malloc
Returns a newEpollData
instance allocated withmemAlloc
. The instance must be explicitly freed. -
calloc
Returns a newEpollData
instance allocated withmemCalloc
. The instance must be explicitly freed. -
create
Returns a newEpollData
instance allocated withBufferUtils
. -
create
Returns a newEpollData
instance for the specified memory address. -
createSafe
-
malloc
Returns a newEpollData.Buffer
instance allocated withmemAlloc
. The instance must be explicitly freed.- Parameters:
capacity
- the buffer capacity
-
calloc
Returns a newEpollData.Buffer
instance allocated withmemCalloc
. The instance must be explicitly freed.- Parameters:
capacity
- the buffer capacity
-
create
Returns a newEpollData.Buffer
instance allocated withBufferUtils
.- Parameters:
capacity
- the buffer capacity
-
create
Create aEpollData.Buffer
instance at the specified memory.- Parameters:
address
- the memory addresscapacity
- the buffer capacity
-
createSafe
-
malloc
Returns a newEpollData
instance allocated on the specifiedMemoryStack
.- Parameters:
stack
- the stack from which to allocate
-
calloc
Returns a newEpollData
instance allocated on the specifiedMemoryStack
and initializes all its bits to zero.- Parameters:
stack
- the stack from which to allocate
-
malloc
Returns a newEpollData.Buffer
instance allocated on the specifiedMemoryStack
.- Parameters:
capacity
- the buffer capacitystack
- the stack from which to allocate
-
calloc
Returns a newEpollData.Buffer
instance allocated on the specifiedMemoryStack
and initializes all its bits to zero.- Parameters:
capacity
- the buffer capacitystack
- the stack from which to allocate
-
nptr
public static long nptr(long struct) Unsafe version ofptr()
. -
nfd
public static int nfd(long struct) Unsafe version offd()
. -
nu32
public static int nu32(long struct) Unsafe version ofu32()
. -
nu64
public static long nu64(long struct) Unsafe version ofu64()
. -
nptr
public static void nptr(long struct, long value) Unsafe version ofptr
. -
nfd
public static void nfd(long struct, int value) Unsafe version offd
. -
nu32
public static void nu32(long struct, int value) Unsafe version ofu32
. -
nu64
public static void nu64(long struct, long value) Unsafe version ofu64
.
-