module Candiru::ValueClass(T)
Overview
Should be extended by objects that want to be Crystal- facing FFI description objects (e.g. Int32, Float64).
Included Modules
Direct including types
Defined in:
candiru.crInstance Method Summary
-
#adopt_as_field_value(field : ITypedField, pointer : Pointer(Void)) : FieldValue(T)
Performs the necessary type sorcery to create a
FieldValue(T)
from a void pointer and the corresponding typed field. -
#from_ffi_return_pointer(pointer : Pointer(Void))
Casts pointer, a return value hole from FFI, to this type, and returns its value.
- #matches?(other : T)
Instance methods inherited from module Candiru::IValueClassType
adopt_as_field_value(field : ITypedField, pointer : Pointer(Void))
adopt_as_field_value,
from_ffi_return_pointer(pointer : Pointer(Void))
from_ffi_return_pointer,
matches?(other)
matches?,
to_ffi : FFI::Type
to_ffi
Instance Method Detail
Description copied from module Candiru::IValueClassType
Performs the necessary type sorcery to create a FieldValue(T)
from a void pointer and the corresponding typed field.
def from_ffi_return_pointer(pointer : Pointer(Void))
#
Description copied from module Candiru::IValueClassType
Casts pointer, a return value hole from FFI, to this type, and returns its value.