Bull DPX/20 Guia do Utilizador Página 284

  • Descarregar
  • Adicionar aos meus manuais
  • Imprimir
  • Página
    / 424
  • Índice
  • MARCADORES
  • Avaliado. / 5. Com base em avaliações de clientes
Vista de página 283
2-116
SOMobjects Base Toolkit: Programmers Reference Manual
somdDispatchMethod Method
Purpose
Dispatch a method on the specified SOM object.
IDL Syntax
void somdDispatchMethod (
in SOMObject somobj,
out somToken retValue,
in somId methodId,
in va_list ap );
Description
The somdDispatchMethod method is used to intercept method calls on objects in a server.
When a request arrives, the request parameters are extracted from the message, and the
target object is resolved. Then, the SOMOA dispatches the method call on the target object
using the somdDispatchMethod method.
The default implementation will call somDispatch on the target object with the parameters
as specified. This method can be overridden to intercept and process the method calls
before they are dispatched.
Parameters
receiver A pointer to a SOMDServer object.
env A pointer to the Environment structure for the method caller.
somobj A pointer to an object “managed” by the server object.
retValue A pointer to the storage area allocated to hold the method result value, if
any.
methodId A somId for the name of the method which is to be dispatched.
ap A pointer to a va_list array of arguments to the method call.
Return Value
The somdDispatchMethod method will return a result, if any, in the storage whose address
is in retValue.
Example
#include <somd.h>
/* overridden somdDispatchMethod */
void somdDispatchMethod(SOMDServer *somself, Environment *ev,
SOMObject *somobj, somToken *retValue,
somId methodId, va_list ap)
{
printf(”dispatching %s on %x\n”, SOM_StringFromId(methodId),
somobj);
SOMObject_somDispatch(somobj, ev, retValue, methodId, ap);
}
Original Class
SOMDServer
Vista de página 283
1 2 ... 279 280 281 282 283 284 285 286 287 288 289 ... 423 424

Comentários a estes Manuais

Sem comentários