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 / Getting Started / MPW Development / MPW Additions / INTO Interfaces&Libraries / Cyberdog SDK / PublicIncludes / CyberSemanticInterface.xh < prev    next >
Encoding:
Text File  |  1996-08-02  |  3.8 KB  |  163 lines  |  [TEXT/MPS ]

  1.  
  2. /*
  3.  * This file was generated by the SOM Compiler.
  4.  * FileName: CyberSemanticInterface.xh.
  5.  * Generated using:
  6.  *     SOM Precompiler somipc: 2.18
  7.  *     SOM Emitter emitxh.dll: 2.33
  8.  */
  9.  
  10. /*
  11.  * 
  12.  *     includes
  13.  */
  14.  
  15.  
  16. #ifndef SOM_CyberSemanticInterface_xh
  17. #define SOM_CyberSemanticInterface_xh
  18.  
  19. class CyberSemanticInterface;
  20.  
  21. #define CyberSemanticInterface_MajorVersion 1
  22. #define CyberSemanticInterface_MinorVersion 0
  23.  
  24. /* C++ SOM defs */
  25. #include <somcls.xh>
  26. #include <somcm.xh>
  27.  
  28. /* C++ parent defs */
  29. #ifndef SOM_ODSemanticInterface_xh
  30. #include <SemtIntB.xh>
  31. #endif
  32.  
  33. #ifndef CyberSemanticInterface_API
  34. #define CyberSemanticInterface_API
  35. /*
  36.  * -- The Class API
  37.  */
  38.  
  39. /*
  40.  * Start of user-defined types:
  41.  */
  42. class ODFrame;
  43. class ODFacet;
  44. class SOMClass;
  45. class SOMObject;
  46. class ODObject;
  47. class ODExtension;
  48. class ODRefCntObject;
  49. class ODSemanticInterface;
  50. class ODSession;
  51. class ODPart;
  52. class ODDesc;
  53. class ODAppleEvent;
  54. class ODOSLToken;
  55. class ODDraft;
  56.  
  57. /*
  58.  * End of user-defined types.
  59.  */
  60.  
  61. #ifdef OLDIBMSOMAPISUPPORT
  62. #define CyberSemanticInterfaceCClassData CyberSemanticInterfaceClassData
  63. #define CyberSemanticInterfaceNewClass(major,minor) somNewVersionedClassReference(CyberSemanticInterface,major,minor)
  64. #endif
  65.  
  66. /* define xxxMetaClass macro to facilitate (cls ## MetaClass) */
  67. #define CyberSemanticInterfaceMetaClass SOMClass
  68.  
  69.  
  70. /* The API to the CyberSemanticInterface class object, and the methods it introduces. */
  71. SOMEXTERN struct CyberSemanticInterfaceClassDataStructure {
  72. #ifdef OLDIBMSOMAPISUPPORT
  73.     SOMClass            *classObject;    /* always zero, use somNewClassReference instead */
  74. #else
  75.     long zero;
  76. #endif
  77.     somStaticClassInfo *sci;
  78.     somDToken        instanceDataToken;
  79.     long reserved [3];
  80.     somMToken SetDraft;
  81. } SOMDLINK CyberSemanticInterfaceClassData;
  82.  
  83. #if !defined(CyberSemanticInterface_Class_Source) && !defined(SOM_Module_cybersemanticinterface_Source)
  84. #if PRAGMA_IMPORT_SUPPORTED
  85. #pragma import list CyberSemanticInterfaceClassData
  86. #endif
  87. #endif
  88.  
  89.  
  90. /*
  91.  * -- Typedefs and inline method declarations for left path inherited methods
  92.  * -- are omitted because this compilation had -museinheritedmethods in effect
  93.  */
  94.  
  95.  
  96. /*
  97.  * -- Typedefs for CyberSemanticInterface Method Procedures
  98.  */
  99. SOMEXTERN {
  100. typedef void   (* SOMLINK somTD_CyberSemanticInterface_SetDraft)(CyberSemanticInterface *somSelf, Environment *ev,
  101.         ODDraft* inDraft);
  102. }
  103.  
  104. #endif /* CyberSemanticInterface_API */
  105.  
  106.  
  107. /*
  108.  * -- This emitter treats Method Tokens as Thunks by default.
  109.  * -- Use the sc modifier "nothunks" to change this default
  110.  */
  111. #undef somresolve_
  112. #define somresolve_(obj,mToken) ((somMethodProc*)((void)obj, mToken))
  113.  
  114. /*
  115.  * -- The C++ Wrapper Class for CyberSemanticInterface
  116.  */
  117. class CyberSemanticInterface : public ODSemanticInterface
  118. {
  119. public:
  120.  
  121. // CyberSemanticInterface::new registers use of the class object, and then uses somNew
  122. // to allocate memory and load the object method table pointer. 
  123. void *operator new(size_t size)
  124. {
  125.     SOM_IgnoreWarning(size);
  126.     // Allocate memory using the default allocator for CyberSemanticInterface, and
  127.     // clear mem & set method table pointer, call basic initialization
  128. #ifdef SOMCHKNULL
  129.     void * __somResult = (void *)
  130.       somNewObject(CyberSemanticInterface);
  131.     SOMCHKNULL(__somResult);
  132.     return __somResult;
  133. #else
  134.     return (void*) somNewObject(CyberSemanticInterface);
  135. #endif
  136. }
  137.  
  138. // CyberSemanticInterface::delete uses the default deallocator for the object's class.
  139. void operator delete(void * obj)
  140. {
  141.     if (obj) {
  142.         SOM_Resolve(obj,SOMObject,somFree)
  143.            ( (SOMObject*) obj );
  144.     }
  145. }
  146.  
  147. /* method: SetDraft */
  148. void   SetDraft(Environment *ev,
  149.         ODDraft* inDraft)
  150. {
  151.    SOM_ResolveD(this,CyberSemanticInterface,CyberSemanticInterface,SetDraft)
  152.     (this,ev,inDraft);
  153. #ifdef SOMCHKEXCEPT
  154.       SOMCHKEXCEPT;
  155. #endif
  156. }
  157.  
  158. };   /* CyberSemanticInterface */
  159.  
  160.  
  161.  
  162. #endif       /* SOM_CyberSemanticInterface_xh */
  163.