SOMClassMgr

From EDM2
Jump to: navigation, search

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.

Attributes

Listed below is 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. When your program finishes using the Repository object, it should call the somDestruct method to release the reference, using a non-zero value for the doFree parameter.

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);

New methods

The following list shows all the SOMClassMgr methods.

Group: Basic Functions:

Group: Access:

Group: Dynamic:

Overridden methods

The following list shows all the methods overridden by the SOMClassMgr class. These methods are overridden in order to modify the behavior defined by an ancestor class.