Jump to content

somGetNumMethods

From EDM2

This method returns the number of 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 somGetNumMethods (SOMClass receiver)

Parameters

receiver (SOMClass)
A pointer to the class object whose instance method count is desired.

Return Code

rc (long)
Returns the total number of methods that are currently available for the receiving class.

Remarks

This method returns the number of methods currently supported by the specified class, including inherited methods (both static and dynamic).

The value that this method returns is the total number of methods currently known to the receiving class as being applicable to its instances. This includes both static and dynamic methods, whether defined in this class or inherited from an ancestor class.

Example Code

#include <animal.h>
main()
{
    long numMethods;

    AnimalNewClass(Animal_MajorVersion, Animal_MinorVersion);
    numMethods = _somGetNumMethods(_Animal);
    somPrintf("Number of methods supported by class: %d\n", numMethods);
}

Related

Methods