Bull DPX/20 Uživatelská příručka Strana 147

  • Stažení
  • Přidat do mých příruček
  • Tisk
  • Strana
    / 424
  • Tabulka s obsahem
  • KNIHY
  • Hodnocené. / 5. Na základě hodnocení zákazníků
Zobrazit stránku 146
SOM Kernel Reference 1-135
Parameters
receiver A pointer to the object whose class will be used for method resolution by
somDispatch.
clsObj A pointer to the class that will be used for method resolution by
somClassDispatch.
retValue 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 (that is, void), a NULL may be passed as this
argument.
methodId 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 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 following example
illustrates this.
Return Value
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.
Zobrazit stránku 146
1 2 ... 142 143 144 145 146 147 148 149 150 151 152 ... 423 424

Komentáře k této Příručce

Žádné komentáře