home *** CD-ROM | disk | FTP | other *** search
/ OS/2 Shareware BBS: 10 Tools / 10-Tools.zip / tolkit45.zip / os2tk45 / som / include / somcm.sc < prev    next >
Text File  |  1999-02-22  |  12KB  |  247 lines

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