Package org.jruby.ext.ffi
Class AbstractMemory
java.lang.Object
org.jruby.RubyBasicObject
org.jruby.RubyObject
org.jruby.ext.ffi.MemoryObject
org.jruby.ext.ffi.AbstractMemory
- All Implemented Interfaces:
Serializable
,Cloneable
,Comparable<IRubyObject>
,InstanceVariables
,InternalVariables
,IRubyObject
,CoreObjectType
A abstract memory object that defines operations common to both pointers and
memory buffers
- See Also:
-
Nested Class Summary
Nested classes/interfaces inherited from class org.jruby.RubyObject
RubyObject.Data
Nested classes/interfaces inherited from class org.jruby.RubyBasicObject
RubyBasicObject.Finalizer
-
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final String
protected long
The total size of the memory areaprotected int
The size of each element of this memory area - e.g.Fields inherited from class org.jruby.RubyObject
IVAR_INSPECTING_OBJECT_ALLOCATOR, OBJECT_ALLOCATOR, REIFYING_OBJECT_ALLOCATOR
Fields inherited from class org.jruby.RubyBasicObject
ALL_F, BASICOBJECT_ALLOCATOR, COMPARE_BY_IDENTITY_F, ERR_INSECURE_SET_INST_VAR, FALSE_F, FL_USHIFT, flags, FROZEN_F, IS_OVERLAID_F, metaClass, NEVER, NIL_F, REFINED_MODULE_F, STAMP_OFFSET, TAINTED_F, UNDEF, USER0_F, USER1_F, USER2_F, USER3_F, USER4_F, USER5_F, USER6_F, USER7_F, USER8_F, USER9_F, USERA_F, VAR_TABLE_OFFSET, varTable, varTableStamp
Fields inherited from interface org.jruby.runtime.builtin.IRubyObject
NULL_ARRAY
-
Constructor Summary
ConstructorsModifierConstructorDescriptionprotected
AbstractMemory
(Ruby runtime, RubyClass klass, MemoryIO io, long size) protected
AbstractMemory
(Ruby runtime, RubyClass klass, MemoryIO io, long size, int typeSize) -
Method Summary
Modifier and TypeMethodDescriptionprotected MemoryIO
final IRubyObject
aref
(ThreadContext context, IRubyObject indexArg) protected static final int
calculateTypeSize
(ThreadContext context, IRubyObject sizeArg) protected static final RubyArray
checkArray
(IRubyObject obj) clear
(ThreadContext context) Clears (zeros out) the memory contents.static RubyClass
createAbstractMemoryClass
(ThreadContext context, RubyModule FFI, RubyClass Object) boolean
Compares thisMemoryPointer
to anotherMemoryPointer
.final IRubyObject
get
(ThreadContext context, IRubyObject typeName, IRubyObject offset, IRubyObject value) get_array_of_float
(ThreadContext context, IRubyObject offset, IRubyObject length) Reads an array of signed 32 bit floating point values from the memory address.get_array_of_float64
(ThreadContext context, IRubyObject offset, IRubyObject length) Reads an array of signed 64 bit floating point values from the memory address.get_array_of_int16
(ThreadContext context, IRubyObject offset, IRubyObject length) Reads an array of signed 16 bit integer values from the memory address.get_array_of_int32
(ThreadContext context, IRubyObject offset, IRubyObject length) Reads an array of signed 32 bit integer values from the memory address.get_array_of_int64
(ThreadContext context, IRubyObject offset, IRubyObject length) Reads an array of signed 64 bit integer values from the memory address.get_array_of_int8
(ThreadContext context, IRubyObject offset, IRubyObject length) Reads an array of signed 8 bit integer values from the memory address.get_array_of_long
(ThreadContext context, IRubyObject offset, IRubyObject length) Reads an array of signed long integer values from the memory address.get_array_of_pointer
(ThreadContext context, IRubyObject offset, IRubyObject length) get_array_of_string
(ThreadContext context, IRubyObject rbOffset) get_array_of_string
(ThreadContext context, IRubyObject rbOffset, IRubyObject rbCount) get_array_of_uint16
(ThreadContext context, IRubyObject offset, IRubyObject length) Reads an array of unsigned 16 bit integer values from the memory address.get_array_of_uint32
(ThreadContext context, IRubyObject offset, IRubyObject length) Reads an array of unsigned 32 bit integer values from the memory address.get_array_of_uint64
(ThreadContext context, IRubyObject offset, IRubyObject length) Reads an array of unsigned 64 bit integer values from the memory address.get_array_of_uint8
(ThreadContext context, IRubyObject offset, IRubyObject length) Reads an array of unsigned 8 bit integer values from the memory address.get_array_of_ulong
(ThreadContext context, IRubyObject offset, IRubyObject length) Reads an array of unsigned long integer values from the memory address.get_bytes
(ThreadContext context, IRubyObject offArg, IRubyObject lenArg) get_float32
(ThreadContext context) Reads a 32 bit floating point value from the memory address.get_float32
(ThreadContext context, IRubyObject offset) Reads a 32 bit floating point value from the memory address.get_float64
(ThreadContext context) Reads a 64 bit floating point value from the memory address.get_float64
(ThreadContext context, IRubyObject offset) Reads a 64 bit floating point value from the memory address.get_int16
(ThreadContext context) Reads a 16 bit signed integer value from the memory address.get_int16
(ThreadContext context, IRubyObject offset) Reads a 16 bit signed integer value from the memory address.get_int32
(ThreadContext context) Reads a 32 bit signed integer value from the memory address.get_int32
(ThreadContext context, IRubyObject offset) Reads a 32 bit signed integer value from the memory address.get_int64
(ThreadContext context) Reads a 64 bit integer value from the memory address.get_int64
(ThreadContext context, IRubyObject offset) Reads a 64 bit integer value from the memory address.get_int8
(ThreadContext context) Reads an 8 bit signed integer value from the memory address.get_int8
(ThreadContext context, IRubyObject offset) Reads an 8 bit signed integer value from the memory address.get_long
(ThreadContext context) Reads a C long integer value from the memory area.get_long
(ThreadContext context, IRubyObject offset) Reads a C long integer value from the memory area.get_pointer
(ThreadContext context) get_pointer
(ThreadContext context, IRubyObject offset) get_string
(ThreadContext context) get_string
(ThreadContext context, IRubyObject offArg) get_string
(ThreadContext context, IRubyObject offArg, IRubyObject lenArg) get_uint16
(ThreadContext context) Reads a 16 bit unsigned integer value from the memory address.get_uint16
(ThreadContext context, IRubyObject offset) Reads a 16 bit unsigned integer value from the memory address.get_uint32
(ThreadContext context) Reads a 32 bit unsigned integer value from the memory address.get_uint32
(ThreadContext context, IRubyObject offset) Reads a 32 bit unsigned integer value from the memory address.get_uint64
(ThreadContext context) Reads a 64 bit unsigned integer value from the memory address.get_uint64
(ThreadContext context, IRubyObject offset) Reads a 64 bit unsigned integer value from the memory address.get_uint8
(ThreadContext context) Reads an 8 bit unsigned integer value from the memory address.get_uint8
(ThreadContext context, IRubyObject offset) Reads an 8 bit unsigned integer value from the memory address.get_ulong
(ThreadContext context) Reads a C unsigned long integer value from the memory area.get_ulong
(ThreadContext context, IRubyObject offset) Reads a C unsigned long integer value from the memory area.protected final long
getOffset
(IRubyObject offset) Calculates the absolute offset within the base memory pointer for a given offset.protected abstract Pointer
getPointer
(Ruby runtime, long offset) final long
getSize()
Gets the size of the memory area.hash
(ThreadContext context) Calculates a hash code for the pointer.int
hashCode()
Calculates the hash code for thisMemoryPointer
op_equal
(ThreadContext context, IRubyObject obj) rb_obj_equal Will by default use identity equality to compare objects.op_plus
(ThreadContext context, IRubyObject value) abstract AbstractMemory
final IRubyObject
order
(ThreadContext context) final IRubyObject
order
(ThreadContext context, IRubyObject byte_order) final IRubyObject
put
(ThreadContext context, IRubyObject typeName, IRubyObject offset) put_array_of_float
(ThreadContext context, IRubyObject offset, IRubyObject arrParam) Writes an array of 32 bit floating point values to the memory area.put_array_of_float64
(ThreadContext context, IRubyObject offset, IRubyObject arrParam) Writes an array of 64 bit floating point values to the memory area.put_array_of_int16
(ThreadContext context, IRubyObject offset, IRubyObject arrParam) Writes an array of signed 16 bit integer values to the memory area.put_array_of_int32
(ThreadContext context, IRubyObject offset, IRubyObject arrParam) Writes an array of signed 32 bit integer values to the memory area.put_array_of_int64
(ThreadContext context, IRubyObject offset, IRubyObject arrParam) Writes an array of signed 64 bit integer values to the memory area.put_array_of_int8
(ThreadContext context, IRubyObject offset, IRubyObject arrParam) Writes an array of signed 8 bit integer values to the memory area.put_array_of_long
(ThreadContext context, IRubyObject offset, IRubyObject arr) Writes an array of signed long integer values to the memory area.put_array_of_pointer
(ThreadContext context, IRubyObject offset, IRubyObject arrParam) put_array_of_uint16
(ThreadContext context, IRubyObject offset, IRubyObject arrParam) Writes an array of unsigned 16 bit integer values to the memory area.put_array_of_uint32
(ThreadContext context, IRubyObject offset, IRubyObject arrParam) Writes an array of unsigned 32 bit integer values to the memory area.put_array_of_uint64
(ThreadContext context, IRubyObject offset, IRubyObject arrParam) Writes an array of unsigned 64 bit integer values to the memory area.put_array_of_uint8
(ThreadContext context, IRubyObject offset, IRubyObject arrParam) Writes an array of unsigned 8 bit integer values to the memory area.put_array_of_ulong
(ThreadContext context, IRubyObject offset, IRubyObject arr) Writes an array of unsigned long integer values to the memory area.put_bytes
(ThreadContext context, IRubyObject[] args) put_callback
(ThreadContext context, IRubyObject offset, IRubyObject proc, IRubyObject cbInfo) put_float32
(ThreadContext context, IRubyObject value) Writes an 32 bit floating point value to the memory area.put_float32
(ThreadContext context, IRubyObject offset, IRubyObject value) Writes an 32 bit floating point value to the memory area.put_float64
(ThreadContext context, IRubyObject value) Writes an 64 bit floating point value to the memory area.put_float64
(ThreadContext context, IRubyObject offset, IRubyObject value) Writes an 64 bit floating point value to the memory area.put_int16
(ThreadContext context, IRubyObject value) Writes a 16 bit signed integer value to the memory address.put_int16
(ThreadContext context, IRubyObject offset, IRubyObject value) Writes a 16 bit signed integer value to the memory address.put_int32
(ThreadContext context, IRubyObject value) Writes a 32 bit signed integer value to the memory address.put_int32
(ThreadContext context, IRubyObject offset, IRubyObject value) Writes a 32 bit signed integer value to the memory address.put_int64
(ThreadContext context, IRubyObject value) Writes a 64 bit integer value to the memory area.put_int64
(ThreadContext context, IRubyObject offset, IRubyObject value) Writes a 64 bit integer value to the memory area.put_int8
(ThreadContext context, IRubyObject value) Writes a 8 bit signed integer value to the memory area.put_int8
(ThreadContext context, IRubyObject offset, IRubyObject value) Writes a 8 bit signed integer value to the memory area.put_long
(ThreadContext context, IRubyObject value) Writes a C long integer value to the memory area.put_long
(ThreadContext context, IRubyObject offset, IRubyObject value) Writes a C long integer value to the memory area.put_pointer
(ThreadContext context, IRubyObject value) put_pointer
(ThreadContext context, IRubyObject offset, IRubyObject value) put_string
(ThreadContext context, IRubyObject offArg, IRubyObject strArg) put_uint16
(ThreadContext context, IRubyObject value) Writes a 16 bit unsigned integer value to the memory address.put_uint16
(ThreadContext context, IRubyObject offset, IRubyObject value) Writes a 16 bit unsigned integer value to the memory address.put_uint32
(ThreadContext context, IRubyObject value) Writes an 32 bit unsigned integer value to the memory address.put_uint32
(ThreadContext context, IRubyObject offset, IRubyObject value) Writes an 32 bit unsigned integer value to the memory address.put_uint64
(ThreadContext context, IRubyObject value) Writes a 64 bit unsigned integer value to the memory area.put_uint64
(ThreadContext context, IRubyObject offset, IRubyObject value) Writes a 64 bit unsigned integer value to the memory area.put_uint8
(ThreadContext context, IRubyObject value) Writes a 8 bit unsigned integer value to the memory area.put_uint8
(ThreadContext context, IRubyObject offset, IRubyObject value) Writes a 8 bit unsigned integer value to the memory area.put_ulong
(ThreadContext context, IRubyObject value) Writes a C long integer value to the memory area.put_ulong
(ThreadContext context, IRubyObject offset, IRubyObject value) Writes a C long integer value to the memory area.read_array_of_float
(ThreadContext context, IRubyObject length) Reads an array of signed 32 bit floating point values from the memory address.read_array_of_float64
(ThreadContext context, IRubyObject length) Reads an array of signed 64 bit floating point values from the memory address.read_array_of_int16
(ThreadContext context, IRubyObject length) Reads an array of signed 16 bit integer values from the memory address.read_array_of_int32
(ThreadContext context, IRubyObject length) Reads an array of signed 32 bit integer values from the memory address.read_array_of_int64
(ThreadContext context, IRubyObject length) Reads an array of signed 64 bit integer values from the memory address.read_array_of_int8
(ThreadContext context, IRubyObject length) Reads an array of signed 8 bit integer values from the memory address.read_array_of_long
(ThreadContext context, IRubyObject length) Reads an array of signed long integer values from the memory address.read_array_of_pointer
(ThreadContext context, IRubyObject length) read_array_of_string
(ThreadContext context) read_array_of_string
(ThreadContext context, IRubyObject rbLength) read_array_of_type
(ThreadContext context, IRubyObject typeArg, IRubyObject lenArg) read_array_of_type
(ThreadContext context, IRubyObject typeArg, IRubyObject reader, IRubyObject lenArg) read_array_of_uint16
(ThreadContext context, IRubyObject length) Reads an array of unsigned 16 bit integer values from the memory address.read_array_of_uint32
(ThreadContext context, IRubyObject length) Reads an array of unsigned 32 bit integer values from the memory address.read_array_of_uint64
(ThreadContext context, IRubyObject length) Reads an array of unsigned 64 bit integer values from the memory address.read_array_of_uint8
(ThreadContext context, IRubyObject length) Reads an array of unsigned 8 bit integer values from the memory address.read_array_of_ulong
(ThreadContext context, IRubyObject length) Reads an array of unsigned long integer values from the memory address.read_bytes
(ThreadContext context, IRubyObject lenArg) read_char
(ThreadContext context) Reads an 8 bit signed integer value from the memory address.read_double
(ThreadContext context) Reads a 64 bit floating point value from the memory address.read_float
(ThreadContext context) Reads a 32 bit floating point value from the memory address.read_int
(ThreadContext context) Reads a 32 bit signed integer value from the memory address.read_long
(ThreadContext context) Reads a C long integer value from the memory area.read_long_long
(ThreadContext context) Reads a 64 bit integer value from the memory address.read_pointer
(ThreadContext context) read_short
(ThreadContext context) Reads a 16 bit signed integer value from the memory address.read_string
(ThreadContext context) read_string
(ThreadContext context, IRubyObject rbLength) read_uchar
(ThreadContext context) Reads an 8 bit unsigned integer value from the memory address.read_uint
(ThreadContext context) Reads a 32 bit unsigned integer value from the memory address.read_uint16
(ThreadContext context) Reads a 16 bit unsigned integer value from the memory address.read_uint8
(ThreadContext context) Reads a 8 bit unsigned integer value from the memory address.read_ulong
(ThreadContext context) Reads a C unsigned long integer value from the memory area.read_ulong_long
(ThreadContext context) Reads a 64 bit unsigned integer value from the memory address.read_ushort
(ThreadContext context) Reads a 16 bit unsigned integer value from the memory address.protected abstract AbstractMemory
protected abstract AbstractMemory
final IRubyObject
slice
(ThreadContext context, IRubyObject offset, IRubyObject size) final IRubyObject
to_ptr
(ThreadContext context) total
(ThreadContext context) Gets the total size (in bytes) of the Memory.final IRubyObject
type_size
(ThreadContext context) Indicates how many bytes the intrinsic type of the memory uses.write_array_of_float
(ThreadContext context, IRubyObject ary) Writes an array of 32 bit floating point values to the memory area.write_array_of_float64
(ThreadContext context, IRubyObject ary) Writes an array of 64 bit floating point values to the memory area.write_array_of_int16
(ThreadContext context, IRubyObject ary) Writes an array of signed 16 bit integer values to the memory area.write_array_of_int32
(ThreadContext context, IRubyObject ary) Writes an array of signed 32 bit integer values to the memory area.write_array_of_int64
(ThreadContext context, IRubyObject ary) Writes an array of signed 64 bit integer values to the memory area.write_array_of_int8
(ThreadContext context, IRubyObject ary) Writes an array of signed 8 bit integer values to the memory area.write_array_of_long
(ThreadContext context, IRubyObject ary) Writes an array of signed long integer values to the memory area.write_array_of_pointer
(ThreadContext context, IRubyObject arrParam) write_array_of_type
(ThreadContext context, IRubyObject typeArg, IRubyObject aryArg) write_array_of_type
(ThreadContext context, IRubyObject typeArg, IRubyObject writer, IRubyObject aryArg) write_array_of_uint16
(ThreadContext context, IRubyObject ary) Writes an array of unsigned 16 bit integer values to the memory area.write_array_of_uint32
(ThreadContext context, IRubyObject ary) Writes an array of unsigned 32 bit integer values to the memory area.write_array_of_uint64
(ThreadContext context, IRubyObject ary) Writes an array of unsigned 64 bit integer values to the memory area.write_array_of_uint8
(ThreadContext context, IRubyObject ary) Writes an array of unsigned 8 bit integer values to the memory area.write_array_of_ulong
(ThreadContext context, IRubyObject ary) Writes an array of unsigned long integer values to the memory area.write_bytes
(ThreadContext context, IRubyObject[] args) write_char
(ThreadContext context, IRubyObject value) Writes a 8 bit signed integer value to the memory area.write_double
(ThreadContext context, IRubyObject value) Writes an 64 bit floating point value to the memory area.write_float
(ThreadContext context, IRubyObject value) Writes an 32 bit floating point value to the memory area.write_int
(ThreadContext context, IRubyObject value) Writes a 32 bit signed integer value to the memory address.write_long
(ThreadContext context, IRubyObject value) Writes a C long integer value to the memory area.write_long_long
(ThreadContext context, IRubyObject value) Writes a 64 bit integer value to the memory area.write_pointer
(ThreadContext context, IRubyObject value) write_short
(ThreadContext context, IRubyObject value) Writes a 16 bit signed integer value to the memory address.write_string
(ThreadContext context, IRubyObject strArg) write_string
(ThreadContext context, IRubyObject strArg, IRubyObject lenArg) write_uchar
(ThreadContext context, IRubyObject value) Writes a 8 bit unsigned integer value to the memory area.write_uint
(ThreadContext context, IRubyObject value) Writes an 32 bit unsigned integer value to the memory address.write_ulong_long
(ThreadContext context, IRubyObject value) Writes a 64 bit unsigned integer value to the memory area.write_ushort
(ThreadContext context, IRubyObject value) Writes a 16 bit unsigned integer value to the memory address.Methods inherited from class org.jruby.ext.ffi.MemoryObject
getMemoryIO, setMemoryIO
Methods inherited from class org.jruby.RubyObject
attachToObjectSpace, callInit, callInit, callInit, callInit, callInit, callInit, callInit, callInit, callInit, callInit, convertToType, dig, dig1, dig2, eqlInternal, equalInternal, finishObjectClass, getNativeClassIndex, inspect, op_eqq, puts, specificEval, toRubyString, toString
Methods inherited from class org.jruby.RubyBasicObject
addFinalizer, addFinalizer, anyToString, asJavaString, asString, callMethod, callMethod, callMethod, callMethod, callMethod, callMethod, callMethod, callMethod, callMethod, callSuper, checkArrayType, checkCallMethod, checkCallMethod, checkFrozen, checkStringType, cloneSetup, compareTo, convertToArray, convertToFloat, convertToHash, convertToInteger, convertToInteger, convertToInteger, convertToString, copyInstanceVariablesInto, copySpecialInstanceVariables, dataGetStruct, dataGetStructChecked, dataWrapStruct, decode, display, dup, dupFinalizer, dupSetup, ensureInstanceVariablesSettable, eql, eql_p, eql_p, equal_p, evalUnder, extend, fastGetInstanceVariable, fastGetInternalVariable, fastHasInstanceVariable, fastHasInternalVariable, fastSetInstanceVariable, fastSetInternalVariable, finishBasicObjectClass, forEachInstanceVariable, forEachInstanceVariableName, freeze, frozen_p, getCurrentContext, getFFIHandle, getFlag, getInstanceEvalClass, getInstanceEvalClass, getInstanceVariable, getInstanceVariableList, getInstanceVariableNameList, getInstanceVariables, getInternalVariable, getInternalVariables, getJavaClass, getMarshalVariableList, getMetaClass, getMetaClass, getNativeHandle, getNativeTypeIndex, getObjectId, getRuntime, getSingletonClass, getSingletonClassClone, getSingletonClassCloneAndAttach, getSingletonClassCloneAndAttach, getType, getVariable, getVariableCount, getVariableList, getVariableNameList, hash, hashyInspect, hasInstanceVariable, hasInstanceVariables, hasInternalVariable, hasVariables, id, infectBy, initialize, initialize_copy, initialize_copy, inspect, inspect, inspectHashCode, instance_eval, instance_eval, instance_eval, instance_eval, instance_eval, instance_exec, instance_of_p, instance_variable_defined_p, instance_variable_get, instance_variable_set, instance_variables, isBuiltin, isClass, isFalse, isFrozen, isImmediate, isModule, isNil, isSpecialConst, isSpecialObject, isTaint, isTrue, isUntrusted, kind_of_p, makeMetaClass, makeMetaClass, makeMetaClassBootstrap, method, method, method, method_missing, methods, methods, nil_p, nonFixnumHashCode, nonFixnumHashCode, OBJ_INIT_COPY, objInitCopy, op_cmp, op_match, op_not, op_not_equal, op_not_match, private_methods, protected_methods, public_methods, rbClone, rbClone, rbInspect, remove_instance_variable, removeFinalizers, removeInstanceVariable, removeInternalVariable, respond_to_p, respond_to_p, respondsTo, respondsToMissing, respondsToMissing, send, send, send, send, send, setFFIHandle, setFlag, setFrozen, setInstanceVariable, setInternalVariable, setMetaClass, setNativeHandle, setTaint, setUntrusted, setVariable, singleton_method, singleton_method, singleton_method_added, singleton_method_removed, singleton_method_undefined, singleton_methods, singletonClass, specificEval, specificEval, specificEval, specificEval, syncVariables, syncVariables, taint, taint, tainted_p, testFrozen, testFrozen, to_a, to_a, to_s, to_s, toJava, trust, type, untaint, untrust, untrusted_p, validateInstanceVariable, validateInstanceVariable, validateInstanceVariable, variableTableContains, variableTableFastContains, variableTableFastFetch, variableTableFastStore, variableTableFetch, variableTableRemove, variableTableStore, variableTableSync, yieldUnder, yieldUnder
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
Methods inherited from interface org.jruby.runtime.builtin.IRubyObject
checkStringType19, dup, marshalLiveVariables
-
Field Details
-
ABSTRACT_MEMORY_RUBY_CLASS
- See Also:
-
size
protected long sizeThe total size of the memory area -
typeSize
protected int typeSizeThe size of each element of this memory area - e.g. :char is 1, :int is 4
-
-
Constructor Details
-
AbstractMemory
-
AbstractMemory
-
-
Method Details
-
createAbstractMemoryClass
public static RubyClass createAbstractMemoryClass(ThreadContext context, RubyModule FFI, RubyClass Object) -
calculateTypeSize
-
checkArray
-
allocateMemoryIO
- Specified by:
allocateMemoryIO
in classMemoryObject
-
getOffset
Calculates the absolute offset within the base memory pointer for a given offset.- Parameters:
offset
- The offset to add to the base offset.- Returns:
- The total offset from the base memory pointer.
-
getSize
public final long getSize()Gets the size of the memory area.- Returns:
- The size of the memory area.
-
hash
Calculates a hash code for the pointer.- Overrides:
hash
in classRubyBasicObject
- Parameters:
context
- the current thread context- Returns:
- A RubyFixnum containing the hash code.
-
aref
-
equals
Compares thisMemoryPointer
to anotherMemoryPointer
.- Overrides:
equals
in classRubyObject
- Parameters:
obj
- The otherMemoryPointer
to compare to.- Returns:
- true if the memory address of
obj
is equal to the address of thisMemoryPointer
. - See Also:
-
op_equal
Description copied from class:RubyBasicObject
rb_obj_equal Will by default use identity equality to compare objects. This follows the Ruby semantics. The name of this method doesn't follow the convention because hierarchy problems- Specified by:
op_equal
in interfaceIRubyObject
- Overrides:
op_equal
in classRubyBasicObject
-
hashCode
public int hashCode()Calculates the hash code for thisMemoryPointer
- Overrides:
hashCode
in classRubyObject
- Returns:
- The hashcode of the memory address.
- See Also:
-
clear
Clears (zeros out) the memory contents.- Parameters:
context
- the thread context- Returns:
- this
-
total
Gets the total size (in bytes) of the Memory.- Parameters:
context
- the thread context- Returns:
- The total size in bytes.
-
type_size
Indicates how many bytes the intrinsic type of the memory uses.- Parameters:
context
- the thread context- Returns:
- the type size
-
write_char
Writes a 8 bit signed integer value to the memory area.- Parameters:
context
- the thread contextvalue
- The value to write.- Returns:
- The value written.
-
put_int8
Writes a 8 bit signed integer value to the memory area.- Parameters:
context
- the thread contextvalue
- The value to write.- Returns:
- The value written.
-
put_int8
Writes a 8 bit signed integer value to the memory area.- Parameters:
context
- the thread contextoffset
- The offset from the base pointer address to write the value.value
- The value to write.- Returns:
- The value written.
-
read_char
Reads an 8 bit signed integer value from the memory address.- Parameters:
context
- the thread context- Returns:
- The value read from the address.
-
get_int8
Reads an 8 bit signed integer value from the memory address.- Parameters:
context
- the thread context- Returns:
- The value read from the address.
-
get_int8
Reads an 8 bit signed integer value from the memory address.- Parameters:
context
- the thread contextoffset
- The offset from the base pointer address to read the value.- Returns:
- The value read from the address.
-
write_uchar
Writes a 8 bit unsigned integer value to the memory area.- Parameters:
context
- the thread contextvalue
- The value to write.- Returns:
- The value written.
-
put_uint8
Writes a 8 bit unsigned integer value to the memory area.- Parameters:
context
- the thread contextvalue
- The value to write.- Returns:
- The value written.
-
put_uint8
Writes a 8 bit unsigned integer value to the memory area.- Parameters:
context
- the thread contextoffset
- The offset from the base pointer address to write the value.value
- The value to write.- Returns:
- The value written.
-
read_uchar
Reads an 8 bit unsigned integer value from the memory address.- Parameters:
context
- the thread context- Returns:
- The value read from the address.
-
get_uint8
Reads an 8 bit unsigned integer value from the memory address.- Parameters:
context
- the thread context- Returns:
- The value read from the address.
-
get_uint8
Reads an 8 bit unsigned integer value from the memory address.- Parameters:
context
- the thread contextoffset
- The offset from the base pointer address to read the value.- Returns:
- The value read from the address.
-
write_short
Writes a 16 bit signed integer value to the memory address.- Parameters:
context
- the thread contextvalue
- The value to write.- Returns:
- The value written.
-
put_int16
Writes a 16 bit signed integer value to the memory address.- Parameters:
context
- the thread contextvalue
- The value to write.- Returns:
- The value written.
-
put_int16
Writes a 16 bit signed integer value to the memory address.- Parameters:
context
- the thread contextoffset
- The offset from the base pointer address to write the value.value
- The value to write.- Returns:
- The value written.
-
read_short
Reads a 16 bit signed integer value from the memory address.- Parameters:
context
- the thread context- Returns:
- The value read from the address.
-
get_int16
Reads a 16 bit signed integer value from the memory address.- Parameters:
context
- the thread context- Returns:
- The value read from the address.
-
get_int16
Reads a 16 bit signed integer value from the memory address.- Parameters:
context
- the thread contextoffset
- The offset from the base pointer address to read the value.- Returns:
- The value read from the address.
-
write_ushort
Writes a 16 bit unsigned integer value to the memory address.- Parameters:
context
- the thread contextvalue
- The value to write.- Returns:
- The value written.
-
put_uint16
Writes a 16 bit unsigned integer value to the memory address.- Parameters:
context
- the thread contextvalue
- The value to write.- Returns:
- The value written.
-
put_uint16
Writes a 16 bit unsigned integer value to the memory address.- Parameters:
context
- the thread contextoffset
- The offset from the base pointer address to write the value.value
- The value to write.- Returns:
- The value written.
-
read_ushort
Reads a 16 bit unsigned integer value from the memory address.- Parameters:
context
- the thread context- Returns:
- The value read from the address.
-
get_uint16
Reads a 16 bit unsigned integer value from the memory address.- Parameters:
context
- the thread context- Returns:
- The value read from the address.
-
get_uint16
Reads a 16 bit unsigned integer value from the memory address.- Parameters:
context
- the thread contextoffset
- The offset from the base pointer address to read the value.- Returns:
- The value read from the address.
-
write_int
Writes a 32 bit signed integer value to the memory address.- Parameters:
context
- the thread contextvalue
- The value to write.- Returns:
- The value written.
-
put_int32
Writes a 32 bit signed integer value to the memory address.- Parameters:
context
- the thread contextvalue
- The value to write.- Returns:
- The value written.
-
put_int32
Writes a 32 bit signed integer value to the memory address.- Parameters:
context
- the thread contextoffset
- The offset from the base pointer address to write the value.value
- The value to write.- Returns:
- The value written.
-
read_int
Reads a 32 bit signed integer value from the memory address.- Parameters:
context
- the thread context- Returns:
- The value read from the address.
-
get_int32
Reads a 32 bit signed integer value from the memory address.- Parameters:
context
- the thread context- Returns:
- The value read from the address.
-
get_int32
Reads a 32 bit signed integer value from the memory address.- Parameters:
context
- the thread contextoffset
- The offset from the base pointer address to read the value.- Returns:
- The value read from the address.
-
write_uint
Writes an 32 bit unsigned integer value to the memory address.- Parameters:
context
- the thread contextvalue
- The value to write.- Returns:
- The value written.
-
put_uint32
Writes an 32 bit unsigned integer value to the memory address.- Parameters:
context
- the thread contextvalue
- The value to write.- Returns:
- The value written.
-
put_uint32
Writes an 32 bit unsigned integer value to the memory address.- Parameters:
context
- the thread contextoffset
- The offset from the base pointer address to write the value.value
- The value to write.- Returns:
- The value written.
-
read_uint8
Reads a 8 bit unsigned integer value from the memory address.- Parameters:
context
- the thread context- Returns:
- The value read from the address.
-
read_uint16
Reads a 16 bit unsigned integer value from the memory address.- Parameters:
context
- the thread context- Returns:
- The value read from the address.
-
read_uint
Reads a 32 bit unsigned integer value from the memory address.- Parameters:
context
- the thread context- Returns:
- The value read from the address.
-
get_uint32
Reads a 32 bit unsigned integer value from the memory address.- Parameters:
context
- the thread context- Returns:
- The value read from the address.
-
get_uint32
Reads a 32 bit unsigned integer value from the memory address.- Parameters:
context
- the thread contextoffset
- The offset from the base pointer address to read the value.- Returns:
- The value read from the address.
-
write_long_long
Writes a 64 bit integer value to the memory area.- Parameters:
context
- the thread contextvalue
- The value to write.- Returns:
- The value written.
-
put_int64
Writes a 64 bit integer value to the memory area.- Parameters:
context
- the thread contextvalue
- The value to write.- Returns:
- The value written.
-
put_int64
Writes a 64 bit integer value to the memory area.- Parameters:
context
- the thread contextoffset
- The offset from the base pointer address to write the value.value
- The value to write.- Returns:
- The value written.
-
read_long_long
Reads a 64 bit integer value from the memory address.- Parameters:
context
- the thread context- Returns:
- The value read from the address.
-
get_int64
Reads a 64 bit integer value from the memory address.- Parameters:
context
- the thread context- Returns:
- The value read from the address.
-
get_int64
Reads a 64 bit integer value from the memory address.- Parameters:
context
- the thread contextoffset
- The offset from the base pointer address to read the value.- Returns:
- The value read from the address.
-
write_ulong_long
Writes a 64 bit unsigned integer value to the memory area.- Parameters:
context
- the thread contextvalue
- The value to write.- Returns:
- The value written.
-
put_uint64
Writes a 64 bit unsigned integer value to the memory area.- Parameters:
context
- the thread contextvalue
- The value to write.- Returns:
- The value written.
-
put_uint64
Writes a 64 bit unsigned integer value to the memory area.- Parameters:
context
- the thread contextoffset
- The offset from the base pointer address to write the value.value
- The value to write.- Returns:
- The value written.
-
read_ulong_long
Reads a 64 bit unsigned integer value from the memory address.- Parameters:
context
- the thread context- Returns:
- The value read from the address.
-
get_uint64
Reads a 64 bit unsigned integer value from the memory address.- Parameters:
context
- the thread context- Returns:
- The value read from the address.
-
get_uint64
Reads a 64 bit unsigned integer value from the memory address.- Parameters:
context
- the thread contextoffset
- The offset from the base pointer address to read the value.- Returns:
- The value read from the address.
-
write_long
Writes a C long integer value to the memory area. This version is added to support the "write_long" alias for the single-arg "put_long".- Parameters:
context
- the thread contextvalue
- The value to write.- Returns:
- The value written.
-
put_long
Writes a C long integer value to the memory area.- Parameters:
context
- the thread contextvalue
- The value to write.- Returns:
- The value written.
-
put_long
Writes a C long integer value to the memory area.- Parameters:
context
- the thread contextoffset
- The offset from the base pointer address to write the value.value
- The value to write.- Returns:
- The value written.
-
read_long
Reads a C long integer value from the memory area.- Parameters:
context
- the thread context- Returns:
- The value read.
-
get_long
Reads a C long integer value from the memory area.- Parameters:
context
- the thread context- Returns:
- The value read.
-
get_long
Reads a C long integer value from the memory area.- Parameters:
context
- the thread contextoffset
- The offset from the base pointer address to read the value.- Returns:
- The value read.
-
put_ulong
Writes a C long integer value to the memory area.- Parameters:
context
- the thread contextvalue
- The value to write.- Returns:
- The value written.
-
put_ulong
Writes a C long integer value to the memory area.- Parameters:
context
- the thread contextoffset
- The offset from the base pointer address to write the value.value
- The value to write.- Returns:
- The value written.
-
read_ulong
Reads a C unsigned long integer value from the memory area.- Parameters:
context
- the thread context- Returns:
- The value read.
-
get_ulong
Reads a C unsigned long integer value from the memory area.- Parameters:
context
- the thread context- Returns:
- The value read.
-
get_ulong
Reads a C unsigned long integer value from the memory area.- Parameters:
context
- the thread contextoffset
- The offset from the base pointer address to read the value.- Returns:
- The value read.
-
write_float
Writes an 32 bit floating point value to the memory area.- Parameters:
context
- the thread contextvalue
- The value to write.- Returns:
- The value written.
-
put_float32
Writes an 32 bit floating point value to the memory area.- Parameters:
context
- the thread contextvalue
- The value to write.- Returns:
- The value written.
-
put_float32
Writes an 32 bit floating point value to the memory area.- Parameters:
context
- the thread contextoffset
- The offset from the base pointer address to write the value.value
- The value to write.- Returns:
- The value written.
-
read_float
Reads a 32 bit floating point value from the memory address.- Parameters:
context
- the thread context- Returns:
- The value read from the address.
-
get_float32
Reads a 32 bit floating point value from the memory address.- Parameters:
context
- the thread context- Returns:
- The value read from the address.
-
get_float32
Reads a 32 bit floating point value from the memory address.- Parameters:
context
- the thread contextoffset
- The offset from the base pointer address to read the value.- Returns:
- The value read from the address.
-
write_double
Writes an 64 bit floating point value to the memory area.- Parameters:
context
- the thread contextvalue
- The value to write.- Returns:
- The value written.
-
put_float64
Writes an 64 bit floating point value to the memory area.- Parameters:
context
- the thread contextvalue
- The value to write.- Returns:
- The value written.
-
put_float64
Writes an 64 bit floating point value to the memory area.- Parameters:
context
- the thread contextoffset
- The offset from the base pointer address to write the value.value
- The value to write.- Returns:
- The value written.
-
read_double
Reads a 64 bit floating point value from the memory address.- Parameters:
context
- the thread context- Returns:
- The value read from the address.
-
get_float64
Reads a 64 bit floating point value from the memory address.- Parameters:
context
- the thread context- Returns:
- The value read from the address.
-
get_float64
Reads a 64 bit floating point value from the memory address.- Parameters:
context
- the thread contextoffset
- The offset from the base pointer address to read the value.- Returns:
- The value read from the address.
-
get_array_of_int8
Reads an array of signed 8 bit integer values from the memory address.- Parameters:
context
- the thread contextoffset
- The offset from the start of the memory area to read the values.length
- The number of values to be read from memory.- Returns:
- An array containing the values.
-
put_array_of_int8
public IRubyObject put_array_of_int8(ThreadContext context, IRubyObject offset, IRubyObject arrParam) Writes an array of signed 8 bit integer values to the memory area.- Parameters:
context
- The thread context.offset
- The offset from the start of the memory area to write the values.arrParam
- Array of values to write to memory.- Returns:
this
object.
-
get_array_of_uint8
public IRubyObject get_array_of_uint8(ThreadContext context, IRubyObject offset, IRubyObject length) Reads an array of unsigned 8 bit integer values from the memory address.- Parameters:
context
- The thread context.offset
- The offset from the start of the memory area to read the values.length
- The number of values to be read from memory.- Returns:
- An array containing the values.
-
put_array_of_uint8
public IRubyObject put_array_of_uint8(ThreadContext context, IRubyObject offset, IRubyObject arrParam) Writes an array of unsigned 8 bit integer values to the memory area.- Parameters:
context
- The thread context.offset
- The offset from the start of the memory area to write the values.arrParam
- Array of values to write to memory.- Returns:
this
object.
-
get_array_of_int16
public IRubyObject get_array_of_int16(ThreadContext context, IRubyObject offset, IRubyObject length) Reads an array of signed 16 bit integer values from the memory address.- Parameters:
context
- The thread context.offset
- The offset from the start of the memory area to read the values.length
- The number of values to be read from memory.- Returns:
- An array containing the values.
-
put_array_of_int16
public IRubyObject put_array_of_int16(ThreadContext context, IRubyObject offset, IRubyObject arrParam) Writes an array of signed 16 bit integer values to the memory area.- Parameters:
context
- The thread context.offset
- The offset from the start of the memory area to write the values.arrParam
- Array of values to write to memory.- Returns:
this
object.
-
get_array_of_uint16
public IRubyObject get_array_of_uint16(ThreadContext context, IRubyObject offset, IRubyObject length) Reads an array of unsigned 16 bit integer values from the memory address.- Parameters:
context
- The thread context.offset
- The offset from the start of the memory area to read the values.length
- The number of values to be read from memory.- Returns:
- An array containing the values.
-
put_array_of_uint16
public IRubyObject put_array_of_uint16(ThreadContext context, IRubyObject offset, IRubyObject arrParam) Writes an array of unsigned 16 bit integer values to the memory area.- Parameters:
context
- The thread context.offset
- The offset from the start of the memory area to write the values.arrParam
- Array of values to write to memory.- Returns:
this
object.
-
get_array_of_int32
public IRubyObject get_array_of_int32(ThreadContext context, IRubyObject offset, IRubyObject length) Reads an array of signed 32 bit integer values from the memory address.- Parameters:
context
- The thread context.offset
- The offset from the start of the memory area to read the values.length
- The number of values to be read from memory.- Returns:
- An array containing the values.
-
put_array_of_int32
public IRubyObject put_array_of_int32(ThreadContext context, IRubyObject offset, IRubyObject arrParam) Writes an array of signed 32 bit integer values to the memory area.- Parameters:
context
- The thread context.offset
- The offset from the start of the memory area to write the values.arrParam
- Array of values to write to memory.- Returns:
this
object.
-
get_array_of_uint32
public IRubyObject get_array_of_uint32(ThreadContext context, IRubyObject offset, IRubyObject length) Reads an array of unsigned 32 bit integer values from the memory address.- Parameters:
context
- The thread context.offset
- The offset from the start of the memory area to read the values.length
- The number of values to be read from memory.- Returns:
- An array containing the values.
-
put_array_of_uint32
public IRubyObject put_array_of_uint32(ThreadContext context, IRubyObject offset, IRubyObject arrParam) Writes an array of unsigned 32 bit integer values to the memory area.- Parameters:
context
- The thread context.offset
- The offset from the start of the memory area to write the values.arrParam
- Array of values to write to memory.- Returns:
this
object.
-
get_array_of_long
Reads an array of signed long integer values from the memory address.- Parameters:
context
- The thread context.offset
- The offset from the start of the memory area to read the values.length
- The number of values to be read from memory.- Returns:
- An array containing the values.
-
put_array_of_long
Writes an array of signed long integer values to the memory area.- Parameters:
context
- The thread context.offset
- The offset from the start of the memory area to write the values.arr
- Array of values to write to memory.- Returns:
this
object.
-
get_array_of_ulong
public IRubyObject get_array_of_ulong(ThreadContext context, IRubyObject offset, IRubyObject length) Reads an array of unsigned long integer values from the memory address.- Parameters:
context
- The thread context.offset
- The offset from the start of the memory area to read the values.length
- The number of values to be read from memory.- Returns:
- An array containing the values.
-
put_array_of_ulong
Writes an array of unsigned long integer values to the memory area.- Parameters:
context
- The thread context.offset
- The offset from the start of the memory area to write the values.arr
- Array of values to write to memory.- Returns:
this
object.
-
get_array_of_int64
public IRubyObject get_array_of_int64(ThreadContext context, IRubyObject offset, IRubyObject length) Reads an array of signed 64 bit integer values from the memory address.- Parameters:
context
- The thread context.offset
- The offset from the start of the memory area to read the values.length
- The number of values to be read from memory.- Returns:
- An array containing the values.
-
put_array_of_int64
public IRubyObject put_array_of_int64(ThreadContext context, IRubyObject offset, IRubyObject arrParam) Writes an array of signed 64 bit integer values to the memory area.- Parameters:
context
- The thread context.offset
- The offset from the start of the memory area to write the values.arrParam
- Array of values to write to memory.- Returns:
this
object.
-
get_array_of_uint64
public IRubyObject get_array_of_uint64(ThreadContext context, IRubyObject offset, IRubyObject length) Reads an array of unsigned 64 bit integer values from the memory address.- Parameters:
context
- The thread context.offset
- The offset from the start of the memory area to read the values.length
- The number of values to be read from memory.- Returns:
- An array containing the values.
-
put_array_of_uint64
public IRubyObject put_array_of_uint64(ThreadContext context, IRubyObject offset, IRubyObject arrParam) Writes an array of unsigned 64 bit integer values to the memory area.- Parameters:
context
- The thread context.offset
- The offset from the start of the memory area to write the values.arrParam
- Array of values to write to memory.- Returns:
this
object.
-
get_array_of_float
public IRubyObject get_array_of_float(ThreadContext context, IRubyObject offset, IRubyObject length) Reads an array of signed 32 bit floating point values from the memory address.- Parameters:
context
- The thread context.offset
- The offset from the start of the memory area to read the values.length
- The number of values to be read from memory.- Returns:
- An array containing the values.
-
put_array_of_float
public IRubyObject put_array_of_float(ThreadContext context, IRubyObject offset, IRubyObject arrParam) Writes an array of 32 bit floating point values to the memory area.- Parameters:
context
- The thread context.offset
- The offset from the start of the memory area to write the values.arrParam
- Array of values to write to memory.- Returns:
this
object.
-
get_array_of_float64
public IRubyObject get_array_of_float64(ThreadContext context, IRubyObject offset, IRubyObject length) Reads an array of signed 64 bit floating point values from the memory address.- Parameters:
context
- The thread context.offset
- The offset from the start of the memory area to read the values.length
- The number of values to be read from memory.- Returns:
- An array containing the values.
-
put_array_of_float64
public IRubyObject put_array_of_float64(ThreadContext context, IRubyObject offset, IRubyObject arrParam) Writes an array of 64 bit floating point values to the memory area.- Parameters:
context
- The thread context.offset
- The offset from the start of the memory area to write the values.arrParam
- Array of values to write to memory.- Returns:
this
object.
-
read_array_of_int8
Reads an array of signed 8 bit integer values from the memory address.- Parameters:
context
- The thread context.length
- The number of values to be read from memory.- Returns:
- An array containing the values.
-
write_array_of_int8
Writes an array of signed 8 bit integer values to the memory area.- Parameters:
context
- The thread context.ary
- The array of values to write to the memory area.- Returns:
this
object.
-
read_array_of_uint8
Reads an array of unsigned 8 bit integer values from the memory address.- Parameters:
context
- The thread context.length
- The number of values to be read from memory.- Returns:
- An array containing the values.
-
write_array_of_uint8
Writes an array of unsigned 8 bit integer values to the memory area.- Parameters:
context
- The thread context.ary
- Array of values to write to memory.- Returns:
this
object.
-
read_array_of_int16
Reads an array of signed 16 bit integer values from the memory address.- Parameters:
context
- The thread context.length
- The number of values to be read from memory.- Returns:
- An array containing the values.
-
write_array_of_int16
Writes an array of signed 16 bit integer values to the memory area.- Parameters:
context
- The thread context.ary
- The array of values to write to the memory area.- Returns:
this
object.
-
read_array_of_uint16
Reads an array of unsigned 16 bit integer values from the memory address.- Parameters:
context
- The thread context.length
- The number of values to be read from memory.- Returns:
- An array containing the values.
-
write_array_of_uint16
Writes an array of unsigned 16 bit integer values to the memory area.- Parameters:
context
- The thread context.ary
- The array of values to write to the memory area.- Returns:
this
object.
-
read_array_of_int32
Reads an array of signed 32 bit integer values from the memory address.- Parameters:
context
- The thread context.length
- The number of values to be read from memory.- Returns:
- An array containing the values.
-
write_array_of_int32
Writes an array of signed 32 bit integer values to the memory area.- Parameters:
context
- The thread context.ary
- The array of values to write to the memory area.- Returns:
this
object.
-
read_array_of_uint32
Reads an array of unsigned 32 bit integer values from the memory address.- Parameters:
context
- The thread context.length
- The number of values to be read from memory.- Returns:
- An array containing the values.
-
write_array_of_uint32
Writes an array of unsigned 32 bit integer values to the memory area.- Parameters:
context
- The thread context.ary
- The array of values to write to the memory area.- Returns:
this
object.
-
read_array_of_int64
Reads an array of signed 64 bit integer values from the memory address.- Parameters:
context
- The thread context.length
- The number of values to be read from memory.- Returns:
- An array containing the values.
-
write_array_of_int64
Writes an array of signed 64 bit integer values to the memory area.- Parameters:
context
- The thread context.ary
- The array of values to write to the memory area.- Returns:
this
object.
-
read_array_of_uint64
Reads an array of unsigned 64 bit integer values from the memory address.- Parameters:
context
- The thread context.length
- The number of values to be read from memory.- Returns:
- An array containing the values.
-
write_array_of_uint64
Writes an array of unsigned 64 bit integer values to the memory area.- Parameters:
context
- The thread context.ary
- The array of values to write to the memory area.- Returns:
this
object.
-
read_array_of_long
Reads an array of signed long integer values from the memory address.- Parameters:
context
- The thread context.length
- The number of values to be read from memory.- Returns:
- An array containing the values.
-
write_array_of_long
Writes an array of signed long integer values to the memory area.- Parameters:
context
- The thread context.ary
- The array of values to write to the memory area.- Returns:
this
object.
-
read_array_of_ulong
Reads an array of unsigned long integer values from the memory address.- Parameters:
context
- The thread context.length
- The number of values to be read from memory.- Returns:
- An array containing the values.
-
write_array_of_ulong
Writes an array of unsigned long integer values to the memory area.- Parameters:
context
- The thread context.ary
- The array of values to write to the memory area.- Returns:
this
object.
-
read_array_of_float
Reads an array of signed 32 bit floating point values from the memory address.- Parameters:
context
- The thread context.length
- The number of values to be read from memory.- Returns:
- An array containing the values.
-
write_array_of_float
Writes an array of 32 bit floating point values to the memory area.- Parameters:
context
- The thread context.ary
- The array of values to write to the memory area.- Returns:
this
object.
-
read_array_of_float64
Reads an array of signed 64 bit floating point values from the memory address.- Parameters:
context
- The thread context.length
- The number of values to be read from memory.- Returns:
- An array containing the values.
-
write_array_of_float64
Writes an array of 64 bit floating point values to the memory area.- Parameters:
context
- The thread context.ary
- The array of values to write to the memory area.- Returns:
this
object.
-
read_array_of_type
public IRubyObject read_array_of_type(ThreadContext context, IRubyObject typeArg, IRubyObject lenArg) -
read_array_of_type
public IRubyObject read_array_of_type(ThreadContext context, IRubyObject typeArg, IRubyObject reader, IRubyObject lenArg) -
write_array_of_type
public IRubyObject write_array_of_type(ThreadContext context, IRubyObject typeArg, IRubyObject aryArg) -
write_array_of_type
public IRubyObject write_array_of_type(ThreadContext context, IRubyObject typeArg, IRubyObject writer, IRubyObject aryArg) -
read_string
-
read_string
-
get_string
-
get_string
-
get_string
-
get_array_of_string
-
get_array_of_string
public IRubyObject get_array_of_string(ThreadContext context, IRubyObject rbOffset, IRubyObject rbCount) -
read_array_of_string
-
read_array_of_string
-
put_string
-
write_string
-
write_string
-
get_bytes
-
put_bytes
-
read_bytes
-
write_bytes
-
read_pointer
-
get_pointer
-
get_pointer
-
write_pointer
-
put_pointer
-
put_pointer
-
get_array_of_pointer
public IRubyObject get_array_of_pointer(ThreadContext context, IRubyObject offset, IRubyObject length) -
put_array_of_pointer
public IRubyObject put_array_of_pointer(ThreadContext context, IRubyObject offset, IRubyObject arrParam) -
read_array_of_pointer
-
write_array_of_pointer
-
put_callback
public IRubyObject put_callback(ThreadContext context, IRubyObject offset, IRubyObject proc, IRubyObject cbInfo) -
op_plus
-
order
-
order
-
to_ptr
-
slice
-
put
-
get
public final IRubyObject get(ThreadContext context, IRubyObject typeName, IRubyObject offset, IRubyObject value) -
order
-
slice
-
slice
-
getPointer
-