Class FT_Module_Class

All Implemented Interfaces:
AutoCloseable, NativeResource, Pointer

public class FT_Module_Class extends Struct<FT_Module_Class> implements NativeResource

 struct FT_Module_Class {
     FT_ULong module_flags;
     FT_Long module_size;
     FT_String const * module_name;
     FT_Fixed module_version;
     FT_Fixed module_requires;
     void const * module_interface;
     {@link FT_Module_ConstructorI FT_Module_Constructor} module_init;
     {@link FT_Module_DestructorI FT_Module_Destructor} module_done;
     {@link FT_Module_RequesterI FT_Module_Requester} get_interface;
 }
  • Field Details

    • SIZEOF

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

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

      public static final int MODULE_FLAGS
      The struct member offsets.
    • MODULE_SIZE

      public static final int MODULE_SIZE
      The struct member offsets.
    • MODULE_NAME

      public static final int MODULE_NAME
      The struct member offsets.
    • MODULE_VERSION

      public static final int MODULE_VERSION
      The struct member offsets.
    • MODULE_REQUIRES

      public static final int MODULE_REQUIRES
      The struct member offsets.
    • MODULE_INTERFACE

      public static final int MODULE_INTERFACE
      The struct member offsets.
    • MODULE_INIT

      public static final int MODULE_INIT
      The struct member offsets.
    • MODULE_DONE

      public static final int MODULE_DONE
      The struct member offsets.
    • GET_INTERFACE

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

    • FT_Module_Class

      public FT_Module_Class(ByteBuffer container)
      Creates a FT_Module_Class 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()
      Description copied from class: Struct
      Returns sizeof(struct).
      Specified by:
      sizeof in class Struct<FT_Module_Class>
    • module_flags

      public long module_flags()
      Returns:
      the value of the module_flags field.
    • module_size

      public long module_size()
      Returns:
      the value of the module_size field.
    • module_name

      public ByteBuffer module_name()
      Returns:
      a ByteBuffer view of the null-terminated string pointed to by the module_name field.
    • module_nameString

      public String module_nameString()
      Returns:
      the null-terminated string pointed to by the module_name field.
    • module_version

      public long module_version()
      Returns:
      the value of the module_version field.
    • module_requires

      public long module_requires()
      Returns:
      the value of the module_requires field.
    • module_interface

      public @Nullable ByteBuffer module_interface(int capacity)
      Returns:
      a ByteBuffer view of the data pointed to by the module_interface field.
    • module_init

      public @Nullable FT_Module_Constructor module_init()
      Returns:
      the value of the module_init field.
    • module_done

      public @Nullable FT_Module_Destructor module_done()
      Returns:
      the value of the module_done field.
    • get_interface

      public @Nullable FT_Module_Requester get_interface()
      Returns:
      the value of the get_interface field.
    • module_flags

      public FT_Module_Class module_flags(long value)
      Sets the specified value to the module_flags field.
    • module_size

      public FT_Module_Class module_size(long value)
      Sets the specified value to the module_size field.
    • module_name

      public FT_Module_Class module_name(ByteBuffer value)
      Sets the address of the specified encoded string to the module_name field.
    • module_version

      public FT_Module_Class module_version(long value)
      Sets the specified value to the module_version field.
    • module_requires

      public FT_Module_Class module_requires(long value)
      Sets the specified value to the module_requires field.
    • module_interface

      public FT_Module_Class module_interface(@Nullable ByteBuffer value)
      Sets the address of the specified ByteBuffer to the module_interface field.
    • module_init

      public FT_Module_Class module_init(@Nullable FT_Module_ConstructorI value)
      Sets the specified value to the module_init field.
    • module_done

      public FT_Module_Class module_done(@Nullable FT_Module_DestructorI value)
      Sets the specified value to the module_done field.
    • get_interface

      public FT_Module_Class get_interface(@Nullable FT_Module_RequesterI value)
      Sets the specified value to the get_interface field.
    • set

      public FT_Module_Class set(long module_flags, long module_size, ByteBuffer module_name, long module_version, long module_requires, @Nullable ByteBuffer module_interface, @Nullable FT_Module_ConstructorI module_init, @Nullable FT_Module_DestructorI module_done, @Nullable FT_Module_RequesterI get_interface)
      Initializes this struct with the specified values.
    • set

      public FT_Module_Class set(FT_Module_Class src)
      Copies the specified struct data to this struct.
      Parameters:
      src - the source struct
      Returns:
      this struct
    • malloc

      public static FT_Module_Class malloc()
      Returns a new FT_Module_Class instance allocated with memAlloc. The instance must be explicitly freed.
    • calloc

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

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

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

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

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

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

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

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

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

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

      public static FT_Module_Class calloc(MemoryStack stack)
      Returns a new FT_Module_Class instance allocated on the specified MemoryStack and initializes all its bits to zero.
      Parameters:
      stack - the stack from which to allocate
    • malloc

      public static FT_Module_Class.Buffer malloc(int capacity, MemoryStack stack)
      Returns a new FT_Module_Class.Buffer instance allocated on the specified MemoryStack.
      Parameters:
      capacity - the buffer capacity
      stack - the stack from which to allocate
    • calloc

      public static FT_Module_Class.Buffer calloc(int capacity, MemoryStack stack)
      Returns a new FT_Module_Class.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
    • nmodule_flags

      public static long nmodule_flags(long struct)
      Unsafe version of module_flags().
    • nmodule_size

      public static long nmodule_size(long struct)
      Unsafe version of module_size().
    • nmodule_name

      public static ByteBuffer nmodule_name(long struct)
      Unsafe version of module_name().
    • nmodule_nameString

      public static String nmodule_nameString(long struct)
      Unsafe version of module_nameString().
    • nmodule_version

      public static long nmodule_version(long struct)
      Unsafe version of module_version().
    • nmodule_requires

      public static long nmodule_requires(long struct)
      Unsafe version of module_requires().
    • nmodule_interface

      public static @Nullable ByteBuffer nmodule_interface(long struct, int capacity)
      Unsafe version of module_interface.
    • nmodule_init

      public static @Nullable FT_Module_Constructor nmodule_init(long struct)
      Unsafe version of module_init().
    • nmodule_done

      public static @Nullable FT_Module_Destructor nmodule_done(long struct)
      Unsafe version of module_done().
    • nget_interface

      public static @Nullable FT_Module_Requester nget_interface(long struct)
      Unsafe version of get_interface().
    • nmodule_flags

      public static void nmodule_flags(long struct, long value)
      Unsafe version of module_flags.
    • nmodule_size

      public static void nmodule_size(long struct, long value)
      Unsafe version of module_size.
    • nmodule_name

      public static void nmodule_name(long struct, ByteBuffer value)
      Unsafe version of module_name.
    • nmodule_version

      public static void nmodule_version(long struct, long value)
      Unsafe version of module_version.
    • nmodule_requires

      public static void nmodule_requires(long struct, long value)
      Unsafe version of module_requires.
    • nmodule_interface

      public static void nmodule_interface(long struct, @Nullable ByteBuffer value)
      Unsafe version of module_interface.
    • nmodule_init

      public static void nmodule_init(long struct, @Nullable FT_Module_ConstructorI value)
      Unsafe version of module_init.
    • nmodule_done

      public static void nmodule_done(long struct, @Nullable FT_Module_DestructorI value)
      Unsafe version of module_done.
    • nget_interface

      public static void nget_interface(long struct, @Nullable FT_Module_RequesterI value)
      Unsafe version of get_interface.
    • validate

      public static void validate(long struct)
      Validates pointer members that should not be NULL.
      Parameters:
      struct - the struct to validate