Disable all code related to libXp
[oweals/cde.git] / cde / programs / dtinfo / DtMmdb / utility / c_iostream.h
1 /*
2  * CDE - Common Desktop Environment
3  *
4  * Copyright (c) 1993-2012, The Open Group. All rights reserved.
5  *
6  * These libraries and programs are free software; you can
7  * redistribute them and/or modify them under the terms of the GNU
8  * Lesser General Public License as published by the Free Software
9  * Foundation; either version 2 of the License, or (at your option)
10  * any later version.
11  *
12  * These libraries and programs are distributed in the hope that
13  * they will be useful, but WITHOUT ANY WARRANTY; without even the
14  * implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
15  * PURPOSE. See the GNU Lesser General Public License for more
16  * details.
17  *
18  * You should have received a copy of the GNU Lesser General Public
19  * License along with these librararies and programs; if not, write
20  * to the Free Software Foundation, Inc., 51 Franklin Street, Fifth
21  * Floor, Boston, MA 02110-1301 USA
22  */
23 /* $XConsortium: c_iostream.h /main/4 1996/08/21 15:54:57 drk $ */
24
25 #ifndef _xostream_h
26 #define _xostream_h
27
28 #include "utility/c_ios.h"
29
30 class istream : public virtual ios
31 {
32 protected:
33    istream&   _getline(char* b, int lim, int delim, int fill_zero);
34    int        eatw(); // return EOF if no char available.
35                       // Otherwise, return the first no white char.
36                       // The char is still in the buffer.
37
38 public:
39    istream(streambuf* sb);
40    virtual ~istream() {};
41
42    istream&        seekg(streampos delta, ios::seek_dir d) ;
43
44    int get();
45    istream&        get(char& c);
46
47    istream&        putback(char c);
48
49    istream&        getline(char* b, int lim, char delim='\n');
50
51    istream&        read(char*  s,int n);
52
53    int             gcount() ;
54
55    istream&        operator>>(unsigned short& c);
56    istream&        operator>>(unsigned int& c);
57    istream&        operator>>(int& c);
58    istream&        operator>>(long& c);
59    istream&        operator>>(char* s);
60    istream&        operator>>(char& c);
61 };
62
63 class ostream : virtual public ios
64 {
65 public:
66
67    ostream(streambuf* sb);
68    virtual ~ostream() {};
69
70    ostream&        operator<<(void*);
71    ostream&        operator<<(const char*);
72    ostream&        operator<<(char c);
73    ostream&        operator<<(int);
74    ostream&        operator<<(unsigned int);
75    ostream&        operator<<(long);
76     ostream&        operator<< (ostream& (*f)(ostream&));
77
78    ostream& put(char);
79
80    ostream&        flush() ;
81
82    ostream&        write(const char*  s,int n);
83 };
84
85 //class iostream : public istream, public ostream
86 class iostream : public istream, public ostream
87 {
88 public:
89    iostream(streambuf* sb);
90    virtual ~iostream() {};
91 };
92
93 ostream&        endl(ostream& i) ;
94
95 #ifndef STREAM_DEBUG
96 #define cout (*cout_ptr)
97 #define cin  (*cin_ptr)
98 #define cerr (*cerr_ptr)
99 extern ostream *cout_ptr;
100 extern istream *cin_ptr;
101 extern ostream *cerr_ptr;
102 #endif
103
104 #endif