home *** CD-ROM | disk | FTP | other *** search
/ The Developer Connection…ice Driver Kit for OS/2 3 / DEV3-D1.ISO / devtools / toolkt21 / cplus / os2h / wppgmgrp.xh < prev    next >
Encoding:
Text File  |  1993-05-02  |  5.4 KB  |  227 lines

  1.  
  2. /*
  3.  * This file was generated by the SOM Compiler.
  4.  * FileName: wppgmgrp.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: WPPGMGRP
  15.  * 
  16.  *  OS/2 Presentation Manager Workplace class definitions
  17.  * 
  18.  *  Copyright (c) International Business Machines Corporation 1991, 1992
  19.  * 
  20.  */
  21.  
  22. #ifndef wppgmgrp_xh
  23. #define wppgmgrp_xh
  24. class WPProgramGroup;
  25.  
  26. #define WPProgramGroup_MajorVersion 1
  27. #define WPProgramGroup_MinorVersion 2
  28.  
  29.  
  30. /*
  31.  * Passthru lines: File: "C.xh", "before"
  32.  */
  33. #define IDKEY_HGROUP  1
  34. /* C++ som defs */
  35. #include <somcls.xh>
  36.  
  37. /* C++ parent def */
  38. #ifndef wpfolder_xh
  39. #include "wpfolder.xh"
  40. #endif
  41.  
  42. #ifndef WPProgramGroup_API
  43. #define WPProgramGroup_API
  44. /*
  45.  * The Class API
  46.  */
  47.  
  48. /* A procedure to create the WPProgramGroup Class */
  49. SOMEXTERN SOMClass * SOMLINK WPProgramGroupNewClass(
  50.         integer4 majorVersion,
  51.         integer4 minorVersion);
  52.  
  53. /* A macro to return the WPProgramGroup class object */
  54. class M_WPProgramGroup;
  55. #define _WPProgramGroup ((M_WPProgramGroup*)WPProgramGroupClassData.classObject)
  56.  
  57. /* The static interface to WPProgramGroup and its instances */
  58. SOMEXTERN struct WPProgramGroupClassDataStructure {
  59.     SOMClass *classObject;
  60.     somMToken wpSetGroupHandle;
  61.     somMToken wpQueryGroupHandle;
  62.     somMToken wpAddProgramRef;
  63.     somMToken wpChangeProgramRef;
  64.     somMToken wpDeleteProgramRef;
  65. } WPProgramGroupClassData;
  66.  
  67. /*
  68.  * -- Typedefs for Procedures that support WPProgramGroup Methods
  69.  */
  70. extern "C" {
  71. typedef HPROGRAM    (SOMLINK *somTD_WPProgramGroup_wpQueryGroupHandle)(WPProgramGroup *somSelf);
  72. typedef BOOL    (SOMLINK *somTD_WPProgramGroup_wpAddProgramRef)(WPProgramGroup *somSelf,HPROGRAM hProgram);
  73. typedef BOOL    (SOMLINK *somTD_WPProgramGroup_wpChangeProgramRef)(WPProgramGroup *somSelf,HPROGRAM hProgram);
  74. typedef BOOL    (SOMLINK *somTD_WPProgramGroup_wpDeleteProgramRef)(WPProgramGroup *somSelf,HPROGRAM hProgram);
  75. }
  76.  
  77.  
  78. #endif /* WPProgramGroup_API */
  79.  
  80.  
  81. /*
  82.  * -- The C++ Wrapper Class for WPProgramGroup
  83.  */
  84. class WPProgramGroup : public WPFolder
  85. {
  86. public:
  87.  
  88. void *operator new(size_t size)
  89. {
  90.    (void) size;
  91.    if (!WPProgramGroupClassData.classObject) 
  92.       WPProgramGroupNewClass(WPProgramGroup_MajorVersion,WPProgramGroup_MinorVersion);
  93.    return (void *)
  94.       ((somTD_SOMClass_somNew)
  95.       somResolve(SOM_TestCls((SOMAny *)(WPProgramGroupClassData.classObject),
  96.                              SOMClassClassData.classObject),
  97.                  SOMClassClassData.somNew))
  98.          ((SOMClass*)(WPProgramGroupClassData.classObject));
  99. }
  100.  
  101. void operator delete(void * obj)
  102. {
  103.    ((SOMObject *)obj)->somFree();
  104. }
  105.  
  106. /* public method: wpQueryGroupHandle */
  107. HPROGRAM    wpQueryGroupHandle()
  108. {
  109.    return (HPROGRAM) SOM_Resolve((SOMAny *)this,WPProgramGroup,wpQueryGroupHandle)
  110.     (this);
  111. }
  112.  
  113.  
  114. /* public method: wpAddProgramRef */
  115. BOOL    wpAddProgramRef(HPROGRAM hProgram)
  116. {
  117.    return (BOOL) SOM_Resolve((SOMAny *)this,WPProgramGroup,wpAddProgramRef)
  118.     (this,hProgram);
  119. }
  120.  
  121.  
  122. /* public method: wpChangeProgramRef */
  123. BOOL    wpChangeProgramRef(HPROGRAM hProgram)
  124. {
  125.    return (BOOL) SOM_Resolve((SOMAny *)this,WPProgramGroup,wpChangeProgramRef)
  126.     (this,hProgram);
  127. }
  128.  
  129.  
  130. /* public method: wpDeleteProgramRef */
  131. BOOL    wpDeleteProgramRef(HPROGRAM hProgram)
  132. {
  133.    return (BOOL) SOM_Resolve((SOMAny *)this,WPProgramGroup,wpDeleteProgramRef)
  134.     (this,hProgram);
  135. }
  136.  
  137.  
  138.  
  139. };   /* WPProgramGroup */
  140.  
  141.  
  142.  
  143. #endif       /* wppgmgrp_xh */
  144.  
  145. /*
  146.  * This file was generated by the SOM Compiler.
  147.  * FileName: wppgmgrp.xh.
  148.  * Generated using:
  149.  *     SOM Precompiler spc: 1.22
  150.  *     SOM Emitter emitxh: 1.11
  151.  */
  152. #ifndef wppgmgrp_mxh
  153. #define wppgmgrp_mxh
  154. class M_WPProgramGroup;
  155.  
  156. #define M_WPProgramGroup_MajorVersion 1
  157. #define M_WPProgramGroup_MinorVersion 2
  158.  
  159. /* C++ som defs */
  160. #include <somcls.xh>
  161.  
  162. /* C++ parent def */
  163. #ifndef wpfolder_xh
  164. #include "wpfolder.xh"
  165. #endif
  166.  
  167. #ifndef M_WPProgramGroup_API
  168. #define M_WPProgramGroup_API
  169. /*
  170.  * The Class API
  171.  */
  172.  
  173. /* A procedure to create the M_WPProgramGroup Class */
  174. SOMEXTERN SOMClass * SOMLINK M_WPProgramGroupNewClass(
  175.         integer4 majorVersion,
  176.         integer4 minorVersion);
  177.  
  178. /* A macro to return the M_WPProgramGroup class object */
  179. #define _M_WPProgramGroup ((SOMClass*)M_WPProgramGroupClassData.classObject)
  180.  
  181. /* The static interface to M_WPProgramGroup and its instances */
  182. SOMEXTERN struct M_WPProgramGroupClassDataStructure {
  183.     SOMClass *classObject;
  184. } M_WPProgramGroupClassData;
  185.  
  186. /*
  187.  * -- Typedefs for Procedures that support M_WPProgramGroup Methods
  188.  */
  189. extern "C" {
  190. }
  191.  
  192.  
  193. #endif /* M_WPProgramGroup_API */
  194.  
  195.  
  196. /*
  197.  * -- The C++ Wrapper Class for M_WPProgramGroup
  198.  */
  199. class M_WPProgramGroup : public M_WPFolder
  200. {
  201. public:
  202.  
  203. void *operator new(size_t size)
  204. {
  205.    (void) size;
  206.    if (!M_WPProgramGroupClassData.classObject) 
  207.       M_WPProgramGroupNewClass(M_WPProgramGroup_MajorVersion,M_WPProgramGroup_MinorVersion);
  208.    return (void *)
  209.       ((somTD_SOMClass_somNew)
  210.       somResolve(SOM_TestCls((SOMAny *)(M_WPProgramGroupClassData.classObject),
  211.                              SOMClassClassData.classObject),
  212.                  SOMClassClassData.somNew))
  213.          ((SOMClass*)(M_WPProgramGroupClassData.classObject));
  214. }
  215.  
  216. void operator delete(void * obj)
  217. {
  218.    ((SOMObject *)obj)->somFree();
  219. }
  220.  
  221.  
  222. };   /* M_WPProgramGroup */
  223.  
  224.  
  225.  
  226. #endif       /* wppgmgrp_mxh */
  227.