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

  1. /*
  2.  *    @(#) 2.17 src/somd/somd.xh, somd, som3.0 5/30/96 14:09:22 [12/24/96 07:39:33]
  3.  */
  4. /*
  5.  *   COMPONENT_NAME: somd
  6.  *
  7.  *   ORIGINS: 27
  8.  *
  9.  *
  10.  *    25H7912  (C)  COPYRIGHT International Business Machines Corp. 1992,1994,1996 
  11.  *   All Rights Reserved
  12.  *   Licensed Materials - Property of IBM
  13.  *   US Government Users Restricted Rights - Use, duplication or
  14.  *   disclosure restricted by GSA ADP Schedule Contract with IBM Corp.
  15.  */
  16.  
  17. /*
  18.  *  somd.xh - global C++ include file for DSOM definitions
  19.  */
  20.  
  21. /*
  22.  *   04/17/96  mbc  D21197 Avoid name collisions with WIN32.
  23.  */
  24.  
  25. #ifndef somd_xh
  26. #define somd_xh
  27. #define somd_h
  28.  
  29. /*  --- base SOM and DSOM types ---  */
  30.  
  31. #define CORBA_FUNCTION_NAMES
  32. #include <som.xh>
  33. #include <somtcnst.xh>
  34. #include <somir.xh>
  35.  
  36. #include <somdtype.xh>
  37.  
  38. /*  --- DSOM error codes ---  */
  39.  
  40. #include <somderr.h>
  41.  
  42. /*  --- DSOM externals ---  */
  43.  
  44. #include <somdext.h>
  45.  
  46. /* For DSOM users, CORBA's exception_free should be mapped to 
  47.  * somdExceptionFree rather than somExceptionFree, as in somcorba.h.
  48.  */
  49. #ifdef exception_free
  50.  #undef exception_free
  51. #endif
  52. #define exception_free somdExceptionFree
  53.  
  54. /*  --- DSOM global variables ---
  55.  *
  56.  *  Several global variables point to DSOM objects that are always or often
  57.  *  used by DSOM applications.
  58.  *
  59.  *  SOMD_ObjectMgr, SOMD_ORBObject, and SOMD_ImplRepObject are initialized
  60.  *  by SOMD_Init().
  61.  *  
  62.  *  SOMD_ImplDefObject is initially NULL.   DSOM servers *MUST* set this to
  63.  *  an ImplementationDef object which describes the server implementation.
  64.  *  DSOM clients *MUST* leave this variable NULL.
  65.  *
  66.  *  SOMD_SOMOAObject is initially NULL.  DSOM servers should use the SOM
  67.  *  Object Adapter can use this variable to refer to the instantiated SOMOA.
  68.  *  It is not used by client processes.
  69.  *
  70.  *  The external references to these global variables are defined in the
  71.  *  .xh files for their respective classes.
  72.  */
  73.  
  74. #include <somdom.xh>        /* SOMD_ObjectMgr (incl. Factory) */
  75. #include <orb.xh>        /* SOMD_ORBObject */
  76. #include <implrep.xh>        /* SOMD_ImplRepObject */
  77. #include <impldef.xh>        /* SOMD_ImplDefObject */
  78. #include <somoa.xh>        /* SOMD_SOMOAObject */
  79.  
  80. /*  --- DSOM interfaces ---
  81.  *
  82.  *  Include the interfaces for other commonly used DSOM classes.
  83.  */
  84.  
  85. #include <somdobj.xh>        /* SOMDObject */
  86. #include <somdcprx.xh>        /* SOMDClientProxy */
  87. #include <cntxt.xh>        /* Context */
  88. #include <nvlist.xh>        /* NVList */
  89. #include <request.xh>        /* Request */
  90.  
  91. /* ----------------------- WIN32 includes --------------- */
  92. #ifdef _WIN32
  93. #define WIN32_LEAN_AND_MEAN
  94. #include <windows.h>
  95. #endif                                 /* WIN32 */
  96.  
  97. #include <stexcep.xh>        /* standard exceptions */
  98. #include <principl.xh>
  99.  
  100. #ifndef OBJECT_NIL
  101. #define OBJECT_NIL ((SOMObject *) NULL)
  102. #endif
  103.  
  104. /* This define gives applications compiled with DSOM 3.0 the
  105.  * new, improved semantics for somFree when invoked on a proxy --
  106.  * both the remote object and the proxy are destroyed.  It also
  107.  * gives string_to_object the 3.0 semantics, returning a local
  108.  * SOMObject.
  109.  */
  110. #define SOMD_Init(ev) \
  111.     { SOMD_Init(ev); \
  112.     if (SOMD_ObjectMgr != NULL) SOMD_ObjectMgr->_set_somd21somFree(ev,TRUE); \
  113.     if (SOMD_ORBObject != NULL) SOMD_ORBObject->_set_stringToObject30(ev, TRUE); }
  114.  
  115. #endif /* somd_xh */
  116.