home *** CD-ROM | disk | FTP | other *** search
/ Power GUI Programming with VisualAge C++ / powergui.iso / trialva / ibmcppw / include / somdcprx.idl < prev    next >
Encoding:
Text File  |  1996-02-21  |  4.1 KB  |  133 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. //   This is the class that implements DSOM proxy objects in clients.
  16. // 
  17. //   This class is a subclass of SOMDObject.  It inherits the basic behavior
  18. //   (methods) of a CORBA object reference from that parent class.
  19. //   Thus, it "is a" SOMDObject.
  20. // 
  21. //   This class overrides the usual somDispatch methods with versions
  22. //   that build a DSOM Request for the invocation and dispatch it, remotely.
  23. //   It is intended that the implementation of this "generic" proxy class
  24. //   will be used to derive specific proxy classes via multiple inheritance.
  25. //   The new dispatch method is inherited from this client proxy class, while
  26. //   the desired interface--and language bindings--are inherited from the 
  27. //   target class (but no implementation).
  28. // 
  29. //   E.g.,
  30. //          SOMDClientProxy      Animal
  31. //                    \           /
  32. //                     \         / (interface only)
  33. //                      \       /
  34. //                   Animal__Proxy
  35. //
  36. //   Note that SOMDClientProxy is an instance of SOMDMetaProxy. 
  37.  
  38.  
  39. #ifndef somdcprx_idl
  40. #define somdcprx_idl
  41.  
  42. #include <somdobj.idl>
  43.  
  44. interface CommBinding;
  45. interface somdMemoryMgr;
  46.  
  47. interface SOMDClientProxy : SOMDObject
  48. {
  49.  
  50.   // To aid in distribution transparency, the following SOMObject methods
  51.   // are FORWARDED to the remote object:
  52.   //     somFree
  53.   //     somGetClass
  54.   //     somGetClassName
  55.   //     somDestruct    (unless the remote connection is no longer valid)
  56.   //     somDefaultInit (when the proxy has already been initialized)
  57.   //     all assignment operator and copy constructor methods
  58.   //        (requires that the "fromObj" parameter also be a proxy
  59.   //         that refers to an object in the same address space.
  60.   //
  61.   // The following additional methods are provided to explicitly direct
  62.   // method calls to the local proxy or to the remote object.
  63.  
  64.   void somdTargetFree();
  65.   // Forwards _somFree method call to the remote target object.
  66.  
  67.   SOMClass somdTargetGetClass();
  68.   // Forwards _somGetClass method call to the remote target object.
  69.  
  70.   string somdTargetGetClassName();
  71.   // Forwards _somGetClassName method call to the remote target object.
  72.  
  73.   void somdProxyFree();
  74.   // Performs _somFree method call on the local proxy object.
  75.  
  76.   SOMClass somdProxyGetClass();
  77.   // Performs _somGetClass method call on the local proxy object.
  78.  
  79.   string somdProxyGetClassName();
  80.   // Performs _somGetClassName method call on the local proxy object.
  81.  
  82.   void somdReleaseResources();
  83.   // Instructs the proxy to free any memory it owns for use by the client.
  84.  
  85.  
  86. #ifdef __SOMIDL__
  87.  
  88.   implementation
  89.   {
  90.  
  91.     releaseorder: somdTargetFree, somdTargetGetClass, 
  92.           somdTargetGetClassName,
  93.           somdProxyFree, somdProxyGetClass, 
  94.           somdProxyGetClassName,
  95.           set_binding, get_binding, reset_binding,
  96.           _get_ctx_seq, _set_ctx_seq, somdReleaseResources,
  97.           _get_memoryMgr;
  98.  
  99.     callstyle = idl;
  100.     dllname = "somd.dll";
  101.     majorversion = 2;
  102.     minorversion = 1;
  103.  
  104.     create_request    : override;
  105.     create_request_args    : override;
  106.     is_proxy        : override;
  107.     release        : override;
  108.     somDispatch        : override;
  109.     somFree        : override;
  110.     somGetClass        : override;
  111.     somGetClassName    : override;
  112.     somDestruct        : override;
  113.     somDefaultInit    : override;
  114.     set_binding         : procedure;
  115.     get_binding         : procedure;
  116.     reset_binding       : procedure;
  117.     somDefaultVCopyInit : override;
  118.     somDefaultConstVCopyInit : override;
  119.     somDefaultCopyInit  : override;
  120.     somDefaultConstCopyInit : override;
  121.     somDefaultAssign    : override;
  122.     somDefaultConstAssign  : override;
  123.     somDefaultVAssign   : override;
  124.     somDefaultConstVAssign : override;
  125.  
  126.   };
  127.  
  128. #endif /* __SOMIDL__ */
  129.  
  130. };
  131.  
  132. #endif  /* somdcprx_idl */
  133.