home *** CD-ROM | disk | FTP | other *** search
/ OS/2 Shareware BBS: 10 Tools / 10-Tools.zip / som30tk.zip / som30os2.zip / include / somcm.sc < prev    next >
Text File  |  1996-12-24  |  12KB  |  260 lines

  1.  
  2. /*
  3.  * This file was generated by the SOM Compiler.
  4.  * FileName: d:\u\otp\include\somcm.sc.
  5.  * Generated using:
  6.  *     SOM Precompiler somipc: 2.29.1.19
  7.  *     SOM Emitter emitsc: 2.49
  8.  */
  9.  
  10. /*
  11.  *  96F8647, 96F8648, 96F8850 (C) Copyright IBM Corp. 1992, 1994
  12.  *  All Rights Reserved
  13.  *  Licensed Materials - Property of IBM
  14.  *   SOMClassMgr: System Object Model class manager
  15.  */
  16.  
  17. #include <somobj.sc>
  18.  
  19. class: SOMClassMgr, 
  20.     externalstem = somcm, majorversion = 1, 
  21.     minorversion = 6, filestem = somcm;
  22.  
  23.     --  [Basic Functions Group]
  24.  
  25.  
  26. parent class: SOMObject;
  27.  
  28.  
  29. release order:
  30.     somFindClsInFile, somFindClass, 
  31.     somClassFromId, somRegisterClass, 
  32.     somUnregisterClass, somLocateClassFile, 
  33.     somLoadClassFile, somUnloadClassFile, 
  34.     somGetInitFunction, somMergeInto, 
  35.     somGetRelatedClasses, somSubstituteClass, 
  36.     _get_somInterfaceRepository, _set_somInterfaceRepository, 
  37.     _get_somRegisteredClasses, somBeginPersistentClasses, 
  38.     somEndPersistentClasses, somcmPrivate1, 
  39.     somcmPrivate2, somRegisterClassLibrary, 
  40.     somJoinAffinityGroup, somUnregisterClassLibrary, 
  41.     somImportObject, somcmPrivate3, 
  42.     somcmPrivate4;
  43.  
  44. methods:
  45.  
  46.  
  47.     SOMClass*   somLoadClassFile(somId classId,
  48.         long majorVersion,
  49.         long minorVersion,
  50.         string file), descriptor = ::SOMClassMgr::somLoadClassFile;
  51.  
  52.     --  Loads the class' code and initializes the class object.
  53.  
  54.     string   somLocateClassFile(somId classId,
  55.         long majorVersion,
  56.         long minorVersion), descriptor = ::SOMClassMgr::somLocateClassFile, dual_owned_result;
  57.  
  58.     --  Real implementation supplied by subclasses.  Default implementation
  59.     --  will lookup the class name in the Interface Repository (if one is
  60.     --  available) to determine the implementation file name (ie, DLL name).
  61.     --  If this information is not available, the class name itself is
  62.     --  returned as the file name.   Subclasses may use version number
  63.     --  info to assist in deriving the file name.
  64.  
  65.     void   somRegisterClass(SOMClass* classObj), descriptor = ::SOMClassMgr::somRegisterClass;
  66.  
  67.     --  Lets the class manager know that the specified class is installed
  68.     --  and tells it where the class object is.
  69.  
  70.     void   somRegisterClassLibrary(string libraryName,
  71.         somMethodPtr libraryInitRtn), descriptor = ::SOMClassMgr::somRegisterClassLibrary;
  72.  
  73.     --  Informs the class manager that a class library has been loaded.
  74.     --  "libraryName" is the name associated with the file containing the
  75.     --  implementation(s) of the class(es) in the class library.
  76.     --  "libraryInitRtn" is the entry point of a SOMInitModule function
  77.     --  that can be used to initialize the class library.  For platforms
  78.     --  that have the capability to automatically invoke a library
  79.     --  initialization function whenever a library is loaded, a call
  80.     --  to this method should occur within the library's automatic init
  81.     --  function.
  82.  
  83.     void   somUnregisterClassLibrary(string libraryName), descriptor = ::SOMClassMgr::somUnregisterClassLibrary;
  84.  
  85.     --  Informs the class manager that a class library has been unloaded.
  86.     --  "libraryName" is the name associated with the file containing the
  87.     --  implementation(s) of the class(es) in the class library.
  88.     --  For platforms that have the capability to automatically invoke a
  89.     --  library termination function whenever a library is unloaded, a call
  90.     --  to this method should occur within the library's automatic
  91.     --  termination function.
  92.  
  93.     long   somUnloadClassFile(SOMClass* classObj), descriptor = ::SOMClassMgr::somUnloadClassFile;
  94.  
  95.     --  Releases the class' code and unregisters all classes in the
  96.     --  same affinity group (see somGetRelatedClasses below).
  97.  
  98.     long   somUnregisterClass(SOMClass* classObj), descriptor = ::SOMClassMgr::somUnregisterClass;
  99.  
  100.     --  Free the class object and removes the class from the SOM registry.
  101.     --  If the class caused dynamic loading to occur, it is also unloaded
  102.     --  (causing its entire affinity group to be unregistered as well).
  103.  
  104.     void   somBeginPersistentClasses(), descriptor = ::SOMClassMgr::somBeginPersistentClasses;
  105.  
  106.     --  Starts a bracket for the current thread wherein all classes
  107.     --  that are registered are marked as permanant and cannot be
  108.     --  unregistered or unloaded.  Persistent classes brackets may be
  109.     --  nested.
  110.  
  111.     void   somEndPersistentClasses(), descriptor = ::SOMClassMgr::somEndPersistentClasses;
  112.  
  113.     --  Ends a persistent classes bracket for the current thread.
  114.  
  115.     boolean   somJoinAffinityGroup(SOMClass* newClass,
  116.         SOMClass* affClass), descriptor = ::SOMClassMgr::somJoinAffinityGroup;
  117.  
  118.     --  If <affClass> is a member of an affinity group, and <newClass> is not a
  119.     --  member of any affinity group, this method adds <newClass> to the
  120.     --  same affinity group as <affClass>.  If the method succeeds it returns
  121.     --  TRUE, otherwise it returns FALSE.  Adding a class to an affinity group
  122.     --  effectively equates its lifetime with that of the other members of
  123.     --  the affinity group.
  124.     --  [Access Group]
  125.  
  126.     string   somGetInitFunction(), descriptor = ::SOMClassMgr::somGetInitFunction, dual_owned_result;
  127.  
  128.     --  The name of the initialization function in the class' code file.
  129.     --  Default implementation returns (*SOMClassInitFuncName)().
  130.  
  131. group: somInterfaceRepository, nodata;
  132.  
  133.     Repository*   _get_somInterfaceRepository(), attribute, nodata, 
  134.     descriptor = ::SOMClassMgr::_get_somInterfaceRepository;
  135.  
  136.     --  The Repository object that provides access to the Interface Repository,
  137.     --  If no Interface Repository has yet been assigned to this attribute,
  138.     --  and the SOMClassMgr is unable to load and instantiate it, the attribute
  139.     --  will have the value NULL.  When finished using the Repository object
  140.     --  you should release your reference using the somDestruct method with
  141.     --  a non-zero <doFree> parameter.
  142.  
  143.     void   _set_somInterfaceRepository(Repository* somInterfaceRepository), attribute, nodata, 
  144.     descriptor = ::SOMClassMgr::_set_somInterfaceRepository;
  145.  
  146.     --  The Repository object that provides access to the Interface Repository,
  147.     --  If no Interface Repository has yet been assigned to this attribute,
  148.     --  and the SOMClassMgr is unable to load and instantiate it, the attribute
  149.     --  will have the value NULL.  When finished using the Repository object
  150.     --  you should release your reference using the somDestruct method with
  151.     --  a non-zero <doFree> parameter.
  152.  
  153. group: somRegisteredClasses, nodata;
  154.  
  155.     _IDL_SEQUENCE_SOMClass   _get_somRegisteredClasses(), attribute, nodata, 
  156.     descriptor = ::SOMClassMgr::_get_somRegisteredClasses;
  157.  
  158.     --  A list of all classes currently registered in this process.
  159.  
  160. methods:
  161.  
  162.  
  163.     SOMClassMgr_SOMClassArray   somGetRelatedClasses(SOMClass* classObj), descriptor = ::SOMClassMgr::somGetRelatedClasses;
  164.  
  165.     --  Returns an array of class objects that were all registered during
  166.     --  the dynamic loading of a class.    These classes are considered to
  167.     --  define an affinity group.  Any class is a member of at most one
  168.     --  affinity group.    The affinity group returned by this call is the
  169.     --  one containing the class identified by classObj.  The first element
  170.     --  in the array is the class that caused the group to be loaded, or the
  171.     --  special value -1 which means that the SOMClassMgr is currently in the
  172.     --  process of unregistering and deleting the affinity group (only
  173.     --  SOMClassMgr subclasses would ever see this value).
  174.     --  The remainder of the array (elements one thru n) consists of
  175.     --  pointers to class objects ordered in reverse chronological sequence
  176.     --  to that in which they were originally registered.  This list includes
  177.     --  the given argument, classObj, as one of its elements, as well as the
  178.     --  class, if any, returned as element[0] above.  The array is terminated
  179.     --  by a NULL pointer as the last element.  Use SOMFree to release the
  180.     --  array when it is no longer needed.  If the supplied class was not
  181.     --  dynamically loaded, it is not a member of any affinity
  182.     --  group and NULL is returned.
  183.     --  [Dynamic Group]
  184.  
  185.     SOMClass*   somClassFromId(somId classId), descriptor = ::SOMClassMgr::somClassFromId;
  186.  
  187.     --  Finds the class object, given its Id, if it already exists.
  188.     --  Does not load the class.  Returns NULL if the class object does
  189.     --  not yet exist.
  190.  
  191.     SOMClass*   somFindClass(somId classId,
  192.         long majorVersion,
  193.         long minorVersion), descriptor = ::SOMClassMgr::somFindClass;
  194.  
  195.     --  Returns the class object for the specified class.  This may result
  196.     --  in dynamic loading.  Uses somLocateClassFile to obtain the name of
  197.     --  the file where the class' code resides, then uses somFindClsInFile.
  198.  
  199.     SOMClass*   somFindClsInFile(somId classId,
  200.         long majorVersion,
  201.         long minorVersion,
  202.         string file), descriptor = ::SOMClassMgr::somFindClsInFile;
  203.  
  204.     --  Returns the class object for the specified class.  This may result
  205.     --  in dynamic loading.  If the class already exists <file> is ignored,
  206.     --  otherwise it is used to locate and dynamically load the class.
  207.     --  Values of 0 for major and minor version numbers bypass version checking.
  208.  
  209.     void   somMergeInto(SOMObject* targetObj), descriptor = ::SOMClassMgr::somMergeInto;
  210.  
  211.     --  Merges the SOMClassMgr registry information from the receiver to
  212.     --  <targetObj>.  <targetObj> is required to be an instance of SOMClassMgr
  213.     --  or one of its subclasses.  At the completion of this operation,
  214.     --  the <targetObj> should be able to function as a replacement for the
  215.     --  receiver.  At the end of the operation the receiver object (which is
  216.     --  then in a newly uninitialized state) is freed.  Subclasses that
  217.     --  override this method should similarly transfer their sections of
  218.     --  the object and pass this method to their parent as the final step.
  219.     --  If the receiving object is the distinguished instance pointed to
  220.     --  from the global variable SOMClassMgrObject, SOMCLassMgrObject is
  221.     --  then reassigned to point to <targetObj>.
  222.  
  223.     long   somSubstituteClass(string origClassName,
  224.         string newClassName), descriptor = ::SOMClassMgr::somSubstituteClass;
  225.  
  226.     --  This method causes the somFindClass, somFindClsInFile, and
  227.     --  somClassFromId methods to return the class named newClassName
  228.     --  whenever they would have normally returned the class named
  229.     --  origClassName.  This effectively results in class <newClassName>
  230.     --  replacing or substituting itself for class <origClassName>.
  231.     --  Some restrictions are enforced to insure that this works well.
  232.     --  Both class <origClassName> and class <newClassName> must
  233.     --  have been already registered before issuing this method, and newClass
  234.     --  must be an immediate child of origClass.  In addition (although not
  235.     --  enforceable), no instances should exist of either class at the time
  236.     --  this method is invoked.    A return value of zero indicates success;
  237.     --  a non-zero value indicates an error was detected.
  238.  
  239.     boolean   somImportObject(SOMObject* objToBeShared), descriptor = ::SOMClassMgr::somImportObject;
  240.  
  241.     --  This method causes the local class manager to load the
  242.     --  dlls that are required for sharing the object <objToBeShared>.
  243.     --  The returned boolean indicates whether or not the operation succeeded.
  244.     --  A return of FALSE (the operation failed) means that it is not safe
  245.     --  to use the object, i.e., invoking a method on the object may lead to
  246.     --  an exception.
  247.  
  248.     override somDefaultInit, original = SOMObject;
  249.  
  250.     -- From SOMObject
  251.  
  252.     override somDestruct, original = SOMObject;
  253.  
  254.     -- From SOMObject
  255.  
  256.     override somDumpSelfInt, original = SOMObject;
  257.  
  258.     -- From SOMObject
  259.  
  260.