home *** CD-ROM | disk | FTP | other *** search
/ OS/2 Shareware BBS: 10 Tools / 10-Tools.zip / wpentk.zip / WBPENTK4.DSK / IDFCOMM.IH < prev    next >
Text File  |  1994-10-07  |  10KB  |  343 lines

  1.  
  2. /*
  3.  * This file was generated by the SOM Compiler.
  4.  * FileName: ..\..\pentkt\h\idfcomm.ih.
  5.  * Generated using:
  6.  *     SOM Precompiler somipc: 2.7
  7.  *     SOM Emitter emitih: 2.22
  8.  */
  9.  
  10. #ifndef SOM_IDFCommon_ih
  11. #define SOM_IDFCommon_ih
  12.  
  13. #pragma checkout(suspend)
  14.  
  15. #include <idfcomm.h>
  16.  
  17. /*
  18.  * Set the scope of methods functions
  19.  */
  20. #ifndef SOM_Scope
  21. #ifdef __cplusplus
  22.   #define SOM_Scope extern "C"
  23. #else
  24.   #define SOM_Scope extern
  25. #endif  /* __cplusplus */
  26. #endif  /* SOM_Scope */
  27.  
  28. #ifndef SOM_CurrentClass
  29.     #define SOM_CurrentClass IDFCommonCClassData.parentMtab
  30. #endif  /* SOM_CurrentClass */
  31.  
  32. #define IDFCommon_MaxNoMethods 4
  33.  
  34. /*
  35.  * Instance data
  36.  */
  37. typedef struct {
  38.     ULONG User1;
  39.     ULONG User2;
  40. } IDFCommonData;
  41.  
  42. /*
  43.  * Getdata macro
  44.  */
  45. #define IDFCommonGetData(somSelf) \
  46.     ((IDFCommonData *) \
  47.         SOM_DataResolve(somSelf, IDFCommonCClassData.instanceDataToken))
  48.  
  49. /*
  50.  * Instance variable access macros
  51.  */
  52. #define _User1 (somThis->User1)
  53. #define _User2 (somThis->User2)
  54.  
  55. /*
  56.  * Begin stuff that only goes in the primary file
  57.  */
  58. #if (defined(IDFCommon_Class_Source) || defined(SOM_Module_idfcomm_Source))
  59.  
  60. /*
  61.  * Trace/Debug macro
  62.  */
  63. #ifndef IDFCommonMethodDebug
  64.    #define IDFCommonMethodDebug(c,m) SOMMethodDebug(c,m)
  65. #endif  /* IDFCommonMethodDebug */
  66.  
  67. /*
  68.  * Current class macros for Instance and Meta classes.
  69.  */
  70. #undef SOMMeta
  71. #define SOMMeta M_IDFCommonCClassData.parentMtab
  72. #undef SOMInstance
  73. #define SOMInstance IDFCommonCClassData.parentMtab
  74.  
  75. #ifndef M_IDFCommon_Class_Source
  76.    #define M_IDFCommon_Class_Source
  77. #endif    /* M_IDFCommon_Class_Source */
  78.  
  79. /*
  80.  * Generate the Apply Stubs.
  81.  */
  82. #pragma linkage(somAP_IDFCommonidfSetUser1, system)
  83. static void SOMLINK somAP_IDFCommonidfSetUser1(IDFCommon *somSelf,
  84.         void *__retVal,
  85.         somMethodProc *__methodPtr,
  86.         va_list __ap)
  87. {
  88.     void *__somSelf = va_arg(__ap, void*);
  89.     Environment *ev = va_arg(__ap, Environment*);
  90.     ULONG user1 = va_arg(__ap, ULONG);
  91.     SOM_IgnoreWarning(__retVal);
  92.  
  93.     ((somTD_IDFCommon_idfSetUser1) __methodPtr) (somSelf, ev, user1);
  94. }
  95.  
  96. #pragma linkage(somAP_IDFCommonidfGetUser1, system)
  97. static void SOMLINK somAP_IDFCommonidfGetUser1(IDFCommon *somSelf,
  98.         ULONG *__retVal,
  99.         somMethodProc *__methodPtr,
  100.         va_list __ap)
  101. {
  102.     void *__somSelf = va_arg(__ap, void*);
  103.     Environment *ev = va_arg(__ap, Environment*);
  104.     SOM_IgnoreWarning(__ap);
  105.  
  106.     *__retVal = ((somTD_IDFCommon_idfGetUser1) __methodPtr) (somSelf, ev);
  107. }
  108.  
  109. #pragma linkage(somAP_IDFCommonidfSetUser2, system)
  110. static void SOMLINK somAP_IDFCommonidfSetUser2(IDFCommon *somSelf,
  111.         void *__retVal,
  112.         somMethodProc *__methodPtr,
  113.         va_list __ap)
  114. {
  115.     void *__somSelf = va_arg(__ap, void*);
  116.     Environment *ev = va_arg(__ap, Environment*);
  117.     ULONG user2 = va_arg(__ap, ULONG);
  118.     SOM_IgnoreWarning(__retVal);
  119.  
  120.     ((somTD_IDFCommon_idfSetUser2) __methodPtr) (somSelf, ev, user2);
  121. }
  122.  
  123. #pragma linkage(somAP_IDFCommonidfGetUser2, system)
  124. static void SOMLINK somAP_IDFCommonidfGetUser2(IDFCommon *somSelf,
  125.         ULONG *__retVal,
  126.         somMethodProc *__methodPtr,
  127.         va_list __ap)
  128. {
  129.     void *__somSelf = va_arg(__ap, void*);
  130.     Environment *ev = va_arg(__ap, Environment*);
  131.     SOM_IgnoreWarning(__ap);
  132.  
  133.     *__retVal = ((somTD_IDFCommon_idfGetUser2) __methodPtr) (somSelf, ev);
  134. }
  135.  
  136.  
  137. /*
  138.  * Initialize the class data structure
  139.  */
  140. struct IDFCommonClassDataStructure IDFCommonClassData = {(SOMAny *) NULL};
  141.  
  142. /*
  143.  * Define the C class data structure
  144.  */
  145. struct IDFCommonCClassDataStructure IDFCommonCClassData = {(somMethodTabs) NULL};
  146.  
  147. /*
  148.  * New Method: idfSetUser1
  149.  */
  150. #pragma linkage(IDFCommonidfSetUser1, system)
  151. SOM_Scope void  SOMLINK IDFCommonidfSetUser1(IDFCommon *somSelf, Environment *ev,
  152.         ULONG user1);
  153. #ifndef somMN_idfSetUser1_defined
  154. #define somMN_idfSetUser1_defined
  155. static char *somMN_idfSetUser1 = "idfSetUser1";
  156. static somId somId_idfSetUser1 = &somMN_idfSetUser1;
  157. #endif  /* somMN_idfSetUser1_defined */
  158. #ifndef somDS_idfSetUser1_defined
  159. #define somDS_idfSetUser1_defined
  160. static char *somDS_idfSetUser1 = somMD_IDFCommon_idfSetUser1;
  161. static somId somDI_idfSetUser1 = &somDS_idfSetUser1;
  162. #endif  /* somDS_idfSetUser1_defined */
  163. #pragma linkage(somRD_IDFCommonidfSetUser1, system)
  164. static void  SOMLINK somRD_IDFCommonidfSetUser1(IDFCommon *somSelf, Environment *ev,
  165.         ULONG user1)
  166. {
  167.     void* __retVal;
  168.  
  169.     va_somDispatch(somSelf, (void **)&__retVal, somId_idfSetUser1, somSelf , ev
  170.         ,user1);
  171. }
  172.  
  173. /*
  174.  * New Method: idfGetUser1
  175.  */
  176. #pragma linkage(IDFCommonidfGetUser1, system)
  177. SOM_Scope ULONG  SOMLINK IDFCommonidfGetUser1(IDFCommon *somSelf, Environment *ev);
  178. #ifndef somMN_idfGetUser1_defined
  179. #define somMN_idfGetUser1_defined
  180. static char *somMN_idfGetUser1 = "idfGetUser1";
  181. static somId somId_idfGetUser1 = &somMN_idfGetUser1;
  182. #endif  /* somMN_idfGetUser1_defined */
  183. #ifndef somDS_idfGetUser1_defined
  184. #define somDS_idfGetUser1_defined
  185. static char *somDS_idfGetUser1 = somMD_IDFCommon_idfGetUser1;
  186. static somId somDI_idfGetUser1 = &somDS_idfGetUser1;
  187. #endif  /* somDS_idfGetUser1_defined */
  188. #pragma linkage(somRD_IDFCommonidfGetUser1, system)
  189. static ULONG  SOMLINK somRD_IDFCommonidfGetUser1(IDFCommon *somSelf, Environment *ev)
  190. {
  191.     ULONG __retVal;
  192.  
  193.     va_somDispatch(somSelf, (void **)&__retVal, somId_idfGetUser1, somSelf , ev
  194.         );
  195.     return __retVal;
  196. }
  197.  
  198. /*
  199.  * New Method: idfSetUser2
  200.  */
  201. #pragma linkage(IDFCommonidfSetUser2, system)
  202. SOM_Scope void  SOMLINK IDFCommonidfSetUser2(IDFCommon *somSelf, Environment *ev,
  203.         ULONG user2);
  204. #ifndef somMN_idfSetUser2_defined
  205. #define somMN_idfSetUser2_defined
  206. static char *somMN_idfSetUser2 = "idfSetUser2";
  207. static somId somId_idfSetUser2 = &somMN_idfSetUser2;
  208. #endif  /* somMN_idfSetUser2_defined */
  209. #ifndef somDS_idfSetUser2_defined
  210. #define somDS_idfSetUser2_defined
  211. static char *somDS_idfSetUser2 = somMD_IDFCommon_idfSetUser2;
  212. static somId somDI_idfSetUser2 = &somDS_idfSetUser2;
  213. #endif  /* somDS_idfSetUser2_defined */
  214. #pragma linkage(somRD_IDFCommonidfSetUser2, system)
  215. static void  SOMLINK somRD_IDFCommonidfSetUser2(IDFCommon *somSelf, Environment *ev,
  216.         ULONG user2)
  217. {
  218.     void* __retVal;
  219.  
  220.     va_somDispatch(somSelf, (void **)&__retVal, somId_idfSetUser2, somSelf , ev
  221.         ,user2);
  222. }
  223.  
  224. /*
  225.  * New Method: idfGetUser2
  226.  */
  227. #pragma linkage(IDFCommonidfGetUser2, system)
  228. SOM_Scope ULONG  SOMLINK IDFCommonidfGetUser2(IDFCommon *somSelf, Environment *ev);
  229. #ifndef somMN_idfGetUser2_defined
  230. #define somMN_idfGetUser2_defined
  231. static char *somMN_idfGetUser2 = "idfGetUser2";
  232. static somId somId_idfGetUser2 = &somMN_idfGetUser2;
  233. #endif  /* somMN_idfGetUser2_defined */
  234. #ifndef somDS_idfGetUser2_defined
  235. #define somDS_idfGetUser2_defined
  236. static char *somDS_idfGetUser2 = somMD_IDFCommon_idfGetUser2;
  237. static somId somDI_idfGetUser2 = &somDS_idfGetUser2;
  238. #endif  /* somDS_idfGetUser2_defined */
  239. #pragma linkage(somRD_IDFCommonidfGetUser2, system)
  240. static ULONG  SOMLINK somRD_IDFCommonidfGetUser2(IDFCommon *somSelf, Environment *ev)
  241. {
  242.     ULONG __retVal;
  243.  
  244.     va_somDispatch(somSelf, (void **)&__retVal, somId_idfGetUser2, somSelf , ev
  245.         );
  246.     return __retVal;
  247. }
  248.  
  249. /*
  250.  * Routines and Structures to create the class object
  251.  */
  252.  
  253. /*
  254.  * Declare the Static Methods table.
  255.  */
  256. static somStaticMethod_t IDFCommonSM[] = {
  257.     {    &IDFCommonClassData.idfSetUser1,
  258.          &somId_idfSetUser1,
  259.          &somDI_idfSetUser1,
  260.          (somMethodProc *) IDFCommonidfSetUser1,
  261.          (somMethodProc *) somRD_IDFCommonidfSetUser1,
  262.          (somMethodProc *) somAP_IDFCommonidfSetUser1    },
  263.     {    &IDFCommonClassData.idfGetUser1,
  264.          &somId_idfGetUser1,
  265.          &somDI_idfGetUser1,
  266.          (somMethodProc *) IDFCommonidfGetUser1,
  267.          (somMethodProc *) somRD_IDFCommonidfGetUser1,
  268.          (somMethodProc *) somAP_IDFCommonidfGetUser1    },
  269.     {    &IDFCommonClassData.idfSetUser2,
  270.          &somId_idfSetUser2,
  271.          &somDI_idfSetUser2,
  272.          (somMethodProc *) IDFCommonidfSetUser2,
  273.          (somMethodProc *) somRD_IDFCommonidfSetUser2,
  274.          (somMethodProc *) somAP_IDFCommonidfSetUser2    },
  275.     {    &IDFCommonClassData.idfGetUser2,
  276.          &somId_idfGetUser2,
  277.          &somDI_idfGetUser2,
  278.          (somMethodProc *) IDFCommonidfGetUser2,
  279.          (somMethodProc *) somRD_IDFCommonidfGetUser2,
  280.          (somMethodProc *) somAP_IDFCommonidfGetUser2    },
  281. };
  282.  
  283.  
  284. /*
  285.  *  Initializers for class Ids
  286.  */
  287. static char * somCN_IDFCommon = "IDFCommon";
  288. static char * somPCN_IDFCommon_SOMObject = "SOMObject";
  289.  
  290. static somId somPCIDFCommon[] = {
  291.     &somPCN_IDFCommon_SOMObject,
  292. };
  293.  
  294. static somStaticClassInfo IDFCommonSCI = {
  295.     3, 4, 0, 0, 0, 0,
  296.     IDFCommon_MajorVersion, IDFCommon_MinorVersion,
  297.     sizeof(IDFCommonData), IDFCommon_MaxNoMethods, 1,
  298.     &somCN_IDFCommon,
  299.     (somId) NULL, 1,
  300.     somPCIDFCommon,
  301.     (somClassDataStructure *) &IDFCommonClassData,
  302.     (somCClassDataStructure *) &IDFCommonCClassData,
  303.     IDFCommonSM, (somOverrideMethod_t *) NULL,
  304.     (char *) NULL,
  305.     (somNonInternalData_t *) NULL,  (somProcMethods_t *) NULL,
  306.     (somVarargsFuncs_t *) NULL,
  307.     (somTP_somClassInitFunc *) NULL,
  308.     0,
  309.     0,  /* old style class, zero directinitclasses */
  310.     0, /* no directinitclasses */
  311.     0, /* number of methods */
  312.     0, /* methods of the class */
  313.     0, /* dataOffset1 */
  314.     0, /* dataOffset2 */
  315.     0, /* number of SelectInheritedMethods */
  316.     0, /* SelectInheritedMethods */
  317.     0, /* number of releaseorder entries */
  318.     0, /* ReleaseOrder */
  319.     0, /* number of migrated methods */
  320.     0, /* migrated method implementations */
  321.     0, /* number of initializers */
  322.     0, /* initializers */
  323.     0, /* used to identify a DTS class */
  324.     0, /* used to register dynamically computed info */
  325. };
  326.  
  327.  
  328. IDFCommon * SOMLINK IDFCommonNewClass (integer4 somtmajorVersion,
  329.         integer4 somtminorVersion)
  330. {
  331.     SOMObjectNewClass(SOMObject_MajorVersion,SOMObject_MinorVersion);    /* static reference */
  332.     return (somBuildClass(1,&IDFCommonSCI, somtmajorVersion, somtminorVersion));
  333. }
  334.  
  335. /*
  336.  * Functions for attributes.
  337.  */
  338.  
  339. #endif                   /* IDFCommon_Class_Source */
  340. #pragma checkout(resume)
  341.  
  342. #endif       /* SOM_IDFCommon_ih */
  343.