somLookupMethod - Remarks

The somLookupMethod method uses name-lookup resolution to return the address of the method procedure that supports the indicated method on instances of the receiver class. The method may be either static or dynamic. The SOM C and C++ usage bindings support name-lookup method resolution by invoking somLookupMethod on the class of the object on which a name-lookup method invocation is made.

The somLookupMethod method is like somFindSMethodOK except that dynamic methods can also be returned. If the method is not supported by the receiving class, then an error is returned and execution is halted. To check the existence of a method, somFindMethod can be used.

As always, in order to use a method procedure pointer such as that returned by somLookupMethod, it is necessary to typecast the procedure pointer so that the compiler can create the correct procedure call. This means that a programmer making explicit use of this method must either know the signature of the identified method, and from this create a typedef indicating system linkage and the appropriate argument and return types, or make use of an existing typedef provided by C or C++ usage bindings for a SOM class that introduces a static method with the desired signature.


[Back: somLookupMethod - Parameters]
[Next: somLookupMethod - Original Class]