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:
java.lang.AutoCloseable,org.lwjgl.system.NativeResource,org.lwjgl.system.Pointer
public class EpollData extends org.lwjgl.system.Struct implements org.lwjgl.system.NativeResourceLayout
union epoll_data_t { void * ptr; int fd; uint32_t u32; uint64_t u64; }
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static classEpollData.BufferAn array ofEpollDatastructs.
-
Constructor Summary
Constructors Constructor Description EpollData(java.nio.ByteBuffer container)Creates aEpollDatainstance at the current position of the specifiedByteBuffercontainer.
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description static EpollDatacalloc()Returns a newEpollDatainstance allocated withmemCalloc.static EpollData.Buffercalloc(int capacity)Returns a newEpollData.Bufferinstance allocated withmemCalloc.static EpollData.Buffercalloc(int capacity, org.lwjgl.system.MemoryStack stack)Returns a newEpollData.Bufferinstance allocated on the specifiedMemoryStackand initializes all its bits to zero.static EpollDatacalloc(org.lwjgl.system.MemoryStack stack)Returns a newEpollDatainstance allocated on the specifiedMemoryStackand initializes all its bits to zero.static EpollDatacreate()Returns a newEpollDatainstance allocated withBufferUtils.static EpollData.Buffercreate(int capacity)Returns a newEpollData.Bufferinstance allocated withBufferUtils.static EpollDatacreate(long address)Returns a newEpollDatainstance for the specified memory address.static EpollData.Buffercreate(long address, int capacity)Create aEpollData.Bufferinstance at the specified memory.static EpollDatacreateSafe(long address)static EpollData.BuffercreateSafe(long address, int capacity)intfd()EpollDatafd(int value)Sets the specified value to thefdfield.static EpollDatamalloc()Returns a newEpollDatainstance allocated withmemAlloc.static EpollData.Buffermalloc(int capacity)Returns a newEpollData.Bufferinstance allocated withmemAlloc.static EpollData.Buffermalloc(int capacity, org.lwjgl.system.MemoryStack stack)Returns a newEpollData.Bufferinstance allocated on the specifiedMemoryStack.static EpollDatamalloc(org.lwjgl.system.MemoryStack stack)Returns a newEpollDatainstance allocated on the specifiedMemoryStack.static intnfd(long struct)Unsafe version offd().static voidnfd(long struct, int value)Unsafe version offd.static longnptr(long struct)Unsafe version ofptr().static voidnptr(long struct, long value)Unsafe version ofptr.static intnu32(long struct)Unsafe version ofu32().static voidnu32(long struct, int value)Unsafe version ofu32.static longnu64(long struct)Unsafe version ofu64().static voidnu64(long struct, long value)Unsafe version ofu64.longptr()EpollDataptr(long value)Sets the specified value to theptrfield.EpollDataset(EpollData src)Copies the specified struct data to this struct.intsizeof()intu32()EpollDatau32(int value)Sets the specified value to theu32field.longu64()EpollDatau64(long value)Sets the specified value to theu64field.
-
-
-
Constructor Detail
-
EpollData
public EpollData(java.nio.ByteBuffer container)
Creates aEpollDatainstance 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 Detail
-
sizeof
public int sizeof()
- Specified by:
sizeofin classorg.lwjgl.system.Struct
-
ptr
public long ptr()
- Returns:
- the value of the
ptrfield.
-
fd
public int fd()
- Returns:
- the value of the
fdfield.
-
u32
public int u32()
- Returns:
- the value of the
u32field.
-
u64
public long u64()
- Returns:
- the value of the
u64field.
-
ptr
public EpollData ptr(long value)
Sets the specified value to theptrfield.
-
fd
public EpollData fd(int value)
Sets the specified value to thefdfield.
-
u32
public EpollData u32(int value)
Sets the specified value to theu32field.
-
u64
public EpollData u64(long value)
Sets the specified value to theu64field.
-
set
public EpollData set(EpollData src)
Copies the specified struct data to this struct.- Parameters:
src- the source struct- Returns:
- this struct
-
malloc
public static EpollData malloc()
Returns a newEpollDatainstance allocated withmemAlloc. The instance must be explicitly freed.
-
calloc
public static EpollData calloc()
Returns a newEpollDatainstance allocated withmemCalloc. The instance must be explicitly freed.
-
create
public static EpollData create()
Returns a newEpollDatainstance allocated withBufferUtils.
-
create
public static EpollData create(long address)
Returns a newEpollDatainstance for the specified memory address.
-
createSafe
@Nullable public static EpollData createSafe(long address)
-
malloc
public static EpollData.Buffer malloc(int capacity)
Returns a newEpollData.Bufferinstance allocated withmemAlloc. The instance must be explicitly freed.- Parameters:
capacity- the buffer capacity
-
calloc
public static EpollData.Buffer calloc(int capacity)
Returns a newEpollData.Bufferinstance allocated withmemCalloc. The instance must be explicitly freed.- Parameters:
capacity- the buffer capacity
-
create
public static EpollData.Buffer create(int capacity)
Returns a newEpollData.Bufferinstance allocated withBufferUtils.- Parameters:
capacity- the buffer capacity
-
create
public static EpollData.Buffer create(long address, int capacity)
Create aEpollData.Bufferinstance at the specified memory.- Parameters:
address- the memory addresscapacity- the buffer capacity
-
createSafe
@Nullable public static EpollData.Buffer createSafe(long address, int capacity)
-
malloc
public static EpollData malloc(org.lwjgl.system.MemoryStack stack)
Returns a newEpollDatainstance allocated on the specifiedMemoryStack.- Parameters:
stack- the stack from which to allocate
-
calloc
public static EpollData calloc(org.lwjgl.system.MemoryStack stack)
Returns a newEpollDatainstance allocated on the specifiedMemoryStackand initializes all its bits to zero.- Parameters:
stack- the stack from which to allocate
-
malloc
public static EpollData.Buffer malloc(int capacity, org.lwjgl.system.MemoryStack stack)
Returns a newEpollData.Bufferinstance allocated on the specifiedMemoryStack.- Parameters:
stack- the stack from which to allocatecapacity- the buffer capacity
-
calloc
public static EpollData.Buffer calloc(int capacity, org.lwjgl.system.MemoryStack stack)
Returns a newEpollData.Bufferinstance allocated on the specifiedMemoryStackand initializes all its bits to zero.- Parameters:
stack- the stack from which to allocatecapacity- the buffer capacity
-
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.
-
-