Bull DPX/20 Podręcznik Użytkownika Strona 41

  • Pobierz
  • Dodaj do moich podręczników
  • Drukuj
  • Strona
    / 424
  • Spis treści
  • BOOKMARKI
  • Oceniono. / 5. Na podstawie oceny klientów
Przeglądanie stron 40
SOM Kernel Reference 1-29
C Example
// SOM IDL for class A and class B
#include <somobj.idl>
module srExample {
interface A : SOMObject { void foo(); implementation {
callstyle=oidl; }; };
interface B : A { implementation { foo: override; }; };
};
// Example C++ program to implement and test module scrExample
#define SOM_Module_srexample_Source
#include <srExample.ih>
#include <stdio.h>
SOM_Scope void SOMLINK srExample_Afoo(srExample_A *somSelf);
{ printf(”1\n”); }
SOM_Scope void SOMLINK srExample_Bfoo(srExample_B *somSelf);
{ printf(”2\n”); }
main()
{
srExample_B objPtr = srExample_BNew();
/* This prints 2 */
((somTD_srExample_A_foo) /* this method procedure expression
cast is necessary */
somResolve(objPtr, srExample_AClassData.foo)
) /* end of method procedure expression */
(objPtr);
}
Related Information
Functions: somResolveByName, somParentResolve, somParentNumResolve,
somClassResolve
Data Structures: somMethodPtr (sombtype.h), somMToken (somapi.h)
Methods: somDispatch, somClassDispatch, somFindMethod, somFindMethodOk,
somGetMethodToken
Macros: SOM_Resolve, SOM_ResolveNoCheck
Przeglądanie stron 40
1 2 ... 36 37 38 39 40 41 42 43 44 45 46 ... 423 424

Komentarze do niniejszej Instrukcji

Brak uwag