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

  • Pobierz
  • Dodaj do moich podręczników
  • Drukuj
  • Strona
    / 424
  • Spis treści
  • BOOKMARKI
  • Oceniono. / 5. Na podstawie oceny klientów
Przeglądanie stron 71
1-60 SOMobjects Base Toolkit: Programmers Reference Manual
SOM_ParentNumResolve Macro
Purpose
Obtains a pointer to a method procedure from a list of method tables. Used by C and C++
implementation bindings to implement parent method calls.
Syntax
somMethodPtr SOM_ParentNumResolve (
<token> IntroClass,
long parentNum,
somMethodTabs parentMtabs,
<token> methodName);
Description
The SOM_ParentNumResolve macro invokes the somParentNumResolve function to
obtain a pointer to the static method procedure that implements the specified method for the
specified parent. The method is specified by indicating the introducing class, IntroClass, and
the method name, methodName.
Parameters
introClass The name of the class that introduces methodName. This name should be
given as a simple token, rather than a quoted string (for example, Animal
rather than “Animal”).
parentNum The position of the desired parent. The first (leftmost) parent of a class has
position 1.
parentMtabs A list of parent method tables acquired by invoking the somGetPClsMtabs
method on a class object.
methodName The name of the method to be resolved. This name should be given as a
simple token, rather than a quoted string (for example, setSound rather
than “setSound”).
Expansion
The expansion of the macro produces an expression that is appropriately typed for
application of the evaluated result to the indicated method’s arguments, as illustrated in the
following example.
Example
#include <somcls.h>
main()
{
SOMClassMgr *cm = somEnvironmentNew();
somMethodTabs mList = _somGetPClsMtabs(_SOMClass);
SOM_ParentNumResolve(SOMObject, 1, mList, somDumpSelfInt)
(_SOMClass,1);
}
Related Information
Functions: somParentNumResolve
Methods: somGetPClsMtabs
Przeglądanie stron 71
1 2 ... 67 68 69 70 71 72 73 74 75 76 77 ... 423 424

Komentarze do niniejszej Instrukcji

Brak uwag