home *** CD-ROM | disk | FTP | other *** search
/ Amiga ISO Collection / AmigaUtilCD2.iso / Programming / C / BK-SC1_4.DMS / in.adf / MUIClass.Lha / Include / Classes / TWiMUI / Semaphore.h < prev    next >
Encoding:
C/C++ Source or Header  |  1996-06-16  |  1.1 KB  |  48 lines

  1. //
  2. //  $VER: Semaphore.h   1.0 (16 Jun 1996)
  3. //
  4. //    c 1996 Thomas Wilhelmi
  5. //
  6. //
  7. // Address : Taunusstrasse 14
  8. //           61138 Niederdorfelden
  9. //           Germany
  10. //
  11. //  E-Mail : willi@twi.rhein-main.de
  12. //
  13. //   Phone : +49 (0)6101 531060
  14. //   Fax   : +49 (0)6101 531061
  15. //
  16. //
  17. //  $HISTORY:
  18. //
  19. //  16 Jun 1996 :   1.0 : first public Release
  20. //
  21.  
  22. #ifndef CPP_TWIMUI_SEMAPHORE_H
  23. #define CPP_TWIMUI_SEMAPHORE_H
  24.  
  25. #ifndef CPP_TWIMUI_NOTIFY_H
  26. #include <classes/twimui/notify.h>
  27. #endif
  28.  
  29. class MUISemaphore : public MUINotify
  30.     {
  31.     protected:
  32.         MUISemaphore(const STRPTR cl) : MUINotify(cl) { };
  33.     public:
  34.         MUISemaphore(const struct TagItem *t) : MUINotify(MUIC_Semaphore) { init(t); };
  35.         MUISemaphore(const Tag, ...);
  36.         MUISemaphore() : MUINotify(MUIC_Semaphore) { };
  37.         MUISemaphore(MUISemaphore &p) : MUINotify(p) { };
  38.         virtual ~MUISemaphore();
  39.         MUISemaphore &operator= (MUISemaphore &p);
  40.         void Attempt() { dom(MUIM_Semaphore_Attempt); };
  41.         void AttemptShared() { dom(MUIM_Semaphore_AttemptShared); };
  42.         void Obtain() { dom(MUIM_Semaphore_Obtain); };
  43.         void ObtainShared() { dom(MUIM_Semaphore_ObtainShared); };
  44.         void Release() { dom(MUIM_Semaphore_Release); };
  45.     };
  46.  
  47. #endif
  48.