Package org.jruby.ext.ffi
Class StructLayout.PointerFieldIO
java.lang.Object
org.jruby.ext.ffi.StructLayout.PointerFieldIO
- All Implemented Interfaces:
StructLayout.FieldIO
- Enclosing class:
- StructLayout
-
Field Summary
Fields -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionget(ThreadContext context, StructLayout.Storage cache, StructLayout.Member m, AbstractMemory ptr) Reads a ruby value from the struct member.final booleanGets the cacheable status of this Struct memberfinal booleanChecks if a reference to the ruby object assigned to this field needs to be storedvoidput(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.
-
Field Details
-
INSTANCE
-
-
Constructor Details
-
PointerFieldIO
PointerFieldIO()
-
-
Method Details
-
put
public void put(ThreadContext context, StructLayout.Storage cache, StructLayout.Member m, AbstractMemory ptr, IRubyObject value) Description copied from interface:StructLayout.FieldIOWrites a ruby value to the native struct member as the appropriate native value.- Specified by:
putin interfaceStructLayout.FieldIO- Parameters:
context- the current contextcache- The value cacheptr- The struct memory area.value- The ruby value to write to the native struct member.
-
get
public IRubyObject get(ThreadContext context, StructLayout.Storage cache, StructLayout.Member m, AbstractMemory ptr) Description copied from interface:StructLayout.FieldIOReads a ruby value from the struct member.- Specified by:
getin interfaceStructLayout.FieldIOcache- The cache used to storeptr- The struct memory area.- Returns:
- A ruby object equivalent to the native member value.
-
isCacheable
public final boolean isCacheable()Description copied from interface:StructLayout.FieldIOGets the cacheable status of this Struct member- Specified by:
isCacheablein interfaceStructLayout.FieldIO- Returns:
- true if this member type is cacheable
-
isValueReferenceNeeded
public final boolean isValueReferenceNeeded()Description copied from interface:StructLayout.FieldIOChecks if a reference to the ruby object assigned to this field needs to be stored- Specified by:
isValueReferenceNeededin interfaceStructLayout.FieldIO- Returns:
- true if this member type requires the ruby value to be stored.
-