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

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