home *** CD-ROM | disk | FTP | other *** search
/ C/C++ User's Journal & Wi…eveloper's Journal Tools / C-C__Users_Journal_and_Windows_Developers_Journal_Tools_1997.iso / smxdemo / smxpp / pipe.hpp < prev    next >
Encoding:
C/C++ Source or Header  |  1993-01-16  |  1.3 KB  |  59 lines

  1. /*************************************************************************
  2. *  Copyright (c) 1989-1992 Micro Digital Associates, Inc.
  3. *                  All Rights Reserved.
  4. *
  5. *  MODULE: PIPE.HPP - Pipe Class
  6. *
  7. *  DESRIPTION:
  8. *              This header file contins the class definition for the
  9. *              pipe class. This class is derived from the SIOBus class. 
  10. *
  11. *
  12. *  AUTHOR: Rick Evans 
  13. *
  14. *
  15. *  UPDATE LOG
  16. *
  17. *************************************************************************/
  18.  
  19. #ifndef __PIPE_HPP
  20. #define __PIPE_HPP     1
  21.  
  22.  
  23. #include    <xtypes.h>
  24. #include    "siobus.hpp"
  25.  
  26. class Pipe : public SIOBus
  27. {
  28.  
  29.    PXCB_PTR       PipeCBP;
  30.  
  31. public:
  32.  
  33.    //---- constructors ------
  34.    // create a Pipe and a message for the buffer.
  35.    Pipe( word size );
  36.     // c upgrade constructor
  37.    Pipe( PXCB_PTR p );
  38.  
  39.    //----- methods ----------
  40. protected:
  41.    // GetChar and PutChar are intended to be used in the device driver/
  42.    virtual  int      GetChar();
  43.    virtual  BOOLEAN  PutChar( int achar );
  44.  
  45. public:
  46.    int      PGetChar( word TimeOut=INF );
  47.    int      PGetCharStop( word TimeOut=INF );
  48.  
  49.    BOOLEAN  PPutChar( char achar, word Timeout=INF );
  50.    BOOLEAN  PPutCharStop( char achar, word Timeout=INF );
  51.  
  52.    //---- destructor ------
  53.    ~Pipe();
  54. };
  55.  
  56. #endif
  57. //EOF
  58.  
  59.