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 / OpenDoc Development / Debugging Support / OpenDoc™ Source Code / UI / StdDisp.cpp < prev    next >
Encoding:
C/C++ Source or Header  |  1996-08-28  |  2.4 KB  |  92 lines  |  [TEXT/MPS ]

  1. /*
  2.     File:        StdDisp.cpp
  3.  
  4.     Contains:    xxx put contents here xxx
  5.  
  6.     Owned by:    xxx put writers here xxx
  7.  
  8.     Copyright:    © 1994 - 1995 by Apple Computer, Inc., all rights reserved.
  9.  
  10.     Change History (most recent first):
  11.  
  12.          <6>      8/3/95    RR        #1257260: Collapse B classes. Remove
  13.                                     somInit methods. Don't call IsInitialized
  14.                                     or SubclassResponsibility
  15.          <5>     6/15/95    RR        #1254828/1255536 Added eventInfo to
  16.                                     Dispatch()
  17.          <4>     5/26/95    RR        #1251403: Multithreading naming support
  18.          <3>     4/13/95    RR        # 1216618 Added ODVolatile
  19.          <2>      4/7/95    RR        #1216618 Added SOM_TRY etc.
  20.          <1>     6/24/94    RR        first checked in
  21.  
  22.     To Do:
  23. */
  24.  
  25.  
  26. /*
  27.  *  This file was generated by the SOM Compiler.
  28.  *  Generated using: 
  29.  *      SOM Emitter emitxtm.dll: somc/smmain.c
  30.  */
  31.  
  32. #define ODStandardDispatchModule_Class_Source
  33. #define VARIABLE_MACROS
  34. #include <StdDisp.xih>
  35.  
  36. #ifndef _STDDISPM_
  37. #include "StdDispM.h"
  38. #endif
  39.  
  40. SOM_Scope void  SOMLINK ODStandardDispatchModuleInitStandardDispatchModule(ODStandardDispatchModule *somSelf, Environment *ev,
  41.         ODSession* session)
  42. {
  43.     ODStandardDispatchModuleData *somThis = ODStandardDispatchModuleGetData(somSelf);
  44.     ODStandardDispatchModuleMethodDebug("ODStandardDispatchModule","InitStandardDispatchModule");
  45.     
  46.     /* Moved from somInit. SOM itself sets fields to zero
  47.     _fImplementation = kODNULL;
  48.     */
  49.     
  50.     MacDispatchModule* module = kODNULL; ODVolatile(module);
  51.     
  52.     SOM_TRY
  53.     
  54.         module = new MacDispatchModule;
  55.         module->InitMacDispatchModule(ev, session);
  56.         _fImplementation = module;
  57.     
  58.     SOM_CATCH_ALL
  59.     
  60.         ODDeleteObject(module);
  61.         
  62.     SOM_ENDTRY
  63. }
  64.  
  65. SOM_Scope void  SOMLINK ODStandardDispatchModulesomUninit(ODStandardDispatchModule *somSelf)
  66. {
  67.     ODStandardDispatchModuleData *somThis = ODStandardDispatchModuleGetData(somSelf);
  68.     ODStandardDispatchModuleMethodDebug("ODStandardDispatchModule","somUninit");
  69.  
  70.     delete _fImplementation;
  71.     parent_somUninit(somSelf);
  72. }
  73.  
  74. SOM_Scope ODBoolean  SOMLINK ODStandardDispatchModuleDispatch(ODStandardDispatchModule *somSelf, Environment *ev,
  75.         ODEventData* event,
  76.         ODEventInfo* eventInfo)
  77. {
  78.     ODStandardDispatchModuleData *somThis = ODStandardDispatchModuleGetData(somSelf);
  79.     ODStandardDispatchModuleMethodDebug("ODStandardDispatchModule","Dispatch");
  80.     
  81.     ODBoolean handled = kODFalse;
  82.     
  83.     SOM_TRY
  84.  
  85.         handled = _fImplementation->Dispatch(ev, event, eventInfo);
  86.         
  87.        SOM_CATCH_ALL
  88.        SOM_ENDTRY
  89.        
  90.        return handled;
  91. }
  92.