home *** CD-ROM | disk | FTP | other *** search
/ OS/2 Shareware BBS: 10 Tools / 10-Tools.zip / cset21v5.zip / TOOLKT21 / SC / SOMCM.SC < prev    next >
Text File  |  1993-05-03  |  6KB  |  142 lines

  1.  
  2. # This file was generated by the SOM Compiler.
  3. # FileName: somcm.sc.
  4. # Generated using:
  5. #     SOM Precompiler spc: 1.22
  6. #     SOM Emitter emitcsc: 1.10
  7.  
  8. --  SOMClassMgr: System Object Model class manager
  9. --  Copyright (c) International Business Machines Corporation
  10. --          1991, 1992
  11.  
  12. #include <somobj.sc>
  13.  
  14. class: SOMClassMgr, 
  15.     external stem = somcm, function prefix = somm_, major version = 1, 
  16.     minor version = 1, file stem = somcm;
  17.  
  18.  
  19. parent class: SOMObject;
  20.  
  21.  
  22. release order:
  23.     somFindClsInFile, somFindClass, somClassFromId, 
  24.     somRegisterClass, somUnregisterClass, somLocateClassFile, 
  25.     somLoadClassFile, somUnloadClassFile, somGetInitFunction, 
  26.     somMergeInto, somGetRelatedClasses;
  27.  
  28. methods:
  29. group: Basic;
  30.  
  31.     SOMClass *   somLoadClassFile(INOUT somId classId,
  32.         IN integer4 majorVersion,
  33.         IN integer4 minorVersion,
  34.         IN zString file);
  35.  
  36.     --  Loads the class' code and initializes the class object.
  37.  
  38.     zString    somLocateClassFile(INOUT somId classId,
  39.         IN integer4 majorVersion,
  40.         IN integer4 minorVersion);
  41.  
  42.     --  Real implementation supplied by subclasses.  Default implementation
  43.     --  returns the class name as the file name.   Subclasses may use
  44.     --  version number info to assist in deriving the file name.
  45.  
  46.     void    somRegisterClass(IN SOMClass *classObj);
  47.  
  48.     --  Lets the class manager know that the specified class is installed
  49.     --  and tells it where the class object is.
  50.  
  51.     int    somUnloadClassFile(IN SOMClass *classObj);
  52.  
  53.     --  Releases the class' code and unregisters all classes in the
  54.     --  same affinity group (see somGetRelatedClasses below).
  55.  
  56.     int    somUnregisterClass(IN SOMClass *classObj);
  57.  
  58.     --  Free the class object and removes the class from the SOM registry.
  59.     --  If the class caused dynamic loading to occur, it is also unloaded
  60.     --  (causing its entire affinity group to be unregistered as well).
  61.  
  62. group: Access;
  63.  
  64.     zString    somGetInitFunction();
  65.  
  66.     --  Supplies the name of the initialization function in the class' code
  67.     --  file.  Default implementation returns (*SOMClassInitFuncName)().
  68.  
  69.     SOMClass **   somGetRelatedClasses(IN SOMClass *classObj);
  70.  
  71.     --  Returns an array of class objects that were all registered during
  72.     --  the dynamic loading of a class.    These classes are considered to
  73.     --  define an affinity group.  Any class is a member of at most one
  74.     --  affinity group.    The affinity group returned by this call is the
  75.     --  one containing the class identified by classObj.  The first element
  76.     --  in the array is the class that caused the group to be loaded, or the
  77.     --  special value -1 which means that the SOMClassMgr is currently in the
  78.     --  process of unregistering and deleting the affinity group (only
  79.     --  SOMClassMgr subclasses would ever see this value).
  80.     --  The remainder of the array (elements one thru n) consists of
  81.     --  pointers to class objects ordered in reverse chronological sequence
  82.     --  to that in which they were originally registered.  This list includes
  83.     --  the given argument, classObj, as one of its elements, as well as the
  84.     --  class, if any, returned as element[0] above.  The array is terminated
  85.     --  by a NULL pointer as the last element.  Use SOMFree to release the
  86.     --  array when it is no longer needed.  If the supplied class was not
  87.     --  dynamically loaded, it is not a member of any affinity
  88.     --  group and NULL is returned.
  89.  
  90. group: Dynamic;
  91.  
  92.     SOMClass *   somClassFromId(IN somId classId);
  93.  
  94.     --  Finds the class object, given its Id, if it already exists.
  95.     --  Does not load the class.  Returns NULL if the class object does
  96.     --  not yet exist.
  97.  
  98.     SOMClass *   somFindClass(INOUT somId classId,
  99.         IN integer4 majorVersion,
  100.         IN integer4 minorVersion);
  101.  
  102.     --  Returns the class object for the specified class.  This may result
  103.     --  in dynamic loading.  Uses somLocateClassFile to obtain the name of
  104.     --  the file where the class' code resides, then uses somFindClsInFile.
  105.  
  106.     SOMClass *   somFindClsInFile(INOUT somId classId,
  107.         IN integer4 majorVersion,
  108.         IN integer4 minorVersion,
  109.         IN zString file);
  110.  
  111.     --  Returns the class object for the specified class.  This may result
  112.     --  in dynamic loading.  If the class already exists <file> is ignored,
  113.     --  otherwise it is used to locate and dynamically load the class.
  114.     --  Values of 0 for major and minor version numbers bypass version checking.
  115.  
  116.     void    somMergeInto(IN SOMObject *targetObj);
  117.  
  118.     --  Merges the SOMClassMgr registry information from the receiver to
  119.     --  <targetObj>.  <targetObj> is required to be an instance of SOMClassMgr
  120.     --  or one of its subclasses.  At the completion of this operation,
  121.     --  the <targetObj> should be able to function as a replacement for the
  122.     --  receiver.  At the end of the operation the receiver object (which is
  123.     --  then in a newly uninitialized state) is freed.  Subclasses that
  124.     --  override this method should similarly transfer their sections of
  125.     --  the object and pass this method to their parent as the final step.
  126.     --  If the receiving object is the distinguished instance pointed to
  127.     --  from the global variable SOMClassMgrObject, SOMCLassMgrObject is
  128.     --  then reassigned to point to <targetObj>.
  129.  
  130.     override somInit;
  131.  
  132.     -- From SOMObject
  133.  
  134.     override somUninit;
  135.  
  136.     -- From SOMObject
  137.  
  138.     override somDumpSelfInt;
  139.  
  140.     -- From SOMObject
  141.  
  142.