static final class StructLayout.NumberFieldIO extends java.lang.Object implements StructLayout.FieldIO
| Constructor and Description |
|---|
NumberFieldIO(MemoryOp op) |
NumberFieldIO(Type type,
java.nio.ByteOrder order) |
| 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 MemoryOp op
NumberFieldIO(Type type, java.nio.ByteOrder order)
NumberFieldIO(MemoryOp op)
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.public 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 final boolean isCacheable()
StructLayout.FieldIOisCacheable in interface StructLayout.FieldIOpublic final boolean isValueReferenceNeeded()
StructLayout.FieldIOisValueReferenceNeeded in interface StructLayout.FieldIO