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

  1. #pragma info( none )
  2. #ifndef __CHKHDR__
  3.    #pragma info( none )
  4. #endif
  5. #pragma info( restore )
  6.  
  7. #ifndef __strstream_h
  8.    #define __strstream_h
  9.  
  10.    /********************************************************************/
  11.    /*  <strstrea.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/strstream.h       1.7"    */
  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.  
  57.    #pragma pack(4)
  58.  
  59.    class _IMPORT strstreambuf : public streambuf
  60.    {
  61.    public:
  62.                            strstreambuf() ;
  63.                            strstreambuf(int) ;
  64.                            strstreambuf(void* (*a)(long), void (*f)(void*)) ;
  65.                            strstreambuf(char* b, int size, char* pstart = 0 ) ;
  66.                            strstreambuf(signed char* b, int size, signed char* pstart = 0 ) ;
  67.                            strstreambuf(unsigned char* b, int size, unsigned char* pstart = 0 ) ;
  68.  
  69.            /*
  70.             FUNCTION  int streambuf::pcount() IS INTERNAL AND SHOULD
  71.             NOT BE USED.
  72.            */
  73.            int             pcount();
  74.  
  75.            void            freeze(int n=1) ;
  76.            char*           str() ;
  77.                            ~strstreambuf() ;
  78.  
  79.    public: /* virtuals  */
  80.            virtual int     doallocate() ;
  81.            virtual int     overflow(int) ;
  82.            virtual int     underflow() ;
  83.            virtual streambuf*
  84.                            setbuf(char*  p, int l) ;
  85.            virtual streampos
  86.                            seekoff(streamoff,ios::seek_dir,int) ;
  87.  
  88.    private:
  89.            void            init(char*,int,char*) ;
  90.  
  91.            void*           (*afct)(long) ;
  92.            void            (*ffct)(void*) ;
  93.            int             ignore_oflow ;
  94.            int             froozen ;
  95.            int             auto_extend ;
  96.  
  97.    public:
  98.            int             isfrozen() { return froozen; }
  99.            } ;
  100.  
  101.    class _IMPORT strstreambase : public virtual ios {
  102.    public:
  103.            strstreambuf*   rdbuf() ;
  104.    protected:
  105.                            strstreambase(char*, int, char*) ;
  106.                            strstreambase() ;
  107.                            ~strstreambase() ;
  108.    private:
  109.            strstreambuf    buf ;
  110.            } ;
  111.  
  112.    class _IMPORT istrstream : public strstreambase, public istream {
  113.    public:
  114.                            istrstream(char* str);
  115.                            istrstream(signed char* str);
  116.                            istrstream(unsigned char* str);
  117.                            istrstream(char* str, int size ) ;
  118.                            istrstream(signed char* str, int size);
  119.                            istrstream(unsigned char* str, int size);
  120.                            istrstream(const char* str);
  121.                            istrstream(const signed char* str);
  122.                            istrstream(const unsigned char* str);
  123.                            istrstream(const char* str, int size ) ;
  124.                            istrstream(const signed char* str, int size);
  125.                            istrstream(const unsigned char* str, int size);
  126.                            ~istrstream() ;
  127.            } ;
  128.  
  129.    class _IMPORT ostrstream : public strstreambase, public ostream {
  130.    public:
  131.                            ostrstream(char* str, int size, int=ios::out) ;
  132.                            ostrstream(signed char* str, int size, int=ios::out) ;
  133.                            ostrstream(unsigned char* str, int size, int=ios::out) ;
  134.                            ostrstream() ;
  135.                            ~ostrstream() ;
  136.            char*           str() ;
  137.            int             pcount() ;
  138.            } ;
  139.  
  140.  
  141.    class _IMPORT strstream : public strstreambase, public iostream {
  142.    public:
  143.                            strstream() ;
  144.                            strstream(char* str, int size, int mode) ;
  145.                            strstream(signed char* str, int size, int mode) ;
  146.                            strstream(unsigned char* str, int size, int mode) ;
  147.                            ~strstream() ;
  148.            char*           str() ;
  149.            } ;
  150.  
  151.    #pragma pack()
  152.  
  153. #endif
  154.  
  155. #pragma info( none )
  156. #ifndef __CHKHDR__
  157.    #pragma info( restore )
  158. #endif
  159. #pragma info( restore )
  160.  
  161.  
  162.