Bull DPX/20 Guida Utente Pagina 15

  • Scaricare
  • Aggiungi ai miei manuali
  • Stampa
  • Pagina
    / 424
  • Indice
  • SEGNALIBRI
  • Valutato. / 5. Basato su recensioni clienti
Vedere la pagina 14
SOM Kernel Reference 1-3
args A pointer to a memory region in which all of the arguments to the method
procedure have been laid out in consecutive addresses, according to the
protocol implemented by va_lists. The first entry of the va_list must be
objPtr. Furthermore, all arguments on the va_list must appear in widened
form, as defined by ANSI C. For example, floats must appear as doubles,
and chars and shorts must appear as ints.
C++ Example
#include <somcls.xh>
#include <string.h>
#include <stdarg.h>
main()
{ va_list args = (va_list) SOMMalloc(4);
va_list push = args;
string result;
SOMClass *scObj;
somMethodData md;
somEnvironmentNew(); /* Init environment */
scObj = _SOMClass; /* The SOMClass object */
scObj–>somGetMethodData(somIdFromString(”somGetName”), &md);
va_arg(push, SOMClass*) = scObj;
somApply(scObj, (somToken*)&result, &md, args);
SOM_Assert(!strcmp(result,”SOMClass”), SOM_Fatal);
/* result is ”SOMClass” */
}
Related Information
Methods: somGetMethodData, somGetNthMethodData, somGetRdStub,
somAddStaticMethod, somAddDynamicMethod (somcIs.idl)
Data Structures: SOMObject (somobj.idl), somMethodData (somapi.h), somToken
(somapi.h), somMethodPtr (sombtype.h), va_list (stdarg.h)
Vedere la pagina 14
1 2 ... 10 11 12 13 14 15 16 17 18 19 20 ... 423 424

Commenti su questo manuale

Nessun commento