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

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