org.jruby.ext.ffi
Class NoImplFactory
java.lang.Object
org.jruby.ext.ffi.Factory
org.jruby.ext.ffi.NoImplFactory
public class NoImplFactory
- extends Factory
An instance of Factory that is used when no FFI implementation can be found.
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
NoImplFactory
public NoImplFactory(java.lang.String msg)
init
public void init(Ruby runtime,
RubyModule ffi)
- Description copied from class:
Factory
- Registers FFI ruby classes/modules
- Overrides:
init
in class Factory
allocateDirectMemory
public AllocatedDirectMemoryIO allocateDirectMemory(Ruby runtime,
int size,
boolean clear)
- Description copied from class:
Factory
- Allocates memory on the native C heap and wraps it in a MemoryIO accessor.
- Specified by:
allocateDirectMemory
in class Factory
size
- The number of bytes to allocate.clear
- If the memory should be cleared.
- Returns:
- A new AllocatedDirectMemoryIO.
allocateDirectMemory
public AllocatedDirectMemoryIO allocateDirectMemory(Ruby runtime,
int size,
int align,
boolean clear)
- Description copied from class:
Factory
- Allocates memory on the native C heap and wraps it in a MemoryIO accessor.
- Specified by:
allocateDirectMemory
in class Factory
size
- The number of bytes to allocate.align
- The minimum alignment of the memoryclear
- If the memory should be cleared.
- Returns:
- A new AllocatedDirectMemoryIO.
wrapDirectMemory
public DirectMemoryIO wrapDirectMemory(Ruby runtime,
long address)
- Description copied from class:
Factory
- Wraps a native C memory address in a MemoryIO accessor.
- Specified by:
wrapDirectMemory
in class Factory
address
- The native address to wrap.
- Returns:
- A new MemoryIO.
getCallbackManager
public CallbackManager getCallbackManager()
- Specified by:
getCallbackManager
in class Factory
newFunction
public AbstractInvoker newFunction(Ruby runtime,
Pointer address,
CallbackInfo cbInfo)
- Specified by:
newFunction
in class Factory
sizeOf
public int sizeOf(NativeType type)
- Specified by:
sizeOf
in class Factory
alignmentOf
public int alignmentOf(NativeType type)
- Specified by:
alignmentOf
in class Factory
Copyright © 2002-2009 JRuby Team. All Rights Reserved.