home *** CD-ROM | disk | FTP | other *** search
/ The Pier Shareware 6 / The_Pier_Shareware_Number_6_(The_Pier_Exchange)_(1995).iso / 035 / kwclass.zip / KPRCHDR.HPP < prev    next >
C/C++ Source or Header  |  1994-04-18  |  1KB  |  57 lines

  1. #ifndef _KPRCHDR_
  2. #define _KPRCHDR_
  3.  
  4. #define INCL_BASE
  5. #define INCL_PM
  6. #include <os2.h>
  7.  
  8. #ifndef KWCONSTANTS
  9.   #include <kwconst.hpp>
  10. #endif
  11.  
  12. #ifndef _IHANDLER_
  13.   #include <ihandler.hpp>
  14. #endif
  15.  
  16. /*-------------------------------------------------------------
  17.  * Class: KProcessEvent
  18.  *
  19.  * Description: 
  20.  *
  21.  *   Event handler for all KASEWORKS process events, 
  22.  *
  23. ------------------------------------------------------------*/ 
  24. class _Export KProcessEvent : public IEvent
  25. {
  26.    public:
  27.       KProcessEvent(const IEvent &event) : IEvent(event) {}
  28.       unsigned long stepId() { return parameter1().asUnsignedLong(); }
  29. };
  30.  
  31. /*-------------------------------------------------------------
  32.  * Class: KProcessHandler
  33.  *
  34.  * Description: 
  35.  *
  36.  *   Event handler for all KASEWORKS process events, 
  37.  *
  38. ------------------------------------------------------------*/ 
  39. class _Export KProcessHandler : public IHandler
  40. {
  41.    public:
  42.       KProcessHandler();
  43.       int currentStep();
  44.       void setCurrentStep(int step);
  45.  
  46.    protected:
  47.       virtual Boolean dispatchHandlerEvent(IEvent &event);
  48.       virtual Boolean nextStep(IEvent &event) = 0;
  49.       virtual Boolean cancelProcess(IEvent &event) = 0;
  50.       virtual Boolean actionComplete(IEvent &event) = 0;
  51.    private: 
  52.       int _currentStep;
  53. };
  54.  
  55. #endif
  56.  
  57.