|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.jruby.ext.ffi.StructLayout.Member
public static final class StructLayout.Member
A struct member. This defines the offset within a chunk of memory to use when reading/writing the member, as well as how to convert between the native representation of the member and the JRuby representation.
Constructor Summary | |
---|---|
protected |
StructLayout.Member(StructLayout.Field f,
int index,
int cacheIndex,
int referenceIndex)
Initializes a new Member instance |
Method Summary | |
---|---|
boolean |
equals(java.lang.Object obj)
|
IRubyObject |
get(ThreadContext context,
StructLayout.Storage cache,
AbstractMemory ptr)
Reads a ruby value from the struct member. |
int |
hashCode()
|
int |
offset()
|
void |
put(ThreadContext context,
StructLayout.Storage cache,
AbstractMemory ptr,
IRubyObject value)
Writes a ruby value to the native struct member as the appropriate native value. |
Type |
type()
|
Methods inherited from class java.lang.Object |
---|
clone, finalize, getClass, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
protected StructLayout.Member(StructLayout.Field f, int index, int cacheIndex, int referenceIndex)
Method Detail |
---|
public boolean equals(java.lang.Object obj)
equals
in class java.lang.Object
public int hashCode()
hashCode
in class java.lang.Object
public final void put(ThreadContext context, StructLayout.Storage cache, AbstractMemory ptr, IRubyObject value)
runtime
- The ruby runtimecache
- The value cacheptr
- The struct memory area.value
- The ruby value to write to the native struct member.public final IRubyObject get(ThreadContext context, StructLayout.Storage cache, AbstractMemory ptr)
cache
- The cache used to storeptr
- The struct memory area.
public final int offset()
public final Type type()
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |