SOM Kernel Reference 1-105
SOMClassMgr Class
Description
One instance of SOMClassMgr is created automatically during SOM initialization. This
instance (pointed to by the global variable, SOMClassMgrObject ) acts as a run-time
registry for all SOM class objects that exist within the current process and assists in the
dynamic loading and unloading of class libraries.
You can subclass SOMClassMgr to augment the functionality of its registry. To have an
instance of your subclass replace the SOM-supplied SOMClassMgrObject, use the
somMergeInto method to place the existing registry information from
SOMClassMgrObject into your new class-manager object.
File Stem
somcm
Base
SOMObject
Metaclass
SOMClass
Ancestor Classes
SOMObject
Types
interface Repository;
SOMClass *SOMClassArray;
Attributes
The following is a list of each available attribute with its corresponding type in parentheses,
followed by a description of its purpose.
somInterfaceRepository (Repository)
The SOM Interface Repository object. If the Interface Repository is not
available or cannot be initialized, this attribute returns NULL. The object
reference returned by this attribute is owned by the SOMClassMgr and
should not be freed.
somRegisteredClasses (sequence<SOMClass>)
This is a “readonly” attribute that returns a sequence containing all of the
class objects registered in the current process. When you have finished
using the returned sequence, you should free the sequence’s buffer using
SOMFree. Here is a fragment of code written in C that illustrates the proper
use of this attribute:
sequence(SOMClass) clsList;
clsList = SOMClassMgr__get_somRegisteredClasses
(SOMClassMgrObject);
somPrintf (”Currently registered classes:\n”);
for (i=0; i<clsList._length; i++)
somPrintf (”\t%s\n”, SOMClass_somGetName
(clsList._buffer[i]));
SOMFree (clsList._buffer);
Komentáře k této Příručce