SOM Kernel Reference 1-73
C Example
/* New dynamic method ”newMethod1” for class ”XXX” */
static char *somMN_newMethod1 = ”newMethod1”;
static somId somId_newMethod1 = &somMN_newMethod1;
static char *somDS_newMethod1 = ”XXX::newMethod1”;
static somId somDI_newMethod1 = &somDS_newMethod1;
static void SOMLINK somAP_newMethod1(SOMObject somSelf,
void *__retVal,
somMethodProc *__methodPtr,
va_list __ap)
{
void* __somSelf = va_arg(__ap, SOMObject);
int arg1 = va_arg(__ap, int);
SOM_IgnoreWarning(__retVal);
((somTD_SOMObject_newMethod1) __methodPtr) (__somSelf, arg1);
}
main()
{
_somAddDynamicMethod (
XXXClassData.classObject, /* Receiver (class object)
*/
somId_newMethod1, /* method name somId
*/
somDI_newMethod1, /* method descriptor somId
*/
(somMethodProc *) newMethod1, /* method procedure
*/
(somMethodProc *) somAP_newMethod1); /* method apply stub
*/
}
Original Class
SOMClass
Related Information
Methods: somGetMethodDescriptor
Kommentare zu diesen Handbüchern