home *** CD-ROM | disk | FTP | other *** search
/ OS/2 Shareware BBS: 10 Tools / 10-Tools.zip / srctrn.zip / SRCTRANS.XIH < prev   
Text File  |  1994-01-11  |  34KB  |  824 lines

  1.  
  2. /*
  3.  * This file was generated by the SOM Compiler.
  4.  * FileName: srctrans.xih.
  5.  * Generated using:
  6.  *     SOM Precompiler spc: 1.22
  7.  *     SOM Emitter emitxih: Development
  8.  */
  9.  
  10. /*
  11.  * 
  12.  *    Source render drag/drop sample
  13.  * 
  14.  *    Author : Andrew Clinch
  15.  * 
  16.  *    Disclaimer :
  17.  *    In no event shall Andrew Clinch be liable for any damages whatsoever
  18.  *    (including, without limitation, damaged or loss of business profits, business
  19.  *    interruption, loss of business information, or other pecuniary loss) arising
  20.  *    out of the use or inability to use this sample code, even if Andrew Clinch
  21.  *    has been advised of the possibility of such damages.
  22.  * 
  23.  */
  24.  
  25.  
  26. #ifndef srctrans_xih
  27. #define srctrans_xih
  28.  
  29. #include <somobj.xh>
  30. #include <somcls.xh>
  31. #include <somcm.xh>
  32.  
  33.  
  34. /*
  35.  * Passthru lines: File: "C.xih", "before"
  36.  */
  37.  
  38.    #define INCL_WIN
  39.    #define INCL_DOS
  40.    #define INCL_GPIBITMAPS
  41.    #define INCL_DOSERRORS
  42.    #include <os2.h>
  43.    #include <string.h>
  44.    #include <stdio.h>
  45.    #include <memory.h>
  46.    #include <stdlib.h>
  47.    #include <setjmp.h>
  48.  
  49.    #define INCL_WPCLASS
  50.    #define INCL_WPFOLDER
  51.    #include <pmwp.h>
  52.  
  53.    #include "srctrans.ph"
  54.  
  55. #include "srctrans.xh"
  56.  
  57. #ifndef SOM_Scope
  58. /*
  59.  * -- Set the scope of method functions
  60.  */
  61. #ifdef __cplusplus
  62. #define SOM_Scope extern "C"
  63. #else
  64. #define SOM_Scope extern
  65. #endif
  66. #endif
  67.  
  68. /*
  69.  * Passthru lines: File: "C.xih", "after"
  70.  */
  71.  
  72.     /*
  73.      *   DRAGSTRUCT:  Structure used for object window
  74.      */
  75.     typedef struct _DRAGSTRUCT
  76.     {
  77.         USHORT      cb;
  78.         SrcTransient  *somSelf;
  79.     } DRAGSTRUCT;
  80.     typedef DRAGSTRUCT *PDRAGSTRUCT;
  81.  
  82.  
  83. #ifndef SOM_CurrentClass
  84. #define SOM_CurrentClass SrcTransientCClassData.parentMtab
  85. #endif
  86.  
  87. #define SrcTransient_MaxNoMethods 0
  88.  
  89. /*
  90.  * -- Instance Data
  91.  */
  92. typedef void SrcTransientData;
  93.  
  94. /*
  95.  * -- Instance Data Access Macros for use in Method Procedures
  96.  */
  97.  
  98. #ifndef C_TRANSLATION_MACROS
  99.  
  100. /*
  101.  * -- C++-Style Method Macros for use in Method Procedures
  102.  */
  103. #define _wpAddObjectGeneralPage somSelf->wpAddObjectGeneralPage
  104. #define _wpAddObjectWindowPage somSelf->wpAddObjectWindowPage
  105. #define _wpAddSettingsPages somSelf->wpAddSettingsPages
  106. #define _wpAddToObjUseList somSelf->wpAddToObjUseList
  107. #define _wpAllocMem somSelf->wpAllocMem
  108. #define _wpAppendObject somSelf->wpAppendObject
  109. #define _wpAssertObjectMutexSem somSelf->wpAssertObjectMutexSem
  110. #define _wpClose somSelf->wpClose
  111. #define _wpCnrInsertObject somSelf->wpCnrInsertObject
  112. #define _wpCnrRemoveObject somSelf->wpCnrRemoveObject
  113. #define _wpCnrSetEmphasis somSelf->wpCnrSetEmphasis
  114. #define _wpConfirmDelete somSelf->wpConfirmDelete
  115. #define _wpConfirmObjectTitle somSelf->wpConfirmObjectTitle
  116. #define _wpCopiedFromTemplate somSelf->wpCopiedFromTemplate
  117. #define _wpCopyObject somSelf->wpCopyObject
  118. #define _wpCreateAnother somSelf->wpCreateAnother
  119. #define _wpCreateFromTemplate somSelf->wpCreateFromTemplate
  120. #define _wpCreateShadowObject somSelf->wpCreateShadowObject
  121. #define _wpDelete somSelf->wpDelete
  122. #define _wpDeleteFromObjUseList somSelf->wpDeleteFromObjUseList
  123. #define _wpDisplayHelp somSelf->wpDisplayHelp
  124. #define _wpDoesObjectMatch somSelf->wpDoesObjectMatch
  125. #define _wpDraggedOverObject somSelf->wpDraggedOverObject
  126. #define _wpDragOver somSelf->wpDragOver
  127. #define _wpDrop somSelf->wpDrop
  128. #define _wpDroppedOnObject somSelf->wpDroppedOnObject
  129. #define _wpEndConversation somSelf->wpEndConversation
  130. #define _wpFilterPopupMenu somSelf->wpFilterPopupMenu
  131. #define _wpFindUseItem somSelf->wpFindUseItem
  132. #define _wpFree somSelf->wpFree
  133. #define _wpFreeMem somSelf->wpFreeMem
  134. #define _wpHide somSelf->wpHide
  135. #define _wpInitData somSelf->wpInitData
  136. #define _wpInsertPopupMenuItems somSelf->wpInsertPopupMenuItems
  137. #define _wpInsertSettingsPage somSelf->wpInsertSettingsPage
  138. #define _wpMenuItemHelpSelected somSelf->wpMenuItemHelpSelected
  139. #define _wpMenuItemSelected somSelf->wpMenuItemSelected
  140. #define _wpModifyPopupMenu somSelf->wpModifyPopupMenu
  141. #define _wpMoveObject somSelf->wpMoveObject
  142. #define _wpOpen somSelf->wpOpen
  143. #define _wpPrintObject somSelf->wpPrintObject
  144. #define _wpQueryConcurrentView somSelf->wpQueryConcurrentView
  145. #define _wpQueryButtonAppearance somSelf->wpQueryButtonAppearance
  146. #define _wpQueryConfirmations somSelf->wpQueryConfirmations
  147. #define _wpQueryDefaultHelp somSelf->wpQueryDefaultHelp
  148. #define _wpQueryDefaultView somSelf->wpQueryDefaultView
  149. #define _wpQueryDetailsData somSelf->wpQueryDetailsData
  150. #define _wpQueryError somSelf->wpQueryError
  151. #define _wpQueryIcon somSelf->wpQueryIcon
  152. #define _wpQueryIconData somSelf->wpQueryIconData
  153. #define _wpQueryMinWindow somSelf->wpQueryMinWindow
  154. #define _wpQueryNameClashOptions somSelf->wpQueryNameClashOptions
  155. #define _wpQueryStyle somSelf->wpQueryStyle
  156. #define _wpSetTaskRec somSelf->wpSetTaskRec
  157. #define _wpFindTaskRec somSelf->wpFindTaskRec
  158. #define _wpQueryTitle somSelf->wpQueryTitle
  159. #define _wpRegisterView somSelf->wpRegisterView
  160. #define _wpReleaseObjectMutexSem somSelf->wpReleaseObjectMutexSem
  161. #define _wpRender somSelf->wpRender
  162. #define _wpRenderComplete somSelf->wpRenderComplete
  163. #define _wpReplaceObject somSelf->wpReplaceObject
  164. #define _wpRequestObjectMutexSem somSelf->wpRequestObjectMutexSem
  165. #define _wpRestore somSelf->wpRestore
  166. #define _wpRestoreData somSelf->wpRestoreData
  167. #define _wpRestoreLong somSelf->wpRestoreLong
  168. #define _wpRestoreState somSelf->wpRestoreState
  169. #define _wpRestoreString somSelf->wpRestoreString
  170. #define _wpSaveData somSelf->wpSaveData
  171. #define _wpSaveImmediate somSelf->wpSaveImmediate
  172. #define _wpSaveDeferred somSelf->wpSaveDeferred
  173. #define _wpSaveLong somSelf->wpSaveLong
  174. #define _wpSaveState somSelf->wpSaveState
  175. #define _wpSaveString somSelf->wpSaveString
  176. #define _wpScanSetupString somSelf->wpScanSetupString
  177. #define _wpSetConcurrentView somSelf->wpSetConcurrentView
  178. #define _wpSetButtonAppearance somSelf->wpSetButtonAppearance
  179. #define _wpSetDefaultHelp somSelf->wpSetDefaultHelp
  180. #define _wpSetDefaultView somSelf->wpSetDefaultView
  181. #define _wpSetError somSelf->wpSetError
  182. #define _wpSetIcon somSelf->wpSetIcon
  183. #define _wpSetIconData somSelf->wpSetIconData
  184. #define _wpSetMinWindow somSelf->wpSetMinWindow
  185. #define _wpSetStyle somSelf->wpSetStyle
  186. #define _wpModifyStyle somSelf->wpModifyStyle
  187. #define _wpSetTitle somSelf->wpSetTitle
  188. #define _wpSetup somSelf->wpSetup
  189. #define _wpSwitchTo somSelf->wpSwitchTo
  190. #define _wpUnInitData somSelf->wpUnInitData
  191. #define _wpViewObject somSelf->wpViewObject
  192. #define _wpQueryTrueStyle somSelf->wpQueryTrueStyle
  193. #define _wpQueryHandle somSelf->wpQueryHandle
  194. #define _wpUnlockObject somSelf->wpUnlockObject
  195. #define _somFree somSelf->somFree
  196. #define _somGetClass somSelf->somGetClass
  197. #define _somGetClassName somSelf->somGetClassName
  198. #define _somGetSize somSelf->somGetSize
  199. #define _somIsA somSelf->somIsA
  200. #define _somIsInstanceOf somSelf->somIsInstanceOf
  201. #define _somRespondsTo somSelf->somRespondsTo
  202. #define _somDispatchV somSelf->somDispatchV
  203. #define _somDispatchL somSelf->somDispatchL
  204. #define _somDispatchA somSelf->somDispatchA
  205. #define _somDispatchD somSelf->somDispatchD
  206. #define _somPrintSelf somSelf->somPrintSelf
  207. #define _somDumpSelf somSelf->somDumpSelf
  208. #define _wpFormatDragItem somSelf->wpFormatDragItem
  209.  
  210. #else
  211.  
  212. /*
  213.  * -- Wierd C-Style Method Macros for use in Method Procedures
  214.  */
  215. #define _wpAddObjectGeneralPage(obj,arg1) obj->wpAddObjectGeneralPage(arg1)
  216. #define _wpAddObjectWindowPage(obj,arg1) obj->wpAddObjectWindowPage(arg1)
  217. #define _wpAddSettingsPages(obj,arg1) obj->wpAddSettingsPages(arg1)
  218. #define _wpAddToObjUseList(obj,arg1) obj->wpAddToObjUseList(arg1)
  219. #define _wpAllocMem(obj,arg1,arg2) obj->wpAllocMem(arg1,arg2)
  220. #define _wpAppendObject(obj,arg1,arg2) obj->wpAppendObject(arg1,arg2)
  221. #define _wpAssertObjectMutexSem(obj) obj->wpAssertObjectMutexSem()
  222. #define _wpClose(obj) obj->wpClose()
  223. #define _wpCnrInsertObject(obj,arg1,arg2,arg3,arg4) obj->wpCnrInsertObject(arg1,arg2,arg3,arg4)
  224. #define _wpCnrRemoveObject(obj,arg1) obj->wpCnrRemoveObject(arg1)
  225. #define _wpCnrSetEmphasis(obj,arg1,arg2) obj->wpCnrSetEmphasis(arg1,arg2)
  226. #define _wpConfirmDelete(obj,arg1) obj->wpConfirmDelete(arg1)
  227. #define _wpConfirmObjectTitle(obj,arg1,arg2,arg3,arg4,arg5) obj->wpConfirmObjectTitle(arg1,arg2,arg3,arg4,arg5)
  228. #define _wpCopiedFromTemplate(obj) obj->wpCopiedFromTemplate()
  229. #define _wpCopyObject(obj,arg1,arg2) obj->wpCopyObject(arg1,arg2)
  230. #define _wpCreateAnother(obj,arg1,arg2,arg3) obj->wpCreateAnother(arg1,arg2,arg3)
  231. #define _wpCreateFromTemplate(obj,arg1,arg2) obj->wpCreateFromTemplate(arg1,arg2)
  232. #define _wpCreateShadowObject(obj,arg1,arg2) obj->wpCreateShadowObject(arg1,arg2)
  233. #define _wpDelete(obj,arg1) obj->wpDelete(arg1)
  234. #define _wpDeleteFromObjUseList(obj,arg1) obj->wpDeleteFromObjUseList(arg1)
  235. #define _wpDisplayHelp(obj,arg1,arg2) obj->wpDisplayHelp(arg1,arg2)
  236. #define _wpDoesObjectMatch(obj,arg1) obj->wpDoesObjectMatch(arg1)
  237. #define _wpDraggedOverObject(obj,arg1) obj->wpDraggedOverObject(arg1)
  238. #define _wpDragOver(obj,arg1,arg2) obj->wpDragOver(arg1,arg2)
  239. #define _wpDrop(obj,arg1,arg2,arg3) obj->wpDrop(arg1,arg2,arg3)
  240. #define _wpDroppedOnObject(obj,arg1) obj->wpDroppedOnObject(arg1)
  241. #define _wpEndConversation(obj,arg1,arg2) obj->wpEndConversation(arg1,arg2)
  242. #define _wpFilterPopupMenu(obj,arg1,arg2,arg3) obj->wpFilterPopupMenu(arg1,arg2,arg3)
  243. #define _wpFindUseItem(obj,arg1,arg2) obj->wpFindUseItem(arg1,arg2)
  244. #define _wpFree(obj) obj->wpFree()
  245. #define _wpFreeMem(obj,arg1) obj->wpFreeMem(arg1)
  246. #define _wpHide(obj) obj->wpHide()
  247. #define _wpInitData(obj) obj->wpInitData()
  248. #define _wpInsertPopupMenuItems(obj,arg1,arg2,arg3,arg4,arg5) obj->wpInsertPopupMenuItems(arg1,arg2,arg3,arg4,arg5)
  249. #define _wpInsertSettingsPage(obj,arg1,arg2) obj->wpInsertSettingsPage(arg1,arg2)
  250. #define _wpMenuItemHelpSelected(obj,arg1) obj->wpMenuItemHelpSelected(arg1)
  251. #define _wpMenuItemSelected(obj,arg1,arg2) obj->wpMenuItemSelected(arg1,arg2)
  252. #define _wpModifyPopupMenu(obj,arg1,arg2,arg3) obj->wpModifyPopupMenu(arg1,arg2,arg3)
  253. #define _wpMoveObject(obj,arg1) obj->wpMoveObject(arg1)
  254. #define _wpOpen(obj,arg1,arg2,arg3) obj->wpOpen(arg1,arg2,arg3)
  255. #define _wpPrintObject(obj,arg1,arg2) obj->wpPrintObject(arg1,arg2)
  256. #define _wpQueryConcurrentView(obj) obj->wpQueryConcurrentView()
  257. #define _wpQueryButtonAppearance(obj) obj->wpQueryButtonAppearance()
  258. #define _wpQueryConfirmations(obj) obj->wpQueryConfirmations()
  259. #define _wpQueryDefaultHelp(obj,arg1,arg2) obj->wpQueryDefaultHelp(arg1,arg2)
  260. #define _wpQueryDefaultView(obj) obj->wpQueryDefaultView()
  261. #define _wpQueryDetailsData(obj,arg1,arg2) obj->wpQueryDetailsData(arg1,arg2)
  262. #define _wpQueryError(obj) obj->wpQueryError()
  263. #define _wpQueryIcon(obj) obj->wpQueryIcon()
  264. #define _wpQueryIconData(obj,arg1) obj->wpQueryIconData(arg1)
  265. #define _wpQueryMinWindow(obj) obj->wpQueryMinWindow()
  266. #define _wpQueryNameClashOptions(obj,arg1) obj->wpQueryNameClashOptions(arg1)
  267. #define _wpQueryStyle(obj) obj->wpQueryStyle()
  268. #define _wpSetTaskRec(obj,arg1,arg2) obj->wpSetTaskRec(arg1,arg2)
  269. #define _wpFindTaskRec(obj) obj->wpFindTaskRec()
  270. #define _wpQueryTitle(obj) obj->wpQueryTitle()
  271. #define _wpRegisterView(obj,arg1,arg2) obj->wpRegisterView(arg1,arg2)
  272. #define _wpReleaseObjectMutexSem(obj) obj->wpReleaseObjectMutexSem()
  273. #define _wpRender(obj,arg1) obj->wpRender(arg1)
  274. #define _wpRenderComplete(obj,arg1,arg2) obj->wpRenderComplete(arg1,arg2)
  275. #define _wpReplaceObject(obj,arg1,arg2) obj->wpReplaceObject(arg1,arg2)
  276. #define _wpRequestObjectMutexSem(obj,arg1) obj->wpRequestObjectMutexSem(arg1)
  277. #define _wpRestore(obj) obj->wpRestore()
  278. #define _wpRestoreData(obj,arg1,arg2,arg3,arg4) obj->wpRestoreData(arg1,arg2,arg3,arg4)
  279. #define _wpRestoreLong(obj,arg1,arg2,arg3) obj->wpRestoreLong(arg1,arg2,arg3)
  280. #define _wpRestoreState(obj,arg1) obj->wpRestoreState(arg1)
  281. #define _wpRestoreString(obj,arg1,arg2,arg3,arg4) obj->wpRestoreString(arg1,arg2,arg3,arg4)
  282. #define _wpSaveData(obj,arg1,arg2,arg3,arg4) obj->wpSaveData(arg1,arg2,arg3,arg4)
  283. #define _wpSaveImmediate(obj) obj->wpSaveImmediate()
  284. #define _wpSaveDeferred(obj) obj->wpSaveDeferred()
  285. #define _wpSaveLong(obj,arg1,arg2,arg3) obj->wpSaveLong(arg1,arg2,arg3)
  286. #define _wpSaveState(obj) obj->wpSaveState()
  287. #define _wpSaveString(obj,arg1,arg2,arg3) obj->wpSaveString(arg1,arg2,arg3)
  288. #define _wpScanSetupString(obj,arg1,arg2,arg3,arg4) obj->wpScanSetupString(arg1,arg2,arg3,arg4)
  289. #define _wpSetConcurrentView(obj,arg1) obj->wpSetConcurrentView(arg1)
  290. #define _wpSetButtonAppearance(obj,arg1) obj->wpSetButtonAppearance(arg1)
  291. #define _wpSetDefaultHelp(obj,arg1,arg2) obj->wpSetDefaultHelp(arg1,arg2)
  292. #define _wpSetDefaultView(obj,arg1) obj->wpSetDefaultView(arg1)
  293. #define _wpSetError(obj,arg1) obj->wpSetError(arg1)
  294. #define _wpSetIcon(obj,arg1) obj->wpSetIcon(arg1)
  295. #define _wpSetIconData(obj,arg1) obj->wpSetIconData(arg1)
  296. #define _wpSetMinWindow(obj,arg1) obj->wpSetMinWindow(arg1)
  297. #define _wpSetStyle(obj,arg1) obj->wpSetStyle(arg1)
  298. #define _wpModifyStyle(obj,arg1,arg2) obj->wpModifyStyle(arg1,arg2)
  299. #define _wpSetTitle(obj,arg1) obj->wpSetTitle(arg1)
  300. #define _wpSetup(obj,arg1) obj->wpSetup(arg1)
  301. #define _wpSwitchTo(obj,arg1) obj->wpSwitchTo(arg1)
  302. #define _wpUnInitData(obj) obj->wpUnInitData()
  303. #define _wpViewObject(obj,arg1,arg2,arg3) obj->wpViewObject(arg1,arg2,arg3)
  304. #define _wpQueryTrueStyle(obj) obj->wpQueryTrueStyle()
  305. #define _wpQueryHandle(obj) obj->wpQueryHandle()
  306. #define _wpUnlockObject(obj) obj->wpUnlockObject()
  307. #define _somFree(obj) obj->somFree()
  308. #define _somGetClass(obj) obj->somGetClass()
  309. #define _somGetClassName(obj) obj->somGetClassName()
  310. #define _somGetSize(obj) obj->somGetSize()
  311. #define _somIsA(obj,arg1) obj->somIsA(arg1)
  312. #define _somIsInstanceOf(obj,arg1) obj->somIsInstanceOf(arg1)
  313. #define _somRespondsTo(obj,arg1) obj->somRespondsTo(arg1)
  314. #define _somDispatchV(obj,arg1,arg2,arg3) obj->somDispatchV(arg1,arg2,arg3)
  315. #define _somDispatchL(obj,arg1,arg2,arg3) obj->somDispatchL(arg1,arg2,arg3)
  316. #define _somDispatchA(obj,arg1,arg2,arg3) obj->somDispatchA(arg1,arg2,arg3)
  317. #define _somDispatchD(obj,arg1,arg2,arg3) obj->somDispatchD(arg1,arg2,arg3)
  318. #define _somPrintSelf(obj) obj->somPrintSelf()
  319. #define _somDumpSelf(obj,arg1) obj->somDumpSelf(arg1)
  320. #define _wpFormatDragItem(obj,arg1) obj->wpFormatDragItem(arg1)
  321.  
  322. #endif
  323.  
  324. /*
  325.  * -- Primary Implementation File Content.
  326.  */
  327. #ifdef SrcTransient_Class_Source
  328. #ifndef M_SrcTransient_Class_Source
  329. #define M_SrcTransient_Class_Source
  330. #endif
  331.  
  332. /*
  333.  * -- Trace/Debug macro
  334.  */
  335. #ifndef SrcTransientMethodDebug
  336. #define SrcTransientMethodDebug(c,m) SOMMethodDebug(c,m)
  337. #endif
  338.  
  339. /*
  340.  * -- Current class macros for Instance and Meta classes.
  341.  */
  342. #undef SOMMeta
  343. #define SOMMeta M_SrcTransientCClassData.parentMtab
  344. #undef SOMInstance
  345. #define SOMInstance SrcTransientCClassData.parentMtab
  346.  
  347.  
  348. /*
  349.  * -- The SrcTransient ClassData Structure
  350.  */
  351. struct SrcTransientClassDataStructure SrcTransientClassData = {(SOMClass *) NULL};
  352.  
  353. /*
  354.  * -- The auxiliary SrcTransient ClassData structure
  355.  */
  356. SOMEXTERN struct SrcTransientCClassDataStructure {
  357.     somMethodTab *parentMtab;
  358.     somDToken instanceDataToken;
  359. } SrcTransientCClassData = {(somMethodTab *) NULL};
  360.  
  361.  
  362. /*
  363.  * -- Apply Stubs for new methods introduced by SrcTransient
  364.  */
  365.  
  366. /*
  367.  * Overridden method: wpFormatDragItem
  368.  */
  369. SOM_Scope BOOL   SOMLINK src_wpFormatDragItem(SrcTransient *somSelf,
  370.         PDRAGITEM pdrgItem);
  371. #ifndef parent_wpFormatDragItem
  372. static char *somMN_wpFormatDragItem = "wpFormatDragItem";
  373. static somId somId_wpFormatDragItem = &somMN_wpFormatDragItem;
  374. #define parent_wpFormatDragItem(somSelf,pdrgItem) \
  375.   ((( somTD_WPObject_wpFormatDragItem ) \
  376.     somParentResolve(SOM_CurrentClass,WPObjectClassData.wpFormatDragItem)) \
  377.      (somSelf,pdrgItem))
  378. #endif
  379.  
  380.  
  381. /* ---------------------------------- */
  382. /*
  383.  * Class Creation and Initialization
  384.  */
  385.  
  386.  
  387. /* a temporary, used during creation */
  388. static somClassDataStructure SrcTransienttempClassData;
  389.  
  390. /* Initialization for SrcTransient */
  391. static void SrcTransientsomInitializeClass ()
  392. {
  393.  
  394.     ((SOMClass *)SrcTransienttempClassData.classObject)->somOverrideSMethod (
  395.             somId_wpFormatDragItem,
  396.             (somMethodProc *) src_wpFormatDragItem);
  397. }
  398.  
  399. static void SOMLINK SrcTransientsomCreateClass(SOMClass *pClsObj,
  400.                            SOMClass *mClsObj)
  401. {
  402.     SrcTransienttempClassData.classObject = (SOMClass *)mClsObj->somNew();
  403.     SrcTransienttempClassData.classObject->somInitClass (
  404.         "SrcTransient",
  405.         pClsObj,
  406.         0,
  407.         SrcTransient_MaxNoMethods,
  408.         SrcTransient_MajorVersion,
  409.         SrcTransient_MinorVersion);
  410.     SrcTransientCClassData.instanceDataToken = 
  411.     SrcTransienttempClassData.classObject->somGetInstanceToken();
  412.     SrcTransientsomInitializeClass();
  413.     SrcTransientCClassData.parentMtab =
  414.     SrcTransienttempClassData.classObject->somGetPClsMtab();
  415.     SrcTransienttempClassData.classObject->somSetClassData((somClassDataStructure *)&SrcTransientClassData);
  416.     SrcTransienttempClassData.classObject->somClassReady();
  417.     /* make newly created class object visible */
  418.     SrcTransientClassData.classObject = SrcTransienttempClassData.classObject;
  419. }
  420.  
  421. SOMEXTERN SOMClass * SOMLINK SrcTransientNewClass (integer4 scemajorVersion,
  422.         integer4 sceminorVersion)
  423. {
  424.     SOMClass *pClsObj;
  425.     SOMClass *mClsObj;
  426.  
  427.     /* Check the version numbers */
  428.     if (((scemajorVersion != 0) && 
  429.          (scemajorVersion != SrcTransient_MajorVersion)) ||
  430.         ((sceminorVersion != 0) && 
  431.          (sceminorVersion > SrcTransient_MinorVersion))) {
  432.     somPrintf("SrcTransientNewClass: Error, bad version numbers.\n");
  433.     SOM_Error(SOMERROR_BadVersion);
  434.     }
  435.     /* Don't do anything if class object is already created. */
  436.     if (SrcTransientClassData.classObject != (SOMClass *) NULL)
  437.     return(SrcTransientClassData.classObject);
  438.  
  439.     /* Make sure the environment is initialized. */
  440.     if (SOMClassMgrObject == (SOMClassMgr *) NULL) somEnvironmentNew();
  441.     if (SOMClassMgrObject == (SOMClassMgr *) NULL)
  442.     SOM_Error(SOMERROR_CouldNotStartup);
  443.  
  444.     /* Get the parent class object. */
  445.     WPTransientNewClass(1,2);    /* static reference */
  446.     pClsObj = ((SOMClassMgr *)SOMClassMgrObject)->somFindClass(
  447.         SOM_IdFromString("WPTransient"), 1, 2);
  448.     if (pClsObj == (SOMClass *) NULL)
  449.     SOM_Error(SOMERROR_NoParentClass);
  450.  
  451.     /* Explicit metaclass, so get it */ 
  452.     M_SrcTransientNewClass(0,0);    /* static reference */
  453.     mClsObj = ((SOMClassMgr *)SOMClassMgrObject)->somFindClass(
  454.         SOM_IdFromString("M_SrcTransient"), 0, 0);
  455.     if (mClsObj == (SOMClass *) NULL)
  456.     SOM_Error(SOMERROR_NoMetaClass);
  457.  
  458.     somConstructClass(SrcTransientsomCreateClass, pClsObj, mClsObj,
  459.              &SrcTransienttempClassData);
  460.     return (SrcTransientClassData.classObject);
  461. }
  462.  
  463. #endif      /* SrcTransient_Class_Source */
  464.  
  465. #endif       /* srctrans_xih */
  466.  
  467. /*
  468.  * This file was generated by the SOM Compiler.
  469.  * FileName: srctrans.xih.
  470.  * Generated using:
  471.  *     SOM Precompiler spc: 1.22
  472.  *     SOM Emitter emitxih: Development
  473.  */
  474.  
  475. #ifndef srctrans_mih
  476. #define srctrans_mih
  477.  
  478.  
  479. #ifndef SOM_Scope
  480. /*
  481.  * -- Set the scope of method functions
  482.  */
  483. #ifdef __cplusplus
  484. #define SOM_Scope extern "C"
  485. #else
  486. #define SOM_Scope extern
  487. #endif
  488. #endif
  489.  
  490. #ifndef SOM_CurrentClass
  491. #define SOM_CurrentClass M_SrcTransientCClassData.parentMtab
  492. #endif
  493.  
  494. #define M_SrcTransient_MaxNoMethods 1
  495.  
  496. /*
  497.  * -- Instance Data
  498.  */
  499. typedef void M_SrcTransientData;
  500.  
  501. /*
  502.  * -- Instance Data Access Macros for use in Method Procedures
  503.  */
  504.  
  505. #ifndef C_TRANSLATION_MACROS
  506.  
  507. /*
  508.  * -- C++-Style Method Macros for use in Method Procedures
  509.  */
  510. #define _wpclsCreateDefaultTemplates somSelf->wpclsCreateDefaultTemplates
  511. #define _wpclsInitData somSelf->wpclsInitData
  512. #define _wpclsMakeAwake somSelf->wpclsMakeAwake
  513. #define _wpclsNew somSelf->wpclsNew
  514. #define _wpclsQueryDefaultHelp somSelf->wpclsQueryDefaultHelp
  515. #define _wpclsQueryDefaultView somSelf->wpclsQueryDefaultView
  516. #define _wpclsQueryDetails somSelf->wpclsQueryDetails
  517. #define _wpclsQueryDetailsInfo somSelf->wpclsQueryDetailsInfo
  518. #define _wpclsQueryExtendedCriteria somSelf->wpclsQueryExtendedCriteria
  519. #define _wpclsQueryFolder somSelf->wpclsQueryFolder
  520. #define _wpclsQueryIcon somSelf->wpclsQueryIcon
  521. #define _wpclsQuerySearchInfo somSelf->wpclsQuerySearchInfo
  522. #define _wpclsQueryStyle somSelf->wpclsQueryStyle
  523. #define _wpclsQueryTitle somSelf->wpclsQueryTitle
  524. #define _wpclsUnInitData somSelf->wpclsUnInitData
  525. #define _wpclsFindObjectFirst somSelf->wpclsFindObjectFirst
  526. #define _wpclsFindObjectNext somSelf->wpclsFindObjectNext
  527. #define _wpclsFindObjectEnd somSelf->wpclsFindObjectEnd
  528. #define _wpclsSetError somSelf->wpclsSetError
  529. #define _wpclsQueryError somSelf->wpclsQueryError
  530. #define _wpclsQuerySettingsPageSize somSelf->wpclsQuerySettingsPageSize
  531. #define _wpclsQueryObject somSelf->wpclsQueryObject
  532. #define _wpclsQueryButtonAppearance somSelf->wpclsQueryButtonAppearance
  533. #define _somAddStaticMethod somSelf->somAddStaticMethod
  534. #define _somClassReady somSelf->somClassReady
  535. #define _somInitClass somSelf->somInitClass
  536. #define _somOverrideSMethod somSelf->somOverrideSMethod
  537. #define _somNew somSelf->somNew
  538. #define _somNewNoInit somSelf->somNewNoInit
  539. #define _somRenew somSelf->somRenew
  540. #define _somRenewNoInit somSelf->somRenewNoInit
  541. #define _somGetApplyStub somSelf->somGetApplyStub
  542. #define _somGetClassData somSelf->somGetClassData
  543. #define _somGetClassMtab somSelf->somGetClassMtab
  544. #define _somGetInstanceToken somSelf->somGetInstanceToken
  545. #define _somGetMemberToken somSelf->somGetMemberToken
  546. #define _somGetInstanceOffset somSelf->somGetInstanceOffset
  547. #define _somGetInstancePartSize somSelf->somGetInstancePartSize
  548. #define _somGetInstanceSize somSelf->somGetInstanceSize
  549. #define _somGetMethodDescriptor somSelf->somGetMethodDescriptor
  550. #define _somGetName somSelf->somGetName
  551. #define _somGetNumMethods somSelf->somGetNumMethods
  552. #define _somGetNumStaticMethods somSelf->somGetNumStaticMethods
  553. #define _somGetParent somSelf->somGetParent
  554. #define _somGetPClsMtab somSelf->somGetPClsMtab
  555. #define _somSetClassData somSelf->somSetClassData
  556. #define _somCheckVersion somSelf->somCheckVersion
  557. #define _somDescendedFrom somSelf->somDescendedFrom
  558. #define _somSupportsMethod somSelf->somSupportsMethod
  559. #define _somFindMethod somSelf->somFindMethod
  560. #define _somFindMethodOk somSelf->somFindMethodOk
  561. #define _somFindSMethod somSelf->somFindSMethod
  562. #define _somFindSMethodOk somSelf->somFindSMethodOk
  563. #define _somInit somSelf->somInit
  564. #define _somUninit somSelf->somUninit
  565. #define _somDumpSelfInt somSelf->somDumpSelfInt
  566. #define _somFree somSelf->somFree
  567. #define _somGetClass somSelf->somGetClass
  568. #define _somGetClassName somSelf->somGetClassName
  569. #define _somGetSize somSelf->somGetSize
  570. #define _somIsA somSelf->somIsA
  571. #define _somIsInstanceOf somSelf->somIsInstanceOf
  572. #define _somRespondsTo somSelf->somRespondsTo
  573. #define _somDispatchV somSelf->somDispatchV
  574. #define _somDispatchL somSelf->somDispatchL
  575. #define _somDispatchA somSelf->somDispatchA
  576. #define _somDispatchD somSelf->somDispatchD
  577. #define _somPrintSelf somSelf->somPrintSelf
  578. #define _somDumpSelf somSelf->somDumpSelf
  579. #define _clsQueryModuleHandle somSelf->clsQueryModuleHandle
  580. #define _wpclsQueryIconData somSelf->wpclsQueryIconData
  581.  
  582. #else
  583.  
  584. /*
  585.  * -- Wierd C-Style Method Macros for use in Method Procedures
  586.  */
  587. #define _wpclsCreateDefaultTemplates(obj,arg1) obj->wpclsCreateDefaultTemplates(arg1)
  588. #define _wpclsInitData(obj) obj->wpclsInitData()
  589. #define _wpclsMakeAwake(obj,arg1,arg2,arg3,arg4,arg5,arg6) obj->wpclsMakeAwake(arg1,arg2,arg3,arg4,arg5,arg6)
  590. #define _wpclsNew(obj,arg1,arg2,arg3,arg4) obj->wpclsNew(arg1,arg2,arg3,arg4)
  591. #define _wpclsQueryDefaultHelp(obj,arg1,arg2) obj->wpclsQueryDefaultHelp(arg1,arg2)
  592. #define _wpclsQueryDefaultView(obj) obj->wpclsQueryDefaultView()
  593. #define _wpclsQueryDetails(obj) obj->wpclsQueryDetails()
  594. #define _wpclsQueryDetailsInfo(obj,arg1,arg2) obj->wpclsQueryDetailsInfo(arg1,arg2)
  595. #define _wpclsQueryExtendedCriteria(obj,arg1,arg2,arg3) obj->wpclsQueryExtendedCriteria(arg1,arg2,arg3)
  596. #define _wpclsQueryFolder(obj,arg1,arg2) obj->wpclsQueryFolder(arg1,arg2)
  597. #define _wpclsQueryIcon(obj) obj->wpclsQueryIcon()
  598. #define _wpclsQuerySearchInfo(obj,arg1,arg2,arg3) obj->wpclsQuerySearchInfo(arg1,arg2,arg3)
  599. #define _wpclsQueryStyle(obj) obj->wpclsQueryStyle()
  600. #define _wpclsQueryTitle(obj) obj->wpclsQueryTitle()
  601. #define _wpclsUnInitData(obj) obj->wpclsUnInitData()
  602. #define _wpclsFindObjectFirst(obj,arg1,arg2,arg3,arg4,arg5,arg6,arg7,arg8) obj->wpclsFindObjectFirst(arg1,arg2,arg3,arg4,arg5,arg6,arg7,arg8)
  603. #define _wpclsFindObjectNext(obj,arg1,arg2,arg3) obj->wpclsFindObjectNext(arg1,arg2,arg3)
  604. #define _wpclsFindObjectEnd(obj,arg1) obj->wpclsFindObjectEnd(arg1)
  605. #define _wpclsSetError(obj,arg1) obj->wpclsSetError(arg1)
  606. #define _wpclsQueryError(obj) obj->wpclsQueryError()
  607. #define _wpclsQuerySettingsPageSize(obj,arg1) obj->wpclsQuerySettingsPageSize(arg1)
  608. #define _wpclsQueryObject(obj,arg1) obj->wpclsQueryObject(arg1)
  609. #define _wpclsQueryButtonAppearance(obj) obj->wpclsQueryButtonAppearance()
  610. #define _somAddStaticMethod(obj,arg1,arg2,arg3,arg4,arg5) obj->somAddStaticMethod(arg1,arg2,arg3,arg4,arg5)
  611. #define _somClassReady(obj) obj->somClassReady()
  612. #define _somInitClass(obj,arg1,arg2,arg3,arg4,arg5,arg6) obj->somInitClass(arg1,arg2,arg3,arg4,arg5,arg6)
  613. #define _somOverrideSMethod(obj,arg1,arg2) obj->somOverrideSMethod(arg1,arg2)
  614. #define _somNew(obj) obj->somNew()
  615. #define _somNewNoInit(obj) obj->somNewNoInit()
  616. #define _somRenew(obj,arg1) obj->somRenew(arg1)
  617. #define _somRenewNoInit(obj,arg1) obj->somRenewNoInit(arg1)
  618. #define _somGetApplyStub(obj,arg1) obj->somGetApplyStub(arg1)
  619. #define _somGetClassData(obj) obj->somGetClassData()
  620. #define _somGetClassMtab(obj) obj->somGetClassMtab()
  621. #define _somGetInstanceToken(obj) obj->somGetInstanceToken()
  622. #define _somGetMemberToken(obj,arg1,arg2) obj->somGetMemberToken(arg1,arg2)
  623. #define _somGetInstanceOffset(obj) obj->somGetInstanceOffset()
  624. #define _somGetInstancePartSize(obj) obj->somGetInstancePartSize()
  625. #define _somGetInstanceSize(obj) obj->somGetInstanceSize()
  626. #define _somGetMethodDescriptor(obj,arg1) obj->somGetMethodDescriptor(arg1)
  627. #define _somGetName(obj) obj->somGetName()
  628. #define _somGetNumMethods(obj) obj->somGetNumMethods()
  629. #define _somGetNumStaticMethods(obj) obj->somGetNumStaticMethods()
  630. #define _somGetParent(obj) obj->somGetParent()
  631. #define _somGetPClsMtab(obj) obj->somGetPClsMtab()
  632. #define _somSetClassData(obj,arg1) obj->somSetClassData(arg1)
  633. #define _somCheckVersion(obj,arg1,arg2) obj->somCheckVersion(arg1,arg2)
  634. #define _somDescendedFrom(obj,arg1) obj->somDescendedFrom(arg1)
  635. #define _somSupportsMethod(obj,arg1) obj->somSupportsMethod(arg1)
  636. #define _somFindMethod(obj,arg1,arg2) obj->somFindMethod(arg1,arg2)
  637. #define _somFindMethodOk(obj,arg1,arg2) obj->somFindMethodOk(arg1,arg2)
  638. #define _somFindSMethod(obj,arg1) obj->somFindSMethod(arg1)
  639. #define _somFindSMethodOk(obj,arg1) obj->somFindSMethodOk(arg1)
  640. #define _somInit(obj) obj->somInit()
  641. #define _somUninit(obj) obj->somUninit()
  642. #define _somDumpSelfInt(obj,arg1) obj->somDumpSelfInt(arg1)
  643. #define _somFree(obj) obj->somFree()
  644. #define _somGetClass(obj) obj->somGetClass()
  645. #define _somGetClassName(obj) obj->somGetClassName()
  646. #define _somGetSize(obj) obj->somGetSize()
  647. #define _somIsA(obj,arg1) obj->somIsA(arg1)
  648. #define _somIsInstanceOf(obj,arg1) obj->somIsInstanceOf(arg1)
  649. #define _somRespondsTo(obj,arg1) obj->somRespondsTo(arg1)
  650. #define _somDispatchV(obj,arg1,arg2,arg3) obj->somDispatchV(arg1,arg2,arg3)
  651. #define _somDispatchL(obj,arg1,arg2,arg3) obj->somDispatchL(arg1,arg2,arg3)
  652. #define _somDispatchA(obj,arg1,arg2,arg3) obj->somDispatchA(arg1,arg2,arg3)
  653. #define _somDispatchD(obj,arg1,arg2,arg3) obj->somDispatchD(arg1,arg2,arg3)
  654. #define _somPrintSelf(obj) obj->somPrintSelf()
  655. #define _somDumpSelf(obj,arg1) obj->somDumpSelf(arg1)
  656. #define _clsQueryModuleHandle(obj) obj->clsQueryModuleHandle()
  657. #define _wpclsQueryIconData(obj,arg1) obj->wpclsQueryIconData(arg1)
  658.  
  659. #endif
  660.  
  661. /*
  662.  * -- Primary Implementation File Content.
  663.  */
  664. #ifdef M_SrcTransient_Class_Source
  665.  
  666. /*
  667.  * -- Trace/Debug macro
  668.  */
  669. #ifndef M_SrcTransientMethodDebug
  670. #define M_SrcTransientMethodDebug(c,m) SOMMethodDebug(c,m)
  671. #endif
  672.  
  673. /*
  674.  * -- Current class macros for Instance and Meta classes.
  675.  */
  676.  
  677. /*
  678.  * -- The M_SrcTransient ClassData Structure
  679.  */
  680. struct M_SrcTransientClassDataStructure M_SrcTransientClassData = {(SOMClass *) NULL};
  681.  
  682. /*
  683.  * -- The auxiliary M_SrcTransient ClassData structure
  684.  */
  685. SOMEXTERN struct M_SrcTransientCClassDataStructure {
  686.     somMethodTab *parentMtab;
  687.     somDToken instanceDataToken;
  688. } M_SrcTransientCClassData = {(somMethodTab *) NULL};
  689.  
  690.  
  691. /*
  692.  * -- Apply Stubs for new methods introduced by M_SrcTransient
  693.  */
  694. static HMODULE   SOMLINK somAP_clsQueryModuleHandle(M_SrcTransient *somSelf,
  695.         somId __id,
  696.         somId __desc,
  697.         va_list __ap)
  698. {
  699.     (void) __ap; (void) __id; (void) __desc;           /* Referenced to prevent warning msg */
  700.  
  701.     return (somSelf->clsQueryModuleHandle());
  702. }
  703.  
  704.  
  705. /*
  706.  * New Method: clsQueryModuleHandle
  707.  */
  708. SOM_Scope HMODULE   SOMLINK srcM_clsQueryModuleHandle(M_SrcTransient *somSelf);
  709. static char *somMN_clsQueryModuleHandle = "clsQueryModuleHandle";
  710. static somId somId_clsQueryModuleHandle = &somMN_clsQueryModuleHandle;
  711. static char *somDS_clsQueryModuleHandle = "----";
  712. static somId somDI_clsQueryModuleHandle = &somDS_clsQueryModuleHandle;
  713. static HMODULE   SOMLINK somRD_clsQueryModuleHandle(M_SrcTransient *somSelf)
  714. {
  715.   return (HMODULE) somSelf->somDispatchL(somId_clsQueryModuleHandle,
  716.     (somSelf->somGetClass())->somGetMethodDescriptor(somId_clsQueryModuleHandle)
  717.         );
  718. }
  719.  
  720. /*
  721.  * Overridden method: wpclsQueryIconData
  722.  */
  723. SOM_Scope ULONG   SOMLINK srcM_wpclsQueryIconData(M_SrcTransient *somSelf,
  724.         PICONINFO pIconInfo);
  725. #ifndef parent_wpclsQueryIconData
  726. static char *somMN_wpclsQueryIconData = "wpclsQueryIconData";
  727. static somId somId_wpclsQueryIconData = &somMN_wpclsQueryIconData;
  728. #define parent_wpclsQueryIconData(somSelf,pIconInfo) \
  729.   ((( somTD_M_WPObject_wpclsQueryIconData ) \
  730.     somParentResolve(SOM_CurrentClass,M_WPObjectClassData.wpclsQueryIconData)) \
  731.      (somSelf,pIconInfo))
  732. #endif
  733.  
  734.  
  735. /* ---------------------------------- */
  736. /*
  737.  * Class Creation and Initialization
  738.  */
  739.  
  740.  
  741. /* a temporary, used during creation */
  742. static somClassDataStructure M_SrcTransienttempClassData;
  743.  
  744. /* Initialization for M_SrcTransient */
  745. static void M_SrcTransientsomInitializeClass ()
  746. {
  747.  
  748.     M_SrcTransientClassData.clsQueryModuleHandle = 
  749.       ((SOMClass *)M_SrcTransienttempClassData.classObject)->somAddStaticMethod (
  750.         somId_clsQueryModuleHandle,
  751.         somDI_clsQueryModuleHandle,
  752.         (somMethodProc *) srcM_clsQueryModuleHandle,
  753.         (somMethodProc *) somRD_clsQueryModuleHandle,
  754.         (somMethodProc *) somAP_clsQueryModuleHandle    );
  755.  
  756.     ((SOMClass *)M_SrcTransienttempClassData.classObject)->somOverrideSMethod (
  757.             somId_wpclsQueryIconData,
  758.             (somMethodProc *) srcM_wpclsQueryIconData);
  759. }
  760.  
  761. static void SOMLINK M_SrcTransientsomCreateClass(SOMClass *pClsObj,
  762.                            SOMClass *mClsObj)
  763. {
  764.     M_SrcTransienttempClassData.classObject = (SOMClass *)mClsObj->somNew();
  765.     M_SrcTransienttempClassData.classObject->somInitClass (
  766.         "M_SrcTransient",
  767.         pClsObj,
  768.         0,
  769.         M_SrcTransient_MaxNoMethods,
  770.         M_SrcTransient_MajorVersion,
  771.         M_SrcTransient_MinorVersion);
  772.     M_SrcTransientCClassData.instanceDataToken = 
  773.     M_SrcTransienttempClassData.classObject->somGetInstanceToken();
  774.     M_SrcTransientsomInitializeClass();
  775.     M_SrcTransientCClassData.parentMtab =
  776.     M_SrcTransienttempClassData.classObject->somGetPClsMtab();
  777.     M_SrcTransienttempClassData.classObject->somSetClassData((somClassDataStructure *)&M_SrcTransientClassData);
  778.     M_SrcTransienttempClassData.classObject->somClassReady();
  779.     /* make newly created class object visible */
  780.     M_SrcTransientClassData.classObject = M_SrcTransienttempClassData.classObject;
  781. }
  782.  
  783. SOMEXTERN SOMClass * SOMLINK M_SrcTransientNewClass (integer4 scemajorVersion,
  784.         integer4 sceminorVersion)
  785. {
  786.     SOMClass *pClsObj;
  787.     SOMClass *mClsObj;
  788.  
  789.     /* Check the version numbers */
  790.     if (((scemajorVersion != 0) && 
  791.          (scemajorVersion != M_SrcTransient_MajorVersion)) ||
  792.         ((sceminorVersion != 0) && 
  793.          (sceminorVersion > M_SrcTransient_MinorVersion))) {
  794.     somPrintf("M_SrcTransientNewClass: Error, bad version numbers.\n");
  795.     SOM_Error(SOMERROR_BadVersion);
  796.     }
  797.     /* Don't do anything if class object is already created. */
  798.     if (M_SrcTransientClassData.classObject != (SOMClass *) NULL)
  799.     return(M_SrcTransientClassData.classObject);
  800.  
  801.     /* Make sure the environment is initialized. */
  802.     if (SOMClassMgrObject == (SOMClassMgr *) NULL) somEnvironmentNew();
  803.     if (SOMClassMgrObject == (SOMClassMgr *) NULL)
  804.     SOM_Error(SOMERROR_CouldNotStartup);
  805.  
  806.     /* Get the parent class object. */
  807.     M_WPTransientNewClass(1,2);    /* static reference */
  808.     pClsObj = ((SOMClassMgr *)SOMClassMgrObject)->somFindClass(
  809.         SOM_IdFromString("M_WPTransient"), 1, 2);
  810.     if (pClsObj == (SOMClass *) NULL)
  811.     SOM_Error(SOMERROR_NoParentClass);
  812.  
  813.     /* Use parent's metaclass */ 
  814.     mClsObj = pClsObj->somGetClass();
  815.  
  816.     somConstructClass(M_SrcTransientsomCreateClass, pClsObj, mClsObj,
  817.              &M_SrcTransienttempClassData);
  818.     return (M_SrcTransientClassData.classObject);
  819. }
  820.  
  821. #endif      /* M_SrcTransient_Class_Source */
  822.  
  823. #endif       /* srctrans_mih */
  824.