The following methods are used to obtain information about a class or to
locate a particular class object:
somCheckVersion
Checks a class for compatibility
with the specified major and minor version numbers. The receiver of the
method is the SOM class about which information is needed. Additional arguments
are values of the major and minor version numbers. The method returns TRUE
if the class is compatible, or FALSE otherwise.
somClassFromId
Finds the class object of an existing class
when given its somId, but without loading the class. The receiver
of the method is the class manager (pointed to by the global variable SOMClassMgrObject).
The additional argument is the class's somId. The method returns
a pointer to the class (or NULL if the class does not exist).
somDescendedFrom
Tests whether one class is derived from another.
The receiver of the method is the class to be tested, and the potential
ancestor class is the argument. The method returns TRUE if the relationships
exists, or FALSE otherwise.
somFindClass
Finds
or creates the class object for a class, given the class's somId and
its major and minor version numbers. The receiver of the method is the class
manager (pointed to by the global variable SOMClassMgrObject). Additional
arguments are the class's somId and the major and minor version numbers.
The method returns a pointer to the class object, or NULL if the class could
not be created.
somFindClsInFile
Finds
or creates the class object for a class. This method is similar to somFindClass,
except the user also provides the name of a file to be used for dynamic
loading, if needed. The receiver of the method is the class manager (pointed
to by the global variable SOMClassMgrObject). Additional arguments
are the class's somId, the major and minor version numbers, and the
file name. The method returns a pointer to the class object, or NULL if
the class could not be created.
somGetInstancePartSize
Obtains the size of the instance variables introduced
by a class. The receiver of the method is the class object. The method returns
the amount of space, in bytes, needed for the instance variables.
somGetInstanceSize
Obtains the total size requirements for an instance
of a class. The receiver of the method is the class object. The method returns
the amount of space, in bytes, required for the instance variables introduced
by the class itself and by all of its ancestor classes.
somGetName
Obtains the name of a class. The receiver of
the method is the class object. The method returns the class name.
somGetNumMethods
Obtains the number of methods available for
a class. The receiver of the method is the class object. The method returns
the total number of currently available methods (static or otherwise, including
inherited methods).
somGetNumStaticMethods
Obtains
the number of static methods available for a class. (A static method is
one declared in the class's interface specification [.idl] file.) The receiver
of the method is the class object. The method returns the total number of
available static methods, including inherited ones.
somGetParents
Obtains a sequence of the parent (base) classes
of a specified class. The receiver of the method is the class object. The
method returns a pointer to a linked list of the parent (base) classes (unless
the receiver is SOMObject, for which it returns NULL).
somGetVersionNumbers
Obtains the major and minor version numbers
of a class. The return type is void, and the two arguments are pointers
to locations in memory where the method can store the major and minor version
numbers (of type long).
somSupportsMethod
Indicates whether instances of a given class
support a given method. The receiver of the somSupportsMethod method
is the class object. The argument is the somId for the method in
question. The somSupportsMethod method returns TRUE if the method
is supported, or FALSE otherwise.
See the System Object Model Programming Reference for more information
on a specific method.