|
||||||||||
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 abstract static 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.
Field Summary | |
---|---|
protected int |
index
The index of this member within the struct |
protected long |
offset
The offset within the memory area of this member |
protected Type |
type
The Type of this member. |
Constructor Summary | |
---|---|
protected |
StructLayout.Member(Type type,
int index,
long offset)
Initializes a new Member instance |
Method Summary | |
---|---|
boolean |
equals(java.lang.Object obj)
|
abstract IRubyObject |
get(Ruby runtime,
StructLayout.Storage cache,
IRubyObject ptr)
Reads a ruby value from the struct member. |
NativeType |
getNativeType()
|
int |
hashCode()
|
protected boolean |
isCacheable()
Gets the cacheable status of this Struct member |
protected boolean |
isValueReferenceNeeded()
Checks if a reference to the ruby object assigned to this field needs to be stored |
abstract void |
put(Ruby runtime,
StructLayout.Storage cache,
IRubyObject ptr,
IRubyObject value)
Writes a ruby value to the native struct member as the appropriate native value. |
Methods inherited from class java.lang.Object |
---|
clone, finalize, getClass, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
protected final Type type
Type
of this member.
protected final long offset
protected final int index
Constructor Detail |
---|
protected StructLayout.Member(Type type, int index, long offset)
Method Detail |
---|
public final NativeType getNativeType()
public boolean equals(java.lang.Object obj)
equals
in class java.lang.Object
public int hashCode()
hashCode
in class java.lang.Object
public abstract void put(Ruby runtime, StructLayout.Storage cache, IRubyObject 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 abstract IRubyObject get(Ruby runtime, StructLayout.Storage cache, IRubyObject ptr)
cache
- The cache used to storeptr
- The struct memory area.
protected boolean isCacheable()
protected boolean isValueReferenceNeeded()
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |