struct Novika::FFI::StructReferenceView
- Novika::FFI::StructReferenceView
- Novika::FFI::StructView
- Struct
- Value
- Object
Overview
Value-side representation of a struct reference, aka struct
pointer, aka heap-allocated struct. Allows to read and write
fields (see StructView
). Similar to the ->
operator in C.
Defined in:
novika/ffi.crInstance Method Summary
- #==(other : StructReferenceView)
-
#box : Pointer(Void)
Wraps this value in a void pointer.
- #to_s(io)
-
#write_to!(base : Pointer(Void)) : Pointer(Void)
Writes this value starting at the given base pointer.
Instance methods inherited from struct Novika::FFI::StructView
==(other : StructView)
==,
[](id : String)
[],
[]=(id : String, value : ForeignValue)
[]=,
[]?(id : String)
[]?,
address(*args, **options)address(*args, **options, &) address, has_field?(*args, **options)
has_field?(*args, **options, &) has_field?, hash(hasher) hash, layout : StructLayout layout, size size, to_form? : Form | Nil to_form?, to_s(io) to_s, unsafe_fetch(index : Int) unsafe_fetch, unsafe_put(index : Int, value : ForeignValue) unsafe_put
Constructor methods inherited from struct Novika::FFI::StructView
new(layout : Novika::FFI::StructLayout, handle : Pointer(Void))
new
Instance methods inherited from module Novika::FFI::ForeignValue
box : Pointer(Void)
box,
must_be_of(type : ForeignType)
must_be_of,
to_form? : Form | Nil
to_form?,
write_to!(base : Pointer(Void)) : Pointer(Void)
write_to!
Instance Method Detail
def box : Pointer(Void)
#
Description copied from module Novika::FFI::ForeignValue
Wraps this value in a void pointer.
def write_to!(base : Pointer(Void)) : Pointer(Void)
#
Description copied from module Novika::FFI::ForeignValue
Writes this value starting at the given base pointer. Returns the base pointer.