The somGetRelatedClasses method returns an array of class objects that were all registered during the dynamic loading of the specified class. These classes are considered to define an affinity group. Any class is a member of at most one affinity group. The affinity group returned by this call is the one containing the class identified by the classObj parameter.
The first element in the array is either the class that caused the group to be loaded, or the special value -1, which means that the class manager is currently in the process of unregistering and deleting the affinity group (only class-manager objects would ever see this value). The remainder of the array consists of pointers to class objects, ordered in reverse chronological sequence to that in which they were originally registered. This list includes the given argument, classObj, as one of its elements, as well as the class that caused the group to be loaded (also given by the first element of the array). The array is terminated by a NULL pointer as the last element.
Use SOMFree to release the array when it is no longer needed. If the supplied class was not dynamically loaded, it is not a member of any affinity group and NULL is returned.