Invocation
is an object holding a target object, a selector,
and arguments to the selector. Thus, an Invocation
holds everything
needed to send a message. An Invocation
can be fired at its target
(with the fire
method), or fired after retargeting (using the
fireAt
method).
An Invocation
is incomplete when not all arguments needed to send
the message have been specified. An incomplete Invocation
can be
fired in two different ways. First, by invoking fireWith
and
supplying values for the remaining arguments. Second, by invoking on
the Invocation
a method completing it. For example, if an
Invocation
x
of the method void with int a do int b
only has a
value for the argument a
, then invoking [x do 23]
will
(temporarily) complete the Invocation
and send the full message
(with do
) to its target.
instance (id) for selector sel to: All target = nil with dynamic arguments;
instance (id) for selector sel to: All target = nil : Indexed arguments = nil;
instance (id) of selector sel to: All target = nil with dynamic arguments;
program-condition
if
the resulting invocation is incomplete.
instance (id) of selector sel to: All target = nil : Indexed arguments = nil;
program-condition
if
the resulting invocation is incomplete.
instance (id) of selector sel to: All target = nil using pointer ap;
Proxy
in its forwarding from
forwardSelector arguments
.
Arguments are to be retrieved from the va_list
pointed to by ap
,
i.e. va_arg (*ap, ...)
.
InvocationResult result;
nil
if we haven't
fired yet, or have fired with a void return type (of the fire
method).
pointer invocation;
protected id init pointer i;
boolean isComplete;
TRUE
iff the receiving invocation is complete, i.e. is has
all the arguments needed and can be fired directly with fire
or
fireAt
.
selector selector;
_builtin_.Any target;
protected InvocationResult forwardSelector selector sel arguments pointer ap;
sel
with the arguments pointed to by the
va_list
pointed to by ap
. Return the result of the invocation.
Only the incoming arguments from *ap
will be retrieved, so that
subsequent va_arg
invocations on *ap
can retrieve the outgoing
argument pointers.
This method is invoked by the runtime library in an attempt to forward
a message not directly implemented by the receiver. This method is
used since it is faster than a forwardInvocation
.
boolean invocationp;
YES
.
InvocationResult fire;
void fire;
InvocationResult
. The
result
of the receiving invocation is set to nil
.
InvocationResult fireAt All target;
target
.
void fireAt All target;
InvocationResult
. The
result
of the receiving invocation is set to nil
.
InvocationResult fireWith dynamic arguments;
arguments
. Return the result. The receiving invocation
will remain incomplete.
void fireWith dynamic arguments;
InvocationResult
. The
result
of the receiving invocation is set to nil
.
_builtin_.Any objectAfterFire;
_builtin_.Any objectOfResult;
InvocationResult result;
TypeDescription resultTypeDescription;
void encodeUsingCoder Encoder coder;
void initWithCoder Decoder coder;
protected void encodeToCoder Encoder coder;
protected void decodeFromCoder Decoder coder;
coder
into the invocation.
void dealloc;
void gc_mark_elements;