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

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