home *** CD-ROM | disk | FTP | other *** search
/ Power GUI Programming with VisualAge C++ / powergui.iso / trialva / ibmcppw / include / stdiostr.h < prev    next >
Encoding:
C/C++ Source or Header  |  1996-02-16  |  4.1 KB  |  99 lines

  1. #pragma info( none )
  2. #ifndef __CHKHDR__
  3.    #pragma info( none )
  4. #endif
  5. #pragma info( restore )
  6.  
  7. #ifndef __stdstream_h
  8.    #define __stdstream_h
  9.  
  10.    /********************************************************************/
  11.    /*  <stdiostr.h> header file                                        */
  12.    /*                                                                  */
  13.    /*  VisualAge for C++ for Windows, Version 3.5                      */
  14.    /*    Licensed Material - Property of IBM                           */
  15.    /*                                                                  */
  16.    /*  5801-ARR and Other Materials                                    */
  17.    /*                                                                  */
  18.    /*  (c) Copyright IBM Corp 1991, 1996. All rights reserved.         */
  19.    /*                                                                  */
  20.    /*                                                                  */
  21.    /*                                                                  */
  22.    /*  Licensed Materials - Property of USL                            */
  23.    /*                                                                  */
  24.    /*  Standard Class Library Version 3.0                              */
  25.    /*  Copyright (C) Unix System Laboratories Inc. 1991.               */
  26.    /*  All rights reserved                                             */
  27.    /*                                                                  */
  28.    /********************************************************************/
  29.  
  30.    /**************************************************************************/
  31.    /*  C++ source for the C++ Language System, Release 3.0.  This product    */
  32.    /*  is a new release of the original cfront developed in the computer     */
  33.    /*  science research center of AT&T Bell Laboratories.                    */
  34.    /*                                                                        */
  35.    /*  Copyright (c) 1991 AT&T and UNIX System Laboratories, Inc.            */
  36.    /*  Copyright (c) 1984, 1989, 1990 AT&T.  All Rights Reserved.            */
  37.    /*                                                                        */
  38.    /*  THIS IS UNPUBLISHED PROPRIETARY SOURCE CODE of AT&T and UNIX System   */
  39.    /*  Laboratories, Inc.  The copyright notice above does not evidence      */
  40.    /*  any actual or intended publication of such source code.               */
  41.    /*                                                                        */
  42.    /*  UNIX is a registered trademark of UNIX System Laboratories, Inc.      */
  43.    /*                                                                        */
  44.    /*  ident "@(#)ctrans:incl-master/const-headers/stdiostream.h     1.4"    */
  45.    /**************************************************************************/
  46.  
  47.    #ifndef _IMPORT
  48.       #ifdef __IMPORTLIB__
  49.          #define _IMPORT _Import
  50.       #else
  51.          #define _IMPORT
  52.       #endif
  53.    #endif
  54.  
  55.    #include <iostream.h>
  56.    #include <stdio.h>
  57.  
  58.    #pragma pack(4)
  59.  
  60.    class _IMPORT stdiobuf : public streambuf {
  61.            /*** stdiobuf is obsolete, should be avoided ***/
  62.    public: // Virtuals
  63.            virtual int     overflow(int=EOF);
  64.            virtual int     underflow();
  65.            virtual int     sync() ;
  66.            virtual streampos
  67.                            seekoff(streamoff,ios::seek_dir,int) ;
  68.            virtual int     pbackfail(int c);
  69.    public:
  70.                            stdiobuf(FILE* f) ;
  71.            FILE*           stdiofile() { return fp ; }
  72.            virtual         ~stdiobuf() ;
  73.    private:
  74.            FILE*           fp ;
  75.            int             last_op ;
  76.            char            buf[2];
  77.    };
  78.  
  79.    class _IMPORT stdiostream : public ios {
  80.    public:
  81.                            stdiostream(FILE*) ;
  82.                            ~stdiostream() ;
  83.            stdiobuf*       rdbuf() ;
  84.    private:
  85.            stdiobuf        buf ;
  86.    };
  87.  
  88.    #pragma pack()
  89.  
  90. #endif
  91.  
  92. #pragma info( none )
  93. #ifndef __CHKHDR__
  94.    #pragma info( restore )
  95. #endif
  96. #pragma info( restore )
  97.  
  98.  
  99.