struct ffi_type {
size_t size;
unsigned short alignment;
unsigned short type;
ffi_type * elements;
}
| Modifier and Type | Class and Description |
|---|---|
| public static class | FFIType.
An array of |
| Modifier and Type | Field and Description |
|---|---|
| public static final int | ALIGNMENT
The struct member offsets. |
| public static final int | ALIGNOF
The struct alignment in bytes. |
| public static final int | ELEMENTS
The struct member offsets. |
| public static final int | SIZE
The struct member offsets. |
| public static final int | SIZEOF
The struct size in bytes. |
| public static final int | TYPE
The struct member offsets. |
| Access | Constructor and Description |
|---|---|
| protected | |
| public | FFIType(ByteBuffer container)
Creates a |
| Modifier and Type | Method and Description |
|---|---|
| public short | |
| public FFIType | |
| public static FFIType | |
| public static FFIType. | calloc(int
the buffer capacity capacity)Returns a new |
| public static FFIType | calloc(MemoryStack
the stack from which to allocate stack)Returns a new |
| public static FFIType. | calloc(int
the buffer capacity capacity, MemoryStack the stack from which to allocate stack)Returns a new |
| protected FFIType | create(long
the struct memory address address, ByteBuffer an optional container buffer, to be referenced strongly by the struct instance. container)Implements abstract org. the constructor, but returns the exact type of the Struct subclass.
|
| public static FFIType | |
| public static FFIType | |
| public static FFIType. | create(int
the buffer capacity capacity)Returns a new |
| public static FFIType. | create(long
the memory address address, int the buffer capacity capacity)Create a |
| public static FFIType | |
| public static FFIType. | |
| public PointerBuffer | Returns: a null-terminated array of pointers toffi_type objects. There is one element per field of the struct.the number of elements in the returned buffer capacity)
|
| public FFIType | |
| public static FFIType | |
| public static FFIType. | malloc(int
the buffer capacity capacity)Returns a new |
| public static FFIType | malloc(MemoryStack
the stack from which to allocate stack)Returns a new |
| public static FFIType. | malloc(int
the buffer capacity capacity, MemoryStack the stack from which to allocate stack)Returns a new |
| public static short | |
| public static void | |
| public static PointerBuffer | |
| public static void | |
| public static long | |
| public static void | |
| public static short | |
| public static void | |
| public FFIType | set(long size, short alignment, short type, PointerBuffer elements)
Initializes this struct with the specified values. |
| public FFIType | |
| public long | |
| public FFIType | |
| public int | |
| public short | |
| public FFIType |
| ALIGNMENT | back to summary |
|---|---|
| public static final int ALIGNMENT The struct member offsets. | |
| ALIGNOF | back to summary |
|---|---|
| public static final int ALIGNOF The struct alignment in bytes. | |
| ELEMENTS | back to summary |
|---|---|
| public static final int ELEMENTS The struct member offsets. | |
| SIZE | back to summary |
|---|---|
| public static final int SIZE The struct member offsets. | |
| SIZEOF | back to summary |
|---|---|
| public static final int SIZEOF The struct size in bytes. | |
| TYPE | back to summary |
|---|---|
| public static final int TYPE The struct member offsets. | |
| FFIType | back to summary |
|---|---|
| protected FFIType(long address, ByteBuffer container) | |
| FFIType | back to summary |
|---|---|
| public FFIType(ByteBuffer container) Creates a The created instance holds a strong reference to the container object. | |
| alignment | back to summary |
|---|---|
| public short alignment() set by libffi; you should initialize it to zero.
| |
| alignment | back to summary |
|---|---|
| public FFIType alignment(short value) Sets the specified value to the | |
| calloc | back to summary |
|---|---|
| public static FFIType calloc() Returns a new | |
| calloc | back to summary |
|---|---|
| public static FFIType. Returns a new
| |
| calloc | back to summary |
|---|---|
| public static FFIType calloc(MemoryStack stack) Returns a new
| |
| calloc | back to summary |
|---|---|
| public static FFIType. Returns a new
| |
| create | back to summary |
|---|---|
| protected FFIType create(long address, ByteBuffer container) Implements abstract org. Doc from org. Similar to Effectively, every
| |
| create | back to summary |
|---|---|
| public static FFIType create() Returns a new | |
| create | back to summary |
|---|---|
| public static FFIType create(long address) Returns a new | |
| create | back to summary |
|---|---|
| public static FFIType. Returns a new
| |
| create | back to summary |
|---|---|
| public static FFIType. Create a
| |
| createSafe | back to summary |
|---|---|
| public static FFIType createSafe(long address) Like
| |
| createSafe | back to summary |
|---|---|
| public static FFIType. Like
| |
| elements | back to summary |
|---|---|
public PointerBuffer elements(int capacity)
| |
| elements | back to summary |
|---|---|
| public FFIType elements(PointerBuffer value) Sets the address of the specified | |
| malloc | back to summary |
|---|---|
| public static FFIType malloc() Returns a new | |
| malloc | back to summary |
|---|---|
| public static FFIType. Returns a new
| |
| malloc | back to summary |
|---|---|
| public static FFIType malloc(MemoryStack stack) Returns a new
| |
| malloc | back to summary |
|---|---|
| public static FFIType. Returns a new
| |
| nalignment | back to summary |
|---|---|
| public static short nalignment(long struct) Unsafe version of | |
| nalignment | back to summary |
|---|---|
| public static void nalignment(long struct, short value) Unsafe version of | |
| nelements | back to summary |
|---|---|
| public static PointerBuffer nelements(long struct, int capacity) Unsafe version of
| |
| nelements | back to summary |
|---|---|
| public static void nelements(long struct, PointerBuffer value) Unsafe version of | |
| nsize | back to summary |
|---|---|
| public static long nsize(long struct) Unsafe version of | |
| nsize | back to summary |
|---|---|
| public static void nsize(long struct, long value) Unsafe version of | |
| ntype | back to summary |
|---|---|
| public static short ntype(long struct) Unsafe version of | |
| ntype | back to summary |
|---|---|
| public static void ntype(long struct, short value) Unsafe version of | |
| set | back to summary |
|---|---|
| public FFIType set(long size, short alignment, short type, PointerBuffer elements) Initializes this struct with the specified values. | |
| set | back to summary |
|---|---|
| public FFIType set(FFIType src) Copies the specified struct data to this struct. | |
| size | back to summary |
|---|---|
| public long size() set by libffi; you should initialize it to zero.
| |
| size | back to summary |
|---|---|
| public FFIType size(long value) Sets the specified value to the | |
| sizeof | back to summary |
|---|---|
| public int sizeof() Implements abstract org. Doc from org. Returns
| |
| type | back to summary |
|---|---|
| public short type() for a structure, this should be set to
| |
| type | back to summary |
|---|---|
| public FFIType type(short value) Sets the specified value to the | |
FFIType structs.
| Modifier and Type | Field and Description |
|---|---|
| private static final FFIType |
| Access | Constructor and Description |
|---|---|
| public | Buffer(ByteBuffer container)
Creates a new |
| public | |
| pack-priv |
| Modifier and Type | Method and Description |
|---|---|
| public short | |
| public FFIType. | |
| public PointerBuffer | |
| public FFIType. | elements(PointerBuffer value)
Sets the address of the specified |
| protected FFIType | |
| protected FFIType. | |
| public long | |
| public FFIType. | |
| public short | |
| public FFIType. |
| ELEMENT_FACTORY | back to summary |
|---|---|
| private static final FFIType ELEMENT_FACTORY | |
| Buffer | back to summary |
|---|---|
| public Buffer(ByteBuffer container) Creates a new Changes to the container's content will be visible to the struct buffer instance and vice versa. The two buffers' position, limit, and mark values
will be independent. The new buffer's position will be zero, its capacity and its limit will be the number of bytes remaining in this buffer divided
by The created buffer instance holds a strong reference to the container object. | |
| Buffer | back to summary |
|---|---|
| public Buffer(long address, int cap) | |
| Buffer | back to summary |
|---|---|
| pack-priv Buffer(long address, ByteBuffer container, int mark, int pos, int lim, int cap) | |
| alignment | back to summary |
|---|---|
public short alignment()
| |
| alignment | back to summary |
|---|---|
| public FFIType. Sets the specified value to the | |
| elements | back to summary |
|---|---|
public PointerBuffer elements(int capacity)
| |
| elements | back to summary |
|---|---|
| public FFIType. Sets the address of the specified | |
| getElementFactory | back to summary |
|---|---|
| protected FFIType getElementFactory() Implements abstract org.
| |
| self | back to summary |
|---|---|
| protected FFIType. Implements abstract org.
| |
| size | back to summary |
|---|---|
public long size()
| |
| size | back to summary |
|---|---|
| public FFIType. Sets the specified value to the | |
| type | back to summary |
|---|---|
public short type()
| |
| type | back to summary |
|---|---|
| public FFIType. Sets the specified value to the | |