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

  1.  
  2. /*
  3.  * This file was generated by the SOM Compiler.
  4.  * FileName: E:\cwpsh\rel\os2c\include\base\os2\wpurl.xh.
  5.  * Generated using:
  6.  *     SOM Precompiler somipc: 2.29.1.14
  7.  *     SOM Emitter emitxh: 2.43
  8.  */
  9.  
  10. /*
  11.  *    Module Name: WPURL
  12.  * 
  13.  *    OS/2 Work Place Shell - Base URL object class
  14.  * 
  15.  *    Copyright (C) 1996 IBM Corporation
  16.  * 
  17.  */
  18.  
  19.  
  20. #ifndef SOM_WPUrl_xh
  21. #define SOM_WPUrl_xh
  22.  
  23. class WPUrl;
  24.  
  25. #define WPUrl_MajorVersion 1
  26. #define WPUrl_MinorVersion 2
  27.  
  28. /* C++ SOM defs */
  29. #include <somcls.xh>
  30. #include <somcm.xh>
  31.  
  32. /* C++ parent defs */
  33. #ifndef SOM_WPDataFile_xh
  34. #include <wpdataf.xh>
  35. #endif
  36.  
  37. #ifndef WPUrl_API
  38. #define WPUrl_API
  39. /*
  40.  * -- The Class API
  41.  */
  42.  
  43. /*
  44.  * Start of bindings for IDL types
  45.  */
  46.  
  47. class SOMClass;
  48. class SOMObject;
  49. class WPFolder;
  50. class M_WPObject;
  51. class WPObject;
  52. class WPImageFile;
  53. class M_WPFileSystem;
  54. class M_WPDataFile;
  55. class M_WPUrl;
  56.  
  57. /*
  58.  * End of bindings for IDL types.
  59.  */
  60.  
  61. /* A procedure to create the WPUrl Class */
  62. class M_WPUrl;
  63. SOMEXTERN M_WPUrl * SOMLINK WPUrlNewClass(
  64.         integer4 majorVersion,
  65.         integer4 minorVersion);
  66.  
  67. /* The API to the WPUrl class object, and the methods it introduces. */
  68. SOMEXTERN struct WPUrlClassDataStructure {
  69.     M_WPUrl *classObject;
  70.     somMToken WPUrlPrivate1;
  71.     somMToken WPUrlPrivate2;
  72.     somMToken WPUrlPrivate3;
  73.     somMToken WPUrlPrivate4;
  74.     somMToken WPUrlPrivate5;
  75. } SOMDLINK WPUrlClassData;
  76. #define _WPUrl WPUrlClassData.classObject
  77.  
  78. /* The API to parentMtabs for WPUrl, and the instance data it introduces. */
  79. SOMEXTERN struct WPUrlCClassDataStructure {
  80.     somMethodTabs parentMtab;
  81.     somDToken              instanceDataToken;
  82. } SOMDLINK WPUrlCClassData;
  83.  
  84. /*
  85.  * -- Typedefs for WPUrl Method Procedures
  86.  */
  87. SOMEXTERN {
  88.  
  89. /*
  90.  * -- Typedefs for Reintroduced Wrapper Methods
  91.  */
  92. typedef M_WPUrl*   SOMLINK somTP_WPUrl_somGetClass(WPUrl *somSelf);
  93. typedef somTP_WPUrl_somGetClass *somTD_WPUrl_somGetClass;
  94. }
  95.  
  96. #endif /* WPUrl_API */
  97.  
  98.  
  99. /*
  100.  * -- This emitter treats Method Tokens as Thunks by default.
  101.  * -- Use the sc modifier "nothunks" to change this default
  102.  */
  103. #undef somresolve_
  104. #define somresolve_(obj,mToken) ((somMethodProc*)((void)obj, mToken))
  105.  
  106. /*
  107.  * -- The C++ Wrapper Class for WPUrl
  108.  */
  109. class WPUrl : public WPDataFile
  110. {
  111. public:
  112.  
  113. // WPUrl::new creates the class object if necessary, and then uses somNewNoInit
  114. // to allocate memory and create the object. Initialization is in ctors.
  115. void *operator new(size_t)
  116. {
  117.    if (!_WPUrl) WPUrlNewClass(WPUrl_MajorVersion,WPUrl_MinorVersion);
  118.    return (void*)
  119.       SOM_Resolve(_WPUrl,SOMClass,somNewNoInit)
  120.          ((SOMClass *)((void*)_WPUrl));
  121. }
  122.  
  123. // WPUrl::delete uses somDestruct.
  124. void operator delete(void * obj)
  125. {
  126.    if (obj && *(void**)obj) {
  127.       SOM_Resolve(obj,SOMObject,somDestruct)
  128.          ((SOMObject*)obj, 1, 0);
  129.    }
  130. }
  131.  
  132. WPUrl& operator=(WPUrl& fromObj)
  133. {
  134.    this->somDefaultAssign(0,(SOMObject*)((void*)&fromObj));
  135.    return *this;
  136. }
  137.  
  138. WPUrl()
  139. {
  140.    if (*(void**)this != 
  141.        ((somParentMtabStructPtr)
  142.         (WPUrlCClassData.parentMtab))->mtab)
  143.       return;
  144.    ((SOMObject*)((void*)this))->somDefaultInit(0);
  145. }
  146.  
  147. WPUrl(WPUrl* fromObj)
  148. {
  149.    if (*(void**)this != 
  150.        ((somParentMtabStructPtr)
  151.         (WPUrlCClassData.parentMtab))->mtab)
  152.       return;
  153.    ((SOMObject*)((void*)this))->somDefaultCopyInit(0,((SOMObject*)((void*)fromObj)));
  154. }
  155.  
  156. WPUrl(const WPUrl* fromObj)
  157. {
  158.    if (*(void**)this != 
  159.        ((somParentMtabStructPtr)
  160.         (WPUrlCClassData.parentMtab))->mtab)
  161.       return;
  162.    ((SOMObject*)((void*)this))->somDefaultConstCopyInit(0,((SOMObject*)((void*)fromObj)));
  163. }
  164.  
  165.  
  166. /*
  167.  * Reintroduce inherited methods
  168.  */
  169.  
  170. /* method: somGetClass */
  171. M_WPUrl*  somGetClass()
  172. {
  173. /*
  174.  *  Return the receiver's class.
  175.  */
  176.    return SOM_ResolveD(this,WPUrl,SOMObject,somGetClass)
  177.     (this);
  178. }
  179.  
  180.  
  181.  
  182. };   /* WPUrl */
  183.  
  184.  
  185.  
  186. #endif       /* SOM_WPUrl_xh */
  187.  
  188. #ifndef SOM_M_WPUrl_xh
  189. #define SOM_M_WPUrl_xh
  190.  
  191. class M_WPUrl;
  192.  
  193. #define M_WPUrl_MajorVersion 1
  194. #define M_WPUrl_MinorVersion 2
  195.  
  196. /* C++ SOM defs */
  197. #include <somcls.xh>
  198. #include <somcm.xh>
  199.  
  200. /* C++ parent defs */
  201. #ifndef SOM_M_WPDataFile_xh
  202. #include <wpdataf.xh>
  203. #endif
  204.  
  205. #ifndef M_WPUrl_API
  206. #define M_WPUrl_API
  207. /*
  208.  * -- The Class API
  209.  */
  210.  
  211. /*
  212.  * Start of bindings for IDL types
  213.  */
  214.  
  215.  
  216. /*
  217.  * End of bindings for IDL types.
  218.  */
  219.  
  220. /*
  221.  * -- M_WPUrl is a metaclass for WPUrl. Make sure WPUrl is known.
  222.  */
  223. class WPUrl;
  224.  
  225.  
  226. /* A procedure to create the M_WPUrl Class */
  227. SOMEXTERN SOMClass * SOMLINK M_WPUrlNewClass(
  228.         integer4 majorVersion,
  229.         integer4 minorVersion);
  230.  
  231. /* The API to the M_WPUrl class object, and the methods it introduces. */
  232. SOMEXTERN struct M_WPUrlClassDataStructure {
  233.     SOMClass *classObject;
  234. } SOMDLINK M_WPUrlClassData;
  235. #define _M_WPUrl M_WPUrlClassData.classObject
  236.  
  237. /* The API to parentMtabs for M_WPUrl, and the instance data it introduces. */
  238. SOMEXTERN struct M_WPUrlCClassDataStructure {
  239.     somMethodTabs parentMtab;
  240.     somDToken              instanceDataToken;
  241. } SOMDLINK M_WPUrlCClassData;
  242.  
  243. /*
  244.  * -- Typedefs for M_WPUrl Method Procedures
  245.  */
  246. SOMEXTERN {
  247.  
  248. /*
  249.  * -- Typedefs for Reintroduced Wrapper Methods
  250.  */
  251. typedef WPUrl*   SOMLINK somTP_M_WPUrl_somNew(M_WPUrl *somSelf);
  252. typedef somTP_M_WPUrl_somNew *somTD_M_WPUrl_somNew;
  253. }
  254.  
  255. #endif /* M_WPUrl_API */
  256.  
  257.  
  258. /*
  259.  * -- This emitter treats Method Tokens as Thunks by default.
  260.  * -- Use the sc modifier "nothunks" to change this default
  261.  */
  262. #undef somresolve_
  263. #define somresolve_(obj,mToken) ((somMethodProc*)((void)obj, mToken))
  264.  
  265. /*
  266.  * -- The C++ Wrapper Class for M_WPUrl
  267.  */
  268. class M_WPUrl : public M_WPDataFile
  269. {
  270. public:
  271.  
  272. // M_WPUrl::new creates the class object if necessary, and then uses somNewNoInit
  273. // to allocate memory and create the object. Initialization is in ctors.
  274. void *operator new(size_t)
  275. {
  276.    if (!_M_WPUrl) M_WPUrlNewClass(M_WPUrl_MajorVersion,M_WPUrl_MinorVersion);
  277.    return (void*)
  278.       SOM_Resolve(_M_WPUrl,SOMClass,somNewNoInit)
  279.          ((SOMClass *)((void*)_M_WPUrl));
  280. }
  281.  
  282. // M_WPUrl::delete uses somDestruct.
  283. void operator delete(void * obj)
  284. {
  285.    if (obj && *(void**)obj) {
  286.       SOM_Resolve(obj,SOMObject,somDestruct)
  287.          ((SOMObject*)obj, 1, 0);
  288.    }
  289. }
  290.  
  291. M_WPUrl& operator=(M_WPUrl& fromObj)
  292. {
  293.    this->somDefaultAssign(0,(SOMObject*)((void*)&fromObj));
  294.    return *this;
  295. }
  296.  
  297. M_WPUrl()
  298. {
  299.    if (*(void**)this != 
  300.        ((somParentMtabStructPtr)
  301.         (M_WPUrlCClassData.parentMtab))->mtab)
  302.       return;
  303.    ((SOMObject*)((void*)this))->somDefaultInit(0);
  304. }
  305.  
  306. M_WPUrl(M_WPUrl* fromObj)
  307. {
  308.    if (*(void**)this != 
  309.        ((somParentMtabStructPtr)
  310.         (M_WPUrlCClassData.parentMtab))->mtab)
  311.       return;
  312.    ((SOMObject*)((void*)this))->somDefaultCopyInit(0,((SOMObject*)((void*)fromObj)));
  313. }
  314.  
  315. M_WPUrl(const M_WPUrl* fromObj)
  316. {
  317.    if (*(void**)this != 
  318.        ((somParentMtabStructPtr)
  319.         (M_WPUrlCClassData.parentMtab))->mtab)
  320.       return;
  321.    ((SOMObject*)((void*)this))->somDefaultConstCopyInit(0,((SOMObject*)((void*)fromObj)));
  322. }
  323.  
  324.  
  325. /*
  326.  * Reintroduce inherited methods
  327.  */
  328.  
  329. /* method: somNew */
  330. WPUrl*  somNew()
  331. {
  332.    return SOM_ResolveD(this,M_WPUrl,SOMClass,somNew)
  333.     (this);
  334. }
  335.  
  336.  
  337.  
  338. };   /* M_WPUrl */
  339.  
  340.  
  341.  
  342. #endif       /* SOM_M_WPUrl_xh */
  343.