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

  1.  
  2. /*
  3.  * This file was generated by the SOM Compiler.
  4.  * FileName: E:\cwpsh\rel\os2c\include\base\os2\wpcmdf.xh.
  5.  * Generated using:
  6.  *     SOM Precompiler somipc: 2.29.1.14
  7.  *     SOM Emitter emitxh: 2.43
  8.  */
  9.  
  10. /*
  11.  *   Module Header
  12.  * 
  13.  *   Module Name: WPCMDF
  14.  * 
  15.  *   OS/2 Presentation Manager Workplace class definitions
  16.  * 
  17.  *   Copyright (c) International Business Machines Corporation 1991, 1992
  18.  * 
  19.  */
  20.  
  21.  
  22. #ifndef SOM_WPCommandFile_xh
  23. #define SOM_WPCommandFile_xh
  24.  
  25. class WPCommandFile;
  26.  
  27. #define WPCommandFile_MajorVersion 1
  28. #define WPCommandFile_MinorVersion 2
  29.  
  30. /* C++ SOM defs */
  31. #include <somcls.xh>
  32. #include <somcm.xh>
  33.  
  34. /* C++ parent defs */
  35. #ifndef SOM_WPProgramFile_xh
  36. #include <wppgmf.xh>
  37. #endif
  38.  
  39. #ifndef WPCommandFile_API
  40. #define WPCommandFile_API
  41. /*
  42.  * -- The Class API
  43.  */
  44.  
  45. /*
  46.  * Start of bindings for IDL types
  47.  */
  48.  
  49. class SOMClass;
  50. class SOMObject;
  51. class WPFolder;
  52. class M_WPObject;
  53. class WPObject;
  54. class WPImageFile;
  55. class M_WPFileSystem;
  56. class M_WPDataFile;
  57. class M_WPProgramFile;
  58. class M_WPCommandFile;
  59.  
  60. /*
  61.  * End of bindings for IDL types.
  62.  */
  63.  
  64. /* A procedure to create the WPCommandFile Class */
  65. class M_WPCommandFile;
  66. SOMEXTERN M_WPCommandFile * SOMLINK WPCommandFileNewClass(
  67.         integer4 majorVersion,
  68.         integer4 minorVersion);
  69.  
  70. /* The API to the WPCommandFile class object, and the methods it introduces. */
  71. SOMEXTERN struct WPCommandFileClassDataStructure {
  72.     M_WPCommandFile *classObject;
  73. } SOMDLINK WPCommandFileClassData;
  74. #define _WPCommandFile WPCommandFileClassData.classObject
  75.  
  76. /* The API to parentMtabs for WPCommandFile, and the instance data it introduces. */
  77. SOMEXTERN struct WPCommandFileCClassDataStructure {
  78.     somMethodTabs parentMtab;
  79.     somDToken              instanceDataToken;
  80. } SOMDLINK WPCommandFileCClassData;
  81.  
  82. /*
  83.  * -- Typedefs for WPCommandFile Method Procedures
  84.  */
  85. SOMEXTERN {
  86.  
  87. /*
  88.  * -- Typedefs for Reintroduced Wrapper Methods
  89.  */
  90. typedef M_WPCommandFile*   SOMLINK somTP_WPCommandFile_somGetClass(WPCommandFile *somSelf);
  91. typedef somTP_WPCommandFile_somGetClass *somTD_WPCommandFile_somGetClass;
  92. }
  93.  
  94. #endif /* WPCommandFile_API */
  95.  
  96.  
  97. /*
  98.  * -- This emitter treats Method Tokens as Thunks by default.
  99.  * -- Use the sc modifier "nothunks" to change this default
  100.  */
  101. #undef somresolve_
  102. #define somresolve_(obj,mToken) ((somMethodProc*)((void)obj, mToken))
  103.  
  104. /*
  105.  * -- The C++ Wrapper Class for WPCommandFile
  106.  */
  107. class WPCommandFile : public WPProgramFile
  108. {
  109. public:
  110.  
  111. // WPCommandFile::new creates the class object if necessary, and then uses somNewNoInit
  112. // to allocate memory and create the object. Initialization is in ctors.
  113. void *operator new(size_t)
  114. {
  115.    if (!_WPCommandFile) WPCommandFileNewClass(WPCommandFile_MajorVersion,WPCommandFile_MinorVersion);
  116.    return (void*)
  117.       SOM_Resolve(_WPCommandFile,SOMClass,somNewNoInit)
  118.          ((SOMClass *)((void*)_WPCommandFile));
  119. }
  120.  
  121. // WPCommandFile::delete uses somDestruct.
  122. void operator delete(void * obj)
  123. {
  124.    if (obj && *(void**)obj) {
  125.       SOM_Resolve(obj,SOMObject,somDestruct)
  126.          ((SOMObject*)obj, 1, 0);
  127.    }
  128. }
  129.  
  130. WPCommandFile& operator=(WPCommandFile& fromObj)
  131. {
  132.    this->somDefaultAssign(0,(SOMObject*)((void*)&fromObj));
  133.    return *this;
  134. }
  135.  
  136. WPCommandFile()
  137. {
  138.    if (*(void**)this != 
  139.        ((somParentMtabStructPtr)
  140.         (WPCommandFileCClassData.parentMtab))->mtab)
  141.       return;
  142.    ((SOMObject*)((void*)this))->somDefaultInit(0);
  143. }
  144.  
  145. WPCommandFile(WPCommandFile* fromObj)
  146. {
  147.    if (*(void**)this != 
  148.        ((somParentMtabStructPtr)
  149.         (WPCommandFileCClassData.parentMtab))->mtab)
  150.       return;
  151.    ((SOMObject*)((void*)this))->somDefaultCopyInit(0,((SOMObject*)((void*)fromObj)));
  152. }
  153.  
  154. WPCommandFile(const WPCommandFile* fromObj)
  155. {
  156.    if (*(void**)this != 
  157.        ((somParentMtabStructPtr)
  158.         (WPCommandFileCClassData.parentMtab))->mtab)
  159.       return;
  160.    ((SOMObject*)((void*)this))->somDefaultConstCopyInit(0,((SOMObject*)((void*)fromObj)));
  161. }
  162.  
  163.  
  164. /*
  165.  * Reintroduce inherited methods
  166.  */
  167.  
  168. /* method: somGetClass */
  169. M_WPCommandFile*  somGetClass()
  170. {
  171. /*
  172.  *  Return the receiver's class.
  173.  */
  174.    return SOM_ResolveD(this,WPCommandFile,SOMObject,somGetClass)
  175.     (this);
  176. }
  177.  
  178.  
  179.  
  180. };   /* WPCommandFile */
  181.  
  182.  
  183.  
  184. #endif       /* SOM_WPCommandFile_xh */
  185.  
  186. #ifndef SOM_M_WPCommandFile_xh
  187. #define SOM_M_WPCommandFile_xh
  188.  
  189. class M_WPCommandFile;
  190.  
  191. #define M_WPCommandFile_MajorVersion 1
  192. #define M_WPCommandFile_MinorVersion 2
  193.  
  194. /* C++ SOM defs */
  195. #include <somcls.xh>
  196. #include <somcm.xh>
  197.  
  198. /* C++ parent defs */
  199. #ifndef SOM_M_WPProgramFile_xh
  200. #include <wppgmf.xh>
  201. #endif
  202.  
  203. #ifndef M_WPCommandFile_API
  204. #define M_WPCommandFile_API
  205. /*
  206.  * -- The Class API
  207.  */
  208.  
  209. /*
  210.  * Start of bindings for IDL types
  211.  */
  212.  
  213.  
  214. /*
  215.  * End of bindings for IDL types.
  216.  */
  217.  
  218. /*
  219.  * -- M_WPCommandFile is a metaclass for WPCommandFile. Make sure WPCommandFile is known.
  220.  */
  221. class WPCommandFile;
  222.  
  223.  
  224. /* A procedure to create the M_WPCommandFile Class */
  225. SOMEXTERN SOMClass * SOMLINK M_WPCommandFileNewClass(
  226.         integer4 majorVersion,
  227.         integer4 minorVersion);
  228.  
  229. /* The API to the M_WPCommandFile class object, and the methods it introduces. */
  230. SOMEXTERN struct M_WPCommandFileClassDataStructure {
  231.     SOMClass *classObject;
  232. } SOMDLINK M_WPCommandFileClassData;
  233. #define _M_WPCommandFile M_WPCommandFileClassData.classObject
  234.  
  235. /* The API to parentMtabs for M_WPCommandFile, and the instance data it introduces. */
  236. SOMEXTERN struct M_WPCommandFileCClassDataStructure {
  237.     somMethodTabs parentMtab;
  238.     somDToken              instanceDataToken;
  239. } SOMDLINK M_WPCommandFileCClassData;
  240.  
  241. /*
  242.  * -- Typedefs for M_WPCommandFile Method Procedures
  243.  */
  244. SOMEXTERN {
  245.  
  246. /*
  247.  * -- Typedefs for Reintroduced Wrapper Methods
  248.  */
  249. typedef WPCommandFile*   SOMLINK somTP_M_WPCommandFile_somNew(M_WPCommandFile *somSelf);
  250. typedef somTP_M_WPCommandFile_somNew *somTD_M_WPCommandFile_somNew;
  251. }
  252.  
  253. #endif /* M_WPCommandFile_API */
  254.  
  255.  
  256. /*
  257.  * -- This emitter treats Method Tokens as Thunks by default.
  258.  * -- Use the sc modifier "nothunks" to change this default
  259.  */
  260. #undef somresolve_
  261. #define somresolve_(obj,mToken) ((somMethodProc*)((void)obj, mToken))
  262.  
  263. /*
  264.  * -- The C++ Wrapper Class for M_WPCommandFile
  265.  */
  266. class M_WPCommandFile : public M_WPProgramFile
  267. {
  268. public:
  269.  
  270. // M_WPCommandFile::new creates the class object if necessary, and then uses somNewNoInit
  271. // to allocate memory and create the object. Initialization is in ctors.
  272. void *operator new(size_t)
  273. {
  274.    if (!_M_WPCommandFile) M_WPCommandFileNewClass(M_WPCommandFile_MajorVersion,M_WPCommandFile_MinorVersion);
  275.    return (void*)
  276.       SOM_Resolve(_M_WPCommandFile,SOMClass,somNewNoInit)
  277.          ((SOMClass *)((void*)_M_WPCommandFile));
  278. }
  279.  
  280. // M_WPCommandFile::delete uses somDestruct.
  281. void operator delete(void * obj)
  282. {
  283.    if (obj && *(void**)obj) {
  284.       SOM_Resolve(obj,SOMObject,somDestruct)
  285.          ((SOMObject*)obj, 1, 0);
  286.    }
  287. }
  288.  
  289. M_WPCommandFile& operator=(M_WPCommandFile& fromObj)
  290. {
  291.    this->somDefaultAssign(0,(SOMObject*)((void*)&fromObj));
  292.    return *this;
  293. }
  294.  
  295. M_WPCommandFile()
  296. {
  297.    if (*(void**)this != 
  298.        ((somParentMtabStructPtr)
  299.         (M_WPCommandFileCClassData.parentMtab))->mtab)
  300.       return;
  301.    ((SOMObject*)((void*)this))->somDefaultInit(0);
  302. }
  303.  
  304. M_WPCommandFile(M_WPCommandFile* fromObj)
  305. {
  306.    if (*(void**)this != 
  307.        ((somParentMtabStructPtr)
  308.         (M_WPCommandFileCClassData.parentMtab))->mtab)
  309.       return;
  310.    ((SOMObject*)((void*)this))->somDefaultCopyInit(0,((SOMObject*)((void*)fromObj)));
  311. }
  312.  
  313. M_WPCommandFile(const M_WPCommandFile* fromObj)
  314. {
  315.    if (*(void**)this != 
  316.        ((somParentMtabStructPtr)
  317.         (M_WPCommandFileCClassData.parentMtab))->mtab)
  318.       return;
  319.    ((SOMObject*)((void*)this))->somDefaultConstCopyInit(0,((SOMObject*)((void*)fromObj)));
  320. }
  321.  
  322.  
  323. /*
  324.  * Reintroduce inherited methods
  325.  */
  326.  
  327. /* method: somNew */
  328. WPCommandFile*  somNew()
  329. {
  330.    return SOM_ResolveD(this,M_WPCommandFile,SOMClass,somNew)
  331.     (this);
  332. }
  333.  
  334.  
  335.  
  336. };   /* M_WPCommandFile */
  337.  
  338.  
  339.  
  340. #endif       /* SOM_M_WPCommandFile_xh */
  341.