home *** CD-ROM | disk | FTP | other *** search
/ OS/2 Shareware BBS: 10 Tools / 10-Tools.zip / cset21v5.zip / TOOLKT21 / CPLUS / OS2H / WPPORT.XH < prev    next >
Text File  |  1993-05-03  |  4KB  |  190 lines

  1.  
  2. /*
  3.  * This file was generated by the SOM Compiler.
  4.  * FileName: wpport.xh.
  5.  * Generated using:
  6.  *     SOM Precompiler spc: 1.22
  7.  *     SOM Emitter emitxh: 1.11
  8.  */
  9.  
  10. /*
  11.  * 
  12.  *  Module Header
  13.  * 
  14.  *  Module Name: WPPORT
  15.  * 
  16.  *  OS/2 Presentation Manager Workplace class definitions
  17.  * 
  18.  *  Copyright (c) International Business Machines Corporation 1991, 1992
  19.  * 
  20.  */
  21.  
  22. #ifndef wpport_xh
  23. #define wpport_xh
  24. class WPPort;
  25.  
  26. #define WPPort_MajorVersion 1
  27. #define WPPort_MinorVersion 1
  28.  
  29. /* C++ som defs */
  30. #include <somcls.xh>
  31.  
  32. /* C++ parent def */
  33. #ifndef wptrans_xh
  34. #include "wptrans.xh"
  35. #endif
  36.  
  37. #ifndef WPPort_API
  38. #define WPPort_API
  39. /*
  40.  * The Class API
  41.  */
  42.  
  43. /* A procedure to create the WPPort Class */
  44. SOMEXTERN SOMClass * SOMLINK WPPortNewClass(
  45.         integer4 majorVersion,
  46.         integer4 minorVersion);
  47.  
  48. /* A macro to return the WPPort class object */
  49. class M_WPPort;
  50. #define _WPPort ((M_WPPort*)WPPortClassData.classObject)
  51.  
  52. /* The static interface to WPPort and its instances */
  53. SOMEXTERN struct WPPortClassDataStructure {
  54.     SOMClass *classObject;
  55.     somMToken prtGetPortInfo;
  56.     somMToken prtSetPortInfo;
  57.     somMToken prtSettings;
  58.     somMToken prtGetDeviceObject;
  59.     somMToken prtSetPortDiscardhwndDlg;
  60.     somMToken prtSetPortInstallhwndDlg;
  61.     somMToken prtPrintPort;
  62.     somMToken prtSetIcon;
  63.     somMToken prtChangePort;
  64. } WPPortClassData;
  65.  
  66. /*
  67.  * -- Typedefs for Procedures that support WPPort Methods
  68.  */
  69. extern "C" {
  70. }
  71.  
  72.  
  73. #endif /* WPPort_API */
  74.  
  75.  
  76. /*
  77.  * -- The C++ Wrapper Class for WPPort
  78.  */
  79. class WPPort : public WPTransient
  80. {
  81. public:
  82.  
  83. void *operator new(size_t size)
  84. {
  85.    (void) size;
  86.    if (!WPPortClassData.classObject) 
  87.       WPPortNewClass(WPPort_MajorVersion,WPPort_MinorVersion);
  88.    return (void *)
  89.       ((somTD_SOMClass_somNew)
  90.       somResolve(SOM_TestCls((SOMAny *)(WPPortClassData.classObject),
  91.                              SOMClassClassData.classObject),
  92.                  SOMClassClassData.somNew))
  93.          ((SOMClass*)(WPPortClassData.classObject));
  94. }
  95.  
  96. void operator delete(void * obj)
  97. {
  98.    ((SOMObject *)obj)->somFree();
  99. }
  100.  
  101.  
  102. };   /* WPPort */
  103.  
  104.  
  105.  
  106. #endif       /* wpport_xh */
  107.  
  108. /*
  109.  * This file was generated by the SOM Compiler.
  110.  * FileName: wpport.xh.
  111.  * Generated using:
  112.  *     SOM Precompiler spc: 1.22
  113.  *     SOM Emitter emitxh: 1.11
  114.  */
  115. #ifndef wpport_mxh
  116. #define wpport_mxh
  117. class M_WPPort;
  118.  
  119. #define M_WPPort_MajorVersion 1
  120. #define M_WPPort_MinorVersion 1
  121.  
  122. /* C++ som defs */
  123. #include <somcls.xh>
  124.  
  125. /* C++ parent def */
  126. #ifndef wptrans_xh
  127. #include "wptrans.xh"
  128. #endif
  129.  
  130. #ifndef M_WPPort_API
  131. #define M_WPPort_API
  132. /*
  133.  * The Class API
  134.  */
  135.  
  136. /* A procedure to create the M_WPPort Class */
  137. SOMEXTERN SOMClass * SOMLINK M_WPPortNewClass(
  138.         integer4 majorVersion,
  139.         integer4 minorVersion);
  140.  
  141. /* A macro to return the M_WPPort class object */
  142. #define _M_WPPort ((SOMClass*)M_WPPortClassData.classObject)
  143.  
  144. /* The static interface to M_WPPort and its instances */
  145. SOMEXTERN struct M_WPPortClassDataStructure {
  146.     SOMClass *classObject;
  147. } M_WPPortClassData;
  148.  
  149. /*
  150.  * -- Typedefs for Procedures that support M_WPPort Methods
  151.  */
  152. extern "C" {
  153. }
  154.  
  155.  
  156. #endif /* M_WPPort_API */
  157.  
  158.  
  159. /*
  160.  * -- The C++ Wrapper Class for M_WPPort
  161.  */
  162. class M_WPPort : public M_WPTransient
  163. {
  164. public:
  165.  
  166. void *operator new(size_t size)
  167. {
  168.    (void) size;
  169.    if (!M_WPPortClassData.classObject) 
  170.       M_WPPortNewClass(M_WPPort_MajorVersion,M_WPPort_MinorVersion);
  171.    return (void *)
  172.       ((somTD_SOMClass_somNew)
  173.       somResolve(SOM_TestCls((SOMAny *)(M_WPPortClassData.classObject),
  174.                              SOMClassClassData.classObject),
  175.                  SOMClassClassData.somNew))
  176.          ((SOMClass*)(M_WPPortClassData.classObject));
  177. }
  178.  
  179. void operator delete(void * obj)
  180. {
  181.    ((SOMObject *)obj)->somFree();
  182. }
  183.  
  184.  
  185. };   /* M_WPPort */
  186.  
  187.  
  188.  
  189. #endif       /* wpport_mxh */
  190.