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

  1. //
  2. //   COMPONENT_NAME: somm
  3. //
  4. //   ORIGINS: 27
  5. //
  6. //
  7. //    25H7912  (C)  COPYRIGHT International Business Machines Corp. 1992,1996,1996
  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. //   @(#)15 1.17 3/29/96 15:41:39 [12/24/96] (c)IBM Corp. 1995
  14.  
  15.  
  16. #ifndef somproxy_idl
  17. #define somproxy_idl
  18.  
  19. #include <somcls.idl>
  20.  
  21.  
  22. interface SOMMProxyFor
  23.                         : SOMClass
  24. {
  25.         SOMClass sommMakeProxyClass( in SOMClass targetClass,
  26.                                      in string className );
  27.         // sommMakeProxyClass returns a class that is the join
  28.         // (in the sense of multiple inheritance) of somSelf and
  29.         // the targetClass (for which abstract inheritance is used,
  30.         // i.e., the interface is inherited but not the implementation).
  31.         // The returned class has the name className (which must be
  32.         // unique among the registered classes).  If the parameter
  33.         // className is NULL or empty, sommMakeProxyClass constructs
  34.         // a unique name that starts with
  35.         //      ProxyFor<name of targetClass>
  36.  
  37.         implementation {
  38.                 releaseorder: sommMakeProxyClass;
  39.                 callstyle = oidl;
  40.                         // oidl callstyle is used here because none of the
  41.                         // introduced methods are ever forwarded.
  42.                 dllname = "somu.dll";
  43.         };
  44. };
  45.  
  46.  
  47.  
  48. interface SOMMProxyForObject: SOMObject
  49. {
  50.         attribute SOMObject sommProxyTarget;
  51.         // An object used by sommProxyDispatch to determine the target
  52.         // object to which a method invocation should be forwarded.
  53.  
  54.  
  55.         struct sommProxyDispatchInfo {
  56.             somMethodData  md;
  57.             somMethodPtr   dispatchFcn;
  58.         };
  59.  
  60.         boolean sommProxyDispatch( out somToken returnBufferPointer,
  61.                                    in  sommProxyDispatchInfo dispatchInfo,
  62.                                    in  va_list ap );
  63.         // sommProxyDispatch is used to forward method invocations to
  64.         // the target object from methods supported by the proxy class.
  65.         // The default implementation assumes that _sommTarget is a pointer
  66.         // to the target object (in the same address space), and that the
  67.         // method data within the dispatchInfo was acquired from the target
  68.         // class.
  69.         // sommProxyDispatch should not be invoked from outside of the
  70.         // proxy class because such an invocation bypasses any override
  71.         // of the method or any behavior added by a metaclass.
  72.  
  73.         implementation {
  74.                 releaseorder:   _get_sommProxyTarget,
  75.                                 _set_sommProxyTarget,
  76.                                 sommProxyDispatch;
  77.                 callstyle = oidl;
  78.                         // oidl callstyle is used here because none of the
  79.                         // introduced methods are ever forwarded.
  80.                 metaclass = SOMMProxyFor;
  81.                 dllname = "somu.dll";
  82.         };
  83. };
  84.  
  85. #endif
  86.