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

  1.  
  2. /*
  3.  * This file was generated by the SOM Compiler.
  4.  * FileName: E:\cwpsh\rel\os2c\include\base\os2\wpmet.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: WPMET
  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_WPMet_xh
  23. #define SOM_WPMet_xh
  24.  
  25. class WPMet;
  26.  
  27. #define WPMet_MajorVersion 1
  28. #define WPMet_MinorVersion 2
  29.  
  30. /* C++ SOM defs */
  31. #include <somcls.xh>
  32. #include <somcm.xh>
  33.  
  34. /* C++ parent defs */
  35. #ifndef SOM_WPDataFile_xh
  36. #include <wpdataf.xh>
  37. #endif
  38.  
  39. #ifndef WPMet_API
  40. #define WPMet_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_WPMet;
  58.  
  59. /*
  60.  * End of bindings for IDL types.
  61.  */
  62.  
  63. /* A procedure to create the WPMet Class */
  64. class M_WPMet;
  65. SOMEXTERN M_WPMet * SOMLINK WPMetNewClass(
  66.         integer4 majorVersion,
  67.         integer4 minorVersion);
  68.  
  69. /* The API to the WPMet class object, and the methods it introduces. */
  70. SOMEXTERN struct WPMetClassDataStructure {
  71.     M_WPMet *classObject;
  72. } SOMDLINK WPMetClassData;
  73. #define _WPMet WPMetClassData.classObject
  74.  
  75. /* The API to parentMtabs for WPMet, and the instance data it introduces. */
  76. SOMEXTERN struct WPMetCClassDataStructure {
  77.     somMethodTabs parentMtab;
  78.     somDToken              instanceDataToken;
  79. } SOMDLINK WPMetCClassData;
  80.  
  81. /*
  82.  * -- Typedefs for WPMet Method Procedures
  83.  */
  84. SOMEXTERN {
  85.  
  86. /*
  87.  * -- Typedefs for Reintroduced Wrapper Methods
  88.  */
  89. typedef M_WPMet*   SOMLINK somTP_WPMet_somGetClass(WPMet *somSelf);
  90. typedef somTP_WPMet_somGetClass *somTD_WPMet_somGetClass;
  91. }
  92.  
  93. #endif /* WPMet_API */
  94.  
  95.  
  96. /*
  97.  * -- This emitter treats Method Tokens as Thunks by default.
  98.  * -- Use the sc modifier "nothunks" to change this default
  99.  */
  100. #undef somresolve_
  101. #define somresolve_(obj,mToken) ((somMethodProc*)((void)obj, mToken))
  102.  
  103. /*
  104.  * -- The C++ Wrapper Class for WPMet
  105.  */
  106. class WPMet : public WPDataFile
  107. {
  108. public:
  109.  
  110. // WPMet::new creates the class object if necessary, and then uses somNewNoInit
  111. // to allocate memory and create the object. Initialization is in ctors.
  112. void *operator new(size_t)
  113. {
  114.    if (!_WPMet) WPMetNewClass(WPMet_MajorVersion,WPMet_MinorVersion);
  115.    return (void*)
  116.       SOM_Resolve(_WPMet,SOMClass,somNewNoInit)
  117.          ((SOMClass *)((void*)_WPMet));
  118. }
  119.  
  120. // WPMet::delete uses somDestruct.
  121. void operator delete(void * obj)
  122. {
  123.    if (obj && *(void**)obj) {
  124.       SOM_Resolve(obj,SOMObject,somDestruct)
  125.          ((SOMObject*)obj, 1, 0);
  126.    }
  127. }
  128.  
  129. WPMet& operator=(WPMet& fromObj)
  130. {
  131.    this->somDefaultAssign(0,(SOMObject*)((void*)&fromObj));
  132.    return *this;
  133. }
  134.  
  135. WPMet()
  136. {
  137.    if (*(void**)this != 
  138.        ((somParentMtabStructPtr)
  139.         (WPMetCClassData.parentMtab))->mtab)
  140.       return;
  141.    ((SOMObject*)((void*)this))->somDefaultInit(0);
  142. }
  143.  
  144. WPMet(WPMet* fromObj)
  145. {
  146.    if (*(void**)this != 
  147.        ((somParentMtabStructPtr)
  148.         (WPMetCClassData.parentMtab))->mtab)
  149.       return;
  150.    ((SOMObject*)((void*)this))->somDefaultCopyInit(0,((SOMObject*)((void*)fromObj)));
  151. }
  152.  
  153. WPMet(const WPMet* fromObj)
  154. {
  155.    if (*(void**)this != 
  156.        ((somParentMtabStructPtr)
  157.         (WPMetCClassData.parentMtab))->mtab)
  158.       return;
  159.    ((SOMObject*)((void*)this))->somDefaultConstCopyInit(0,((SOMObject*)((void*)fromObj)));
  160. }
  161.  
  162.  
  163. /*
  164.  * Reintroduce inherited methods
  165.  */
  166.  
  167. /* method: somGetClass */
  168. M_WPMet*  somGetClass()
  169. {
  170. /*
  171.  *  Return the receiver's class.
  172.  */
  173.    return SOM_ResolveD(this,WPMet,SOMObject,somGetClass)
  174.     (this);
  175. }
  176.  
  177.  
  178.  
  179. };   /* WPMet */
  180.  
  181.  
  182.  
  183. #endif       /* SOM_WPMet_xh */
  184.  
  185. #ifndef SOM_M_WPMet_xh
  186. #define SOM_M_WPMet_xh
  187.  
  188. class M_WPMet;
  189.  
  190. #define M_WPMet_MajorVersion 1
  191. #define M_WPMet_MinorVersion 2
  192.  
  193. /* C++ SOM defs */
  194. #include <somcls.xh>
  195. #include <somcm.xh>
  196.  
  197. /* C++ parent defs */
  198. #ifndef SOM_M_WPDataFile_xh
  199. #include <wpdataf.xh>
  200. #endif
  201.  
  202. #ifndef M_WPMet_API
  203. #define M_WPMet_API
  204. /*
  205.  * -- The Class API
  206.  */
  207.  
  208. /*
  209.  * Start of bindings for IDL types
  210.  */
  211.  
  212.  
  213. /*
  214.  * End of bindings for IDL types.
  215.  */
  216.  
  217. /*
  218.  * -- M_WPMet is a metaclass for WPMet. Make sure WPMet is known.
  219.  */
  220. class WPMet;
  221.  
  222.  
  223. /* A procedure to create the M_WPMet Class */
  224. SOMEXTERN SOMClass * SOMLINK M_WPMetNewClass(
  225.         integer4 majorVersion,
  226.         integer4 minorVersion);
  227.  
  228. /* The API to the M_WPMet class object, and the methods it introduces. */
  229. SOMEXTERN struct M_WPMetClassDataStructure {
  230.     SOMClass *classObject;
  231. } SOMDLINK M_WPMetClassData;
  232. #define _M_WPMet M_WPMetClassData.classObject
  233.  
  234. /* The API to parentMtabs for M_WPMet, and the instance data it introduces. */
  235. SOMEXTERN struct M_WPMetCClassDataStructure {
  236.     somMethodTabs parentMtab;
  237.     somDToken              instanceDataToken;
  238. } SOMDLINK M_WPMetCClassData;
  239.  
  240. /*
  241.  * -- Typedefs for M_WPMet Method Procedures
  242.  */
  243. SOMEXTERN {
  244.  
  245. /*
  246.  * -- Typedefs for Reintroduced Wrapper Methods
  247.  */
  248. typedef WPMet*   SOMLINK somTP_M_WPMet_somNew(M_WPMet *somSelf);
  249. typedef somTP_M_WPMet_somNew *somTD_M_WPMet_somNew;
  250. }
  251.  
  252. #endif /* M_WPMet_API */
  253.  
  254.  
  255. /*
  256.  * -- This emitter treats Method Tokens as Thunks by default.
  257.  * -- Use the sc modifier "nothunks" to change this default
  258.  */
  259. #undef somresolve_
  260. #define somresolve_(obj,mToken) ((somMethodProc*)((void)obj, mToken))
  261.  
  262. /*
  263.  * -- The C++ Wrapper Class for M_WPMet
  264.  */
  265. class M_WPMet : public M_WPDataFile
  266. {
  267. public:
  268.  
  269. // M_WPMet::new creates the class object if necessary, and then uses somNewNoInit
  270. // to allocate memory and create the object. Initialization is in ctors.
  271. void *operator new(size_t)
  272. {
  273.    if (!_M_WPMet) M_WPMetNewClass(M_WPMet_MajorVersion,M_WPMet_MinorVersion);
  274.    return (void*)
  275.       SOM_Resolve(_M_WPMet,SOMClass,somNewNoInit)
  276.          ((SOMClass *)((void*)_M_WPMet));
  277. }
  278.  
  279. // M_WPMet::delete uses somDestruct.
  280. void operator delete(void * obj)
  281. {
  282.    if (obj && *(void**)obj) {
  283.       SOM_Resolve(obj,SOMObject,somDestruct)
  284.          ((SOMObject*)obj, 1, 0);
  285.    }
  286. }
  287.  
  288. M_WPMet& operator=(M_WPMet& fromObj)
  289. {
  290.    this->somDefaultAssign(0,(SOMObject*)((void*)&fromObj));
  291.    return *this;
  292. }
  293.  
  294. M_WPMet()
  295. {
  296.    if (*(void**)this != 
  297.        ((somParentMtabStructPtr)
  298.         (M_WPMetCClassData.parentMtab))->mtab)
  299.       return;
  300.    ((SOMObject*)((void*)this))->somDefaultInit(0);
  301. }
  302.  
  303. M_WPMet(M_WPMet* fromObj)
  304. {
  305.    if (*(void**)this != 
  306.        ((somParentMtabStructPtr)
  307.         (M_WPMetCClassData.parentMtab))->mtab)
  308.       return;
  309.    ((SOMObject*)((void*)this))->somDefaultCopyInit(0,((SOMObject*)((void*)fromObj)));
  310. }
  311.  
  312. M_WPMet(const M_WPMet* fromObj)
  313. {
  314.    if (*(void**)this != 
  315.        ((somParentMtabStructPtr)
  316.         (M_WPMetCClassData.parentMtab))->mtab)
  317.       return;
  318.    ((SOMObject*)((void*)this))->somDefaultConstCopyInit(0,((SOMObject*)((void*)fromObj)));
  319. }
  320.  
  321.  
  322. /*
  323.  * Reintroduce inherited methods
  324.  */
  325.  
  326. /* method: somNew */
  327. WPMet*  somNew()
  328. {
  329.    return SOM_ResolveD(this,M_WPMet,SOMClass,somNew)
  330.     (this);
  331. }
  332.  
  333.  
  334.  
  335. };   /* M_WPMet */
  336.  
  337.  
  338.  
  339. #endif       /* SOM_M_WPMet_xh */
  340.