Class EpollData

java.lang.Object
org.lwjgl.system.Pointer.Default
org.lwjgl.system.Struct<EpollData>
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<EpollData> 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
    Modifier and Type
    Class
    Description
    static class 
    An array of EpollData structs.

    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

    Fields
    Modifier and Type
    Field
    Description
    static 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

    Constructors
    Constructor
    Description
    EpollData(ByteBuffer container)
    Creates a EpollData instance at the current position of the specified ByteBuffer container.
  • Method Summary

    Modifier and Type
    Method
    Description
    static EpollData
    Returns a new EpollData instance allocated with memCalloc.
    calloc(int capacity)
    Returns a new EpollData.Buffer instance allocated with memCalloc.
    calloc(int capacity, org.lwjgl.system.MemoryStack stack)
    Returns a new EpollData.Buffer instance allocated on the specified MemoryStack and initializes all its bits to zero.
    static EpollData
    calloc(org.lwjgl.system.MemoryStack stack)
    Returns a new EpollData instance allocated on the specified MemoryStack and initializes all its bits to zero.
    static EpollData
    Returns a new EpollData instance allocated with BufferUtils.
    create(int capacity)
    Returns a new EpollData.Buffer instance allocated with BufferUtils.
    static EpollData
    create(long address)
    Returns a new EpollData instance for the specified memory address.
    create(long address, int capacity)
    Create a EpollData.Buffer instance at the specified memory.
    static EpollData
    createSafe(long address)
    Like create, but returns null if address is NULL.
    createSafe(long address, int capacity)
    Like create, but returns null if address is NULL.
    int
    fd()
     
    fd(int value)
    Sets the specified value to the fd field.
    static EpollData
    Returns a new EpollData instance allocated with memAlloc.
    malloc(int capacity)
    Returns a new EpollData.Buffer instance allocated with memAlloc.
    malloc(int capacity, org.lwjgl.system.MemoryStack stack)
    Returns a new EpollData.Buffer instance allocated on the specified MemoryStack.
    static EpollData
    malloc(org.lwjgl.system.MemoryStack stack)
    Returns a new EpollData instance allocated on the specified MemoryStack.
    static int
    nfd(long struct)
    Unsafe version of fd().
    static void
    nfd(long struct, int value)
    Unsafe version of fd.
    static long
    nptr(long struct)
    Unsafe version of ptr().
    static void
    nptr(long struct, long value)
    Unsafe version of ptr.
    static int
    nu32(long struct)
    Unsafe version of u32().
    static void
    nu32(long struct, int value)
    Unsafe version of u32.
    static long
    nu64(long struct)
    Unsafe version of u64().
    static void
    nu64(long struct, long value)
    Unsafe version of u64.
    long
    ptr()
     
    ptr(long value)
    Sets the specified value to the ptr field.
    Copies the specified struct data to this struct.
    int
     
    int
    u32()
     
    u32(int value)
    Sets the specified value to the u32 field.
    long
    u64()
     
    u64(long value)
    Sets the specified value to the u64 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 class java.lang.Object

    getClass, notify, notifyAll, wait, wait, wait

    Methods inherited from interface org.lwjgl.system.NativeResource

    close, free
  • Field Details

    • SIZEOF

      public static final int SIZEOF
      The struct size in bytes.
    • ALIGNOF

      public static final int ALIGNOF
      The struct alignment in bytes.
    • PTR

      public static final int PTR
      The struct member offsets.
    • FD

      public static final int FD
      The struct member offsets.
    • U32

      public static final int U32
      The struct member offsets.
    • U64

      public static final int U64
      The struct member offsets.
  • Constructor Details

    • EpollData

      public EpollData(ByteBuffer container)
      Creates a EpollData instance at the current position of the specified ByteBuffer 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 class org.lwjgl.system.Struct<EpollData>
    • 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

      public EpollData ptr(long value)
      Sets the specified value to the ptr field.
    • fd

      public EpollData fd(int value)
      Sets the specified value to the fd field.
    • u32

      public EpollData u32(int value)
      Sets the specified value to the u32 field.
    • u64

      public EpollData u64(long value)
      Sets the specified value to the u64 field.
    • 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 new EpollData instance allocated with memAlloc. The instance must be explicitly freed.
    • calloc

      public static EpollData calloc()
      Returns a new EpollData instance allocated with memCalloc. The instance must be explicitly freed.
    • create

      public static EpollData create()
      Returns a new EpollData instance allocated with BufferUtils.
    • create

      public static EpollData create(long address)
      Returns a new EpollData instance for the specified memory address.
    • createSafe

      @Nullable public static EpollData createSafe(long address)
      Like create, but returns null if address is NULL.
    • malloc

      public static EpollData.Buffer malloc(int capacity)
      Returns a new EpollData.Buffer instance allocated with memAlloc. The instance must be explicitly freed.
      Parameters:
      capacity - the buffer capacity
    • calloc

      public static EpollData.Buffer calloc(int capacity)
      Returns a new EpollData.Buffer instance allocated with memCalloc. The instance must be explicitly freed.
      Parameters:
      capacity - the buffer capacity
    • create

      public static EpollData.Buffer create(int capacity)
      Returns a new EpollData.Buffer instance allocated with BufferUtils.
      Parameters:
      capacity - the buffer capacity
    • create

      public static EpollData.Buffer create(long address, int capacity)
      Create a EpollData.Buffer instance at the specified memory.
      Parameters:
      address - the memory address
      capacity - the buffer capacity
    • createSafe

      @Nullable public static EpollData.Buffer createSafe(long address, int capacity)
      Like create, but returns null if address is NULL.
    • malloc

      public static EpollData malloc(org.lwjgl.system.MemoryStack stack)
      Returns a new EpollData instance allocated on the specified MemoryStack.
      Parameters:
      stack - the stack from which to allocate
    • calloc

      public static EpollData calloc(org.lwjgl.system.MemoryStack stack)
      Returns a new EpollData instance allocated on the specified MemoryStack and 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 new EpollData.Buffer instance allocated on the specified MemoryStack.
      Parameters:
      capacity - the buffer capacity
      stack - the stack from which to allocate
    • calloc

      public static EpollData.Buffer calloc(int capacity, org.lwjgl.system.MemoryStack stack)
      Returns a new EpollData.Buffer instance allocated on the specified MemoryStack and initializes all its bits to zero.
      Parameters:
      capacity - the buffer capacity
      stack - the stack from which to allocate
    • nptr

      public static long nptr(long struct)
      Unsafe version of ptr().
    • nfd

      public static int nfd(long struct)
      Unsafe version of fd().
    • nu32

      public static int nu32(long struct)
      Unsafe version of u32().
    • nu64

      public static long nu64(long struct)
      Unsafe version of u64().
    • nptr

      public static void nptr(long struct, long value)
      Unsafe version of ptr.
    • nfd

      public static void nfd(long struct, int value)
      Unsafe version of fd.
    • nu32

      public static void nu32(long struct, int value)
      Unsafe version of u32.
    • nu64

      public static void nu64(long struct, long value)
      Unsafe version of u64.