home *** CD-ROM | disk | FTP | other *** search
/ Power GUI Programming with VisualAge C++ / powergui.iso / trialva / ibmcppw / include / om.idl < prev    next >
Encoding:
Text File  |  1996-02-21  |  3.3 KB  |  110 lines

  1. //
  2. //   COMPONENT_NAME: somd
  3. //
  4. //   ORIGINS: 27
  5. //
  6. //
  7. //   10H9767, 10H9769  (C) COPYRIGHT International Business Machines Corp. 1992,1994
  8. //   All Rights Reserved
  9. //   Licensed Materials - Property of IBM
  10. //   US Government Users Restricted Rights - Use, duplication or
  11. //   disclosure restricted by GSA ADP Schedule Contract with IBM Corp.
  12. //
  13.  
  14. // 
  15. //   IDL interface spec for generic Object Manager.
  16. // 
  17. //   The Object Manager (abstract) class provides a uniform abstraction
  18. //   for various sorts of object managers.  Object Request Brokers, persistent
  19. //   storage managers, and OODBMSs are examples of object managers.
  20. // 
  21. //   This is an abstract base class, which defines the "core" interface for
  22. //   an object manager.  The basic groups of methods are:
  23. // 
  24. //     - object creation (basic)
  25. //     - object identification & location/activation
  26. //     - object release & destruction
  27. // 
  28. //   If a desired object cannot be mapped into the client's address space, the
  29. //   object manager is responsible for building a local "proxy" for the remote
  30. //   object.  The client invokes methods on the proxy, and the proxy should
  31. //   redispatch the requests to the remote object in an appropriate and
  32. //   transparent way.
  33. //
  34. //   NOTE: Since this is only intended to be an abstract base class, there
  35. //   is no underlying implementation, and ObjectMgr objects should not actually
  36. //   be instantiated.
  37. //
  38.  
  39. #ifndef om_idl
  40. #define om_idl
  41.  
  42. #include <somobj.idl>
  43. #include <somdtype.idl>
  44. #include <snglicls.idl>
  45.  
  46. interface ObjectMgr : SOMObject
  47. {
  48.     // methods for creation
  49.  
  50.   SOMObject somdNewObject(in Identifier objclass, in string hints);
  51.  
  52.   // Returns a new object of the named class.  This is a "basic" creation
  53.   // method, where the decisions about where and how to create the object
  54.   // are mostly left up to the Object Manager.  However, the Object Manager
  55.   // may optionally define creation "hints" which the client may specify in 
  56.   // this call.
  57.   //
  58.   // OWNERSHIP of returned object is transferred to the caller.
  59.  
  60.     // methods for identification & location/activation
  61.  
  62.   string somdGetIdFromObject(in SOMObject obj);
  63.  
  64.   // Returns a external id for an object managed by this Object Manager.
  65.   // The id is unambiguous -- it always refers to the same object (as long
  66.   // as the object exists).
  67.   //
  68.   // OWNERSHIP of returned id string is transferred to the caller.
  69.  
  70.   SOMObject somdGetObjectFromId(in string id);
  71.  
  72.   // Finds and/or activates an object implemented by this Object Manager,
  73.   // given its id.
  74.   //
  75.   // OWNERSHIP of returned object is transferred to the caller.
  76.  
  77.     // methods for releasing / destroying objects
  78.  
  79.   void somdReleaseObject(in SOMObject obj);
  80.  
  81.   // Indicates that the client has finished using the object, and the
  82.   // "connection" to the object, if any, can be released.
  83.  
  84.   void somdDestroyObject(in SOMObject obj);
  85.  
  86.   // Causes the specified object to be destroyed.  (There is an implicit
  87.   // somoReleaseObject call made.)
  88.  
  89. #ifdef __SOMIDL__
  90.  
  91.   implementation
  92.   {
  93.     releaseorder: somdNewObject,
  94.           somdGetIdFromObject,somdGetObjectFromId,
  95.           somdReleaseObject,somdDestroyObject;
  96.  
  97.     callstyle = idl;
  98.     metaclass = SOMMSingleInstance;
  99.     dllname = "somd.dll";
  100.     majorversion = 2;
  101.     minorversion = 1;
  102.  
  103.   };
  104.  
  105. #endif /* __SOMIDL__ */
  106.  
  107. };
  108.  
  109. #endif  /* om_idl */
  110.