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