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 / Framewrk / FWSemEvt / Include / SLSemInt.xh < prev    next >
Encoding:
Text File  |  1996-08-16  |  4.4 KB  |  189 lines  |  [TEXT/MPS ]

  1.  
  2. /*
  3.  * This file was generated by the SOM Compiler.
  4.  * FileName: SLSemInt.xh.
  5.  * Generated using:
  6.  *     SOM Precompiler somipc: 2.18
  7.  *     SOM Emitter emitxh.dll: 2.33
  8.  */
  9.  
  10. /*
  11.  * 
  12.  *     File:                SLSemInt.idl
  13.  * 
  14.  *     Contains:            Interface for FW_OSemanticInterface class
  15.  *     Release Version:    $ ODF 1 $
  16.  * 
  17.  *     Copyright:    (c) 1993 - 1996 by Apple Computer, Inc., all rights reserved.
  18.  * 
  19.  */
  20.  
  21.  
  22. #ifndef SOM_FW_OSemanticInterface_xh
  23. #define SOM_FW_OSemanticInterface_xh
  24.  
  25. class FW_OSemanticInterface;
  26.  
  27. #define FW_OSemanticInterface_MajorVersion 1
  28. #define FW_OSemanticInterface_MinorVersion 0
  29.  
  30. /*
  31.  * Passthru lines: File: "C.xh", "before"
  32.  */
  33. struct FW_SSemIntGlueProcs;
  34. typedef FW_SSemIntGlueProcs* FW_HSemIntGlueProcs;
  35.  
  36. /* C++ SOM defs */
  37. #include <somcls.xh>
  38. #include <somcm.xh>
  39.  
  40. /* C++ parent defs */
  41. #ifndef SOM_ODSemanticInterface_xh
  42. #include <SemtIntB.xh>
  43. #endif
  44.  
  45. #ifndef FW_OSemanticInterface_API
  46. #define FW_OSemanticInterface_API
  47. /*
  48.  * -- The Class API
  49.  */
  50.  
  51. /*
  52.  * Start of user-defined types:
  53.  */
  54. class SOMClass;
  55. class SOMObject;
  56. class ODFrame;
  57. class ODFacet;
  58. class ODObject;
  59. class ODExtension;
  60. class ODRefCntObject;
  61. class ODSemanticInterface;
  62. class ODSession;
  63. class ODPart;
  64. class ODDesc;
  65. class ODAppleEvent;
  66. class ODOSLToken;
  67. class FW_OSemanticInterface;
  68. class FW_CSemanticInterface;
  69.  
  70. /*
  71.  * End of user-defined types.
  72.  */
  73.  
  74. #ifdef OLDIBMSOMAPISUPPORT
  75. #define FW_OSemanticInterfaceCClassData FW_OSemanticInterfaceClassData
  76. #define FW_OSemanticInterfaceNewClass(major,minor) somNewVersionedClassReference(FW_OSemanticInterface,major,minor)
  77. #endif
  78.  
  79. /* define xxxMetaClass macro to facilitate (cls ## MetaClass) */
  80. #define FW_OSemanticInterfaceMetaClass SOMClass
  81.  
  82. #if PRAGMA_ALIGN_SUPPORTED
  83. #  pragma options align=power
  84. #endif
  85.  
  86. /* The API to the FW_OSemanticInterface class object, and the methods it introduces. */
  87. SOMEXTERN struct FW_OSemanticInterfaceClassDataStructure {
  88. #ifdef OLDIBMSOMAPISUPPORT
  89.     SOMClass            *classObject;    /* always zero, use somNewClassReference instead */
  90. #else
  91.     long zero;
  92. #endif
  93.     somStaticClassInfo *sci;
  94.     somDToken        instanceDataToken;
  95.     long reserved [3];
  96.     somMToken InitODFSemanticInterface;
  97. } SOMDLINK FW_OSemanticInterfaceClassData;
  98.  
  99. #if PRAGMA_ALIGN_SUPPORTED
  100. #  pragma options align=reset
  101. #endif
  102.  
  103. #if !defined(FW_OSemanticInterface_Class_Source) && !defined(SOM_Module_slsemint_Source)
  104. #if PRAGMA_IMPORT_SUPPORTED
  105. #pragma import list FW_OSemanticInterfaceClassData
  106. #endif
  107. #endif
  108.  
  109.  
  110. /*
  111.  * -- Typedefs and inline method declarations for left path inherited methods
  112.  * -- are omitted because this compilation had -museinheritedmethods in effect
  113.  */
  114.  
  115.  
  116. /*
  117.  * -- Typedefs for FW_OSemanticInterface Method Procedures
  118.  */
  119. SOMEXTERN {
  120. typedef void   (* SOMLINK somTD_FW_OSemanticInterface_InitODFSemanticInterface)(FW_OSemanticInterface *somSelf, Environment *ev,
  121.         ODPart* base,
  122.         ODSession* session,
  123.         FW_CSemanticInterface* semInt,
  124.         FW_HSemIntGlueProcs semIntGlue);
  125. }
  126.  
  127. #endif /* FW_OSemanticInterface_API */
  128.  
  129.  
  130. /*
  131.  * -- This emitter treats Method Tokens as Thunks by default.
  132.  * -- Use the sc modifier "nothunks" to change this default
  133.  */
  134. #undef somresolve_
  135. #define somresolve_(obj,mToken) ((somMethodProc*)((void)obj, mToken))
  136.  
  137. /*
  138.  * -- The C++ Wrapper Class for FW_OSemanticInterface
  139.  */
  140. class FW_OSemanticInterface : public ODSemanticInterface
  141. {
  142. public:
  143.  
  144. // FW_OSemanticInterface::new registers use of the class object, and then uses somNew
  145. // to allocate memory and load the object method table pointer. 
  146. void *operator new(size_t size)
  147. {
  148.     SOM_IgnoreWarning(size);
  149.     // Allocate memory using the default allocator for FW_OSemanticInterface, and
  150.     // clear mem & set method table pointer, call basic initialization
  151. #ifdef SOMCHKNULL
  152.     void * __somResult = (void *)
  153.       somNewObject(FW_OSemanticInterface);
  154.     SOMCHKNULL(__somResult);
  155.     return __somResult;
  156. #else
  157.     return (void*) somNewObject(FW_OSemanticInterface);
  158. #endif
  159. }
  160.  
  161. // FW_OSemanticInterface::delete uses the default deallocator for the object's class.
  162. void operator delete(void * obj)
  163. {
  164.     if (obj) {
  165.         SOM_Resolve(obj,SOMObject,somFree)
  166.            ( (SOMObject*) obj );
  167.     }
  168. }
  169.  
  170. /* method: InitODFSemanticInterface */
  171. void   InitODFSemanticInterface(Environment *ev,
  172.         ODPart* base,
  173.         ODSession* session,
  174.         FW_CSemanticInterface* semInt,
  175.         FW_HSemIntGlueProcs semIntGlue)
  176. {
  177.    SOM_ResolveD(this,FW_OSemanticInterface,FW_OSemanticInterface,InitODFSemanticInterface)
  178.     (this,ev,base,session,semInt,semIntGlue);
  179. #ifdef SOMCHKEXCEPT
  180.       SOMCHKEXCEPT;
  181. #endif
  182. }
  183.  
  184. };   /* FW_OSemanticInterface */
  185.  
  186.  
  187.  
  188. #endif       /* SOM_FW_OSemanticInterface_xh */
  189.