somParentResolve

From EDM2
Jump to: navigation, search

This function obtains a pointer to a procedure that implements a method, given a list of method tables. Obsolete but still supported.

Syntax

somMethodTabs    parentMtab;
somToken         mToken;
somMethodPtr     rc;

rc = somParentResolve(parentMtab, mToken);

Parameters

parentMtab (somMethodTabs) 
A list of parent method tables, the first of which is the method table for the parent class for which the method is to be resolved. The SOM API specifies that the list of parent method tables for a given class be stored in the auxiliary class data structure of the class, in the parentMtab component. Thus, for the class "XYZ", the parent method table list is found in location XYZCClassData.parentMtab. Parent method table lists are available from class objects via the method call

somGetPClsMtabs.

mToken (somToken) 
The method token for the method to be resolved. The SOM API requires that if the class "XYZ" introduces the static method "foo", then the method token for "foo" is found in the class data structure for "XYZ" (called XYZClassData) in the structure member named "foo" (i.e., at XYZClassData.foo). Method tokens can also be obtained using the

somGetMethodToken method.

Return Code

rc (somMethodPtr) 
A pointer to the somMethodProc (procedure) that implements the specified method, selected from the first method table.

Remarks

This function is used by old, single-parent class binaries to make parent method calls. The function is obsolete, but is still supported. This function returns a pointer to the procedure that implements the specified method. This pointer is selected from the first method table in the parentMtab list.

Example Code


Related

Data Structures
  • somMethodPtr(sombtype.h)
  • somMethodTabs (somapi.h)
  • somMToken(somapi.h)
Functions
Methods
Macros