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

  1.  
  2. /*
  3.  * This file was generated by the SOM Compiler.
  4.  * FileName: E:\cwpsh\rel\os2c\include\base\os2\wpctry.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: WPCTRY
  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_WPCountry_xh
  23. #define SOM_WPCountry_xh
  24.  
  25. class WPCountry;
  26.  
  27. #define WPCountry_MajorVersion 1
  28. #define WPCountry_MinorVersion 2
  29.  
  30. /* C++ SOM defs */
  31. #include <somcls.xh>
  32. #include <somcm.xh>
  33.  
  34. /* C++ parent defs */
  35. #ifndef SOM_WPAbstract_xh
  36. #include <wpabs.xh>
  37. #endif
  38.  
  39. #ifndef WPCountry_API
  40. #define WPCountry_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_WPAbstract;
  56. class M_WPCountry;
  57.  
  58. /*
  59.  * End of bindings for IDL types.
  60.  */
  61.  
  62. /* A procedure to create the WPCountry Class */
  63. class M_WPCountry;
  64. SOMEXTERN M_WPCountry * SOMLINK WPCountryNewClass(
  65.         integer4 majorVersion,
  66.         integer4 minorVersion);
  67.  
  68. /* The API to the WPCountry class object, and the methods it introduces. */
  69. SOMEXTERN struct WPCountryClassDataStructure {
  70.     M_WPCountry *classObject;
  71.     somMToken wpAddCountryTimePage;
  72.     somMToken wpAddCountryDatePage;
  73.     somMToken withdrawn;
  74.     somMToken wpAddCountryPage;
  75.     somMToken wpAddCountryNumbersPage;
  76. } SOMDLINK WPCountryClassData;
  77. #define _WPCountry WPCountryClassData.classObject
  78.  
  79. /* The API to parentMtabs for WPCountry, and the instance data it introduces. */
  80. SOMEXTERN struct WPCountryCClassDataStructure {
  81.     somMethodTabs parentMtab;
  82.     somDToken              instanceDataToken;
  83. } SOMDLINK WPCountryCClassData;
  84.  
  85. /*
  86.  * -- Typedefs for WPCountry Method Procedures
  87.  */
  88. SOMEXTERN {
  89. typedef ULONG   SOMLINK somTP_WPCountry_wpAddCountryTimePage(WPCountry *somSelf, 
  90.         HWND hwndNotebook);
  91. typedef somTP_WPCountry_wpAddCountryTimePage *somTD_WPCountry_wpAddCountryTimePage;
  92. typedef ULONG   SOMLINK somTP_WPCountry_wpAddCountryDatePage(WPCountry *somSelf, 
  93.         HWND hwndNotebook);
  94. typedef somTP_WPCountry_wpAddCountryDatePage *somTD_WPCountry_wpAddCountryDatePage;
  95. typedef ULONG   SOMLINK somTP_WPCountry_wpAddCountryNumbersPage(WPCountry *somSelf, 
  96.         HWND hwndNotebook);
  97. typedef somTP_WPCountry_wpAddCountryNumbersPage *somTD_WPCountry_wpAddCountryNumbersPage;
  98. typedef ULONG   SOMLINK somTP_WPCountry_wpAddCountryPage(WPCountry *somSelf, 
  99.         HWND hwndNotebook);
  100. typedef somTP_WPCountry_wpAddCountryPage *somTD_WPCountry_wpAddCountryPage;
  101.  
  102. /*
  103.  * -- Typedefs for Reintroduced Wrapper Methods
  104.  */
  105. typedef M_WPCountry*   SOMLINK somTP_WPCountry_somGetClass(WPCountry *somSelf);
  106. typedef somTP_WPCountry_somGetClass *somTD_WPCountry_somGetClass;
  107. }
  108.  
  109. #endif /* WPCountry_API */
  110.  
  111.  
  112. /*
  113.  * -- This emitter treats Method Tokens as Thunks by default.
  114.  * -- Use the sc modifier "nothunks" to change this default
  115.  */
  116. #undef somresolve_
  117. #define somresolve_(obj,mToken) ((somMethodProc*)((void)obj, mToken))
  118.  
  119. /*
  120.  * -- The C++ Wrapper Class for WPCountry
  121.  */
  122. class WPCountry : public WPAbstract
  123. {
  124. public:
  125.  
  126. // WPCountry::new creates the class object if necessary, and then uses somNewNoInit
  127. // to allocate memory and create the object. Initialization is in ctors.
  128. void *operator new(size_t)
  129. {
  130.    if (!_WPCountry) WPCountryNewClass(WPCountry_MajorVersion,WPCountry_MinorVersion);
  131.    return (void*)
  132.       SOM_Resolve(_WPCountry,SOMClass,somNewNoInit)
  133.          ((SOMClass *)((void*)_WPCountry));
  134. }
  135.  
  136. // WPCountry::delete uses somDestruct.
  137. void operator delete(void * obj)
  138. {
  139.    if (obj && *(void**)obj) {
  140.       SOM_Resolve(obj,SOMObject,somDestruct)
  141.          ((SOMObject*)obj, 1, 0);
  142.    }
  143. }
  144.  
  145. WPCountry& operator=(WPCountry& fromObj)
  146. {
  147.    this->somDefaultAssign(0,(SOMObject*)((void*)&fromObj));
  148.    return *this;
  149. }
  150.  
  151. WPCountry()
  152. {
  153.    if (*(void**)this != 
  154.        ((somParentMtabStructPtr)
  155.         (WPCountryCClassData.parentMtab))->mtab)
  156.       return;
  157.    ((SOMObject*)((void*)this))->somDefaultInit(0);
  158. }
  159.  
  160. WPCountry(WPCountry* fromObj)
  161. {
  162.    if (*(void**)this != 
  163.        ((somParentMtabStructPtr)
  164.         (WPCountryCClassData.parentMtab))->mtab)
  165.       return;
  166.    ((SOMObject*)((void*)this))->somDefaultCopyInit(0,((SOMObject*)((void*)fromObj)));
  167. }
  168.  
  169. WPCountry(const WPCountry* fromObj)
  170. {
  171.    if (*(void**)this != 
  172.        ((somParentMtabStructPtr)
  173.         (WPCountryCClassData.parentMtab))->mtab)
  174.       return;
  175.    ((SOMObject*)((void*)this))->somDefaultConstCopyInit(0,((SOMObject*)((void*)fromObj)));
  176. }
  177.  
  178.  
  179. /* method: wpAddCountryTimePage */
  180. ULONG   wpAddCountryTimePage(HWND hwndNotebook)
  181. {
  182.    return SOM_ResolveD(this,WPCountry,WPCountry,wpAddCountryTimePage)
  183.     (this,hwndNotebook);
  184. }
  185.  
  186.  
  187. /* method: wpAddCountryDatePage */
  188. ULONG   wpAddCountryDatePage(HWND hwndNotebook)
  189. {
  190.    return SOM_ResolveD(this,WPCountry,WPCountry,wpAddCountryDatePage)
  191.     (this,hwndNotebook);
  192. }
  193.  
  194.  
  195. /* method: wpAddCountryNumbersPage */
  196. ULONG   wpAddCountryNumbersPage(HWND hwndNotebook)
  197. {
  198.    return SOM_ResolveD(this,WPCountry,WPCountry,wpAddCountryNumbersPage)
  199.     (this,hwndNotebook);
  200. }
  201.  
  202.  
  203. /* method: wpAddCountryPage */
  204. ULONG   wpAddCountryPage(HWND hwndNotebook)
  205. {
  206.    return SOM_ResolveD(this,WPCountry,WPCountry,wpAddCountryPage)
  207.     (this,hwndNotebook);
  208. }
  209.  
  210.  
  211. /*
  212.  * Reintroduce inherited methods
  213.  */
  214.  
  215. /* method: somGetClass */
  216. M_WPCountry*  somGetClass()
  217. {
  218. /*
  219.  *  Return the receiver's class.
  220.  */
  221.    return SOM_ResolveD(this,WPCountry,SOMObject,somGetClass)
  222.     (this);
  223. }
  224.  
  225.  
  226.  
  227. };   /* WPCountry */
  228.  
  229.  
  230.  
  231. #endif       /* SOM_WPCountry_xh */
  232.  
  233. #ifndef SOM_M_WPCountry_xh
  234. #define SOM_M_WPCountry_xh
  235.  
  236. class M_WPCountry;
  237.  
  238. #define M_WPCountry_MajorVersion 1
  239. #define M_WPCountry_MinorVersion 2
  240.  
  241. /* C++ SOM defs */
  242. #include <somcls.xh>
  243. #include <somcm.xh>
  244.  
  245. /* C++ parent defs */
  246. #ifndef SOM_M_WPAbstract_xh
  247. #include <wpabs.xh>
  248. #endif
  249.  
  250. #ifndef M_WPCountry_API
  251. #define M_WPCountry_API
  252. /*
  253.  * -- The Class API
  254.  */
  255.  
  256. /*
  257.  * Start of bindings for IDL types
  258.  */
  259.  
  260.  
  261. /*
  262.  * End of bindings for IDL types.
  263.  */
  264.  
  265. /*
  266.  * -- M_WPCountry is a metaclass for WPCountry. Make sure WPCountry is known.
  267.  */
  268. class WPCountry;
  269.  
  270.  
  271. /* A procedure to create the M_WPCountry Class */
  272. SOMEXTERN SOMClass * SOMLINK M_WPCountryNewClass(
  273.         integer4 majorVersion,
  274.         integer4 minorVersion);
  275.  
  276. /* The API to the M_WPCountry class object, and the methods it introduces. */
  277. SOMEXTERN struct M_WPCountryClassDataStructure {
  278.     SOMClass *classObject;
  279. } SOMDLINK M_WPCountryClassData;
  280. #define _M_WPCountry M_WPCountryClassData.classObject
  281.  
  282. /* The API to parentMtabs for M_WPCountry, and the instance data it introduces. */
  283. SOMEXTERN struct M_WPCountryCClassDataStructure {
  284.     somMethodTabs parentMtab;
  285.     somDToken              instanceDataToken;
  286. } SOMDLINK M_WPCountryCClassData;
  287.  
  288. /*
  289.  * -- Typedefs for M_WPCountry Method Procedures
  290.  */
  291. SOMEXTERN {
  292.  
  293. /*
  294.  * -- Typedefs for Reintroduced Wrapper Methods
  295.  */
  296. typedef WPCountry*   SOMLINK somTP_M_WPCountry_somNew(M_WPCountry *somSelf);
  297. typedef somTP_M_WPCountry_somNew *somTD_M_WPCountry_somNew;
  298. }
  299.  
  300. #endif /* M_WPCountry_API */
  301.  
  302.  
  303. /*
  304.  * -- This emitter treats Method Tokens as Thunks by default.
  305.  * -- Use the sc modifier "nothunks" to change this default
  306.  */
  307. #undef somresolve_
  308. #define somresolve_(obj,mToken) ((somMethodProc*)((void)obj, mToken))
  309.  
  310. /*
  311.  * -- The C++ Wrapper Class for M_WPCountry
  312.  */
  313. class M_WPCountry : public M_WPAbstract
  314. {
  315. public:
  316.  
  317. // M_WPCountry::new creates the class object if necessary, and then uses somNewNoInit
  318. // to allocate memory and create the object. Initialization is in ctors.
  319. void *operator new(size_t)
  320. {
  321.    if (!_M_WPCountry) M_WPCountryNewClass(M_WPCountry_MajorVersion,M_WPCountry_MinorVersion);
  322.    return (void*)
  323.       SOM_Resolve(_M_WPCountry,SOMClass,somNewNoInit)
  324.          ((SOMClass *)((void*)_M_WPCountry));
  325. }
  326.  
  327. // M_WPCountry::delete uses somDestruct.
  328. void operator delete(void * obj)
  329. {
  330.    if (obj && *(void**)obj) {
  331.       SOM_Resolve(obj,SOMObject,somDestruct)
  332.          ((SOMObject*)obj, 1, 0);
  333.    }
  334. }
  335.  
  336. M_WPCountry& operator=(M_WPCountry& fromObj)
  337. {
  338.    this->somDefaultAssign(0,(SOMObject*)((void*)&fromObj));
  339.    return *this;
  340. }
  341.  
  342. M_WPCountry()
  343. {
  344.    if (*(void**)this != 
  345.        ((somParentMtabStructPtr)
  346.         (M_WPCountryCClassData.parentMtab))->mtab)
  347.       return;
  348.    ((SOMObject*)((void*)this))->somDefaultInit(0);
  349. }
  350.  
  351. M_WPCountry(M_WPCountry* fromObj)
  352. {
  353.    if (*(void**)this != 
  354.        ((somParentMtabStructPtr)
  355.         (M_WPCountryCClassData.parentMtab))->mtab)
  356.       return;
  357.    ((SOMObject*)((void*)this))->somDefaultCopyInit(0,((SOMObject*)((void*)fromObj)));
  358. }
  359.  
  360. M_WPCountry(const M_WPCountry* fromObj)
  361. {
  362.    if (*(void**)this != 
  363.        ((somParentMtabStructPtr)
  364.         (M_WPCountryCClassData.parentMtab))->mtab)
  365.       return;
  366.    ((SOMObject*)((void*)this))->somDefaultConstCopyInit(0,((SOMObject*)((void*)fromObj)));
  367. }
  368.  
  369.  
  370. /*
  371.  * Reintroduce inherited methods
  372.  */
  373.  
  374. /* method: somNew */
  375. WPCountry*  somNew()
  376. {
  377.    return SOM_ResolveD(this,M_WPCountry,SOMClass,somNew)
  378.     (this);
  379. }
  380.  
  381.  
  382.  
  383. };   /* M_WPCountry */
  384.  
  385.  
  386.  
  387. #endif       /* SOM_M_WPCountry_xh */
  388.