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

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