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

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