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

  1.  
  2. /*
  3.  * This file was generated by the SOM Compiler.
  4.  * FileName: E:\cwpsh\rel\os2c\include\base\os2\wphost.xh.
  5.  * Generated using:
  6.  *     SOM Precompiler somipc: 2.29.1.14
  7.  *     SOM Emitter emitxh: 2.43
  8.  */
  9.  
  10. /*
  11.  *    Module Name: WPHOST
  12.  * 
  13.  *    OS/2 Work Place Shell - Remote FTP Host object
  14.  * 
  15.  *    Copyright (C) 1996 IBM Corporation
  16.  * 
  17.  */
  18.  
  19.  
  20. #ifndef SOM_WPHost_xh
  21. #define SOM_WPHost_xh
  22.  
  23. class WPHost;
  24.  
  25. #define WPHost_MajorVersion 1
  26. #define WPHost_MinorVersion 2
  27.  
  28. /* C++ SOM defs */
  29. #include <somcls.xh>
  30. #include <somcm.xh>
  31.  
  32. /* C++ parent defs */
  33. #ifndef SOM_WPFolder_xh
  34. #include <wpfolder.xh>
  35. #endif
  36.  
  37. #ifndef WPHost_API
  38. #define WPHost_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_WPFolder;
  55. class M_WPTransient;
  56. class M_WPFtpObj;
  57. class M_WPHost;
  58.  
  59. /*
  60.  * End of bindings for IDL types.
  61.  */
  62.  
  63. /* A procedure to create the WPHost Class */
  64. class M_WPHost;
  65. SOMEXTERN M_WPHost * SOMLINK WPHostNewClass(
  66.         integer4 majorVersion,
  67.         integer4 minorVersion);
  68.  
  69. /* The API to the WPHost class object, and the methods it introduces. */
  70. SOMEXTERN struct WPHostClassDataStructure {
  71.     M_WPHost *classObject;
  72.     somMToken WPHostPrivate1;
  73.     somMToken WPHostPrivate2;
  74.     somMToken WPHostPrivate3;
  75.     somMToken WPHostPrivate4;
  76.     somMToken WPHostPrivate5;
  77.     somMToken WPHostPrivate6;
  78.     somMToken WPHostPrivate7;
  79.     somMToken WPHostPrivate8;
  80.     somMToken WPHostPrivate9;
  81.     somMToken WPHostPrivate10;
  82.     somMToken WPHostPrivate11;
  83.     somMToken WPHostPrivate12;
  84.     somMToken WPHostPrivate13;
  85.     somMToken WPHostPrivate14;
  86.     somMToken WPHostPrivate15;
  87.     somMToken WPHostPrivate16;
  88.     somMToken WPHostPrivate17;
  89.     somMToken WPHostPrivate18;
  90.     somMToken WPHostPrivate19;
  91.     somMToken WPHostPrivate20;
  92.     somMToken WPHostPrivate21;
  93.     somMToken WPHostPrivate22;
  94.     somMToken WPHostPrivate23;
  95.     somMToken WPHostPrivate24;
  96.     somMToken WPHostPrivate25;
  97.     somMToken WPHostPrivate26;
  98.     somMToken WPHostPrivate27;
  99.     somMToken WPHostPrivate28;
  100.     somMToken WPHostPrivate29;
  101.     somMToken WPHostPrivate30;
  102.     somMToken WPHostPrivate31;
  103.     somMToken WPHostPrivate32;
  104.     somMToken WPHostPrivate33;
  105.     somMToken WPHostPrivate34;
  106.     somMToken WPHostPrivate35;
  107.     somMToken WPHostPrivate36;
  108.     somMToken WPHostPrivate37;
  109.     somMToken WPHostPrivate38;
  110.     somMToken WPHostPrivate39;
  111. } SOMDLINK WPHostClassData;
  112. #define _WPHost WPHostClassData.classObject
  113.  
  114. /* The API to parentMtabs for WPHost, and the instance data it introduces. */
  115. SOMEXTERN struct WPHostCClassDataStructure {
  116.     somMethodTabs parentMtab;
  117.     somDToken              instanceDataToken;
  118. } SOMDLINK WPHostCClassData;
  119.  
  120. /*
  121.  * -- Typedefs for WPHost Method Procedures
  122.  */
  123. SOMEXTERN {
  124.  
  125. /*
  126.  * -- Typedefs for Reintroduced Wrapper Methods
  127.  */
  128. typedef M_WPHost*   SOMLINK somTP_WPHost_somGetClass(WPHost *somSelf);
  129. typedef somTP_WPHost_somGetClass *somTD_WPHost_somGetClass;
  130. }
  131.  
  132. #endif /* WPHost_API */
  133.  
  134.  
  135. /*
  136.  * -- This emitter treats Method Tokens as Thunks by default.
  137.  * -- Use the sc modifier "nothunks" to change this default
  138.  */
  139. #undef somresolve_
  140. #define somresolve_(obj,mToken) ((somMethodProc*)((void)obj, mToken))
  141.  
  142. /*
  143.  * -- The C++ Wrapper Class for WPHost
  144.  */
  145. class WPHost : public WPFolder
  146. {
  147. public:
  148.  
  149. // WPHost::new creates the class object if necessary, and then uses somNewNoInit
  150. // to allocate memory and create the object. Initialization is in ctors.
  151. void *operator new(size_t)
  152. {
  153.    if (!_WPHost) WPHostNewClass(WPHost_MajorVersion,WPHost_MinorVersion);
  154.    return (void*)
  155.       SOM_Resolve(_WPHost,SOMClass,somNewNoInit)
  156.          ((SOMClass *)((void*)_WPHost));
  157. }
  158.  
  159. // WPHost::delete uses somDestruct.
  160. void operator delete(void * obj)
  161. {
  162.    if (obj && *(void**)obj) {
  163.       SOM_Resolve(obj,SOMObject,somDestruct)
  164.          ((SOMObject*)obj, 1, 0);
  165.    }
  166. }
  167.  
  168. WPHost& operator=(WPHost& fromObj)
  169. {
  170.    this->somDefaultAssign(0,(SOMObject*)((void*)&fromObj));
  171.    return *this;
  172. }
  173.  
  174. WPHost()
  175. {
  176.    if (*(void**)this != 
  177.        ((somParentMtabStructPtr)
  178.         (WPHostCClassData.parentMtab))->mtab)
  179.       return;
  180.    ((SOMObject*)((void*)this))->somDefaultInit(0);
  181. }
  182.  
  183. WPHost(WPHost* fromObj)
  184. {
  185.    if (*(void**)this != 
  186.        ((somParentMtabStructPtr)
  187.         (WPHostCClassData.parentMtab))->mtab)
  188.       return;
  189.    ((SOMObject*)((void*)this))->somDefaultCopyInit(0,((SOMObject*)((void*)fromObj)));
  190. }
  191.  
  192. WPHost(const WPHost* fromObj)
  193. {
  194.    if (*(void**)this != 
  195.        ((somParentMtabStructPtr)
  196.         (WPHostCClassData.parentMtab))->mtab)
  197.       return;
  198.    ((SOMObject*)((void*)this))->somDefaultConstCopyInit(0,((SOMObject*)((void*)fromObj)));
  199. }
  200.  
  201.  
  202. /*
  203.  * Reintroduce inherited methods
  204.  */
  205.  
  206. /* method: somGetClass */
  207. M_WPHost*  somGetClass()
  208. {
  209. /*
  210.  *  Return the receiver's class.
  211.  */
  212.    return SOM_ResolveD(this,WPHost,SOMObject,somGetClass)
  213.     (this);
  214. }
  215.  
  216.  
  217.  
  218. };   /* WPHost */
  219.  
  220.  
  221.  
  222. #endif       /* SOM_WPHost_xh */
  223.  
  224. #ifndef SOM_M_WPHost_xh
  225. #define SOM_M_WPHost_xh
  226.  
  227. class M_WPHost;
  228.  
  229. #define M_WPHost_MajorVersion 1
  230. #define M_WPHost_MinorVersion 2
  231.  
  232. /* C++ SOM defs */
  233. #include <somcls.xh>
  234. #include <somcm.xh>
  235.  
  236. /* C++ parent defs */
  237. #ifndef SOM_M_WPFolder_xh
  238. #include <wpfolder.xh>
  239. #endif
  240.  
  241. #ifndef M_WPHost_API
  242. #define M_WPHost_API
  243. /*
  244.  * -- The Class API
  245.  */
  246.  
  247. /*
  248.  * Start of bindings for IDL types
  249.  */
  250.  
  251.  
  252. /*
  253.  * End of bindings for IDL types.
  254.  */
  255.  
  256. /*
  257.  * -- M_WPHost is a metaclass for WPHost. Make sure WPHost is known.
  258.  */
  259. class WPHost;
  260.  
  261.  
  262. /* A procedure to create the M_WPHost Class */
  263. SOMEXTERN SOMClass * SOMLINK M_WPHostNewClass(
  264.         integer4 majorVersion,
  265.         integer4 minorVersion);
  266.  
  267. /* The API to the M_WPHost class object, and the methods it introduces. */
  268. SOMEXTERN struct M_WPHostClassDataStructure {
  269.     SOMClass *classObject;
  270. } SOMDLINK M_WPHostClassData;
  271. #define _M_WPHost M_WPHostClassData.classObject
  272.  
  273. /* The API to parentMtabs for M_WPHost, and the instance data it introduces. */
  274. SOMEXTERN struct M_WPHostCClassDataStructure {
  275.     somMethodTabs parentMtab;
  276.     somDToken              instanceDataToken;
  277. } SOMDLINK M_WPHostCClassData;
  278.  
  279. /*
  280.  * -- Typedefs for M_WPHost Method Procedures
  281.  */
  282. SOMEXTERN {
  283.  
  284. /*
  285.  * -- Typedefs for Reintroduced Wrapper Methods
  286.  */
  287. typedef WPHost*   SOMLINK somTP_M_WPHost_somNew(M_WPHost *somSelf);
  288. typedef somTP_M_WPHost_somNew *somTD_M_WPHost_somNew;
  289. }
  290.  
  291. #endif /* M_WPHost_API */
  292.  
  293.  
  294. /*
  295.  * -- This emitter treats Method Tokens as Thunks by default.
  296.  * -- Use the sc modifier "nothunks" to change this default
  297.  */
  298. #undef somresolve_
  299. #define somresolve_(obj,mToken) ((somMethodProc*)((void)obj, mToken))
  300.  
  301. /*
  302.  * -- The C++ Wrapper Class for M_WPHost
  303.  */
  304. class M_WPHost : public M_WPFolder
  305. {
  306. public:
  307.  
  308. // M_WPHost::new creates the class object if necessary, and then uses somNewNoInit
  309. // to allocate memory and create the object. Initialization is in ctors.
  310. void *operator new(size_t)
  311. {
  312.    if (!_M_WPHost) M_WPHostNewClass(M_WPHost_MajorVersion,M_WPHost_MinorVersion);
  313.    return (void*)
  314.       SOM_Resolve(_M_WPHost,SOMClass,somNewNoInit)
  315.          ((SOMClass *)((void*)_M_WPHost));
  316. }
  317.  
  318. // M_WPHost::delete uses somDestruct.
  319. void operator delete(void * obj)
  320. {
  321.    if (obj && *(void**)obj) {
  322.       SOM_Resolve(obj,SOMObject,somDestruct)
  323.          ((SOMObject*)obj, 1, 0);
  324.    }
  325. }
  326.  
  327. M_WPHost& operator=(M_WPHost& fromObj)
  328. {
  329.    this->somDefaultAssign(0,(SOMObject*)((void*)&fromObj));
  330.    return *this;
  331. }
  332.  
  333. M_WPHost()
  334. {
  335.    if (*(void**)this != 
  336.        ((somParentMtabStructPtr)
  337.         (M_WPHostCClassData.parentMtab))->mtab)
  338.       return;
  339.    ((SOMObject*)((void*)this))->somDefaultInit(0);
  340. }
  341.  
  342. M_WPHost(M_WPHost* fromObj)
  343. {
  344.    if (*(void**)this != 
  345.        ((somParentMtabStructPtr)
  346.         (M_WPHostCClassData.parentMtab))->mtab)
  347.       return;
  348.    ((SOMObject*)((void*)this))->somDefaultCopyInit(0,((SOMObject*)((void*)fromObj)));
  349. }
  350.  
  351. M_WPHost(const M_WPHost* fromObj)
  352. {
  353.    if (*(void**)this != 
  354.        ((somParentMtabStructPtr)
  355.         (M_WPHostCClassData.parentMtab))->mtab)
  356.       return;
  357.    ((SOMObject*)((void*)this))->somDefaultConstCopyInit(0,((SOMObject*)((void*)fromObj)));
  358. }
  359.  
  360.  
  361. /*
  362.  * Reintroduce inherited methods
  363.  */
  364.  
  365. /* method: somNew */
  366. WPHost*  somNew()
  367. {
  368.    return SOM_ResolveD(this,M_WPHost,SOMClass,somNew)
  369.     (this);
  370. }
  371.  
  372.  
  373.  
  374. };   /* M_WPHost */
  375.  
  376.  
  377.  
  378. #endif       /* SOM_M_WPHost_xh */
  379.