1 #ifndef _STLP_INTERNAL_IOSFWD
2 #define _STLP_INTERNAL_IOSFWD
3 
4 #if defined (__sgi) && !defined (__GNUC__) && !defined (_STANDARD_C_PLUS_PLUS)
5 #  error This header file requires the -LANG:std option
6 #endif
7 
8 // This file provides forward declarations of the most important I/O
9 // classes.  Note that almost all of those classes are class templates,
10 // with default template arguments.  According to the C++ standard,
11 // if a class template is declared more than once in the same scope
12 // then only one of those declarations may have default arguments.
13 
14 // <iosfwd> contains the same declarations as other headers, and including
15 // both <iosfwd> and (say) <iostream> is permitted.  This means that only
16 // one header may contain those default template arguments.
17 
18 // In this implementation, the declarations in <iosfwd> contain default
19 // template arguments.  All of the other I/O headers include <iosfwd>.
20 
21 #ifndef _STLP_CHAR_TRAITS_H
22 #  include <stl/char_traits.h>
23 #endif
24 
25 _STLP_BEGIN_NAMESPACE
26 
27 class ios_base;
28 
29 template <class _CharT, _STLP_DFL_TMPL_PARAM(_Traits , char_traits<_CharT>) >
30 class basic_ios;
31 
32 template <class _CharT, _STLP_DFL_TMPL_PARAM(_Traits , char_traits<_CharT>) >
33 class basic_streambuf;
34 
35 template <class _CharT, _STLP_DFL_TMPL_PARAM(_Traits , char_traits<_CharT>) >
36 class basic_istream;
37 
38 template <class _CharT, _STLP_DFL_TMPL_PARAM(_Traits , char_traits<_CharT>) >
39 class basic_ostream;
40 
41 template <class _CharT, _STLP_DFL_TMPL_PARAM(_Traits , char_traits<_CharT>) >
42 class basic_iostream;
43 
44 template <class _CharT, _STLP_DFL_TMPL_PARAM( _Traits , char_traits<_CharT>),
45           _STLP_DFL_TMPL_PARAM(_Allocator , allocator<_CharT>) >
46 class basic_stringbuf;
47 
48 template <class _CharT, _STLP_DFL_TMPL_PARAM(_Traits , char_traits<_CharT>),
49           _STLP_DFL_TMPL_PARAM(_Allocator , allocator<_CharT>) >
50 class basic_istringstream;
51 
52 template <class _CharT, _STLP_DFL_TMPL_PARAM(_Traits , char_traits<_CharT>),
53           _STLP_DFL_TMPL_PARAM(_Allocator , allocator<_CharT>) >
54 class basic_ostringstream;
55 
56 template <class _CharT, _STLP_DFL_TMPL_PARAM(_Traits , char_traits<_CharT>),
57           _STLP_DFL_TMPL_PARAM(_Allocator , allocator<_CharT>) >
58 class basic_stringstream;
59 
60 template <class _CharT, _STLP_DFL_TMPL_PARAM(_Traits , char_traits<_CharT>) >
61 class basic_filebuf;
62 
63 template <class _CharT, _STLP_DFL_TMPL_PARAM(_Traits , char_traits<_CharT>) >
64 class basic_ifstream;
65 
66 template <class _CharT, _STLP_DFL_TMPL_PARAM(_Traits , char_traits<_CharT>) >
67 class basic_ofstream;
68 
69 template <class _CharT, _STLP_DFL_TMPL_PARAM(_Traits , char_traits<_CharT>) >
70 class basic_fstream;
71 
72 template <class _CharT, _STLP_DFL_TMPL_PARAM(_Traits , char_traits<_CharT>) >
73 class istreambuf_iterator;
74 
75 template <class _CharT, _STLP_DFL_TMPL_PARAM(_Traits , char_traits<_CharT>) >
76 class ostreambuf_iterator;
77 
78 typedef basic_ios<char, char_traits<char> >    ios;
79 
80 #if !defined (_STLP_NO_WCHAR_T)
81 typedef basic_ios<wchar_t, char_traits<wchar_t> > wios;
82 #endif
83 
84 // Forward declaration of class locale, and of the most important facets.
85 class locale;
86 template <class _Facet>
87 #if defined (_STLP_NO_EXPLICIT_FUNCTION_TMPL_ARGS)
88 struct _Use_facet {
89   const locale& __loc;
_Use_facet_Use_facet90   _Use_facet(const locale& __p_loc) : __loc(__p_loc) {}
91   inline const _Facet& operator *() const;
92 };
93 #  define use_facet *_Use_facet
94 #else
95 inline const _Facet& use_facet(const locale&);
96 #endif
97 
98 template <class _CharT> class ctype;
99 template <class _CharT> class ctype_byname;
100 template <class _CharT> class collate;
101 template <class _CharT> class collate_byname;
102 
103 _STLP_TEMPLATE_NULL class ctype<char>;
104 _STLP_TEMPLATE_NULL class ctype_byname<char>;
105 _STLP_TEMPLATE_NULL class collate<char>;
106 _STLP_TEMPLATE_NULL class collate_byname<char>;
107 
108 #if !defined (_STLP_NO_WCHAR_T)
109 _STLP_TEMPLATE_NULL class ctype<wchar_t>;
110 _STLP_TEMPLATE_NULL class ctype_byname<wchar_t>;
111 _STLP_TEMPLATE_NULL class collate<wchar_t>;
112 _STLP_TEMPLATE_NULL class collate_byname<wchar_t>;
113 #endif
114 
115 #if !(defined (__SUNPRO_CC) && __SUNPRO_CC < 0x500 )
116 // Typedefs for ordinary (narrow-character) streams.
117 //_STLP_TEMPLATE_NULL class basic_streambuf<char, char_traits<char> >;
118 #endif
119 
120 typedef basic_istream<char, char_traits<char> >  istream;
121 typedef basic_ostream<char, char_traits<char> >  ostream;
122 typedef basic_iostream<char, char_traits<char> > iostream;
123 typedef basic_streambuf<char,char_traits<char> > streambuf;
124 
125 typedef basic_stringbuf<char, char_traits<char>, allocator<char> >     stringbuf;
126 typedef basic_istringstream<char, char_traits<char>, allocator<char> > istringstream;
127 typedef basic_ostringstream<char, char_traits<char>, allocator<char> > ostringstream;
128 typedef basic_stringstream<char, char_traits<char>, allocator<char> >  stringstream;
129 
130 typedef basic_filebuf<char, char_traits<char> >  filebuf;
131 typedef basic_ifstream<char, char_traits<char> > ifstream;
132 typedef basic_ofstream<char, char_traits<char> > ofstream;
133 typedef basic_fstream<char, char_traits<char> >  fstream;
134 
135 #if !defined (_STLP_NO_WCHAR_T)
136 // Typedefs for wide-character streams.
137 typedef basic_streambuf<wchar_t, char_traits<wchar_t> > wstreambuf;
138 typedef basic_istream<wchar_t, char_traits<wchar_t> >   wistream;
139 typedef basic_ostream<wchar_t, char_traits<wchar_t> >   wostream;
140 typedef basic_iostream<wchar_t, char_traits<wchar_t> >  wiostream;
141 
142 typedef basic_stringbuf<wchar_t, char_traits<wchar_t>, allocator<wchar_t> >     wstringbuf;
143 typedef basic_istringstream<wchar_t, char_traits<wchar_t>, allocator<wchar_t> > wistringstream;
144 typedef basic_ostringstream<wchar_t, char_traits<wchar_t>, allocator<wchar_t> > wostringstream;
145 typedef basic_stringstream<wchar_t, char_traits<wchar_t>, allocator<wchar_t> >  wstringstream;
146 
147 typedef basic_filebuf<wchar_t, char_traits<wchar_t> >  wfilebuf;
148 typedef basic_ifstream<wchar_t, char_traits<wchar_t> > wifstream;
149 typedef basic_ofstream<wchar_t, char_traits<wchar_t> > wofstream;
150 typedef basic_fstream<wchar_t, char_traits<wchar_t> >  wfstream;
151 #endif
152 
153 _STLP_END_NAMESPACE
154 
155 #endif
156 
157 // Local Variables:
158 // mode:C++
159 // End:
160