home *** CD-ROM | disk | FTP | other *** search
/ The Developer Connection…ice Driver Kit for OS/2 3 / DEV3-D1.ISO / devtools / os2tk21j / cplus / os2h / wpdataf.xh_ / wpdataf.xh
Encoding:
Text File  |  1993-04-30  |  6.4 KB  |  260 lines

  1.  
  2. /*
  3.  * This file was generated by the SOM Compiler.
  4.  * FileName: wpdataf.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: WPDATAF
  15.  * 
  16.  *  OS/2 Presentation Manager Workplace class definitions
  17.  * 
  18.  *  Copyright (c) International Business Machines Corporation 1991, 1992
  19.  * 
  20.  */
  21.  
  22. #ifndef wpdataf_xh
  23. #define wpdataf_xh
  24. class WPDataFile;
  25.  
  26. #define WPDataFile_MajorVersion 1
  27. #define WPDataFile_MinorVersion 2
  28.  
  29.  
  30. /*
  31.  * Passthru lines: File: "C.xh", "before"
  32.  */
  33. #define MAX_ASSOC_ITEMS 12
  34. /* C++ som defs */
  35. #include <somcls.xh>
  36.  
  37. /* C++ parent def */
  38. #ifndef wpfsys_xh
  39. #include "wpfsys.xh"
  40. #endif
  41.  
  42. #ifndef WPDataFile_API
  43. #define WPDataFile_API
  44. /*
  45.  * The Class API
  46.  */
  47.  
  48. /* A procedure to create the WPDataFile Class */
  49. SOMEXTERN SOMClass * SOMLINK WPDataFileNewClass(
  50.         integer4 majorVersion,
  51.         integer4 minorVersion);
  52.  
  53. /* A macro to return the WPDataFile class object */
  54. class M_WPDataFile;
  55. #define _WPDataFile ((M_WPDataFile*)WPDataFileClassData.classObject)
  56.  
  57. /* The static interface to WPDataFile and its instances */
  58. SOMEXTERN struct WPDataFileClassDataStructure {
  59.     SOMClass *classObject;
  60.     somMToken wpAddFileTypePage;
  61.     somMToken wpPrintMetaFile;
  62.     somMToken wpPrintPifFile;
  63.     somMToken wpPrintPrinterSpecificFile;
  64.     somMToken wpPrintUnknownFile;
  65.     somMToken wpQueryAssociatedProgram;
  66.     somMToken wpSetAssociatedFileIcon;
  67. } WPDataFileClassData;
  68.  
  69. /*
  70.  * -- Typedefs for Procedures that support WPDataFile Methods
  71.  */
  72. extern "C" {
  73. typedef ULONG    (SOMLINK *somTD_WPDataFile_wpAddFileTypePage)(WPDataFile *somSelf,HWND hwndNotebook);
  74. typedef BOOL    (SOMLINK *somTD_WPDataFile_wpPrintMetaFile)(WPDataFile *somSelf,PPRINTDEST pPrintDest);
  75. typedef BOOL    (SOMLINK *somTD_WPDataFile_wpPrintPifFile)(WPDataFile *somSelf,PPRINTDEST pPrintDest);
  76. typedef BOOL    (SOMLINK *somTD_WPDataFile_wpPrintPrinterSpecificFile)(WPDataFile *somSelf,PPRINTDEST pPrintDest);
  77. typedef BOOL    (SOMLINK *somTD_WPDataFile_wpPrintUnknownFile)(WPDataFile *somSelf,PPRINTDEST pPrintDest);
  78. typedef WPObject *   (SOMLINK *somTD_WPDataFile_wpQueryAssociatedProgram)(WPDataFile *somSelf,ULONG ulView,PULONG pulHowMatched,PSZ pszMatchString,ULONG cbMatchString,PSZ pszDefaultType);
  79. typedef VOID    (SOMLINK *somTD_WPDataFile_wpSetAssociatedFileIcon)(WPDataFile *somSelf);
  80. }
  81.  
  82.  
  83. #endif /* WPDataFile_API */
  84.  
  85.  
  86. /*
  87.  * -- The C++ Wrapper Class for WPDataFile
  88.  */
  89. class WPDataFile : public WPFileSystem
  90. {
  91. public:
  92.  
  93. void *operator new(size_t size)
  94. {
  95.    (void) size;
  96.    if (!WPDataFileClassData.classObject) 
  97.       WPDataFileNewClass(WPDataFile_MajorVersion,WPDataFile_MinorVersion);
  98.    return (void *)
  99.       ((somTD_SOMClass_somNew)
  100.       somResolve(SOM_TestCls((SOMAny *)(WPDataFileClassData.classObject),
  101.                              SOMClassClassData.classObject),
  102.                  SOMClassClassData.somNew))
  103.          ((SOMClass*)(WPDataFileClassData.classObject));
  104. }
  105.  
  106. void operator delete(void * obj)
  107. {
  108.    ((SOMObject *)obj)->somFree();
  109. }
  110.  
  111. /* public method: wpAddFileTypePage */
  112. ULONG    wpAddFileTypePage(HWND hwndNotebook)
  113. {
  114.    return (ULONG) SOM_Resolve((SOMAny *)this,WPDataFile,wpAddFileTypePage)
  115.     (this,hwndNotebook);
  116. }
  117.  
  118.  
  119. /* public method: wpPrintMetaFile */
  120. BOOL    wpPrintMetaFile(PPRINTDEST pPrintDest)
  121. {
  122.    return (BOOL) SOM_Resolve((SOMAny *)this,WPDataFile,wpPrintMetaFile)
  123.     (this,pPrintDest);
  124. }
  125.  
  126.  
  127. /* public method: wpPrintPifFile */
  128. BOOL    wpPrintPifFile(PPRINTDEST pPrintDest)
  129. {
  130.    return (BOOL) SOM_Resolve((SOMAny *)this,WPDataFile,wpPrintPifFile)
  131.     (this,pPrintDest);
  132. }
  133.  
  134.  
  135. /* public method: wpPrintPrinterSpecificFile */
  136. BOOL    wpPrintPrinterSpecificFile(PPRINTDEST pPrintDest)
  137. {
  138.    return (BOOL) SOM_Resolve((SOMAny *)this,WPDataFile,wpPrintPrinterSpecificFile)
  139.     (this,pPrintDest);
  140. }
  141.  
  142.  
  143. /* public method: wpPrintUnknownFile */
  144. BOOL    wpPrintUnknownFile(PPRINTDEST pPrintDest)
  145. {
  146.    return (BOOL) SOM_Resolve((SOMAny *)this,WPDataFile,wpPrintUnknownFile)
  147.     (this,pPrintDest);
  148. }
  149.  
  150.  
  151. /* public method: wpQueryAssociatedProgram */
  152. WPObject *   wpQueryAssociatedProgram(ULONG ulView,
  153.         PULONG pulHowMatched,
  154.         PSZ pszMatchString,
  155.         ULONG cbMatchString,
  156.         PSZ pszDefaultType)
  157. {
  158.    return (WPObject*) SOM_Resolve((SOMAny *)this,WPDataFile,wpQueryAssociatedProgram)
  159.     (this,ulView,pulHowMatched,pszMatchString,cbMatchString,pszDefaultType);
  160. }
  161.  
  162.  
  163. /* public method: wpSetAssociatedFileIcon */
  164. VOID    wpSetAssociatedFileIcon()
  165. {
  166.    SOM_Resolve((SOMAny *)this,WPDataFile,wpSetAssociatedFileIcon)
  167.     (this);
  168. }
  169.  
  170.  
  171.  
  172. };   /* WPDataFile */
  173.  
  174.  
  175.  
  176. #endif       /* wpdataf_xh */
  177.  
  178. /*
  179.  * This file was generated by the SOM Compiler.
  180.  * FileName: wpdataf.xh.
  181.  * Generated using:
  182.  *     SOM Precompiler spc: 1.22
  183.  *     SOM Emitter emitxh: 1.11
  184.  */
  185. #ifndef wpdataf_mxh
  186. #define wpdataf_mxh
  187. class M_WPDataFile;
  188.  
  189. #define M_WPDataFile_MajorVersion 1
  190. #define M_WPDataFile_MinorVersion 2
  191.  
  192. /* C++ som defs */
  193. #include <somcls.xh>
  194.  
  195. /* C++ parent def */
  196. #ifndef wpfsys_xh
  197. #include "wpfsys.xh"
  198. #endif
  199.  
  200. #ifndef M_WPDataFile_API
  201. #define M_WPDataFile_API
  202. /*
  203.  * The Class API
  204.  */
  205.  
  206. /* A procedure to create the M_WPDataFile Class */
  207. SOMEXTERN SOMClass * SOMLINK M_WPDataFileNewClass(
  208.         integer4 majorVersion,
  209.         integer4 minorVersion);
  210.  
  211. /* A macro to return the M_WPDataFile class object */
  212. #define _M_WPDataFile ((SOMClass*)M_WPDataFileClassData.classObject)
  213.  
  214. /* The static interface to M_WPDataFile and its instances */
  215. SOMEXTERN struct M_WPDataFileClassDataStructure {
  216.     SOMClass *classObject;
  217. } M_WPDataFileClassData;
  218.  
  219. /*
  220.  * -- Typedefs for Procedures that support M_WPDataFile Methods
  221.  */
  222. extern "C" {
  223. }
  224.  
  225.  
  226. #endif /* M_WPDataFile_API */
  227.  
  228.  
  229. /*
  230.  * -- The C++ Wrapper Class for M_WPDataFile
  231.  */
  232. class M_WPDataFile : public M_WPFileSystem
  233. {
  234. public:
  235.  
  236. void *operator new(size_t size)
  237. {
  238.    (void) size;
  239.    if (!M_WPDataFileClassData.classObject) 
  240.       M_WPDataFileNewClass(M_WPDataFile_MajorVersion,M_WPDataFile_MinorVersion);
  241.    return (void *)
  242.       ((somTD_SOMClass_somNew)
  243.       somResolve(SOM_TestCls((SOMAny *)(M_WPDataFileClassData.classObject),
  244.                              SOMClassClassData.classObject),
  245.                  SOMClassClassData.somNew))
  246.          ((SOMClass*)(M_WPDataFileClassData.classObject));
  247. }
  248.  
  249. void operator delete(void * obj)
  250. {
  251.    ((SOMObject *)obj)->somFree();
  252. }
  253.  
  254.  
  255. };   /* M_WPDataFile */
  256.  
  257.  
  258.  
  259. #endif       /* wpdataf_mxh */
  260.