SomGetNthMethodInfo: Difference between revisions
Appearance
Created page with "{{DISPLAYTITLE:somGetNthMethodInfo}} This method returns the somId of the nth (static or dynamic) method known to a given class. Also loads a somId with a descriptor for the m..." |
mNo edit summary |
||
Line 1: | Line 1: | ||
{{DISPLAYTITLE:somGetNthMethodInfo}} | {{DISPLAYTITLE:somGetNthMethodInfo}} | ||
This method 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. | This method 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. | ||
For backward compatibility, this method does not take an Environment parameter. | For backward compatibility, this method does not take an Environment parameter. | ||
; Original Class : [[SOMClass]] | ;Original Class : [[SOMClass]] | ||
==Syntax== | ==Syntax== | ||
somId somGetNthMethodInfo (SOMClass receiver, long index, somId descriptor) | somId somGetNthMethodInfo (SOMClass receiver, long index, somId descriptor) | ||
==Parameters== | ==Parameters== | ||
; | ;receiver (SOMClass): A pointer to the class from which the index was obtained using method somGetMethodIndex. | ||
;index (long): The nth method known to this class, whose method descriptor is desired. | |||
; index (long) : The nth method known to this class, whose method descriptor is desired. | ;descriptor (somId): A pointer to a somId that will be loaded with a somId for the descriptor. | ||
; descriptor (somId) : A pointer to a somId that will be loaded with a somId for the descriptor. | |||
==Return Code== | ==Return Code== | ||
; | ;rc (somId): | ||
* somID - Returns the somId for the indicated method, if a method with the indicated index is known to the receiver. | |||
* somID | * NULL - Returns NULL if a method with the indicated index is not known to the receiver. | ||
* NULL | |||
==Remarks== | ==Remarks== | ||
Line 39: | Line 37: | ||
==Related== | ==Related== | ||
;Classes | |||
* Repository (repostry.idl) | * Repository (repostry.idl) | ||
;Methods | |||
* [[somGetMethodIndex]] | * [[somGetMethodIndex]] | ||
* [[somGetNthMethodData]] | * [[somGetNthMethodData]] | ||
[[Category:SOMClass]] | [[Category:SOMClass]] |
Latest revision as of 17:55, 5 April 2025
This method 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.
For backward compatibility, this method does not take an Environment parameter.
- Original Class
- SOMClass
Syntax
somId somGetNthMethodInfo (SOMClass receiver, long index, somId descriptor)
Parameters
- receiver (SOMClass)
- A pointer to the class from which the index was obtained using method somGetMethodIndex.
- index (long)
- The nth method known to this class, whose method descriptor is desired.
- descriptor (somId)
- A pointer to a somId that will be loaded with a somId for the descriptor.
Return Code
- rc (somId)
- somID - Returns the somId for the indicated method, if a method with the indicated index is known to the receiver.
- NULL - Returns NULL if a method with the indicated index is not known to the receiver.
Remarks
This 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.
Example Code
#include <somcls.xh> main() { somEnvironmentNew(); somId descriptor, icId = somIdFromSring("somGetMethodIndex"); long ndx = _SOMClass->somGetMethodIndex(icId); somMethodData md; boolean rc = _SOMClass->somGetNthMethodData(index,&md); SOM_Test(rc && somCompareIds(gmiId, md.id)); }
Related
- Classes
- Repository (repostry.idl)
- Methods