home *** CD-ROM | disk | FTP | other *** search
/ Power GUI Programming with VisualAge C++ / powergui.iso / trialva / ibmcppw / include / ibhandle.hpp < prev    next >
Encoding:
C/C++ Source or Header  |  1996-02-22  |  2.6 KB  |  77 lines

  1. #ifndef _IBHANDLE_
  2. #define _IBHANDLE_
  3. /*******************************************************************************
  4. * FILE NAME: ibhandle.hpp                                                      *
  5. *                                                                              *
  6. * DESCRIPTION:                                                                 *
  7. *   Declaration of the classes:                                                *
  8. *     IHandle                                                                  *
  9. *     ISemaphoreHandle                                                         *
  10. *                                                                              *
  11. * COPYRIGHT:                                                                   *
  12. *   IBM Open Class Library                                                     *
  13. *   (C) Copyright International Business Machines Corporation 1992, 1996       *
  14. *   Licensed Material - Program-Property of IBM - All Rights Reserved.         *
  15. *   US Government Users Restricted Rights - Use, duplication, or disclosure    *
  16. *   restricted by GSA ADP Schedule Contract with IBM Corp.                     *
  17. *                                                                              *
  18. *******************************************************************************/
  19. #include <ibase.hpp>
  20. #include <ievtdata.hpp>
  21.  
  22. class ostream;
  23. class IString;
  24.  
  25. #pragma pack(4)
  26.  
  27. class IHandle : public IBase {
  28. typedef IBase
  29.   Inherited;
  30. public:
  31. /*---------------------------------- Value -----------------------------------*/
  32. typedef void*
  33.   Value;
  34.  
  35. /*------------------------------- Constructors -------------------------------*/
  36.   IHandle ( Value value );
  37.  
  38. /*------------------------------- Diagnostics --------------------------------*/
  39.  
  40. IString
  41.   asString    ( ) const,
  42.   asDebugInfo ( ) const;
  43.  
  44. friend ostream
  45.  &operator << ( ostream&       aStream,
  46.                 const IHandle& aHandle );
  47.  
  48. unsigned long
  49.   asUnsigned  ( ) const;
  50.  
  51. /*-------------------------------- Operators ---------------------------------*/
  52.   operator Value ( ) const;
  53.  
  54. protected:
  55. /*---------------------------------- Value -----------------------------------*/
  56. Value
  57.   handle;
  58. }; // IHandle
  59.  
  60.  
  61. class ISemaphoreHandle : public IHandle {
  62. typedef IHandle
  63.   Inherited;
  64. public:
  65. /*------------------------------- Constructors -------------------------------*/
  66.   ISemaphoreHandle ( Value hsem = 0 );
  67.  
  68. /*-------------------------------- Operators ---------------------------------*/
  69.  
  70. }; // ISemaphoreHandle
  71.  
  72. #pragma pack()
  73.  
  74.   #include <ibhandle.inl>
  75.  
  76. #endif // _IBHANDLE_
  77.