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

  1. /*
  2.  *    @(#) 2.37 src/somd/somdobj.idl, somd, som3.0 9/26/96 14:02:18 [12/24/96 07:39:37]
  3.  */
  4. //
  5. //   COMPONENT_NAME: somd
  6. //
  7. //   ORIGINS: 27
  8. //
  9. //    25H7912  (C)  COPYRIGHT International Business Machines Corp. 1992,1994,1996 
  10. //   All Rights Reserved
  11. //   Licensed Materials - Property of IBM
  12. //   US Government Users Restricted Rights - Use, duplication or
  13. //   disclosure restricted by GSA ADP Schedule Contract with IBM Corp.
  14. //
  15.  
  16. //#  SOMDObject is a PUBLIC class derived from SOMObject.
  17. //
  18. //   This is the class that implements the behavior of CORBA object references,
  19. //   e.g., get_implementation, get_interface, duplicate, release, etc.
  20. //
  21. //   In DSOM, there is also another derivation of this class:  SOMDClientProxy.
  22. //   This subclass inherits the implementation of this class, but extends it
  23. //   by overriding sommProxyDispatch with a "remote dispatch" method, and
  24. //   caches the binding to the server process.  Whenever a remote object is
  25. //   accessed, it is represented in the client process by a SOMDClientProxy
  26. //   object.
  27.  
  28.  
  29. #ifndef somdobj_idl
  30. #define somdobj_idl
  31.  
  32. #include <somobj.idl>
  33.  
  34. #include <unotypes.idl>
  35.  
  36. interface ImplementationDef;
  37. interface InterfaceDef;
  38. interface NVList;
  39. interface Context;
  40. interface Request;
  41.  
  42.  
  43. interface SOMDObject : SOMObject
  44. {
  45.  
  46.   boolean is_nil();
  47.  
  48.   // Tests to see if the target object is nil.  This is a procedure
  49.   // method.  Therefore, it can be invoked on OBJECT_NIL (a null pointer),
  50.   // but it cannot be overridden.
  51.  
  52.   boolean is_SOM_ref();
  53.  
  54.   // Returns TRUE if target object was created by SOMOA::create_SOM_ref.
  55.   // This method can only be called from a server. 
  56.   // SOM extension.
  57.  
  58.   boolean is_constant();
  59.  
  60.   // Returns TRUE if target object was created by SOMOA::create_SOM_ref or
  61.   // SOMOA::create_constant.  Indicates ReferenceData cannot be changed.
  62.   // This method can only be called from a server. 
  63.   // SOM extension.
  64.  
  65.  
  66.   ImplementationDef get_implementation();
  67.  
  68.   // Returns the implementation definition of the target object.
  69.  
  70.   InterfaceDef get_interface();
  71.  
  72.   // Returns the interface definition of the target object.
  73.  
  74.   boolean is_proxy();
  75.  
  76.   // Returns TRUE if target object is a proxy object (i.e., the target object
  77.   // is remote).  The default implementation returns FALSE.  Proxy classes
  78.   // which are subclasses of SOMDObject (e.g. SOMDClientProxy) should override
  79.   // this method to return TRUE.
  80.   // SOM extension.
  81.  
  82.   SOMObject duplicate();
  83.  
  84.   // Returns a double of the target object.
  85.   // OWNERSHIP of returned object is transferred to the caller.
  86.  
  87.   void release();
  88.  
  89.   // Frees the memory associated with the target object.
  90.  
  91.   ORBStatus create_request(in Context ctx, in Identifier operation, 
  92.                in NVList arg_list, inout NamedValue result, 
  93.                out Request request, in Flags req_flags);
  94.  
  95.   // Creates a request to execute a particular operation on the target
  96.   // object.  CORBA introduces this method in this class, but DSOM actually
  97.   // implements this method in the SOMDClientProxy subclass.
  98.  
  99.   ORBStatus create_request_args(in Identifier operation, out NVList arg_list,
  100.                                 out NamedValue result);
  101.  
  102.   // Creates the appropriate NVList for the specified operation and creates a
  103.   // NamedValue to hold the result.  (Similar in function to
  104.   // ORB::create_operation_list.)  This method is defined in this class as a
  105.   // companion to "create_request", but DSOM implements this method in the 
  106.   // SOMDClientProxy subclass.
  107.  
  108.  
  109.   attribute string type_id;
  110.   // IDL-format repository ID.  Format defined by OMG Interface
  111.   // Repository Specificiation.
  112.  
  113. #ifdef __SOMIDL__
  114.  
  115. // D21205: Move _get_somd_id, _set_somd_id, _get_tagged_profiles,
  116. //         _set_tagged_profiles to private. 
  117.   implementation
  118.   {
  119.     releaseorder: get_implementation, get_interface, unused1,
  120.           is_nil, is_SOM_ref, is_constant, is_proxy,
  121.           duplicate, release, create_request, create_request_args,
  122.  
  123.           private1,
  124.           private2, private3, 
  125.           private4, private5,
  126.           private6, private7,
  127.                   private8, private9,
  128.                   private10, private11,
  129.  
  130.           _get_type_id, _set_type_id;
  131.  
  132.     //# class modifiers
  133.     callstyle = idl;
  134.     dllname = "somd.dll";
  135.     majorversion = 2;
  136.     minorversion = 2;
  137.  
  138.     //# method modifiers
  139.     somDefaultInit: override;
  140.     somDestruct: override;
  141.     somDumpSelfInt: override;
  142.     is_nil: procedure;
  143.  
  144.  
  145.     passthru C_h_before = ""
  146.       "#include <somdtype.h>"
  147.       "#ifndef SOM_DONT_USE_SHORT_NAMES"
  148.       "#define SOM_DONT_USE_SHORT_NAMES"
  149.       "#include <unotypes.h>"
  150.       "#undef SOM_DONT_USE_SHORT_NAMES"
  151.       "#else"
  152.       "#include <unotypes.h>"
  153.       "#endif"
  154.       "";
  155.  
  156.     passthru C_xh_before =  ""
  157.       "#include <somdtype.xh>"
  158.       "#ifndef SOM_DONT_USE_SHORT_NAMES"
  159.       "#define SOM_DONT_USE_SHORT_NAMES"
  160.       "#include <unotypes.xh>"
  161.       "#undef SOM_DONT_USE_SHORT_NAMES"
  162.       "#else"
  163.       "#include <unotypes.xh>"
  164.       "#endif"
  165.       "";
  166.   };
  167.  
  168. #endif /* __SOMIDL__ */
  169.  
  170. };
  171.  
  172. #endif  /* somdobj_idl */
  173. 
  174.