home *** CD-ROM | disk | FTP | other *** search
/ Developer CD Series 1997 January: Mac OS SDK / Dev.CD Jan 97 SDK2.toast / Development Kits (Disc 2) / OpenDoc Development Framework / ODFDev / ODF / Found / FWRefCnt / SLRefCnt.xih < prev   
Encoding:
Text File  |  1996-09-16  |  7.5 KB  |  322 lines  |  [TEXT/MPS ]

  1.  
  2. /*
  3.  * This file was generated by the SOM Compiler.
  4.  * FileName: SLRefCnt.xih.
  5.  * Generated using:
  6.  *     SOM Precompiler somipc: 2.18
  7.  *     SOM Emitter emitxih.dll: 2.33
  8.  */
  9.  
  10. /*
  11.  * 
  12.  *     File:        SLRefCnt.idl
  13.  * 
  14.  *     Contains:    Interface for FW_ORefCount class
  15.  *     Release Version:    $ ODF 2 $
  16.  * 
  17.  *     Copyright:    (c) 1993 - 1996 by Apple Computer, Inc., all rights reserved.
  18.  * 
  19.  */
  20.  
  21.  
  22. #ifndef SOM_FW_ORefCount_xih
  23. #define SOM_FW_ORefCount_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_ORefCount_xh
  34. #include <SLRefCnt.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_ORefCount_MaxNoMethods 3
  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_ORefCountData {
  57.     long fRefCount;
  58. } FW_ORefCountData;
  59. #if PRAGMA_ALIGN_SUPPORTED
  60. #  pragma options align=reset
  61. #endif
  62.  
  63. /*
  64.  * -- Getdata Macro
  65.  */
  66.  
  67. /*
  68.  * -- This emitter treats Data Tokens as Thunks by default.
  69.  * -- Use the sc modifier "nothunks" to override this default.
  70.  */
  71. SOMEXTERN typedef FW_ORefCountData* (* SOMLINK somTD_FW_ORefCount_DataThunk)(void*);
  72. #define FW_ORefCountGetData(somSelf) \
  73.    (((somTD_FW_ORefCount_DataThunk)(FW_ORefCountClassData.instanceDataToken))(somSelf))
  74.  
  75. /*
  76.  * -- Instance Data Access Macros for use in Method Procedures
  77.  */
  78. #ifdef VARIABLE_MACROS
  79.   #define _fRefCount (somThis->fRefCount)
  80. #endif
  81.  
  82.  
  83. /*
  84.  * Trace/Debug macro
  85.  */
  86. #ifndef FW_ORefCountMethodDebug
  87. #define FW_ORefCountMethodDebug(c,m) SOMMethodDebug(c,m)
  88. #endif
  89.  
  90. /*
  91.  * -- Method Macros for use in Method Procedures
  92.  */
  93. #ifdef METHOD_MACROS
  94.   #define _somInit somSelf->somInit
  95.   #define _somUninit somSelf->somUninit
  96.   #define _somDuplicateReference somSelf->somDuplicateReference
  97.   #define _somCompareReference somSelf->somCompareReference
  98.   #define _somRelease somSelf->somRelease
  99.   #define _somFree somSelf->somFree
  100.   #define _somCanDelete somSelf->somCanDelete
  101.   #define _somGetClass somSelf->somGetClass
  102.   #define _somGetClassName somSelf->somGetClassName
  103.   #define _somGetSize somSelf->somGetSize
  104.   #define _somIsA somSelf->somIsA
  105.   #define _somRespondsTo somSelf->somRespondsTo
  106.   #define _somIsInstanceOf somSelf->somIsInstanceOf
  107.   #define _somDispatch somSelf->somDispatch
  108.   #define _somClassDispatch somSelf->somClassDispatch
  109.   #define _somCastObj somSelf->somCastObj
  110.   #define _somResetObj somSelf->somResetObj
  111.   #define _somPrintSelf somSelf->somPrintSelf
  112.   #define _somDumpSelf somSelf->somDumpSelf
  113.   #define _somDumpSelfInt somSelf->somDumpSelfInt
  114.   #define _Acquire somSelf->Acquire
  115.   #define _Release somSelf->Release
  116.   #define _GetRefCount somSelf->GetRefCount
  117.   #define _somInit somSelf->somInit
  118.   #define _somUninit somSelf->somUninit
  119. #endif
  120.  
  121.  
  122. /*
  123.  * Introduced methods
  124.  */
  125.  
  126. /* New Method: Acquire */
  127. SOM_Scope void  SOMLINK FW_ORefCountAcquire(FW_ORefCount *somSelf, Environment *ev);
  128.  
  129. /* New Method: Release */
  130. SOM_Scope long  SOMLINK FW_ORefCountRelease(FW_ORefCount *somSelf, Environment *ev);
  131.  
  132. /* New Method: GetRefCount */
  133. SOM_Scope long  SOMLINK FW_ORefCountGetRefCount(FW_ORefCount *somSelf, Environment *ev);
  134.  
  135. /*
  136.  * Overridden methods
  137.  */
  138.  
  139. /* Overridden method: somInit */
  140. SOM_Scope void  SOMLINK FW_ORefCountsomInit(FW_ORefCount *somSelf);
  141. SOMEXTERN typedef void   (* SOMLINK somTD_xih_FW_ORefCount_somInit)(FW_ORefCount *somSelf);
  142. inline void  SOMLINK FW_ORefCount_parent_SOMObject_somInit(FW_ORefCount *somSelf)
  143. {
  144.   (void)         (somSelf);
  145. }
  146. #define FW_ORefCount_parents_somInit(arg0) \
  147.   (void) FW_ORefCount_parent_SOMObject_somInit(arg0)
  148.  
  149. /* Overridden method: somUninit */
  150. SOM_Scope void  SOMLINK FW_ORefCountsomUninit(FW_ORefCount *somSelf);
  151. SOMEXTERN typedef void   (* SOMLINK somTD_xih_FW_ORefCount_somUninit)(FW_ORefCount *somSelf);
  152. inline void  SOMLINK FW_ORefCount_parent_SOMObject_somUninit(FW_ORefCount *somSelf)
  153. {
  154.   (void)         (somSelf);
  155. }
  156. #define FW_ORefCount_parents_somUninit(arg0) \
  157.   (void) FW_ORefCount_parent_SOMObject_somUninit(arg0)
  158.  
  159. /*
  160.  * -- Primary Implementation File Support
  161.  */
  162. #if (defined(FW_ORefCount_Class_Source) || defined(SOM_Module_slrefcnt_Source))
  163.  
  164. /*
  165.  * -- The FW_ORefCount ClassData Structure
  166.  */
  167.  
  168. #if PRAGMA_IMPORT_SUPPORTED
  169. #pragma export list FW_ORefCountClassData
  170. #endif
  171.  
  172.  
  173. /*
  174.  * -- The FW_ORefCount Class Ancestor Table
  175.  */
  176. static somClassDataStructure * SOMDLINK FW_ORefCountClassAncestors [] = {
  177.     (somClassDataStructure*) & SOMObjectClassData,    /* parent */
  178. };
  179.  
  180.  
  181. /*
  182.  * -- The FW_ORefCount Override ProcPtr Implementations Table
  183.  */
  184. static somMethodPtr FW_ORefCountOverrideProcs [] = {
  185.     (somMethodPtr) FW_ORefCountsomInit,    /* override class SOMObject */
  186.     (somMethodPtr) FW_ORefCountsomUninit,    /* override class SOMObject */
  187. };
  188.  
  189.  
  190. static void FW_ORefCountDLLD ( void ) { }
  191.  
  192.  
  193. /*
  194.  * -- The FW_ORefCount Static Class Info Master Table
  195.  */
  196. static somStaticClassInfo FW_ORefCountSCI = {
  197.       70,    /* layout version */
  198.     (somClassDataStructure*)  & FW_ORefCountClassData,    /* main token table */
  199.       FW_ORefCountOverrideProcs,    /* override proc implemenations table */
  200.       FW_ORefCountClassAncestors,    /* ancestor table */
  201.       FW_ORefCountDLLD,    /* DLLdesignator */
  202.       0,    /* no special procs */
  203.       0,    /* rtci slot */
  204.       0,    /* count slot */
  205.       0,    /* dynamic ancestry */
  206.       0,    /* free */
  207.       0,    /* free */
  208.       0,    /* free */
  209.       0,    /* free */
  210.  
  211. /*
  212.  * -- The FW_ORefCount Counts Table
  213.  */
  214.     (somStaticClassCounts *)
  215.         "\x00\x00\x00\x01"    /* majorversion */
  216.         "\x00\x00\x00\x00"    /* minorversion */
  217.         "\x00\x00\x00\x01"    /* flags */
  218.             "\x00\x02"    /* type code alignment */
  219.             "\x00\x05"    /* classTokenCount */
  220.             "\x00\x01"    /* numDirectParents */
  221.             "\x00\x00"    /* numMetaClasses */
  222.             "\x00\x01"    /* numOverriddenAncestors */
  223.             "\x00\x00"    /* numMigratedMethods */
  224.             "\x00\x00"    /* numSelectedInherited */
  225.             "\x00\x00"    /* numUnused */
  226.             "\x00\x00"    /* free */
  227.             "\x00\x00"    /* free */
  228.             "\x00\x00"    /* free */
  229.             "\x00"    /* free */
  230.                 ,
  231.  
  232.     {
  233.       "FW_ORefCount",    /* the class name */
  234.       sizeof (FW_ORefCountData), /* class instance data size */
  235.  
  236. /*
  237.  * -- The FW_ORefCount Parent Versions Table
  238.  */
  239.     (somParentVersions *)
  240.         "\x00\x00\x00\x46"    /* majorversion */
  241.         "\x00\x00\x00\x01"    /* minorversion */
  242.                 ,
  243.  
  244.  
  245. /*
  246.  * -- The FW_ORefCount Token Slot Usage Table
  247.  */
  248.     (somSlotUsage *)
  249.         "\x33\x00",
  250.  
  251.  
  252. /*
  253.  * -- The FW_ORefCount Method Signature Info
  254.  */
  255.     (somSignatureInfo *)
  256.         "\x02\x07"    /* Acquire */
  257.          "\x02\x05"    /* Release */
  258.          "\x02\x05"    /* GetRefCount */
  259.              ,
  260.  
  261.  
  262. /*
  263.  * -- The FW_ORefCount Class Method Names
  264.  */
  265.         "somInit\0"
  266.         "somUninit\0"
  267.         "Acquire\0"
  268.         "Release\0"
  269.         "GetRefCount\0"
  270.             ,
  271.  
  272.  
  273. /*
  274.  * -- The FW_ORefCount Override Slots Table
  275.  */
  276.     (somOverrideData *)
  277.         "\x00\x00\x00\x02"    /* parent SOMObject has 2 overrides */
  278.             "\x00\x00"    /* somInit */
  279.             "\x00\x01"    /* somUninit */
  280.                 ,
  281.  
  282.       0,    /* no migrated methods table */
  283.       0,    /* no selected inherited */
  284.       0,    /* unused */
  285.  
  286.       0,    /* free */
  287.       0,    /* free */
  288.       0,    /* free */
  289.       0,    /* free */
  290.     },
  291. };
  292.  
  293. /*
  294.  * -- The FW_ORefCount ClassData Structure
  295.  */
  296. struct FW_ORefCountClassDataStructure SOMDLINK FW_ORefCountClassData = {
  297.       0,            /* zero */
  298.     & FW_ORefCountSCI,        /* SCI link */
  299.       0,            /* instanceDataToken */
  300.       0,            /* reserved */
  301.       0,            /* reserved */
  302.       0,            /* reserved */
  303.     (somMToken) 0,        /* somInit:empty */
  304.     (somMToken) 0,        /* somUninit:empty */
  305.     (somMToken) FW_ORefCountAcquire,    /* Acquire:method */
  306.     (somMToken) FW_ORefCountRelease,    /* Release:method */
  307.     (somMToken) FW_ORefCountGetRefCount,    /* GetRefCount:method */
  308. };
  309.  
  310.  
  311. /*
  312.  * Functions for attributes.
  313.  */
  314.  
  315. /*
  316.  * Macros for initializers/destructors
  317.  */
  318.  
  319. #endif /* Primary Implementation Support */
  320.  
  321. #endif       /* SOM_FW_ORefCount_xih */
  322.