home *** CD-ROM | disk | FTP | other *** search
/ The Developer Connection…ice Driver Kit for OS/2 3 / DEV3-D1.ISO / devtools / toolkt21 / cplus / os2h / wpnetlnk.xh < prev    next >
Encoding:
Text File  |  1993-05-02  |  4.3 KB  |  201 lines

  1.  
  2. /*
  3.  * This file was generated by the SOM Compiler.
  4.  * FileName: wpnetlnk.xh.
  5.  * Generated using:
  6.  *     SOM Precompiler spc: 1.22
  7.  *     SOM Emitter emitxh: 1.11
  8.  */
  9.  
  10. /*
  11.  * 
  12.  *  Module Header
  13.  * 
  14.  *  Module Name: WPNETLNK
  15.  * 
  16.  *  OS/2 Presentation Manager Workplace class definitions
  17.  * 
  18.  *  Copyright (c) International Business Machines Corporation 1991, 1992
  19.  * 
  20.  */
  21.  
  22. #ifndef wpnetlnk_xh
  23. #define wpnetlnk_xh
  24. class WPNetLink;
  25.  
  26. #define WPNetLink_MajorVersion 1
  27. #define WPNetLink_MinorVersion 2
  28.  
  29. /* C++ som defs */
  30. #include <somcls.xh>
  31.  
  32. /* C++ parent def */
  33. #ifndef wpshadow_xh
  34. #include "wpshadow.xh"
  35. #endif
  36.  
  37. #ifndef WPNetLink_API
  38. #define WPNetLink_API
  39. /*
  40.  * The Class API
  41.  */
  42.  
  43. /* A procedure to create the WPNetLink Class */
  44. SOMEXTERN SOMClass * SOMLINK WPNetLinkNewClass(
  45.         integer4 majorVersion,
  46.         integer4 minorVersion);
  47.  
  48. /* A macro to return the WPNetLink class object */
  49. class M_WPNetLink;
  50. #define _WPNetLink ((M_WPNetLink*)WPNetLinkClassData.classObject)
  51.  
  52. /* The static interface to WPNetLink and its instances */
  53. SOMEXTERN struct WPNetLinkClassDataStructure {
  54.     SOMClass *classObject;
  55.     somMToken wpSetObjectNetId;
  56.     somMToken wpQueryObjectNetId;
  57. } WPNetLinkClassData;
  58.  
  59. /*
  60.  * -- Typedefs for Procedures that support WPNetLink Methods
  61.  */
  62. extern "C" {
  63. typedef BOOL    (SOMLINK *somTD_WPNetLink_wpSetObjectNetId)(WPNetLink *somSelf,PSZ pszNetIdentity);
  64. typedef PSZ    (SOMLINK *somTD_WPNetLink_wpQueryObjectNetId)(WPNetLink *somSelf);
  65. }
  66.  
  67.  
  68. #endif /* WPNetLink_API */
  69.  
  70.  
  71. /*
  72.  * -- The C++ Wrapper Class for WPNetLink
  73.  */
  74. class WPNetLink : public WPShadow
  75. {
  76. public:
  77.  
  78. void *operator new(size_t size)
  79. {
  80.    (void) size;
  81.    if (!WPNetLinkClassData.classObject) 
  82.       WPNetLinkNewClass(WPNetLink_MajorVersion,WPNetLink_MinorVersion);
  83.    return (void *)
  84.       ((somTD_SOMClass_somNew)
  85.       somResolve(SOM_TestCls((SOMAny *)(WPNetLinkClassData.classObject),
  86.                              SOMClassClassData.classObject),
  87.                  SOMClassClassData.somNew))
  88.          ((SOMClass*)(WPNetLinkClassData.classObject));
  89. }
  90.  
  91. void operator delete(void * obj)
  92. {
  93.    ((SOMObject *)obj)->somFree();
  94. }
  95.  
  96. /* public method: wpSetObjectNetId */
  97. BOOL    wpSetObjectNetId(PSZ pszNetIdentity)
  98. {
  99.    return (BOOL) SOM_Resolve((SOMAny *)this,WPNetLink,wpSetObjectNetId)
  100.     (this,pszNetIdentity);
  101. }
  102.  
  103.  
  104. /* public method: wpQueryObjectNetId */
  105. PSZ    wpQueryObjectNetId()
  106. {
  107.    return (PSZ) SOM_Resolve((SOMAny *)this,WPNetLink,wpQueryObjectNetId)
  108.     (this);
  109. }
  110.  
  111.  
  112.  
  113. };   /* WPNetLink */
  114.  
  115.  
  116.  
  117. #endif       /* wpnetlnk_xh */
  118.  
  119. /*
  120.  * This file was generated by the SOM Compiler.
  121.  * FileName: wpnetlnk.xh.
  122.  * Generated using:
  123.  *     SOM Precompiler spc: 1.22
  124.  *     SOM Emitter emitxh: 1.11
  125.  */
  126. #ifndef wpnetlnk_mxh
  127. #define wpnetlnk_mxh
  128. class M_WPNetLink;
  129.  
  130. #define M_WPNetLink_MajorVersion 1
  131. #define M_WPNetLink_MinorVersion 2
  132.  
  133. /* C++ som defs */
  134. #include <somcls.xh>
  135.  
  136. /* C++ parent def */
  137. #ifndef wpshadow_xh
  138. #include "wpshadow.xh"
  139. #endif
  140.  
  141. #ifndef M_WPNetLink_API
  142. #define M_WPNetLink_API
  143. /*
  144.  * The Class API
  145.  */
  146.  
  147. /* A procedure to create the M_WPNetLink Class */
  148. SOMEXTERN SOMClass * SOMLINK M_WPNetLinkNewClass(
  149.         integer4 majorVersion,
  150.         integer4 minorVersion);
  151.  
  152. /* A macro to return the M_WPNetLink class object */
  153. #define _M_WPNetLink ((SOMClass*)M_WPNetLinkClassData.classObject)
  154.  
  155. /* The static interface to M_WPNetLink and its instances */
  156. SOMEXTERN struct M_WPNetLinkClassDataStructure {
  157.     SOMClass *classObject;
  158. } M_WPNetLinkClassData;
  159.  
  160. /*
  161.  * -- Typedefs for Procedures that support M_WPNetLink Methods
  162.  */
  163. extern "C" {
  164. }
  165.  
  166.  
  167. #endif /* M_WPNetLink_API */
  168.  
  169.  
  170. /*
  171.  * -- The C++ Wrapper Class for M_WPNetLink
  172.  */
  173. class M_WPNetLink : public M_WPShadow
  174. {
  175. public:
  176.  
  177. void *operator new(size_t size)
  178. {
  179.    (void) size;
  180.    if (!M_WPNetLinkClassData.classObject) 
  181.       M_WPNetLinkNewClass(M_WPNetLink_MajorVersion,M_WPNetLink_MinorVersion);
  182.    return (void *)
  183.       ((somTD_SOMClass_somNew)
  184.       somResolve(SOM_TestCls((SOMAny *)(M_WPNetLinkClassData.classObject),
  185.                              SOMClassClassData.classObject),
  186.                  SOMClassClassData.somNew))
  187.          ((SOMClass*)(M_WPNetLinkClassData.classObject));
  188. }
  189.  
  190. void operator delete(void * obj)
  191. {
  192.    ((SOMObject *)obj)->somFree();
  193. }
  194.  
  195.  
  196. };   /* M_WPNetLink */
  197.  
  198.  
  199.  
  200. #endif       /* wpnetlnk_mxh */
  201.