Dictionary cache storing wrappers; usually used in
WRAPPER_COLLECTIONs or WRAPPER_DICTIONARY
Key is the address (pointer) to the wrapped C structure,
value is the corresponding Eiffel wrapper.
Dictionary cache storing wrappers; usually used in
WRAPPER_COLLECTIONs or WRAPPER_DICTIONARY
Key is the address (pointer) to the wrapped C structure,
value is the corresponding Eiffel wrapper.
This way you
can get back an already-created Eiffel wrapper. Heirs of
SHARED_C_STRUCT, i.e. G_OBJECT could provide alternative
implementation that will not rely on this dictionary.
It could be newly created or
retrieved from a cache, a dictionary, from the underlying
object, depending on the implementation.
See also wrapper_or_void: when a_pointer is the
default pointer (known as NULL in C) Result will be Void.
A wrapper for a_pointer or Void if a_pointer
default_pointer (NULL in C).
A commodity feature to
replace the following code snippet:
my_gobject: A_WRAPPER
local p: POINTER
do
p := get_foo(handle)
if p.is_not_null then
Result := factory.wrapper(p)
end
end
with
my_gobject: A_G_OBJECT_HEIR
do
Result := factory.wrapper_or_void(get_foo(handle))
end
ensure
null_pointer_returns_void: a_pointer.is_null implies Result = Void
correct: a_pointer.is_not_null implies Result /= Void and then Result.handle = a_pointer
This exception occurs when Void is passed as the expression
to inspect ("inspect on STRING only).
This exception also occurs when the inspected value selects no branch (when the keyword "else"
not used, one "when" branch _must_ be selected). Some value which is not one of the inspect
constants, if there is no Else_part
o