|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.jruby.ext.ffi.Factory
public abstract class Factory
A factory that can create a FFI Provider
| Constructor Summary | |
|---|---|
protected |
Factory()
|
| Method Summary | |
|---|---|
abstract int |
alignmentOf(NativeType type)
|
abstract AllocatedDirectMemoryIO |
allocateDirectMemory(Ruby runtime,
int size,
boolean clear)
Allocates memory on the native C heap and wraps it in a MemoryIO accessor. |
abstract AllocatedDirectMemoryIO |
allocateDirectMemory(Ruby runtime,
int size,
int align,
boolean clear)
Allocates memory on the native 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 DirectMemoryIO |
wrapDirectMemory(Ruby runtime,
long address)
Wraps a native C memory address in a MemoryIO accessor. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
protected Factory()
| Method Detail |
|---|
public static final Factory getInstance()
public void init(Ruby runtime,
RubyModule ffi)
module - the module to register the classes under
public abstract AllocatedDirectMemoryIO allocateDirectMemory(Ruby runtime,
int size,
boolean clear)
size - The number of bytes to allocate.clear - If the memory should be cleared.
public abstract AllocatedDirectMemoryIO 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 DirectMemoryIO 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)
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||