Jump to content

somGetNumStaticMethods

From EDM2
Revision as of 17:29, 13 October 2017 by Martini (talk | contribs) (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...")
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)

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