public abstract class Factory extends Object
| Modifier | Constructor and Description | 
|---|---|
| protected  | Factory() | 
| Modifier and Type | Method and Description | 
|---|---|
| abstract int | alignmentOf(NativeType type) | 
| abstract MemoryIO | allocateDirectMemory(Ruby runtime,
                    int size,
                    boolean clear)Allocates memory on the native C heap and wraps it in a MemoryIO accessor. | 
| abstract MemoryIO | allocateDirectMemory(Ruby runtime,
                    int size,
                    int align,
                    boolean clear)Allocates memory on the native C heap and wraps it in a MemoryIO accessor. | 
| abstract MemoryIO | allocateTransientDirectMemory(Ruby runtime,
                             int size,
                             int align,
                             boolean clear)Allocates transient native memory (not from C heap) and wraps it in a MemoryIO accessor. | 
| abstract CallbackManager | getCallbackManager() | 
| static Factory | getInstance()Gets an instance of FFIProvider | 
| void | init(Ruby runtime,
    RubyModule ffi)Registers FFI ruby classes/modules | 
| abstract AbstractInvoker | newFunction(Ruby runtime,
           Pointer address,
           CallbackInfo cbInfo) | 
| abstract int | sizeOf(NativeType type) | 
| abstract MemoryIO | wrapDirectMemory(Ruby runtime,
                long address)Wraps a  native C memory address in a MemoryIO accessor. | 
public static final Factory getInstance()
public void init(Ruby runtime, RubyModule ffi)
module - the module to register the classes underpublic abstract MemoryIO allocateDirectMemory(Ruby runtime, int size, boolean clear)
size - The number of bytes to allocate.clear - If the memory should be cleared.public abstract MemoryIO allocateDirectMemory(Ruby runtime, int size, int align, boolean clear)
size - The number of bytes to allocate.align - The minimum alignment of the memoryclear - If the memory should be cleared.public abstract MemoryIO allocateTransientDirectMemory(Ruby runtime, int size, int align, boolean clear)
size - The number of bytes to allocate.align - The minimum alignment of the memoryclear - If the memory should be cleared.public abstract MemoryIO wrapDirectMemory(Ruby runtime, long address)
address - The native address to wrap.public abstract CallbackManager getCallbackManager()
public abstract AbstractInvoker newFunction(Ruby runtime, Pointer address, CallbackInfo cbInfo)
public abstract int sizeOf(NativeType type)
public abstract int alignmentOf(NativeType type)
Copyright © 2001-2015 JRuby. All Rights Reserved.