home *** CD-ROM | disk | FTP | other *** search
/ OS/2 Shareware BBS: 10 Tools / 10-Tools.zip / detk45he.zip / wpdserv.xh < prev    next >
Text File  |  1999-03-15  |  4KB  |  160 lines

  1.  
  2. /*
  3.  * This file was generated by the SOM Compiler.
  4.  * FileName: E:\cwpsh\rel\os2c\include\base\os2\wpdserv.xh.
  5.  * Generated using:
  6.  *     SOM Precompiler somipc: 2.29.1.14
  7.  *     SOM Emitter emitxh: 2.43
  8.  */
  9.  
  10. /*
  11.  *  Copyright (c) IBM Corporation  1994 - All Rights Reserved
  12.  * 
  13.  *  WPDSERV - Workplace Shell DSOM Server Class DLL
  14.  */
  15.  
  16.  
  17. #ifndef SOM_WPDServer_xh
  18. #define SOM_WPDServer_xh
  19.  
  20. class WPDServer;
  21.  
  22. #define WPDServer_MajorVersion 0
  23. #define WPDServer_MinorVersion 0
  24.  
  25. /* C++ SOM defs */
  26. #include <somcls.xh>
  27. #include <somcm.xh>
  28.  
  29. /* C++ parent defs */
  30. #ifndef SOM_SOMDServer_xh
  31. #include <somdserv.xh>
  32. #endif
  33.  
  34. #ifndef WPDServer_API
  35. #define WPDServer_API
  36. /*
  37.  * -- The Class API
  38.  */
  39.  
  40. /*
  41.  * Start of bindings for IDL types
  42.  */
  43.  
  44. class SOMClass;
  45. class SOMObject;
  46. class Container;
  47. class SOMDObject;
  48. class WPObject;
  49.  
  50. /*
  51.  * End of bindings for IDL types.
  52.  */
  53.  
  54. /*
  55.  * Passthru lines: File: "C.xh", "after"
  56.  */
  57. #define INCL_WIN
  58. #include <os2.h>
  59.  
  60.  
  61. /* A procedure to create the WPDServer Class */
  62. SOMEXTERN SOMClass * SOMLINK WPDServerNewClass(
  63.         integer4 majorVersion,
  64.         integer4 minorVersion);
  65.  
  66. /* The API to the WPDServer class object, and the methods it introduces. */
  67. SOMEXTERN struct WPDServerClassDataStructure {
  68.     SOMClass *classObject;
  69. } SOMDLINK WPDServerClassData;
  70. #define _WPDServer WPDServerClassData.classObject
  71.  
  72. /* The API to parentMtabs for WPDServer, and the instance data it introduces. */
  73. SOMEXTERN struct WPDServerCClassDataStructure {
  74.     somMethodTabs parentMtab;
  75.     somDToken              instanceDataToken;
  76. } SOMDLINK WPDServerCClassData;
  77.  
  78. /*
  79.  * -- Typedefs for WPDServer Method Procedures
  80.  */
  81. SOMEXTERN {
  82. }
  83.  
  84. #endif /* WPDServer_API */
  85.  
  86.  
  87. /*
  88.  * -- This emitter treats Method Tokens as Thunks by default.
  89.  * -- Use the sc modifier "nothunks" to change this default
  90.  */
  91. #undef somresolve_
  92. #define somresolve_(obj,mToken) ((somMethodProc*)((void)obj, mToken))
  93.  
  94. /*
  95.  * -- The C++ Wrapper Class for WPDServer
  96.  */
  97. class WPDServer : public SOMDServer
  98. {
  99. public:
  100.  
  101. // WPDServer::new creates the class object if necessary, and then uses somNewNoInit
  102. // to allocate memory and create the object. Initialization is in ctors.
  103. void *operator new(size_t)
  104. {
  105.    if (!_WPDServer) WPDServerNewClass(WPDServer_MajorVersion,WPDServer_MinorVersion);
  106.    return (void*)
  107.       SOM_Resolve(_WPDServer,SOMClass,somNewNoInit)
  108.          ((SOMClass *)((void*)_WPDServer));
  109. }
  110.  
  111. // WPDServer::delete uses somDestruct.
  112. void operator delete(void * obj)
  113. {
  114.    if (obj && *(void**)obj) {
  115.       SOM_Resolve(obj,SOMObject,somDestruct)
  116.          ((SOMObject*)obj, 1, 0);
  117.    }
  118. }
  119.  
  120. WPDServer& operator=(WPDServer& fromObj)
  121. {
  122.    this->somDefaultAssign(0,(SOMObject*)((void*)&fromObj));
  123.    return *this;
  124. }
  125.  
  126. WPDServer()
  127. {
  128.    if (*(void**)this != 
  129.        ((somParentMtabStructPtr)
  130.         (WPDServerCClassData.parentMtab))->mtab)
  131.       return;
  132.    ((SOMObject*)((void*)this))->somDefaultInit(0);
  133. }
  134.  
  135. WPDServer(WPDServer* fromObj)
  136. {
  137.    if (*(void**)this != 
  138.        ((somParentMtabStructPtr)
  139.         (WPDServerCClassData.parentMtab))->mtab)
  140.       return;
  141.    ((SOMObject*)((void*)this))->somDefaultCopyInit(0,((SOMObject*)((void*)fromObj)));
  142. }
  143.  
  144. WPDServer(const WPDServer* fromObj)
  145. {
  146.    if (*(void**)this != 
  147.        ((somParentMtabStructPtr)
  148.         (WPDServerCClassData.parentMtab))->mtab)
  149.       return;
  150.    ((SOMObject*)((void*)this))->somDefaultConstCopyInit(0,((SOMObject*)((void*)fromObj)));
  151. }
  152.  
  153.  
  154.  
  155. };   /* WPDServer */
  156.  
  157.  
  158.  
  159. #endif       /* SOM_WPDServer_xh */
  160.