home *** CD-ROM | disk | FTP | other *** search
/ OS/2 Shareware BBS: 10 Tools / 10-Tools.zip / sompar.zip / SOM / PART.IH < prev    next >
Text File  |  1994-01-06  |  10KB  |  379 lines

  1.  
  2. /*
  3.  * This file was generated by the SOM Compiler.
  4.  * FileName: part.ih.
  5.  * Generated using:
  6.  *     SOM Precompiler somipc: 2.2
  7.  *     SOM Emitter emitih: 2.7
  8.  */
  9.  
  10. /*
  11.  * 
  12.  *  Project: Digitalk Parts like Toolbar and SOMObjects Containers Demo
  13.  *  File:    part.idl
  14.  *  Author:  Stewart Hyde
  15.  *  Created: Dec   18, 1993
  16.  *  Updated: Dec   18, 1993
  17.  * 
  18.  *  Description:
  19.  * 
  20.  */
  21.  
  22.  
  23. /*
  24.  * The SOM_STRICT_IDL macro means that we can ignore stars
  25.  * in our declarations of objects.
  26.  */
  27. #define SOM_STRICT_IDL 1
  28.  
  29.  
  30. #ifndef SOM_Part_ih
  31. #define SOM_Part_ih
  32.  
  33. #pragma checkout(suspend)
  34.  
  35. #include <part.h>
  36.  
  37. /*
  38.  * Set the scope of methods functions
  39.  */
  40. #ifndef SOM_Scope
  41. #define SOM_Scope static
  42. #endif  /* SOM_Scope */
  43.  
  44. #ifndef SOM_CurrentClass
  45.     #define SOM_CurrentClass PartCClassData.parentMtab
  46. #endif  /* SOM_CurrentClass */
  47.  
  48. #define Part_MaxNoMethods 5
  49.  
  50. /*
  51.  * Instance data
  52.  */
  53. typedef struct {
  54.     boolean DebugState;
  55.     long stackCount;
  56.     long stackSet[100];
  57.     long stackAction[100];
  58.     long stackActionCount[100];
  59. } PartData;
  60.  
  61. /*
  62.  * Getdata macro
  63.  */
  64. #define PartGetData(somSelf) \
  65.     ((PartData *) \
  66.         SOM_DataResolve(somSelf, PartCClassData.instanceDataToken))
  67.  
  68. /*
  69.  * Instance variable access macros
  70.  */
  71. #define _DebugState (somThis->DebugState)
  72. #define _stackCount (somThis->stackCount)
  73. #define _stackSet (somThis->stackSet)
  74. #define _stackAction (somThis->stackAction)
  75. #define _stackActionCount (somThis->stackActionCount)
  76.  
  77. /*
  78.  * Begin stuff that only goes in the primary file
  79.  */
  80. #if (defined(Part_Class_Source) || defined(SOM_Module_part_Source))
  81.  
  82. /*
  83.  * Trace/Debug macro
  84.  */
  85. #ifndef PartMethodDebug
  86.    #define PartMethodDebug(c,m) SOMMethodDebug(c,m)
  87. #endif  /* PartMethodDebug */
  88.  
  89. /*
  90.  * Current class macros for Instance and Meta classes.
  91.  */
  92. #undef SOMMeta
  93. #define SOMMeta M_PartCClassData.parentMtab
  94. #undef SOMInstance
  95. #define SOMInstance PartCClassData.parentMtab
  96.  
  97. #ifndef M_Part_Class_Source
  98.    #define M_Part_Class_Source
  99. #endif    /* M_Part_Class_Source */
  100.  
  101. /*
  102.  * Overridden method: somInit
  103.  */
  104. #pragma linkage(somInit, system)
  105. SOM_Scope void  SOMLINK somInit(Part somSelf);
  106. #ifndef somMN_somInit_defined
  107. #define somMN_somInit_defined
  108.    static char *somMN_somInit = "somInit";
  109.    static somId somId_somInit = &somMN_somInit;
  110. #endif  /* somMN_somInit_defined */
  111. #define Part_parent_SOMObject_somInit(somSelf) \
  112.     ((SOM_ParentNumResolve(SOMObject, 1, PartCClassData.parentMtab, somInit)) \
  113.      (somSelf))
  114. #ifndef SOMGD_pmc_SOMObject_somInit
  115.   #ifdef parent_SOMObject_somInit
  116.      #undef parent_SOMObject_somInit
  117.      #define SOMGD_pmc_SOMObject_somInit 1
  118.   #else
  119.      #define parent_SOMObject_somInit Part_parent_SOMObject_somInit
  120.   #endif /* parent_SOMObject_somInit */
  121. #endif /* SOMGD_pmc_SOMObject_somInit */
  122. #ifndef parent_somInit
  123.    #define parent_somInit(somSelf) \
  124.     ((SOM_ParentNumResolve(SOMObject, 1, SOM_CurrentClass, somInit)) \
  125.      (somSelf))
  126. #endif  /* parent_somInit */
  127. #define Part_parents_somInit(arg0) \
  128.   (void) Part_parent_SOMObject_somInit(arg0);
  129.  
  130. /*
  131.  * Initialize the class data structure
  132.  */
  133. struct PartClassDataStructure PartClassData = {(SOMAny *) NULL};
  134.  
  135. /*
  136.  * Define the C class data structure
  137.  */
  138. struct PartCClassDataStructure PartCClassData = {(somMethodTabs) NULL};
  139.  
  140. /*
  141.  * New Method: Search
  142.  */
  143. #pragma linkage(Search, system)
  144. SOM_Scope boolean  SOMLINK Search(Part somSelf, Environment *ev,
  145.         long lSet,
  146.         long lAction,
  147.         long* ID,
  148.         long* Count);
  149. #ifndef somMN_Search_defined
  150. #define somMN_Search_defined
  151. static char *somMN_Search = "Search";
  152. static somId somId_Search = &somMN_Search;
  153. #endif  /* somMN_Search_defined */
  154. #ifndef somDS_Search_defined
  155. #define somDS_Search_defined
  156. static char *somDS_Search = somMD_Part_Search;
  157. static somId somDI_Search = &somDS_Search;
  158. #endif  /* somDS_Search_defined */
  159.  
  160. static somMethodInfo SearchMethodInfo = {10, 24, 0};
  161.  
  162. static somApRdInfo SearchStubs = {0, 0, &SearchMethodInfo};
  163.  
  164. /*
  165.  * New Method: Add
  166.  */
  167. #pragma linkage(Add, system)
  168. SOM_Scope boolean  SOMLINK Add(Part somSelf, Environment *ev,
  169.         long lSet,
  170.         long LAction,
  171.         long* ID,
  172.         long* Count);
  173. #ifndef somMN_Add_defined
  174. #define somMN_Add_defined
  175. static char *somMN_Add = "Add";
  176. static somId somId_Add = &somMN_Add;
  177. #endif  /* somMN_Add_defined */
  178. #ifndef somDS_Add_defined
  179. #define somDS_Add_defined
  180. static char *somDS_Add = somMD_Part_Add;
  181. static somId somDI_Add = &somDS_Add;
  182. #endif  /* somDS_Add_defined */
  183.  
  184. static somMethodInfo AddMethodInfo = {10, 24, 0};
  185.  
  186. static somApRdInfo AddStubs = {0, 0, &AddMethodInfo};
  187.  
  188. /*
  189.  * New Method: Update
  190.  */
  191. #pragma linkage(Update, system)
  192. SOM_Scope boolean  SOMLINK Update(Part somSelf, Environment *ev,
  193.         long lSet,
  194.         long LAction,
  195.         long* ID,
  196.         long* Count);
  197. #ifndef somMN_Update_defined
  198. #define somMN_Update_defined
  199. static char *somMN_Update = "Update";
  200. static somId somId_Update = &somMN_Update;
  201. #endif  /* somMN_Update_defined */
  202. #ifndef somDS_Update_defined
  203. #define somDS_Update_defined
  204. static char *somDS_Update = somMD_Part_Update;
  205. static somId somDI_Update = &somDS_Update;
  206. #endif  /* somDS_Update_defined */
  207.  
  208. static somMethodInfo UpdateMethodInfo = {10, 24, 0};
  209.  
  210. static somApRdInfo UpdateStubs = {0, 0, &UpdateMethodInfo};
  211.  
  212. /*
  213.  * New Method: Debug
  214.  */
  215. #pragma linkage(Debug, system)
  216. SOM_Scope boolean  SOMLINK Debug(Part somSelf, Environment *ev,
  217.         boolean NewState);
  218. #ifndef somMN_Debug_defined
  219. #define somMN_Debug_defined
  220. static char *somMN_Debug = "Debug";
  221. static somId somId_Debug = &somMN_Debug;
  222. #endif  /* somMN_Debug_defined */
  223. #ifndef somDS_Debug_defined
  224. #define somDS_Debug_defined
  225. static char *somDS_Debug = somMD_Part_Debug;
  226. static somId somDI_Debug = &somDS_Debug;
  227. #endif  /* somDS_Debug_defined */
  228.  
  229. static somMethodInfo DebugMethodInfo = {10, 12, 0};
  230.  
  231. static somApRdInfo DebugStubs = {0, 0, &DebugMethodInfo};
  232.  
  233. /*
  234.  * New Method: Size
  235.  */
  236. #pragma linkage(Size, system)
  237. SOM_Scope long  SOMLINK Size(Part somSelf, Environment *ev);
  238. #ifndef somMN_Size_defined
  239. #define somMN_Size_defined
  240. static char *somMN_Size = "Size";
  241. static somId somId_Size = &somMN_Size;
  242. #endif  /* somMN_Size_defined */
  243. #ifndef somDS_Size_defined
  244. #define somDS_Size_defined
  245. static char *somDS_Size = somMD_Part_Size;
  246. static somId somDI_Size = &somDS_Size;
  247. #endif  /* somDS_Size_defined */
  248. #define Size_somApRdDefault
  249.  
  250. /*
  251.  * Routines and Structures to create the class object
  252.  */
  253.  
  254. /*
  255.  * Declare the Static Methods table.
  256.  */
  257. static somStaticMethod_t PartSM[] = {
  258.     {    &PartClassData.Search,
  259.          &somId_Search,
  260.          &somDI_Search,
  261.          (somMethodProc *) Search,
  262.          (somMethodProc *)((void*)-1),
  263. #ifdef Search_somApRdDefault
  264.          0},
  265. #else
  266.          (somMethodProc *) ((void*)&SearchStubs) },
  267. #endif
  268.     {    &PartClassData.Add,
  269.          &somId_Add,
  270.          &somDI_Add,
  271.          (somMethodProc *) Add,
  272.          (somMethodProc *)((void*)-1),
  273. #ifdef Add_somApRdDefault
  274.          0},
  275. #else
  276.          (somMethodProc *) ((void*)&AddStubs) },
  277. #endif
  278.     {    &PartClassData.Update,
  279.          &somId_Update,
  280.          &somDI_Update,
  281.          (somMethodProc *) Update,
  282.          (somMethodProc *)((void*)-1),
  283. #ifdef Update_somApRdDefault
  284.          0},
  285. #else
  286.          (somMethodProc *) ((void*)&UpdateStubs) },
  287. #endif
  288.     {    &PartClassData.Debug,
  289.          &somId_Debug,
  290.          &somDI_Debug,
  291.          (somMethodProc *) Debug,
  292.          (somMethodProc *)((void*)-1),
  293. #ifdef Debug_somApRdDefault
  294.          0},
  295. #else
  296.          (somMethodProc *) ((void*)&DebugStubs) },
  297. #endif
  298.     {    &PartClassData.Size,
  299.          &somId_Size,
  300.          &somDI_Size,
  301.          (somMethodProc *) Size,
  302.          (somMethodProc *)((void*)-1),
  303. #ifdef Size_somApRdDefault
  304.          0},
  305. #else
  306.          (somMethodProc *) ((void*)&SizeStubs) },
  307. #endif
  308. };
  309.  
  310.  
  311. /*
  312.  * Declare the Override Methods table.
  313.  */
  314. static somOverrideMethod_t PartOM[] = {
  315.     {    &somId_somInit,
  316.          (somMethodProc *) somInit    },
  317. };
  318.  
  319.  
  320. /*
  321.  *  Initializers for class Ids
  322.  */
  323. static char * somCN_Part = "Part";
  324. static char * somPCN_Part_SOMObject = "SOMObject";
  325.  
  326. static somId somPCPart[] = {
  327.     &somPCN_Part_SOMObject,
  328. };
  329.  
  330. static somStaticClassInfo PartSCI = {
  331.     3, 5, 1, 0, 0, 0,
  332.     Part_MajorVersion, Part_MinorVersion,
  333.     sizeof(PartData), Part_MaxNoMethods, 1,
  334.     &somCN_Part,
  335.     (somId) NULL, 1,
  336.     somPCPart,
  337.     (somClassDataStructure *) &PartClassData,
  338.     (somCClassDataStructure *) &PartCClassData,
  339.     PartSM, PartOM,
  340.     (char *) NULL,
  341.     (somNonInternalData_t *) NULL,  (somProcMethods_t *) NULL,
  342.     (somVarargsFuncs_t *) NULL,
  343.     (somTP_somClassInitFunc *) NULL,
  344.     0,
  345.     0,  /* old style class, zero directinitclasses */
  346.     0, /* no directinitclasses */
  347.     0, /* number of methods */
  348.     0, /* methods of the class */
  349.     0, /* dataOffset1 */
  350.     0, /* dataOffset2 */
  351.     0, /* number of SelectInheritedMethods */
  352.     0, /* SelectInheritedMethods */
  353.     0, /* number of releaseorder entries */
  354.     0, /* ReleaseOrder */
  355.     0, /* number of migrated methods */
  356.     0, /* migrated method implementations */
  357.     0, /* number of initializers */
  358.     0, /* initializers */
  359.     0, /* used to identify a DTS class */
  360.     0, /* used to register dynamically computed info */
  361. };
  362.  
  363.  
  364. Part  SOMLINK PartNewClass (integer4 somtmajorVersion,
  365.         integer4 somtminorVersion)
  366. {
  367.     SOMObjectNewClass(SOMObject_MajorVersion,SOMObject_MinorVersion);    /* static reference */
  368.     return (somBuildClass(1,&PartSCI, somtmajorVersion, somtminorVersion));
  369. }
  370.  
  371. /*
  372.  * Functions for attributes.
  373.  */
  374.  
  375. #endif                   /* Part_Class_Source */
  376. #pragma checkout(resume)
  377.  
  378. #endif       /* SOM_Part_ih */
  379.