home *** CD-ROM | disk | FTP | other *** search
/ OS/2 Shareware BBS: 10 Tools / 10-Tools.zip / tolkit45.zip / os2tk45 / som / include / somdobj.idl < prev    next >
Text File  |  1999-02-22  |  5KB  |  161 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. //#  @(#) 2.13 src/somd/somdobj.idl, somd, som2.1 10/7/94 13:37:14 [7/30/96 14:45:47]
  14.  
  15.  
  16.  
  17. //   Interface for CORBA Object Reference.
  18. //
  19. //   This is the class that implements the behavior of CORBA object references,
  20. //   e.g., get_implementation, get_interface, duplicate, release, etc.
  21. //
  22. //   In addition, there are some private methods, which are exposed only to
  23. //   the ORB classes, to implement the ORB functions related to object
  24. //   references (e.g., ORB_object_to_string).
  25. //
  26. //   In DSOM, there is also another derivation of this class:  SOMDClientProxy.
  27. //   This subclass inherits the implementation of this class, but extends it
  28. //   by overriding somDispatch with a "remote dispatch" method, and caches the
  29. //   binding to the server process.  Whenever a remote object is accessed, it
  30. //   is represented in the client process by a SOMDClientProxy object.
  31. //
  32. //
  33.  
  34.  
  35. #ifndef somdobj_idl
  36. #define somdobj_idl
  37.  
  38. #include <somobj.idl>
  39. #include <somdtype.idl>
  40.  
  41. interface ImplementationDef;
  42. interface InterfaceDef;
  43. interface NVList;
  44. interface Context;
  45. interface Request;
  46.  
  47. interface SOMDObject : SOMObject
  48. {
  49.  
  50.   ImplementationDef get_implementation();
  51.  
  52.   // Returns the implementation definition for the referenced object.
  53.  
  54.   InterfaceDef get_interface();
  55.  
  56.   // Returns the interface definition for the referenced object.
  57.  
  58.  
  59.   boolean is_nil();
  60.  
  61.   // Tests to see if the object reference is nil.
  62.   // This is a procedure method.  Therefore, it can be invoked on OBJECT_NIL
  63.   // (a null pointer), but it cannot be overridden.
  64.  
  65.   boolean is_SOM_ref();
  66.  
  67.   // Returns TRUE if object reference was created by SOMOA::create_SOM_ref
  68.   // else returns FALSE.
  69.  
  70.   boolean is_constant();
  71.  
  72.   // Returns TRUE if object reference was created by SOMOA::create_constant
  73.   // else returns FALSE.
  74.  
  75.   boolean is_proxy();
  76.  
  77.   // Returns TRUE if object reference (self) is a DSOM client proxy object 
  78.   // (i.e., the target object is remote).  Returns FALSE if the referenced 
  79.   // object is in the same process as the reference.
  80.   //
  81.   // The default implementation returns FALSE.  Proxy classes which are
  82.   // subclasses of SOMDObject (like SOMDClientProxy) should override this 
  83.   // method to return TRUE.
  84.  
  85.   SOMDObject duplicate();
  86.  
  87.   // Makes a duplicate of the object reference.
  88.   // OWNERSHIP of returned object is transferred to the caller.
  89.   // Call release to free the object.
  90.  
  91.   void release();
  92.  
  93.   // Releases the memory associated with the object reference.
  94.  
  95.   ORBStatus create_request(in Context ctx, in Identifier operation, 
  96.                in NVList arg_list, inout NamedValue result, 
  97.                out Request request,
  98.                            in Flags req_flags);
  99.  
  100.   // Creates a request to execute a particular operation on the
  101.   // referenced object.
  102.   //
  103.   // CORBA 1.1 introduces this method in this class, but DSOM actually
  104.   // implements this method in the SOMDClientProxy subclass.
  105.  
  106.   ORBStatus create_request_args(in Identifier operation, out NVList arg_list,
  107.                                 out NamedValue result);
  108.  
  109.   // Creates the appropriate arg_list (NVList) for the specified operation.
  110.   // Also creates a NamedValue to hold the result.
  111.   // (Similar in function to ORB_create_operation_list.)
  112.   //
  113.   // This method is defined in this class, as a companion to the 
  114.   // "create_request" method, but DSOM implements this method in the 
  115.   // SOMDClientProxy subclass.
  116.  
  117.  
  118.  
  119. #ifdef __SOMIDL__
  120.  
  121.   implementation
  122.   {
  123.     releaseorder: get_implementation, get_interface,
  124.           set_to_nil, is_nil,
  125.                   is_SOM_ref, is_constant, is_proxy,
  126.                   duplicate, release,
  127.           create_request, create_request_args, 
  128.           _get_somd_tag, _get_somd_flags, _set_somd_flags, 
  129.           _get_somd_impl, _set_somd_impl, _get_somd_rid, 
  130.           _set_somd_rid, _get_somd_id, _set_somd_id;
  131.  
  132.     //# Class Modifiers
  133.     callstyle = idl;
  134.     dllname = "somd.dll";
  135.     majorversion = 2;
  136.     minorversion = 1;
  137.  
  138.     //# Method Modifiers
  139.     somDefaultInit: override;
  140.     somDestruct: override;
  141.     somDumpSelfInt: override;
  142.     is_nil : procedure;
  143.  
  144.  
  145.     //# Passthrus
  146.     passthru C_h_before = ""
  147.       "#include <somdtype.h>"
  148.       "";
  149.  
  150.     passthru C_xh_before =  ""
  151.       "#include <somdtype.xh>"
  152.       "";
  153.  
  154.  
  155.   };
  156. #endif /* __SOMIDL__ */
  157.  
  158. };
  159.  
  160. #endif  /* somdobj_idl */
  161.