home *** CD-ROM | disk | FTP | other *** search
/ OS/2 Shareware BBS: 10 Tools / 10-Tools.zip / ocl150a.zip / OCL / Samples / Critics / Source / Critics.hpp < prev   
C/C++ Source or Header  |  1996-11-12  |  780b  |  51 lines

  1. // OCL Sample
  2. // Critics.hpp
  3.  
  4. #define INCL_VIO
  5.  
  6. #include <ocl.hpp>
  7. #include <OCriticalSec.hpp>
  8. #include <OThread.hpp>
  9.  
  10.  
  11. typedef class Thread *pThread;
  12.  
  13.  
  14. class Thread 
  15.   : virtual public OCLObject
  16. {
  17.  protected: 
  18.    PSZ     threadName;
  19.    ULONG   count;
  20.    USHORT  line;
  21.  
  22.  public:
  23.    OThread<Thread> paint;
  24.  
  25.    Thread(PSZ name, USHORT threadRow);
  26.    virtual ~Thread();
  27.    
  28.    virtual PSZ isOfType() const;
  29.    virtual void paintfunc();
  30. };
  31.  
  32.  
  33. typedef class CriticalThread *pCriticalThread;
  34.  
  35.  
  36. class CriticalThread 
  37.   : public Thread
  38. {
  39.  private:
  40.    OCriticalSec critical;
  41.  
  42.  public:
  43.    CriticalThread(USHORT threadRow);
  44.    virtual ~CriticalThread();
  45.    
  46.    virtual PSZ isOfType() const;
  47.    virtual void paintfunc();
  48. };
  49.  
  50. // end of source 
  51.