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

  1.  
  2. /*
  3.  * This file was generated by the SOM Compiler.
  4.  * FileName: E:\cwpsh\rel\os2c\include\base\os2\wptrans.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: WPTRANS
  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_WPTransient_xh
  23. #define SOM_WPTransient_xh
  24.  
  25. class WPTransient;
  26.  
  27. #define WPTransient_MajorVersion 1
  28. #define WPTransient_MinorVersion 2
  29.  
  30. /* C++ SOM defs */
  31. #include <somcls.xh>
  32. #include <somcm.xh>
  33.  
  34. /* C++ parent defs */
  35. #ifndef SOM_WPObject_xh
  36. #include <wpobject.xh>
  37. #endif
  38.  
  39. #ifndef WPTransient_API
  40. #define WPTransient_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.  
  57. /*
  58.  * End of bindings for IDL types.
  59.  */
  60.  
  61. /* A procedure to create the WPTransient Class */
  62. class M_WPTransient;
  63. SOMEXTERN M_WPTransient * SOMLINK WPTransientNewClass(
  64.         integer4 majorVersion,
  65.         integer4 minorVersion);
  66.  
  67. /* The API to the WPTransient class object, and the methods it introduces. */
  68. SOMEXTERN struct WPTransientClassDataStructure {
  69.     M_WPTransient *classObject;
  70. } SOMDLINK WPTransientClassData;
  71. #define _WPTransient WPTransientClassData.classObject
  72.  
  73. /* The API to parentMtabs for WPTransient, and the instance data it introduces. */
  74. SOMEXTERN struct WPTransientCClassDataStructure {
  75.     somMethodTabs parentMtab;
  76.     somDToken              instanceDataToken;
  77. } SOMDLINK WPTransientCClassData;
  78.  
  79. /*
  80.  * -- Typedefs for WPTransient Method Procedures
  81.  */
  82. SOMEXTERN {
  83.  
  84. /*
  85.  * -- Typedefs for Reintroduced Wrapper Methods
  86.  */
  87. typedef M_WPTransient*   SOMLINK somTP_WPTransient_somGetClass(WPTransient *somSelf);
  88. typedef somTP_WPTransient_somGetClass *somTD_WPTransient_somGetClass;
  89. }
  90.  
  91. #endif /* WPTransient_API */
  92.  
  93.  
  94. /*
  95.  * -- This emitter treats Method Tokens as Thunks by default.
  96.  * -- Use the sc modifier "nothunks" to change this default
  97.  */
  98. #undef somresolve_
  99. #define somresolve_(obj,mToken) ((somMethodProc*)((void)obj, mToken))
  100.  
  101. /*
  102.  * -- The C++ Wrapper Class for WPTransient
  103.  */
  104. class WPTransient : public WPObject
  105. {
  106. public:
  107.  
  108. // WPTransient::new creates the class object if necessary, and then uses somNewNoInit
  109. // to allocate memory and create the object. Initialization is in ctors.
  110. void *operator new(size_t)
  111. {
  112.    if (!_WPTransient) WPTransientNewClass(WPTransient_MajorVersion,WPTransient_MinorVersion);
  113.    return (void*)
  114.       SOM_Resolve(_WPTransient,SOMClass,somNewNoInit)
  115.          ((SOMClass *)((void*)_WPTransient));
  116. }
  117.  
  118. // WPTransient::delete uses somDestruct.
  119. void operator delete(void * obj)
  120. {
  121.    if (obj && *(void**)obj) {
  122.       SOM_Resolve(obj,SOMObject,somDestruct)
  123.          ((SOMObject*)obj, 1, 0);
  124.    }
  125. }
  126.  
  127. WPTransient& operator=(WPTransient& fromObj)
  128. {
  129.    this->somDefaultAssign(0,(SOMObject*)((void*)&fromObj));
  130.    return *this;
  131. }
  132.  
  133. WPTransient()
  134. {
  135.    if (*(void**)this != 
  136.        ((somParentMtabStructPtr)
  137.         (WPTransientCClassData.parentMtab))->mtab)
  138.       return;
  139.    ((SOMObject*)((void*)this))->somDefaultInit(0);
  140. }
  141.  
  142. WPTransient(WPTransient* fromObj)
  143. {
  144.    if (*(void**)this != 
  145.        ((somParentMtabStructPtr)
  146.         (WPTransientCClassData.parentMtab))->mtab)
  147.       return;
  148.    ((SOMObject*)((void*)this))->somDefaultCopyInit(0,((SOMObject*)((void*)fromObj)));
  149. }
  150.  
  151. WPTransient(const WPTransient* fromObj)
  152. {
  153.    if (*(void**)this != 
  154.        ((somParentMtabStructPtr)
  155.         (WPTransientCClassData.parentMtab))->mtab)
  156.       return;
  157.    ((SOMObject*)((void*)this))->somDefaultConstCopyInit(0,((SOMObject*)((void*)fromObj)));
  158. }
  159.  
  160.  
  161. /*
  162.  * Reintroduce inherited methods
  163.  */
  164.  
  165. /* method: somGetClass */
  166. M_WPTransient*  somGetClass()
  167. {
  168. /*
  169.  *  Return the receiver's class.
  170.  */
  171.    return SOM_ResolveD(this,WPTransient,SOMObject,somGetClass)
  172.     (this);
  173. }
  174.  
  175.  
  176.  
  177. };   /* WPTransient */
  178.  
  179.  
  180.  
  181. #endif       /* SOM_WPTransient_xh */
  182.  
  183. #ifndef SOM_M_WPTransient_xh
  184. #define SOM_M_WPTransient_xh
  185.  
  186. class M_WPTransient;
  187.  
  188. #define M_WPTransient_MajorVersion 1
  189. #define M_WPTransient_MinorVersion 2
  190.  
  191. /* C++ SOM defs */
  192. #include <somcls.xh>
  193. #include <somcm.xh>
  194.  
  195. /* C++ parent defs */
  196. #ifndef SOM_M_WPObject_xh
  197. #include <wpobject.xh>
  198. #endif
  199.  
  200. #ifndef M_WPTransient_API
  201. #define M_WPTransient_API
  202. /*
  203.  * -- The Class API
  204.  */
  205.  
  206. /*
  207.  * Start of bindings for IDL types
  208.  */
  209.  
  210.  
  211. /*
  212.  * End of bindings for IDL types.
  213.  */
  214.  
  215. /*
  216.  * -- M_WPTransient is a metaclass for WPTransient. Make sure WPTransient is known.
  217.  */
  218. class WPTransient;
  219.  
  220.  
  221. /* A procedure to create the M_WPTransient Class */
  222. SOMEXTERN SOMClass * SOMLINK M_WPTransientNewClass(
  223.         integer4 majorVersion,
  224.         integer4 minorVersion);
  225.  
  226. /* The API to the M_WPTransient class object, and the methods it introduces. */
  227. SOMEXTERN struct M_WPTransientClassDataStructure {
  228.     SOMClass *classObject;
  229.     somMToken wpclsTransientPrivate1;
  230.     somMToken wpclsTransientPrivate2;
  231. } SOMDLINK M_WPTransientClassData;
  232. #define _M_WPTransient M_WPTransientClassData.classObject
  233.  
  234. /* The API to parentMtabs for M_WPTransient, and the instance data it introduces. */
  235. SOMEXTERN struct M_WPTransientCClassDataStructure {
  236.     somMethodTabs parentMtab;
  237.     somDToken              instanceDataToken;
  238. } SOMDLINK M_WPTransientCClassData;
  239.  
  240. /*
  241.  * -- Typedefs for M_WPTransient Method Procedures
  242.  */
  243. SOMEXTERN {
  244.  
  245. /*
  246.  * -- Typedefs for Reintroduced Wrapper Methods
  247.  */
  248. typedef WPTransient*   SOMLINK somTP_M_WPTransient_somNew(M_WPTransient *somSelf);
  249. typedef somTP_M_WPTransient_somNew *somTD_M_WPTransient_somNew;
  250. }
  251.  
  252. #endif /* M_WPTransient_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_WPTransient
  264.  */
  265. class M_WPTransient : public M_WPObject
  266. {
  267. public:
  268.  
  269. // M_WPTransient::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_WPTransient) M_WPTransientNewClass(M_WPTransient_MajorVersion,M_WPTransient_MinorVersion);
  274.    return (void*)
  275.       SOM_Resolve(_M_WPTransient,SOMClass,somNewNoInit)
  276.          ((SOMClass *)((void*)_M_WPTransient));
  277. }
  278.  
  279. // M_WPTransient::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_WPTransient& operator=(M_WPTransient& fromObj)
  289. {
  290.    this->somDefaultAssign(0,(SOMObject*)((void*)&fromObj));
  291.    return *this;
  292. }
  293.  
  294. M_WPTransient()
  295. {
  296.    if (*(void**)this != 
  297.        ((somParentMtabStructPtr)
  298.         (M_WPTransientCClassData.parentMtab))->mtab)
  299.       return;
  300.    ((SOMObject*)((void*)this))->somDefaultInit(0);
  301. }
  302.  
  303. M_WPTransient(M_WPTransient* fromObj)
  304. {
  305.    if (*(void**)this != 
  306.        ((somParentMtabStructPtr)
  307.         (M_WPTransientCClassData.parentMtab))->mtab)
  308.       return;
  309.    ((SOMObject*)((void*)this))->somDefaultCopyInit(0,((SOMObject*)((void*)fromObj)));
  310. }
  311.  
  312. M_WPTransient(const M_WPTransient* fromObj)
  313. {
  314.    if (*(void**)this != 
  315.        ((somParentMtabStructPtr)
  316.         (M_WPTransientCClassData.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. WPTransient*  somNew()
  328. {
  329.    return SOM_ResolveD(this,M_WPTransient,SOMClass,somNew)
  330.     (this);
  331. }
  332.  
  333.  
  334.  
  335. };   /* M_WPTransient */
  336.  
  337.  
  338.  
  339. #endif       /* SOM_M_WPTransient_xh */
  340.