SomGetNumStaticMethods: Difference between revisions
Appearance
Created page with "{{DISPLAYTITLE:somGetNumStaticMethods}} This method obtains the number of static methods available for a class of objects. Not generally overridden. For backward compatibilit..." |
mNo edit summary |
||
Line 4: | Line 4: | ||
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== | ||
long somGetNumStaticMethods (SOMClass receiver) | long somGetNumStaticMethods (SOMClass receiver) | ||
==Parameters== | ==Parameters== | ||
; | ;receiver (SOMClass) : A pointer to the class object whose static method count is desired. | ||
==Return Code== | ==Return Code== | ||
; | ;rc (long) : Returns the total number of static methods that are available for instances of the receiving class. | ||
==Remarks== | ==Remarks== | ||
Line 32: | Line 33: | ||
==Related== | ==Related== | ||
;Methods | |||
* [[somGetNumMethods]] | * [[somGetNumMethods]] | ||
[[Category:SOMClass]] | [[Category:SOMClass]] |
Latest revision as of 18:22, 5 April 2025
This method obtains the number of static methods available for a class of objects. Not generally overridden.
For backward compatibility, this method does not take an Environment parameter.
- Original Class
- SOMClass
Syntax
long somGetNumStaticMethods (SOMClass receiver)
Parameters
- receiver (SOMClass)
- A pointer to the class object whose static method count is desired.
Return Code
- rc (long)
- Returns the total number of static methods that are available for instances of the receiving class.
Remarks
This method returns the number of static methods available in the specified class, including inherited ones. Static methods are those that are represented by entries in the class's instance method table, and which can be invoked using method tokens and offset resolution.
Example Code
#include <animal.h> main() { long numMethods; AnimalNewClass(Animal_MajorVersion, Animal_MinorVersion); numMethods = _somGetNumStaticMethods(_Animal); somPrintf("Number of static methods supported by class: %d\n", numMethods); }
Related
- Methods