home *** CD-ROM | disk | FTP | other *** search
/ Developer CD Series 1996 October: Mac OS SDK / Dev.CD Oct 96 SDK / Dev.CD Oct 96 SDK2.toast / Development Kits (Disc 2) / OpenDoc Development Framework / ODFDev / ODF / OS / FWResour / Include / SLResFil.xih < prev    next >
Encoding:
Text File  |  1996-08-16  |  11.0 KB  |  385 lines  |  [TEXT/MPS ]

  1.  
  2. /*
  3.  * This file was generated by the SOM Compiler.
  4.  * FileName: SLResFil.xih.
  5.  * Generated using:
  6.  *     SOM Precompiler somipc: 2.18
  7.  *     SOM Emitter emitxih.dll: 2.33
  8.  */
  9.  
  10. /*
  11.  * 
  12.  * 
  13.  *     File:                SLResour.idl
  14.  *     Release Version:    $ ODF 1 $
  15.  * 
  16.  *     Copyright:    (c) 1993 - 1996 by Apple Computer, Inc., all rights reserved.
  17.  * 
  18.  * 
  19.  */
  20.  
  21.  
  22. #ifndef SOM_FW_OResourceFile_xih
  23. #define SOM_FW_OResourceFile_xih
  24.  
  25. #include <somcls.xh>
  26. #include <somcm.xh>
  27.  
  28. /*
  29.  * Passthru lines: File: "C.xih", "before"
  30.  */
  31.  
  32.  
  33. #ifndef SOM_FW_OResourceFile_xh
  34. #include <SLResFil.xh>
  35. #endif
  36.  
  37. /*
  38.  * Set the scope of methods functions
  39.  */
  40. #ifndef SOM_Scope
  41. #define SOM_Scope extern "C"
  42. #endif
  43.  
  44. #define FW_OResourceFile_MaxNoMethods 9
  45.  
  46. /*
  47.  * -- Instance Data
  48.  */
  49.  
  50. /*
  51.  * -- Use best possible alignment for instance data slice.
  52.  */
  53. #if PRAGMA_ALIGN_SUPPORTED
  54. #  pragma options align=power
  55. #endif
  56. typedef struct FW_OResourceFileData {
  57.     FW_Boolean fMustCloseFile;
  58.     FW_ResourceFileID fResourceFileID;
  59.     FW_OFileSpecification* fFileSpec;
  60. } FW_OResourceFileData;
  61. #if PRAGMA_ALIGN_SUPPORTED
  62. #  pragma options align=reset
  63. #endif
  64.  
  65. /*
  66.  * -- Getdata Macro
  67.  */
  68.  
  69. /*
  70.  * -- This emitter treats Data Tokens as Thunks by default.
  71.  * -- Use the sc modifier "nothunks" to override this default.
  72.  */
  73. SOMEXTERN typedef FW_OResourceFileData* (* SOMLINK somTD_FW_OResourceFile_DataThunk)(void*);
  74. #define FW_OResourceFileGetData(somSelf) \
  75.    (((somTD_FW_OResourceFile_DataThunk)(FW_OResourceFileClassData.instanceDataToken))(somSelf))
  76.  
  77. /*
  78.  * -- Instance Data Access Macros for use in Method Procedures
  79.  */
  80. #ifdef VARIABLE_MACROS
  81.   #define _fMustCloseFile (somThis->fMustCloseFile)
  82.   #define _fResourceFileID (somThis->fResourceFileID)
  83.   #define _fFileSpec (somThis->fFileSpec)
  84. #endif
  85.  
  86.  
  87. /*
  88.  * Trace/Debug macro
  89.  */
  90. #ifndef FW_OResourceFileMethodDebug
  91. #define FW_OResourceFileMethodDebug(c,m) SOMMethodDebug(c,m)
  92. #endif
  93.  
  94. /*
  95.  * -- Method Macros for use in Method Procedures
  96.  */
  97. #ifdef METHOD_MACROS
  98.   #define _Acquire somSelf->Acquire
  99.   #define _Release somSelf->Release
  100.   #define _GetRefCount somSelf->GetRefCount
  101.   #define _somInit somSelf->somInit
  102.   #define _somUninit somSelf->somUninit
  103.   #define _somInit somSelf->somInit
  104.   #define _somUninit somSelf->somUninit
  105.   #define _somDuplicateReference somSelf->somDuplicateReference
  106.   #define _somCompareReference somSelf->somCompareReference
  107.   #define _somRelease somSelf->somRelease
  108.   #define _somFree somSelf->somFree
  109.   #define _somCanDelete somSelf->somCanDelete
  110.   #define _somGetClass somSelf->somGetClass
  111.   #define _somGetClassName somSelf->somGetClassName
  112.   #define _somGetSize somSelf->somGetSize
  113.   #define _somIsA somSelf->somIsA
  114.   #define _somRespondsTo somSelf->somRespondsTo
  115.   #define _somIsInstanceOf somSelf->somIsInstanceOf
  116.   #define _somDispatch somSelf->somDispatch
  117.   #define _somClassDispatch somSelf->somClassDispatch
  118.   #define _somCastObj somSelf->somCastObj
  119.   #define _somResetObj somSelf->somResetObj
  120.   #define _somPrintSelf somSelf->somPrintSelf
  121.   #define _somDumpSelf somSelf->somDumpSelf
  122.   #define _somDumpSelfInt somSelf->somDumpSelfInt
  123.   #define _InitFromFileSpec somSelf->InitFromFileSpec
  124.   #define _InitFromResFileID somSelf->InitFromResFileID
  125.   #define _GetFileSpecification somSelf->GetFileSpecification
  126.   #define _HasResource somSelf->HasResource
  127.   #define _GetResourceHandle somSelf->GetResourceHandle
  128.   #define _ReleaseResourceHandle somSelf->ReleaseResourceHandle
  129.   #define _PrivHasSpecialResource somSelf->PrivHasSpecialResource
  130.   #define _PrivGetSpecialResource somSelf->PrivGetSpecialResource
  131.   #define _PrivGetResourceFileID somSelf->PrivGetResourceFileID
  132.   #define _somInit somSelf->somInit
  133.   #define _somUninit somSelf->somUninit
  134. #endif
  135.  
  136.  
  137. /*
  138.  * Introduced methods
  139.  */
  140.  
  141. /* New Method: InitFromFileSpec */
  142. SOM_Scope void  SOMLINK FW_OResourceFile__InitFromFileSpec(FW_OResourceFile *somSelf, Environment *ev,
  143.         FW_OFileSpecification* newFileSpec);
  144.  
  145. /* New Method: InitFromResFileID */
  146. SOM_Scope void  SOMLINK FW_OResourceFile__InitFromResFileID(FW_OResourceFile *somSelf, Environment *ev,
  147.         FW_ResourceFileID resFileID);
  148.  
  149. /* New Method: GetFileSpecification */
  150. SOM_Scope FW_OFileSpecification*  SOMLINK FW_OResourceFile__GetFileSpecification(FW_OResourceFile *somSelf, Environment *ev);
  151.  
  152. /* New Method: HasResource */
  153. SOM_Scope FW_Boolean  SOMLINK FW_OResourceFile__HasResource(FW_OResourceFile *somSelf, Environment *ev,
  154.         FW_ResourceId resourceId,
  155.         FW_ResourceType resourceType);
  156.  
  157. /* New Method: GetResourceHandle */
  158. SOM_Scope FW_ResourceHandle  SOMLINK FW_OResourceFile__GetResourceHandle(FW_OResourceFile *somSelf, Environment *ev,
  159.         FW_ResourceId resourceId,
  160.         FW_ResourceType resourceType);
  161.  
  162. /* New Method: ReleaseResourceHandle */
  163. SOM_Scope void  SOMLINK FW_OResourceFile__ReleaseResourceHandle(FW_OResourceFile *somSelf, Environment *ev,
  164.         FW_ResourceHandle handle);
  165.  
  166. /* New Method: PrivHasSpecialResource */
  167. SOM_Scope FW_Boolean  SOMLINK FW_OResourceFile__PrivHasSpecialResource(FW_OResourceFile *somSelf, Environment *ev,
  168.         FW_ResourceId resourceId,
  169.         FW_ResourceType resourceType);
  170.  
  171. /* New Method: PrivGetSpecialResource */
  172. SOM_Scope FW_PlatformHandle  SOMLINK FW_OResourceFile__PrivGetSpecialResource(FW_OResourceFile *somSelf, Environment *ev,
  173.         FW_ResourceId resourceId,
  174.         FW_ResourceType resourceType);
  175.  
  176. /* New Method: PrivGetResourceFileID */
  177. SOM_Scope FW_ResourceFileID  SOMLINK FW_OResourceFile__PrivGetResourceFileID(FW_OResourceFile *somSelf, Environment *ev);
  178.  
  179. /*
  180.  * Overridden methods
  181.  */
  182.  
  183. /* Overridden method: somInit */
  184. SOM_Scope void  SOMLINK FW_OResourceFile__somInit(FW_OResourceFile *somSelf);
  185. SOMEXTERN typedef void   (* SOMLINK somTD_xih_FW_OResourceFile_somInit)(FW_OResourceFile *somSelf);
  186. inline void  SOMLINK FW_OResourceFile_parent_FW_ORefCount_somInit(FW_OResourceFile *somSelf)
  187. {
  188.   (void)         (somSelf);
  189. }
  190. #define FW_OResourceFile_parents_somInit(arg0) \
  191.   (void) FW_OResourceFile_parent_FW_ORefCount_somInit(arg0)
  192.  
  193. /* Overridden method: somUninit */
  194. SOM_Scope void  SOMLINK FW_OResourceFile__somUninit(FW_OResourceFile *somSelf);
  195. SOMEXTERN typedef void   (* SOMLINK somTD_xih_FW_OResourceFile_somUninit)(FW_OResourceFile *somSelf);
  196. inline void  SOMLINK FW_OResourceFile_parent_FW_ORefCount_somUninit(FW_OResourceFile *somSelf)
  197. {
  198.   (void)         (somSelf);
  199. }
  200. #define FW_OResourceFile_parents_somUninit(arg0) \
  201.   (void) FW_OResourceFile_parent_FW_ORefCount_somUninit(arg0)
  202.  
  203. /*
  204.  * -- Primary Implementation File Support
  205.  */
  206. #if (defined(FW_OResourceFile_Class_Source) || defined(SOM_Module_slresfil_Source))
  207.  
  208. /*
  209.  * -- The FW_OResourceFile ClassData Structure
  210.  */
  211.  
  212. #if PRAGMA_IMPORT_SUPPORTED
  213. #pragma export list FW_OResourceFileClassData
  214. #endif
  215.  
  216.  
  217. /*
  218.  * -- The FW_OResourceFile Class Ancestor Table
  219.  */
  220. static somClassDataStructure * SOMDLINK FW_OResourceFileClassAncestors [] = {
  221.     (somClassDataStructure*) & FW_ORefCountClassData,    /* parent */
  222.     (somClassDataStructure*) & SOMObjectClassData,    /* ancestor */
  223. };
  224.  
  225.  
  226. /*
  227.  * -- The FW_OResourceFile Override ProcPtr Implementations Table
  228.  */
  229. static somMethodPtr FW_OResourceFileOverrideProcs [] = {
  230.     (somMethodPtr) FW_OResourceFile__somInit,    /* override class SOMObject */
  231.     (somMethodPtr) FW_OResourceFile__somUninit,    /* override class SOMObject */
  232. };
  233.  
  234.  
  235. static void FW_OResourceFileDLLD ( void ) { }
  236.  
  237.  
  238. /*
  239.  * -- The FW_OResourceFile Static Class Info Master Table
  240.  */
  241. static somStaticClassInfo FW_OResourceFileSCI = {
  242.       70,    /* layout version */
  243.     (somClassDataStructure*)  & FW_OResourceFileClassData,    /* main token table */
  244.       FW_OResourceFileOverrideProcs,    /* override proc implemenations table */
  245.       FW_OResourceFileClassAncestors,    /* ancestor table */
  246.       FW_OResourceFileDLLD,    /* DLLdesignator */
  247.       0,    /* no special procs */
  248.       0,    /* rtci slot */
  249.       0,    /* count slot */
  250.       0,    /* dynamic ancestry */
  251.       0,    /* free */
  252.       0,    /* free */
  253.       0,    /* free */
  254.       0,    /* free */
  255.  
  256. /*
  257.  * -- The FW_OResourceFile Counts Table
  258.  */
  259.     (somStaticClassCounts *)
  260.         "\x00\x00\x00\x01"    /* majorversion */
  261.         "\x00\x00\x00\x00"    /* minorversion */
  262.         "\x00\x00\x00\x01"    /* flags */
  263.             "\x00\x02"    /* type code alignment */
  264.             "\x00\x0b"    /* classTokenCount */
  265.             "\x00\x01"    /* numDirectParents */
  266.             "\x00\x00"    /* numMetaClasses */
  267.             "\x00\x01"    /* numOverriddenAncestors */
  268.             "\x00\x00"    /* numMigratedMethods */
  269.             "\x00\x00"    /* numSelectedInherited */
  270.             "\x00\x00"    /* numUnused */
  271.             "\x00\x00"    /* free */
  272.             "\x00\x00"    /* free */
  273.             "\x00\x00"    /* free */
  274.             "\x00"    /* free */
  275.                 ,
  276.  
  277.     {
  278.       "FW_OResourceFile",    /* the class name */
  279.       sizeof (FW_OResourceFileData), /* class instance data size */
  280.  
  281. /*
  282.  * -- The FW_OResourceFile Parent Versions Table
  283.  */
  284.     (somParentVersions *)
  285.         "\x00\x00\x00\x01"    /* majorversion */
  286.         "\x00\x00\x00\x00"    /* minorversion */
  287.                 ,
  288.  
  289.  
  290. /*
  291.  * -- The FW_OResourceFile Token Slot Usage Table
  292.  */
  293.     (somSlotUsage *)
  294.         "\x33\x00\x00\x00\x00",
  295.  
  296.  
  297. /*
  298.  * -- The FW_OResourceFile Method Signature Info
  299.  */
  300.     (somSignatureInfo *)
  301.         "\x03\x07"    /* InitFromFileSpec */
  302.          "\x03\x17\xc3"    /* InitFromResFileID */
  303.          "\x02\x0c"    /* GetFileSpecification */
  304.          "\x04\x10\xc2\x40"    /* HasResource */
  305.          "\x04\x1c\xc2\x40"    /* GetResourceHandle */
  306.          "\x03\x07"    /* ReleaseResourceHandle */
  307.          "\x04\x10\xc2\x40"    /* PrivHasSpecialResource */
  308.          "\x04\x1c\xc2\x40"    /* PrivGetSpecialResource */
  309.          "\x02\x03"    /* PrivGetResourceFileID */
  310.              ,
  311.  
  312.  
  313. /*
  314.  * -- The FW_OResourceFile Class Method Names
  315.  */
  316.         "somInit\0"
  317.         "somUninit\0"
  318.         "InitFromFileSpec\0"
  319.         "InitFromResFileID\0"
  320.         "GetFileSpecification\0"
  321.         "HasResource\0"
  322.         "GetResourceHandle\0"
  323.         "ReleaseResourceHandle\0"
  324.         "PrivHasSpecialResource\0"
  325.         "PrivGetSpecialResource\0"
  326.         "PrivGetResourceFileID\0"
  327.             ,
  328.  
  329.  
  330. /*
  331.  * -- The FW_OResourceFile Override Slots Table
  332.  */
  333.     (somOverrideData *)
  334.         "\x00\x01\x00\x02"    /* parent SOMObject has 2 overrides */
  335.             "\x00\x00"    /* somInit */
  336.             "\x00\x01"    /* somUninit */
  337.                 ,
  338.  
  339.       0,    /* no migrated methods table */
  340.       0,    /* no selected inherited */
  341.       0,    /* unused */
  342.  
  343.       0,    /* free */
  344.       0,    /* free */
  345.       0,    /* free */
  346.       0,    /* free */
  347.     },
  348. };
  349.  
  350. /*
  351.  * -- The FW_OResourceFile ClassData Structure
  352.  */
  353. struct FW_OResourceFileClassDataStructure SOMDLINK FW_OResourceFileClassData = {
  354.       0,            /* zero */
  355.     & FW_OResourceFileSCI,        /* SCI link */
  356.       0,            /* instanceDataToken */
  357.       0,            /* reserved */
  358.       0,            /* reserved */
  359.       0,            /* reserved */
  360.     (somMToken) 0,        /* somInit:empty */
  361.     (somMToken) 0,        /* somUninit:empty */
  362.     (somMToken) FW_OResourceFile__InitFromFileSpec,    /* InitFromFileSpec:method */
  363.     (somMToken) FW_OResourceFile__InitFromResFileID,    /* InitFromResFileID:method */
  364.     (somMToken) FW_OResourceFile__GetFileSpecification,    /* GetFileSpecification:method */
  365.     (somMToken) FW_OResourceFile__HasResource,    /* HasResource:method */
  366.     (somMToken) FW_OResourceFile__GetResourceHandle,    /* GetResourceHandle:method */
  367.     (somMToken) FW_OResourceFile__ReleaseResourceHandle,    /* ReleaseResourceHandle:method */
  368.     (somMToken) FW_OResourceFile__PrivHasSpecialResource,    /* PrivHasSpecialResource:method */
  369.     (somMToken) FW_OResourceFile__PrivGetSpecialResource,    /* PrivGetSpecialResource:method */
  370.     (somMToken) FW_OResourceFile__PrivGetResourceFileID,    /* PrivGetResourceFileID:method */
  371. };
  372.  
  373.  
  374. /*
  375.  * Functions for attributes.
  376.  */
  377.  
  378. /*
  379.  * Macros for initializers/destructors
  380.  */
  381.  
  382. #endif /* Primary Implementation Support */
  383.  
  384. #endif       /* SOM_FW_OResourceFile_xih */
  385.