static final class StructLayout.MappedFieldIO extends java.lang.Object implements StructLayout.FieldIO
| Modifier and Type | Field and Description |
|---|---|
private MappedType |
mappedType |
private StructLayout.FieldIO |
nativeFieldIO |
| Constructor and Description |
|---|
MappedFieldIO(MappedType mappedType,
StructLayout.FieldIO nativeFieldIO) |
| Modifier and Type | Method and Description |
|---|---|
IRubyObject |
get(ThreadContext context,
StructLayout.Storage cache,
StructLayout.Member m,
AbstractMemory ptr)
Reads a ruby value from the struct member.
|
boolean |
isCacheable()
Gets the cacheable status of this Struct member
|
boolean |
isValueReferenceNeeded()
Checks if a reference to the ruby object assigned to this field needs to be stored
|
void |
put(ThreadContext context,
StructLayout.Storage cache,
StructLayout.Member m,
AbstractMemory ptr,
IRubyObject value)
Writes a ruby value to the native struct member as the appropriate native value.
|
private final StructLayout.FieldIO nativeFieldIO
private final MappedType mappedType
public MappedFieldIO(MappedType mappedType, StructLayout.FieldIO nativeFieldIO)
public final boolean isCacheable()
StructLayout.FieldIOisCacheable in interface StructLayout.FieldIOpublic final boolean isValueReferenceNeeded()
StructLayout.FieldIOisValueReferenceNeeded in interface StructLayout.FieldIOpublic final IRubyObject get(ThreadContext context, StructLayout.Storage cache, StructLayout.Member m, AbstractMemory ptr)
StructLayout.FieldIOget in interface StructLayout.FieldIOcache - The cache used to storeptr - The struct memory area.public void put(ThreadContext context, StructLayout.Storage cache, StructLayout.Member m, AbstractMemory ptr, IRubyObject value)
StructLayout.FieldIOput in interface StructLayout.FieldIOcache - The value cacheptr - The struct memory area.value - The ruby value to write to the native struct member.