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

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