Bull DPX/20 Betriebsanweisung Seite 146

  • Herunterladen
  • Zu meinen Handbüchern hinzufügen
  • Drucken
  • Seite
    / 424
  • Inhaltsverzeichnis
  • LESEZEICHEN
  • Bewertet. / 5. Basierend auf Kundenbewertungen
Seitenansicht 145
1-134 SOMobjects Base Toolkit: Programmers Reference Manual
somDispatch, somClassDispatch Methods
Purpose
Invokes a method using dispatch method resolution. The somDispatch method is designed
to be overridden. The somClassDispatch method is not generally overridden.
IDL Syntax
boolean somDispatch (
out somToken retValue,
in somId methodId,
in va_list args);
boolean somClassDispatch (
in SOMClass clsObj,
out somToken retValue,
in somId methodId,
in va_list args);
Note: For backward compatibility, these methods do not take an Environment parameter.
Description
Both somDispatch and somClassDispatch perform method resolution to select a method
procedure, and then invoke this procedure on args. The “somSelf” argument for the
selected method procedure (called the “target object,” in the following text, to distinguish it
from the receiver of the somDispatch or somClassDispatch method call) is the first
argument included in the va_list, args.
For somDispatch, method resolution is performed using the class of the receiver; for
somClassDispatch, method resolution is performed using the argument class, clsObj.
Because somClassDispatch uses clsObj for method resolution, a programmer invoking
somDispatch or somClassDispatch should assure that the class of the target object is
either derived from or is identical to the class used for method resolution; otherwise, a
run-time error will likely result when the target object is passed to the resolved procedure.
Although not necessary, the receiver is usually also the target object.
The somDispatch and somClassDispatch methods supersede the somDispatchX
methods. Unlike the somDispatchX methods, which are restricted to few return types, the
somDispatch and somClassDispatch methods make no assumptions concerning the
result returned by the method to be invoked. Thus, somDispatch and somClassDispatch
can be used to invoke methods that return structures. The somDispatchX methods now
invoke somDispatch, so overriding somDispatch serves to override the somDispatchX
methods as well.
Seitenansicht 145
1 2 ... 141 142 143 144 145 146 147 148 149 150 151 ... 423 424

Kommentare zu diesen Handbüchern

Keine Kommentare