somDispatch - Parameters
receiver (SOMObject)
A pointer to the object
whose class will be used for method resolution by somDispatch.
retValue (somToken)
The address of the area
in memory where the result of the invoked method procedure is to be stored.
The caller is responsible for allocating enough memory to hold the result
of the specified method. When dispatching methods that return no result
(i.e., void), a NULL may be passed as this argument.
methodId (somID)
A somId identifying
the method to be invoked. A string representing the method name can be converted
to a somId using the somIdFromString function.
args (va_list)
A va_list containing
the arguments to be passed to the method identified by methodId.
The arguments must include a pointer to the target object as the first
entry. As a convenience for C and C++ programmers, SOM's language bindings
provide a varargs invocation macro for va_list methods (such as somDispatch
and somClassDispatch). The example below illustrates this.
rc (boolean)
A boolean representing whether
or not the method was successfully dispatched is returned. The reason for
this is that somDispatch and somClassDispatch use the function
somApply to invoke the resolved method procedure, and somApply
requires an apply stub for successful execution. In support of old class
binaries SOM does not consider a NULL apply stub to be an error. As a result,
somApply may fail. If this happens, then false is returned; otherwise true
is returned.
[Back: somDispatch Parameter - rc]
[Next: somDispatch - Remarks]