Attempt to represent the S^2->S^3 header reorganisation as a series of "hg rename" operations
2 * © Portions copyright (c) 2006-2007 Nokia Corporation. All rights reserved.
5 * Silicon Graphics Computer Systems, Inc.
10 * This material is provided "as is", with absolutely no warranty expressed
11 * or implied. Any use is at your own risk.
13 * Permission to use or copy this software for any purpose is hereby granted
14 * without fee, provided the above notices are retained on all copies.
15 * Permission to modify the code and to distribute modified code is granted,
16 * provided the above notices are retained, and a notice that the code was
17 * modified is included with the above copyright notice.
20 // This header defines classes basic_filebuf, basic_ifstream,
21 // basic_ofstream, and basic_fstream. These classes represent
22 // streambufs and streams whose sources or destinations are files.
24 #ifndef _STLP_INTERNAL_FSTREAM_H
25 #define _STLP_INTERNAL_FSTREAM_H
27 #if defined(__sgi) && !defined(__GNUC__) && !defined(_STANDARD_C_PLUS_PLUS)
28 #error This header file requires the -LANG:std option
31 #ifndef _STLP_INTERNAL_STREAMBUF
32 # include <stl/_streambuf.h>
35 #ifndef _STLP_INTERNAL_ISTREAM_H
36 #include <stl/_istream.h>
39 #ifndef _STLP_INTERNAL_CODECVT_H
40 #include <stl/_codecvt.h>
43 #ifndef _STLP_STDIO_FILE_H
44 #include <stl/_stdio_file.h>
47 // fbp : let us map 1 MB maximum, just be sure not to trash VM
48 //for hardware defining 8kb of mmap chunk
50 # define MMAP_CHUNK 0x2000UL
52 # define MMAP_CHUNK 0x100000UL
55 #if !defined (_STLP_USE_UNIX_IO) && !defined(_STLP_USE_WIN32_IO) \
56 && ! defined (_STLP_USE_UNIX_EMULATION_IO) && !defined (_STLP_USE_STDIO_IO)
58 # if defined (_STLP_UNIX) || defined (__CYGWIN__) || defined (__amigaos__) || defined (__EMX__) || defined (__SYMBIAN32__)
59 // open/close/read/write
60 # define _STLP_USE_UNIX_IO
61 # elif defined (_STLP_WIN32) && ! defined (__CYGWIN__)
62 // CreateFile/ReadFile/WriteFile
63 # define _STLP_USE_WIN32_IO
64 # elif defined (_STLP_WIN16) || defined (_STLP_WIN32) || defined (_STLP_MAC)
66 # define _STLP_USE_UNIX_EMULATION_IO
69 # define _STLP_USE_STDIO_IO
70 # endif /* _STLP_UNIX */
72 #endif /* mode selection */
75 #if defined (_STLP_USE_WIN32_IO)
76 typedef void* _STLP_fd;
77 #elif defined (_STLP_USE_UNIX_EMULATION_IO) || defined (_STLP_USE_STDIO_IO) || defined (_STLP_USE_UNIX_IO)
80 #error "Configure i/o !"
86 #if defined(__LIBSTD_CPP_SYMBIAN32_WSD__) || defined(_STLP_LIBSTD_CPP_NO_STATIC_VAR_)
87 _STLP_DECLSPEC size_t& get_fstream_Filebuf_Base_GetPageSize();
88 #endif //__LIBSTD_CPP_SYMBIAN32_WSD__
89 //----------------------------------------------------------------------
90 // Class _Filebuf_base, a private base class to factor out the system-
91 // dependent code from basic_filebuf<>.
93 class _STLP_CLASS_DECLSPEC _Filebuf_base {
94 public: // Opening and closing files.
95 _STLP_DECLSPEC _Filebuf_base();
97 _STLP_DECLSPEC bool _M_open(const char*, ios_base::openmode, long __protection);
98 _STLP_DECLSPEC bool _M_open(const char*, ios_base::openmode);
99 _STLP_DECLSPEC bool _M_open(int __id, ios_base::openmode = ios_base::__default_mode);
100 _STLP_DECLSPEC bool _M_close();
102 public: // Low-level I/O, like Unix read/write
103 _STLP_DECLSPEC ptrdiff_t _M_read(char* __buf, ptrdiff_t __n);
104 _STLP_DECLSPEC streamoff _M_seek(streamoff __offset, ios_base::seekdir __dir);
105 _STLP_DECLSPEC streamoff _M_file_size();
106 _STLP_DECLSPEC bool _M_write(char* __buf, ptrdiff_t __n);
108 public: // Memory-mapped I/O.
109 _STLP_DECLSPEC void* _M_mmap(streamoff __offset, streamoff __len);
110 _STLP_DECLSPEC void _M_unmap(void* __mmap_base, streamoff __len);
113 // Returns a value n such that, if pos is the file pointer at the
114 // beginning of the range [first, last), pos + n is the file pointer at
115 // the end. On many operating systems n == __last - __first.
116 // In Unix, writing n characters always bumps the file position by n.
117 // In Windows text mode, however, it bumps the file position by n + m,
118 // where m is the number of newlines in the range. That's because an
119 // internal \n corresponds to an external two-character sequence.
120 streamoff _M_get_offset(char* __first, char* __last) {
121 #if defined (_STLP_UNIX) || defined (_STLP_MAC)
122 return __last - __first;
123 #else // defined (_STLP_WIN32) || defined (_STLP_WIN16) || defined (_STLP_DOS)
124 return ( (_M_openmode & ios_base::binary) != 0 )
126 : count(__first, __last, '\n') + (__last - __first);
130 // Returns true if we're in binary mode or if we're using an OS or file
131 // system where there is no distinction between text and binary mode.
132 bool _M_in_binary_mode() const {
133 # if defined (_STLP_UNIX) || defined (_STLP_MAC) || defined(__BEOS__) || defined (__amigaos__) || defined (_STLP_VXWORKS_TORNADO)
135 # elif defined (_STLP_WIN32) || defined (_STLP_WIN16) || defined (_STLP_DOS) || defined (_STLP_VM) || defined (__EMX__)
136 return (_M_openmode & ios_base::binary) != 0;
139 #pragma message(" Symbian I/O stream support on progress."__FILE__)
143 protected: // Static data members.
144 # if !defined(__LIBSTD_CPP_SYMBIAN32_WSD__) && !defined(_STLP_LIBSTD_CPP_NO_STATIC_VAR_)
145 static size_t _M_page_size;
146 #endif //__SYMBIAN32__
148 protected: // Data members.
150 # ifdef _STLP_USE_STDIO_IO
151 // for stdio, the whole FILE* is being kept here
154 # ifdef _STLP_USE_WIN32_IO
158 ios_base::openmode _M_openmode ;
159 unsigned char _M_is_open ;
160 unsigned char _M_should_close ;
161 unsigned char _M_regular_file ;
164 #if defined(__LIBSTD_CPP_SYMBIAN32_WSD__) || defined(_STLP_LIBSTD_CPP_NO_STATIC_VAR_)
165 static size_t _STLP_CALL __page_size() { return get_fstream_Filebuf_Base_GetPageSize(); }
167 static size_t _STLP_CALL __page_size() { return _M_page_size; }
169 int __o_mode() const { return (int)_M_openmode; }
170 bool __is_open() const { return (_M_is_open !=0 ); }
171 bool __should_close() const { return (_M_should_close != 0); }
172 bool __regular_file() const { return (_M_regular_file != 0); }
173 _STLP_fd __get_fd() const { return _M_file_id; }
179 //----------------------------------------------------------------------
180 // Class basic_filebuf<>.
182 // Forward declaration of two helper classes.
183 template <class _Traits> class _Noconv_input;
185 class _Noconv_input<char_traits<char> >;
187 template <class _Traits> class _Noconv_output;
189 class _Noconv_output< char_traits<char> >;
191 // There is a specialized version of underflow, for basic_filebuf<char>,
194 template <class _CharT, class _Traits>
197 _STLP_TEMPLATE_NULL class _Underflow< char, char_traits<char> >;
199 template <class _CharT, class _Traits>
200 class basic_filebuf : public basic_streambuf<_CharT, _Traits>
203 typedef _CharT char_type;
204 typedef typename _Traits::int_type int_type;
205 typedef typename _Traits::pos_type pos_type;
206 typedef typename _Traits::off_type off_type;
207 typedef _Traits traits_type;
209 typedef typename _Traits::state_type _State_type;
210 typedef basic_streambuf<_CharT, _Traits> _Base;
211 typedef basic_filebuf<_CharT, _Traits> _Self;
213 public: // Constructors, destructor.
217 public: // Opening and closing files.
218 bool is_open() const { return _M_base.__is_open(); }
220 _Self* open(const char* __s, ios_base::openmode __m) {
221 return _M_base._M_open(__s, __m) ? this : 0;
224 # ifndef _STLP_NO_EXTENSIONS
225 // These two version of open() and file descriptor getter are extensions.
226 _Self* open(const char* __s, ios_base::openmode __m,
228 return _M_base._M_open(__s, __m, __protection) ? this : 0;
231 _STLP_fd fd() const { return _M_base.__get_fd(); }
233 _Self* open(int __id, ios_base::openmode _Init_mode = ios_base::__default_mode) {
234 return this->_M_open(__id, _Init_mode);
238 _Self* _M_open(int __id, ios_base::openmode _Init_mode = ios_base::__default_mode) {
239 return _M_base._M_open(__id, _Init_mode) ? this : 0;
244 protected: // Virtual functions from basic_streambuf.
245 virtual streamsize showmanyc();
246 virtual int_type underflow();
248 virtual int_type pbackfail(int_type = traits_type::eof());
249 virtual int_type overflow(int_type = traits_type::eof());
251 virtual basic_streambuf<_CharT, _Traits>* setbuf(char_type*, streamsize);
252 virtual pos_type seekoff(off_type, ios_base::seekdir,
253 ios_base::openmode = ios_base::in | ios_base::out);
254 virtual pos_type seekpos(pos_type,
255 ios_base::openmode = ios_base::in | ios_base::out);
258 virtual void imbue(const locale&);
261 virtual int save_read_buffer ();
262 virtual void _change_input_mode();
265 private: // Helper functions.
267 // Precondition: we are currently in putback input mode. Effect:
268 // switches back to ordinary input mode.
269 void _M_exit_putback_mode() {
270 this->setg(_M_saved_eback, _M_saved_gptr, _M_saved_egptr);
271 _M_in_putback_mode = false;
273 bool _M_switch_to_input_mode();
274 void _M_exit_input_mode();
275 bool _M_switch_to_output_mode();
277 int_type _M_input_error();
278 int_type _M_underflow_aux();
279 // friend class _Noconv_input<_Traits>;
280 // friend class _Noconv_output<_Traits>;
281 friend class _Underflow<_CharT, _Traits>;
283 int_type _M_output_error();
286 bool _M_allocate_buffers(_CharT* __buf, streamsize __n);
287 bool _M_allocate_buffers();
288 void _M_deallocate_buffers();
290 pos_type _M_seek_return(off_type __off, _State_type __state) {
292 if (_M_in_input_mode)
293 _M_exit_input_mode();
294 #ifndef __SYMBIAN32__
295 _M_in_input_mode = false; //moved down, because setg again sets input mode
297 _M_in_output_mode = false;
298 _M_in_putback_mode = false;
299 _M_in_error_mode = false;
303 _M_in_input_mode = false;
307 pos_type __result(__off);
308 __result.state(__state);
312 bool _M_seek_init(bool __do_unshift);
314 void _M_setup_codecvt(const locale&);
316 private: // Data members used in all modes.
318 _Filebuf_base _M_base;
320 private: // Locale-related information.
322 unsigned char _M_constant_width;
323 unsigned char _M_always_noconv;
325 // private: // Mode flags.
326 unsigned char _M_int_buf_dynamic; // True if internal buffer is heap allocated,
327 // false if it was supplied by the user.
328 unsigned char _M_in_input_mode;
329 unsigned char _M_in_output_mode;
330 unsigned char _M_in_error_mode;
331 unsigned char _M_in_putback_mode;
333 // Internal buffer: characters seen by the filebuf's clients.
335 _CharT* _M_int_buf_EOS;
337 // External buffer: characters corresponding to the external file.
339 char* _M_ext_buf_EOS;
341 // The range [_M_ext_buf, _M_ext_buf_converted) contains the external
342 // characters corresponding to the sequence in the internal buffer. The
343 // range [_M_ext_buf_converted, _M_ext_buf_end) contains characters that
344 // have been read into the external buffer but have not been converted
345 // to an internal sequence.
346 char* _M_ext_buf_converted;
347 char* _M_ext_buf_end;
349 // State corresponding to beginning of internal buffer.
350 _State_type _M_state;
352 private: // Data members used only in input mode.
354 // Similar to _M_state except that it corresponds to
355 // the end of the internal buffer instead of the beginning.
356 _State_type _M_end_state;
358 // This is a null pointer unless we are in mmap input mode.
360 streamoff _M_mmap_len;
362 private: // Data members used only in putback mode.
363 _CharT* _M_saved_eback;
364 _CharT* _M_saved_gptr;
365 _CharT* _M_saved_egptr;
367 typedef codecvt<_CharT, char, _State_type> _Codecvt;
368 const _Codecvt* _M_codecvt;
370 int _M_width; // Width of the encoding (if constant), else 1
371 int _M_max_width; // Largest possible width of single character.
374 enum { _S_pback_buf_size = 8 };
375 _CharT _M_pback_buf[_S_pback_buf_size];
377 // for _Noconv_output
379 bool _M_write(char* __buf, ptrdiff_t __n) {return _M_base._M_write(__buf, __n); }
383 _M_do_noconv_input() {
384 _M_ext_buf_converted = _M_ext_buf_end;
385 this->setg((char_type*)_M_ext_buf, (char_type*)_M_ext_buf, (char_type*)_M_ext_buf_end);
386 return traits_type::to_int_type(*_M_ext_buf);
390 # if defined (_STLP_USE_TEMPLATE_EXPORT)
391 _STLP_EXPORT_TEMPLATE_CLASS basic_filebuf<char, char_traits<char> >;
392 # if ! defined (_STLP_NO_WCHAR_T)
393 _STLP_EXPORT_TEMPLATE_CLASS basic_filebuf<wchar_t, char_traits<wchar_t> >;
395 # endif /* _STLP_USE_TEMPLATE_EXPORT */
399 template <class _CharT>
400 struct _Filebuf_Tmp_Buf
403 _Filebuf_Tmp_Buf(ptrdiff_t __n) : _M_ptr(0) { _M_ptr = new _CharT[__n]; }
404 ~_Filebuf_Tmp_Buf() { delete[] _M_ptr; }
409 // This class had to be designed very carefully to work
412 template <class _Traits>
413 class _Noconv_output {
415 typedef typename _Traits::char_type char_type;
416 static bool _STLP_CALL _M_doit(basic_filebuf<char_type, _Traits >*,
417 char_type*, char_type*)
424 class _STLP_CLASS_DECLSPEC _Noconv_output< char_traits<char> > {
426 static bool _STLP_CALL
427 _M_doit(basic_filebuf<char, char_traits<char> >* __buf,
428 char* __first, char* __last)
430 ptrdiff_t __n = __last - __first;
431 if (__buf->_M_write(__first, __n)) {
439 //----------------------------------------------------------------------
440 // basic_filebuf<> helper functions.
443 //----------------------------------------
444 // Helper functions for switching between modes.
447 // This class had to be designed very carefully to work
450 template <class _Traits>
451 class _Noconv_input {
453 typedef typename _Traits::int_type int_type;
454 typedef typename _Traits::char_type char_type;
456 static inline int_type _STLP_CALL
457 _M_doit(basic_filebuf<char_type, _Traits>*)
464 class _Noconv_input<char_traits<char> > {
466 static inline int _STLP_CALL
467 _M_doit(basic_filebuf<char, char_traits<char> >* __buf) {
468 return __buf->_M_do_noconv_input();
472 // underflow() may be called for one of two reasons. (1) We've
473 // been going through the special putback buffer, and we need to move back
474 // to the regular internal buffer. (2) We've exhausted the internal buffer,
475 // and we need to replentish it.
476 template <class _CharT, class _Traits>
479 typedef typename _Traits::int_type int_type;
480 typedef _Traits traits_type;
482 static int_type _STLP_CALL _M_doit(basic_filebuf<_CharT, _Traits>* __this);
486 // Specialization of underflow: if the character type is char, maybe
487 // we can use mmap instead of read.
489 class _STLP_CLASS_DECLSPEC _Underflow< char, char_traits<char> > {
491 typedef char_traits<char>::int_type int_type;
492 typedef char_traits<char> traits_type;
493 _STLP_DECLSPEC static int _STLP_CALL _M_doit(basic_filebuf<char, traits_type >* __this);
496 // There is a specialized version of underflow, for basic_filebuf<char>,
499 template <class _CharT, class _Traits>
500 _STLP_TYPENAME_ON_RETURN_TYPE _Underflow<_CharT, _Traits>::int_type // _STLP_CALL
501 _Underflow<_CharT, _Traits>::_M_doit(basic_filebuf<_CharT, _Traits>* __this)
503 if (!__this->_M_in_input_mode) {
504 if (!__this->_M_switch_to_input_mode())
505 return traits_type::eof();
508 else if (__this->_M_in_putback_mode) {
509 __this->_M_exit_putback_mode();
510 if (__this->gptr() != __this->egptr()) {
511 int_type __c = traits_type::to_int_type(*__this->gptr());
516 return __this->_M_underflow_aux();
519 #if defined( _STLP_USE_TEMPLATE_EXPORT ) && ! defined (_STLP_NO_WCHAR_T)
520 _STLP_EXPORT_TEMPLATE_CLASS _Underflow<wchar_t, char_traits<wchar_t> >;
524 //----------------------------------------------------------------------
525 // Class basic_ifstream<>
527 template <class _CharT, class _Traits>
528 class basic_ifstream : public basic_istream<_CharT, _Traits>
531 typedef _CharT char_type;
532 typedef typename _Traits::int_type int_type;
533 typedef typename _Traits::pos_type pos_type;
534 typedef typename _Traits::off_type off_type;
535 typedef _Traits traits_type;
537 typedef basic_ios<_CharT, _Traits> _Basic_ios;
538 typedef basic_istream<_CharT, _Traits> _Base;
539 typedef basic_filebuf<_CharT, _Traits> _Buf;
541 public: // Constructors, destructor.
544 basic_ios<_CharT, _Traits>(), basic_istream<_CharT, _Traits>(0), _M_buf() {
548 explicit basic_ifstream(const char* __s, ios_base::openmode __mod = ios_base::in) :
549 basic_ios<_CharT, _Traits>(), basic_istream<_CharT, _Traits>(0),
552 if (!_M_buf.open(__s, __mod | ios_base::in))
553 this->setstate(ios_base::failbit);
556 # ifndef _STLP_NO_EXTENSIONS
557 explicit basic_ifstream(int __id, ios_base::openmode __mod = ios_base::in) :
558 basic_ios<_CharT, _Traits>(), basic_istream<_CharT, _Traits>(0), _M_buf() {
560 if (!_M_buf.open(__id, __mod | ios_base::in))
561 this->setstate(ios_base::failbit);
563 basic_ifstream(const char* __s, ios_base::openmode __m,
565 basic_ios<_CharT, _Traits>(), basic_istream<_CharT, _Traits>(0), _M_buf() {
567 if (!_M_buf.open(__s, __m | ios_base::in, __protection))
568 this->setstate(ios_base::failbit);
575 public: // File and buffer operations.
576 basic_filebuf<_CharT, _Traits>* rdbuf() const
577 { return __CONST_CAST(_Buf*,&_M_buf); }
580 return this->rdbuf()->is_open();
583 void open(const char* __s, ios_base::openmode __mod = ios_base::in) {
584 if (!this->rdbuf()->open(__s, __mod | ios_base::in))
585 this->setstate(ios_base::failbit);
589 if (!this->rdbuf()->close())
590 this->setstate(ios_base::failbit);
595 basic_filebuf<_CharT, _Traits> _M_buf;
599 //----------------------------------------------------------------------
600 // Class basic_ofstream<>
602 template <class _CharT, class _Traits>
603 class basic_ofstream : public basic_ostream<_CharT, _Traits>
606 typedef _CharT char_type;
607 typedef typename _Traits::int_type int_type;
608 typedef typename _Traits::pos_type pos_type;
609 typedef typename _Traits::off_type off_type;
610 typedef _Traits traits_type;
612 typedef basic_ios<_CharT, _Traits> _Basic_ios;
613 typedef basic_ostream<_CharT, _Traits> _Base;
614 typedef basic_filebuf<_CharT, _Traits> _Buf;
616 public: // Constructors, destructor.
618 basic_ios<_CharT, _Traits>(),
619 basic_ostream<_CharT, _Traits>(0), _M_buf() {
622 explicit basic_ofstream(const char* __s, ios_base::openmode __mod = ios_base::out)
623 : basic_ios<_CharT, _Traits>(), basic_ostream<_CharT, _Traits>(0),
626 if (!_M_buf.open(__s, __mod | ios_base::out))
627 this->setstate(ios_base::failbit);
630 # ifndef _STLP_NO_EXTENSIONS
631 explicit basic_ofstream(int __id, ios_base::openmode __mod = ios_base::out)
632 : basic_ios<_CharT, _Traits>(), basic_ostream<_CharT, _Traits>(0),
635 if (!_M_buf.open(__id, __mod | ios_base::out))
636 this->setstate(ios_base::failbit);
638 basic_ofstream(const char* __s, ios_base::openmode __m, long __protection) :
639 basic_ios<_CharT, _Traits>(), basic_ostream<_CharT, _Traits>(0), _M_buf() {
641 if (!_M_buf.open(__s, __m | ios_base::out, __protection))
642 this->setstate(ios_base::failbit);
648 public: // File and buffer operations.
649 basic_filebuf<_CharT, _Traits>* rdbuf() const
650 { return __CONST_CAST(_Buf*,&_M_buf); }
653 return this->rdbuf()->is_open();
656 void open(const char* __s, ios_base::openmode __mod= ios_base::out) {
657 if (!this->rdbuf()->open(__s, __mod | ios_base::out))
658 this->setstate(ios_base::failbit);
662 if (!this->rdbuf()->close())
663 this->setstate(ios_base::failbit);
667 basic_filebuf<_CharT, _Traits> _M_buf;
671 //----------------------------------------------------------------------
672 // Class basic_fstream<>
674 template <class _CharT, class _Traits>
675 class basic_fstream : public basic_iostream<_CharT, _Traits>
678 typedef _CharT char_type;
679 typedef typename _Traits::int_type int_type;
680 typedef typename _Traits::pos_type pos_type;
681 typedef typename _Traits::off_type off_type;
682 typedef _Traits traits_type;
684 typedef basic_ios<_CharT, _Traits> _Basic_ios;
685 typedef basic_iostream<_CharT, _Traits> _Base;
686 typedef basic_filebuf<_CharT, _Traits> _Buf;
688 public: // Constructors, destructor.
690 _STLP_DECLSPEC basic_fstream();
691 explicit basic_fstream(const char* __s,
692 ios_base::openmode __mod = ios_base::in | ios_base::out) :
693 basic_ios<_CharT, _Traits>(), basic_iostream<_CharT, _Traits>(0), _M_buf() {
695 if (!_M_buf.open(__s, __mod))
696 this->setstate(ios_base::failbit);
699 # ifndef _STLP_NO_EXTENSIONS
700 explicit basic_fstream(int __id,
701 ios_base::openmode __mod = ios_base::in | ios_base::out) :
702 basic_ios<_CharT, _Traits>(), basic_iostream<_CharT, _Traits>(0), _M_buf() {
704 if (!_M_buf.open(__id, __mod))
705 this->setstate(ios_base::failbit);
707 basic_fstream(const char* __s, ios_base::openmode __m, long __protection) :
708 basic_ios<_CharT, _Traits>(), basic_iostream<_CharT, _Traits>(0), _M_buf() {
710 if (!_M_buf.open(__s, __m, __protection))
711 this->setstate(ios_base::failbit);
714 _STLP_DECLSPEC ~basic_fstream();
716 public: // File and buffer operations.
718 basic_filebuf<_CharT, _Traits>* rdbuf() const
719 { return __CONST_CAST(_Buf*,&_M_buf); }
722 return this->rdbuf()->is_open();
725 void open(const char* __s,
726 ios_base::openmode __mod =
727 ios_base::in | ios_base::out) {
728 if (!this->rdbuf()->open(__s, __mod))
729 this->setstate(ios_base::failbit);
733 if (!this->rdbuf()->close())
734 this->setstate(ios_base::failbit);
738 basic_filebuf<_CharT, _Traits> _M_buf;
743 # if !defined (_STLP_LINK_TIME_INSTANTIATION)
744 # include <stl/_fstream.c>
747 _STLP_BEGIN_NAMESPACE
749 # if defined (_STLP_USE_TEMPLATE_EXPORT)
750 _STLP_EXPORT_TEMPLATE_CLASS basic_ifstream<char, char_traits<char> >;
751 _STLP_EXPORT_TEMPLATE_CLASS basic_ofstream<char, char_traits<char> >;
752 _STLP_EXPORT_TEMPLATE_CLASS basic_fstream<char, char_traits<char> >;
753 # if ! defined (_STLP_NO_WCHAR_T)
754 _STLP_EXPORT_TEMPLATE_CLASS basic_ifstream<wchar_t, char_traits<wchar_t> >;
755 _STLP_EXPORT_TEMPLATE_CLASS basic_ofstream<wchar_t, char_traits<wchar_t> >;
756 _STLP_EXPORT_TEMPLATE_CLASS basic_fstream<wchar_t, char_traits<wchar_t> >;
758 # endif /* _STLP_USE_TEMPLATE_EXPORT */
762 #endif /* _STLP_FSTREAM */