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

  1.  
  2. /*
  3.  * This file was generated by the SOM Compiler.
  4.  * FileName: wpjob.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: WPJOB
  15.  * 
  16.  *  OS/2 Presentation Manager Workplace class definitions
  17.  * 
  18.  *  Copyright (c) International Business Machines Corporation 1991, 1992
  19.  * 
  20.  */
  21.  
  22. #ifndef wpjob_xh
  23. #define wpjob_xh
  24. class WPJob;
  25.  
  26. #define WPJob_MajorVersion 1
  27. #define WPJob_MinorVersion 1
  28.  
  29.  
  30. /*
  31.  * Passthru lines: File: "C.xh", "before"
  32.  */
  33. /* C++ som defs */
  34. #include <somcls.xh>
  35.  
  36. /* C++ parent def */
  37. #ifndef wptrans_xh
  38. #include "wptrans.xh"
  39. #endif
  40.  
  41. #ifndef WPJob_API
  42. #define WPJob_API
  43. /*
  44.  * The Class API
  45.  */
  46.  
  47. /* A procedure to create the WPJob Class */
  48. SOMEXTERN SOMClass * SOMLINK WPJobNewClass(
  49.         integer4 majorVersion,
  50.         integer4 minorVersion);
  51.  
  52. /* A macro to return the WPJob class object */
  53. class M_WPJob;
  54. #define _WPJob ((M_WPJob*)WPJobClassData.classObject)
  55.  
  56. /* The static interface to WPJob and its instances */
  57. SOMEXTERN struct WPJobClassDataStructure {
  58.     SOMClass *classObject;
  59.     somMToken prtGetJobID;
  60.     somMToken prtSetJobID;
  61.     somMToken prtGetJobInfo2;
  62.     somMToken prtSetJobInfo2;
  63.     somMToken prtGetJobInfo3;
  64.     somMToken prtSetJobInfo3;
  65.     somMToken prtFreeJobInfo2;
  66.     somMToken prtFreeJobInfo3;
  67.     somMToken prtGetPDObject;
  68.     somMToken prtSetPDObject;
  69.     somMToken prtGetDocument;
  70.     somMToken prtSetDocument;
  71.     somMToken prtDupJobInfo2;
  72.     somMToken prtDupJobInfo3;
  73.     somMToken wpDeleteJob;
  74.     somMToken wpHoldJob;
  75.     somMToken wpReleaseJob;
  76.     somMToken wpPrintJobNext;
  77.     somMToken wpStartJobAgain;
  78. } WPJobClassData;
  79.  
  80. /*
  81.  * -- Typedefs for Procedures that support WPJob Methods
  82.  */
  83. extern "C" {
  84. typedef BOOL    (SOMLINK *somTD_WPJob_wpDeleteJob)(WPJob *somSelf);
  85. typedef BOOL    (SOMLINK *somTD_WPJob_wpHoldJob)(WPJob *somSelf);
  86. typedef BOOL    (SOMLINK *somTD_WPJob_wpReleaseJob)(WPJob *somSelf);
  87. typedef BOOL    (SOMLINK *somTD_WPJob_wpPrintJobNext)(WPJob *somSelf);
  88. typedef BOOL    (SOMLINK *somTD_WPJob_wpStartJobAgain)(WPJob *somSelf);
  89. }
  90.  
  91.  
  92. #endif /* WPJob_API */
  93.  
  94.  
  95. /*
  96.  * -- The C++ Wrapper Class for WPJob
  97.  */
  98. class WPJob : public WPTransient
  99. {
  100. public:
  101.  
  102. void *operator new(size_t size)
  103. {
  104.    (void) size;
  105.    if (!WPJobClassData.classObject) 
  106.       WPJobNewClass(WPJob_MajorVersion,WPJob_MinorVersion);
  107.    return (void *)
  108.       ((somTD_SOMClass_somNew)
  109.       somResolve(SOM_TestCls((SOMAny *)(WPJobClassData.classObject),
  110.                              SOMClassClassData.classObject),
  111.                  SOMClassClassData.somNew))
  112.          ((SOMClass*)(WPJobClassData.classObject));
  113. }
  114.  
  115. void operator delete(void * obj)
  116. {
  117.    ((SOMObject *)obj)->somFree();
  118. }
  119.  
  120. /* public method: wpDeleteJob */
  121. BOOL    wpDeleteJob()
  122. {
  123.    return (BOOL) SOM_Resolve((SOMAny *)this,WPJob,wpDeleteJob)
  124.     (this);
  125. }
  126.  
  127.  
  128. /* public method: wpHoldJob */
  129. BOOL    wpHoldJob()
  130. {
  131.    return (BOOL) SOM_Resolve((SOMAny *)this,WPJob,wpHoldJob)
  132.     (this);
  133. }
  134.  
  135.  
  136. /* public method: wpReleaseJob */
  137. BOOL    wpReleaseJob()
  138. {
  139.    return (BOOL) SOM_Resolve((SOMAny *)this,WPJob,wpReleaseJob)
  140.     (this);
  141. }
  142.  
  143.  
  144. /* public method: wpPrintJobNext */
  145. BOOL    wpPrintJobNext()
  146. {
  147.    return (BOOL) SOM_Resolve((SOMAny *)this,WPJob,wpPrintJobNext)
  148.     (this);
  149. }
  150.  
  151.  
  152. /* public method: wpStartJobAgain */
  153. BOOL    wpStartJobAgain()
  154. {
  155.    return (BOOL) SOM_Resolve((SOMAny *)this,WPJob,wpStartJobAgain)
  156.     (this);
  157. }
  158.  
  159.  
  160.  
  161. };   /* WPJob */
  162.  
  163.  
  164.  
  165. #endif       /* wpjob_xh */
  166.  
  167. /*
  168.  * This file was generated by the SOM Compiler.
  169.  * FileName: wpjob.xh.
  170.  * Generated using:
  171.  *     SOM Precompiler spc: 1.22
  172.  *     SOM Emitter emitxh: 1.11
  173.  */
  174. #ifndef wpjob_mxh
  175. #define wpjob_mxh
  176. class M_WPJob;
  177.  
  178. #define M_WPJob_MajorVersion 1
  179. #define M_WPJob_MinorVersion 1
  180.  
  181. /* C++ som defs */
  182. #include <somcls.xh>
  183.  
  184. /* C++ parent def */
  185. #ifndef wptrans_xh
  186. #include "wptrans.xh"
  187. #endif
  188.  
  189. #ifndef M_WPJob_API
  190. #define M_WPJob_API
  191. /*
  192.  * The Class API
  193.  */
  194.  
  195. /* A procedure to create the M_WPJob Class */
  196. SOMEXTERN SOMClass * SOMLINK M_WPJobNewClass(
  197.         integer4 majorVersion,
  198.         integer4 minorVersion);
  199.  
  200. /* A macro to return the M_WPJob class object */
  201. #define _M_WPJob ((SOMClass*)M_WPJobClassData.classObject)
  202.  
  203. /* The static interface to M_WPJob and its instances */
  204. SOMEXTERN struct M_WPJobClassDataStructure {
  205.     SOMClass *classObject;
  206. } M_WPJobClassData;
  207.  
  208. /*
  209.  * -- Typedefs for Procedures that support M_WPJob Methods
  210.  */
  211. extern "C" {
  212. }
  213.  
  214.  
  215. #endif /* M_WPJob_API */
  216.  
  217.  
  218. /*
  219.  * -- The C++ Wrapper Class for M_WPJob
  220.  */
  221. class M_WPJob : public M_WPTransient
  222. {
  223. public:
  224.  
  225. void *operator new(size_t size)
  226. {
  227.    (void) size;
  228.    if (!M_WPJobClassData.classObject) 
  229.       M_WPJobNewClass(M_WPJob_MajorVersion,M_WPJob_MinorVersion);
  230.    return (void *)
  231.       ((somTD_SOMClass_somNew)
  232.       somResolve(SOM_TestCls((SOMAny *)(M_WPJobClassData.classObject),
  233.                              SOMClassClassData.classObject),
  234.                  SOMClassClassData.somNew))
  235.          ((SOMClass*)(M_WPJobClassData.classObject));
  236. }
  237.  
  238. void operator delete(void * obj)
  239. {
  240.    ((SOMObject *)obj)->somFree();
  241. }
  242.  
  243.  
  244. };   /* M_WPJob */
  245.  
  246.  
  247.  
  248. #endif       /* wpjob_mxh */
  249.