1-94 SOMobjects Base Toolkit: Programmer’s Reference Manual
somGetNthMethodInfo Method
Purpose
Returns the somId of the nth (static or dynamic) method known to a given class. Also loads
a somId with a descriptor for the method. Not generally overridden.
IDL Syntax
somId somGetNthMethodInfo (
in long index,
out somId descriptor);
Note: For backward compatibility, this method does not take an Environment parameter.
Description
The somGetNthMethodInfo method returns the identifier of a method, and loads the
somId whose address is passed with the somId of the method descriptor. Method
descriptors are used to support access to information stored in a SOM Interface Repository.
Parameters
receiver A pointer to the class from which the index was obtained using method
somGetMethodIndex.
index The nth method known to this class, whose method descriptor is desired.
descriptor A pointer to a somId that will be loaded with a somId for the descriptor.
Return Value
The somId for the indicated method, if a method with the indicated index is known to the
receiver; otherwise, NULL.
C++ Example
#include <somcls.xh>
main()
{
somEnvironmentNew();
somId descriptor, icId = somIdFromString(”somInitClass”);
long ndx = _SOMClass–>somGetMethodIndex(icId);
SOM_Test(
somCompareIds(
icId,
_SOMClass–>somGetNthMethodInfo(ndx,&descriptor));
SOMFree(icId);
SOMFree(descriptor);
}
Original Class
SOMClass
Related Information
Methods: somGetMethodIndex, somGetNthMethodData
Classes: Repository (repostry.idl)
Comentários a estes Manuais