home *** CD-ROM | disk | FTP | other *** search
/ OS/2 Shareware BBS: 10 Tools / 10-Tools.zip / baclsema.zip / IPCEVENT.H < prev    next >
C/C++ Source or Header  |  1994-06-23  |  1KB  |  50 lines

  1. // ****************************************************************************
  2. //
  3. // Module:  ipcevent.h
  4. // Author:  Dick Lam
  5. //
  6. // Purpose: C++ class header file for ipcEventSemaphore
  7. //
  8. // Notes:  This class is derived from ipcSemaphore.  It is an interface class
  9. //         for event semaphores that can be used to signal events across
  10. //         processes or threads.
  11. //
  12. // ****************************************************************************
  13.  
  14. #ifndef MODULE_ipcEventSemaphoreh
  15. #define MODULE_ipcEventSemaphoreh
  16.  
  17. #include "ipcsem.h"
  18.  
  19. // class declaration
  20. class EXPORT ipcEventSemaphore : public ipcSemaphore {
  21.  
  22. public:
  23.  
  24.    // constructor and destructor
  25.    ipcEventSemaphore(const char *name, ipcSemaphoreOp operation = semcreate);
  26.    virtual ~ipcEventSemaphore();
  27.  
  28.    // query method for number of requests made
  29.    virtual unsigned long Query();
  30.  
  31.    // post, reset and wait methods
  32.    virtual void Post();
  33.    virtual void Reset();
  34.    virtual void Wait();
  35.  
  36. private:
  37.  
  38.    // private copy constructor and operator= (define these and make them
  39.    // public to enable copy and assignment of the class)
  40.    ipcEventSemaphore(const ipcEventSemaphore&);
  41.    ipcEventSemaphore& operator=(const ipcEventSemaphore&);
  42.  
  43. };
  44.  
  45. #endif
  46.  
  47. // ****************************************************************************
  48.  
  49. // end of ipcevent.h
  50.