3 * Silicon Graphics Computer Systems, Inc.
8 * This material is provided "as is", with absolutely no warranty expressed
9 * or implied. Any use is at your own risk.
11 * Permission to use or copy this software for any purpose is hereby granted
12 * without fee, provided the above notices are retained on all copies.
13 * Permission to modify the code and to distribute modified code is granted,
14 * provided the above notices are retained, and a notice that the code was
15 * modified is included with the above copyright notice.
18 // This header defines classes basic_filebuf, basic_ifstream,
19 // basic_ofstream, and basic_fstream. These classes represent
20 // streambufs and streams whose sources or destinations are files.
22 #ifndef _STLP_INTERNAL_FSTREAM_H
23 #define _STLP_INTERNAL_FSTREAM_H
25 #if defined(__sgi) && !defined(__GNUC__) && !defined(_STANDARD_C_PLUS_PLUS)
26 # error This header file requires the -LANG:std option
29 #ifndef _STLP_INTERNAL_STREAMBUF
30 # include <stl/_streambuf.h>
33 #ifndef _STLP_INTERNAL_ISTREAM
34 # include <stl/_istream.h>
37 #ifndef _STLP_INTERNAL_CODECVT_H
38 # include <stl/_codecvt.h>
41 #if !defined (_STLP_USE_UNIX_IO) && !defined(_STLP_USE_WIN32_IO) && \
42 !defined (_STLP_USE_UNIX_EMULATION_IO) && !defined (_STLP_USE_STDIO_IO)
44 # if defined (_STLP_UNIX) || defined (__CYGWIN__) || defined (__amigaos__) || defined (__EMX__)
45 // open/close/read/write
46 # define _STLP_USE_UNIX_IO
47 # elif defined (_STLP_WIN32)
48 // CreateFile/ReadFile/WriteFile
49 # define _STLP_USE_WIN32_IO
50 # elif defined (_STLP_WIN16) || defined (_STLP_MAC)
52 # define _STLP_USE_UNIX_EMULATION_IO
55 # define _STLP_USE_STDIO_IO
56 # endif /* _STLP_UNIX */
57 #endif /* mode selection */
59 #if defined (_STLP_USE_WIN32_IO)
60 typedef void* _STLP_fd;
61 #elif defined (_STLP_USE_UNIX_EMULATION_IO) || defined (_STLP_USE_STDIO_IO) || defined (_STLP_USE_UNIX_IO)
64 # error "Configure i/o !"
69 //----------------------------------------------------------------------
70 // Class _Filebuf_base, a private base class to factor out the system-
71 // dependent code from basic_filebuf<>.
73 class _STLP_CLASS_DECLSPEC _Filebuf_base {
74 public: // Opening and closing files.
77 bool _M_open(const char*, ios_base::openmode, long __protection);
78 bool _M_open(const char*, ios_base::openmode);
79 bool _M_open(int __id, ios_base::openmode = ios_base::__default_mode);
80 #if defined (_STLP_USE_WIN32_IO)
81 bool _M_open(_STLP_fd __id, ios_base::openmode = ios_base::__default_mode);
82 #endif /* _STLP_USE_WIN32_IO */
85 public: // Low-level I/O, like Unix read/write
86 ptrdiff_t _M_read(char* __buf, ptrdiff_t __n);
87 streamoff _M_seek(streamoff __offset, ios_base::seekdir __dir);
88 streamoff _M_file_size();
89 bool _M_write(char* __buf, ptrdiff_t __n);
91 public: // Memory-mapped I/O.
92 void* _M_mmap(streamoff __offset, streamoff __len);
93 void _M_unmap(void* __mmap_base, streamoff __len);
96 // Returns a value n such that, if pos is the file pointer at the
97 // beginning of the range [first, last), pos + n is the file pointer at
98 // the end. On many operating systems n == __last - __first.
99 // In Unix, writing n characters always bumps the file position by n.
100 // In Windows text mode, however, it bumps the file position by n + m,
101 // where m is the number of newlines in the range. That's because an
102 // internal \n corresponds to an external two-character sequence.
103 streamoff _M_get_offset(char* __first, char* __last) {
104 #if defined (_STLP_UNIX) || defined (_STLP_MAC)
105 return __last - __first;
106 #else // defined (_STLP_WIN32) || defined (_STLP_WIN16) || defined (_STLP_DOS) || defined(N_PLAT_NLM)
107 return ( (_M_openmode & ios_base::binary) != 0 )
109 : count(__first, __last, '\n') + (__last - __first);
113 // Returns true if we're in binary mode or if we're using an OS or file
114 // system where there is no distinction between text and binary mode.
115 bool _M_in_binary_mode() const {
116 #if defined (_STLP_UNIX) || defined (_STLP_MAC) || defined(__BEOS__) || defined (__amigaos__)
118 #elif defined (_STLP_WIN32) || defined (_STLP_WIN16) || defined (_STLP_DOS) || defined (_STLP_VM) || defined (__EMX__) || defined(N_PLAT_NLM)
119 return (_M_openmode & ios_base::binary) != 0;
125 protected: // Static data members.
126 static size_t _M_page_size;
128 protected: // Data members.
130 #if defined (_STLP_USE_STDIO_IO)
131 // for stdio, the whole FILE* is being kept here
134 #if defined (_STLP_USE_WIN32_IO)
138 ios_base::openmode _M_openmode ;
139 unsigned char _M_is_open ;
140 unsigned char _M_should_close ;
141 unsigned char _M_regular_file ;
144 static size_t _STLP_CALL __page_size() { return _M_page_size; }
145 int __o_mode() const { return (int)_M_openmode; }
146 bool __is_open() const { return (_M_is_open !=0 ); }
147 bool __should_close() const { return (_M_should_close != 0); }
148 bool __regular_file() const { return (_M_regular_file != 0); }
149 _STLP_fd __get_fd() const { return _M_file_id; }
152 //----------------------------------------------------------------------
153 // Class basic_filebuf<>.
155 // Forward declaration of two helper classes.
156 template <class _Traits> class _Noconv_input;
158 class _Noconv_input<char_traits<char> >;
160 template <class _Traits> class _Noconv_output;
162 class _Noconv_output< char_traits<char> >;
164 // There is a specialized version of underflow, for basic_filebuf<char>,
167 template <class _CharT, class _Traits>
170 _STLP_TEMPLATE_NULL class _Underflow< char, char_traits<char> >;
172 template <class _CharT, class _Traits>
173 class basic_filebuf : public basic_streambuf<_CharT, _Traits> {
175 typedef _CharT char_type;
176 typedef typename _Traits::int_type int_type;
177 typedef typename _Traits::pos_type pos_type;
178 typedef typename _Traits::off_type off_type;
179 typedef _Traits traits_type;
181 typedef typename _Traits::state_type _State_type;
182 typedef basic_streambuf<_CharT, _Traits> _Base;
183 typedef basic_filebuf<_CharT, _Traits> _Self;
185 public: // Constructors, destructor.
189 public: // Opening and closing files.
190 bool is_open() const { return _M_base.__is_open(); }
192 _Self* open(const char* __s, ios_base::openmode __m) {
193 return _M_base._M_open(__s, __m) ? this : 0;
196 #if !defined (_STLP_NO_EXTENSIONS)
197 // These two version of open() and file descriptor getter are extensions.
198 _Self* open(const char* __s, ios_base::openmode __m,
200 return _M_base._M_open(__s, __m, __protection) ? this : 0;
203 _STLP_fd fd() const { return _M_base.__get_fd(); }
205 _Self* open(int __id, ios_base::openmode _Init_mode = ios_base::__default_mode) {
206 return this->_M_open(__id, _Init_mode);
209 # if defined (_STLP_USE_WIN32_IO)
210 _Self* open(_STLP_fd __id, ios_base::openmode _Init_mode = ios_base::__default_mode) {
211 return _M_base._M_open(__id, _Init_mode) ? this : 0;
213 # endif /* _STLP_USE_WIN32_IO */
217 _Self* _M_open(int __id, ios_base::openmode _Init_mode = ios_base::__default_mode) {
218 return _M_base._M_open(__id, _Init_mode) ? this : 0;
223 protected: // Virtual functions from basic_streambuf.
224 virtual streamsize showmanyc();
225 virtual int_type underflow();
227 virtual int_type pbackfail(int_type = traits_type::eof());
228 virtual int_type overflow(int_type = traits_type::eof());
230 virtual basic_streambuf<_CharT, _Traits>* setbuf(char_type*, streamsize);
231 virtual pos_type seekoff(off_type, ios_base::seekdir,
232 ios_base::openmode = ios_base::in | ios_base::out);
233 virtual pos_type seekpos(pos_type,
234 ios_base::openmode = ios_base::in | ios_base::out);
237 virtual void imbue(const locale&);
239 private: // Helper functions.
241 // Precondition: we are currently in putback input mode. Effect:
242 // switches back to ordinary input mode.
243 void _M_exit_putback_mode() {
244 this->setg(_M_saved_eback, _M_saved_gptr, _M_saved_egptr);
245 _M_in_putback_mode = false;
247 bool _M_switch_to_input_mode();
248 void _M_exit_input_mode();
249 bool _M_switch_to_output_mode();
251 int_type _M_input_error();
252 int_type _M_underflow_aux();
253 // friend class _Noconv_input<_Traits>;
254 // friend class _Noconv_output<_Traits>;
255 friend class _Underflow<_CharT, _Traits>;
257 int_type _M_output_error();
260 bool _M_allocate_buffers(_CharT* __buf, streamsize __n);
261 bool _M_allocate_buffers();
262 void _M_deallocate_buffers();
264 pos_type _M_seek_return(off_type __off, _State_type __state) {
266 if (_M_in_input_mode)
267 _M_exit_input_mode();
268 _M_in_input_mode = false;
269 _M_in_output_mode = false;
270 _M_in_putback_mode = false;
271 _M_in_error_mode = false;
276 pos_type __result(__off);
277 __result.state(__state);
281 bool _M_seek_init(bool __do_unshift);
283 void _M_setup_codecvt(const locale&, bool __on_imbue = true);
285 private: // Data members used in all modes.
287 _Filebuf_base _M_base;
289 private: // Locale-related information.
291 unsigned char _M_constant_width;
292 unsigned char _M_always_noconv;
294 // private: // Mode flags.
295 unsigned char _M_int_buf_dynamic; // True if internal buffer is heap allocated,
296 // false if it was supplied by the user.
297 unsigned char _M_in_input_mode;
298 unsigned char _M_in_output_mode;
299 unsigned char _M_in_error_mode;
300 unsigned char _M_in_putback_mode;
302 // Internal buffer: characters seen by the filebuf's clients.
304 _CharT* _M_int_buf_EOS;
306 // External buffer: characters corresponding to the external file.
308 char* _M_ext_buf_EOS;
310 // The range [_M_ext_buf, _M_ext_buf_converted) contains the external
311 // characters corresponding to the sequence in the internal buffer. The
312 // range [_M_ext_buf_converted, _M_ext_buf_end) contains characters that
313 // have been read into the external buffer but have not been converted
314 // to an internal sequence.
315 char* _M_ext_buf_converted;
316 char* _M_ext_buf_end;
318 // State corresponding to beginning of internal buffer.
319 _State_type _M_state;
321 private: // Data members used only in input mode.
323 // Similar to _M_state except that it corresponds to
324 // the end of the internal buffer instead of the beginning.
325 _State_type _M_end_state;
327 // This is a null pointer unless we are in mmap input mode.
329 streamoff _M_mmap_len;
331 private: // Data members used only in putback mode.
332 _CharT* _M_saved_eback;
333 _CharT* _M_saved_gptr;
334 _CharT* _M_saved_egptr;
336 typedef codecvt<_CharT, char, _State_type> _Codecvt;
337 const _Codecvt* _M_codecvt;
339 int _M_width; // Width of the encoding (if constant), else 1
340 int _M_max_width; // Largest possible width of single character.
343 enum { _S_pback_buf_size = 8 };
344 _CharT _M_pback_buf[_S_pback_buf_size];
346 // for _Noconv_output
348 bool _M_write(char* __buf, ptrdiff_t __n) {return _M_base._M_write(__buf, __n); }
352 _M_do_noconv_input() {
353 _M_ext_buf_converted = _M_ext_buf_end;
354 /* this-> */ _Base::setg((char_type*)_M_ext_buf, (char_type*)_M_ext_buf, (char_type*)_M_ext_buf_end);
355 return traits_type::to_int_type(*_M_ext_buf);
359 #if defined (_STLP_USE_TEMPLATE_EXPORT)
360 _STLP_EXPORT_TEMPLATE_CLASS basic_filebuf<char, char_traits<char> >;
361 # if ! defined (_STLP_NO_WCHAR_T)
362 _STLP_EXPORT_TEMPLATE_CLASS basic_filebuf<wchar_t, char_traits<wchar_t> >;
364 #endif /* _STLP_USE_TEMPLATE_EXPORT */
368 template <class _CharT>
369 struct _Filebuf_Tmp_Buf {
371 _Filebuf_Tmp_Buf(ptrdiff_t __n) : _M_ptr(0) { _M_ptr = new _CharT[__n]; }
372 ~_Filebuf_Tmp_Buf() { delete[] _M_ptr; }
377 // This class had to be designed very carefully to work
380 template <class _Traits>
381 class _Noconv_output {
383 typedef typename _Traits::char_type char_type;
384 static bool _STLP_CALL _M_doit(basic_filebuf<char_type, _Traits >*,
385 char_type*, char_type*)
390 class _STLP_CLASS_DECLSPEC _Noconv_output< char_traits<char> > {
392 static bool _STLP_CALL
393 _M_doit(basic_filebuf<char, char_traits<char> >* __buf,
394 char* __first, char* __last) {
395 ptrdiff_t __n = __last - __first;
396 return (__buf->_M_write(__first, __n));
400 //----------------------------------------------------------------------
401 // basic_filebuf<> helper functions.
404 //----------------------------------------
405 // Helper functions for switching between modes.
408 // This class had to be designed very carefully to work
411 template <class _Traits>
412 class _Noconv_input {
414 typedef typename _Traits::int_type int_type;
415 typedef typename _Traits::char_type char_type;
417 static inline int_type _STLP_CALL
418 _M_doit(basic_filebuf<char_type, _Traits>*)
419 { return _Traits::eof(); }
423 class _Noconv_input<char_traits<char> > {
425 static inline int _STLP_CALL
426 _M_doit(basic_filebuf<char, char_traits<char> >* __buf) {
427 return __buf->_M_do_noconv_input();
431 // underflow() may be called for one of two reasons. (1) We've
432 // been going through the special putback buffer, and we need to move back
433 // to the regular internal buffer. (2) We've exhausted the internal buffer,
434 // and we need to replentish it.
435 template <class _CharT, class _Traits>
438 typedef typename _Traits::int_type int_type;
439 typedef _Traits traits_type;
441 static int_type _STLP_CALL _M_doit(basic_filebuf<_CharT, _Traits>* __this);
445 // Specialization of underflow: if the character type is char, maybe
446 // we can use mmap instead of read.
448 class _STLP_CLASS_DECLSPEC _Underflow< char, char_traits<char> > {
450 typedef char_traits<char>::int_type int_type;
451 typedef char_traits<char> traits_type;
452 static int _STLP_CALL _M_doit(basic_filebuf<char, traits_type >* __this);
455 // There is a specialized version of underflow, for basic_filebuf<char>,
458 template <class _CharT, class _Traits>
459 _STLP_TYPENAME_ON_RETURN_TYPE _Underflow<_CharT, _Traits>::int_type // _STLP_CALL
460 _Underflow<_CharT, _Traits>::_M_doit(basic_filebuf<_CharT, _Traits>* __this) {
461 if (!__this->_M_in_input_mode) {
462 if (!__this->_M_switch_to_input_mode())
463 return traits_type::eof();
465 else if (__this->_M_in_putback_mode) {
466 __this->_M_exit_putback_mode();
467 if (__this->gptr() != __this->egptr()) {
468 int_type __c = traits_type::to_int_type(*__this->gptr());
473 return __this->_M_underflow_aux();
476 #if defined (_STLP_USE_TEMPLATE_EXPORT) && !defined (_STLP_NO_WCHAR_T)
477 _STLP_EXPORT_TEMPLATE_CLASS _Underflow<wchar_t, char_traits<wchar_t> >;
480 //----------------------------------------------------------------------
481 // Class basic_ifstream<>
483 template <class _CharT, class _Traits>
484 class basic_ifstream : public basic_istream<_CharT, _Traits> {
486 typedef _CharT char_type;
487 typedef typename _Traits::int_type int_type;
488 typedef typename _Traits::pos_type pos_type;
489 typedef typename _Traits::off_type off_type;
490 typedef _Traits traits_type;
492 typedef basic_ios<_CharT, _Traits> _Basic_ios;
493 typedef basic_istream<_CharT, _Traits> _Base;
494 typedef basic_filebuf<_CharT, _Traits> _Buf;
496 public: // Constructors, destructor.
499 basic_ios<_CharT, _Traits>(), basic_istream<_CharT, _Traits>(0), _M_buf() {
503 explicit basic_ifstream(const char* __s, ios_base::openmode __mod = ios_base::in) :
504 basic_ios<_CharT, _Traits>(), basic_istream<_CharT, _Traits>(0),
507 if (!_M_buf.open(__s, __mod | ios_base::in))
508 this->setstate(ios_base::failbit);
511 #if !defined (_STLP_NO_EXTENSIONS)
512 explicit basic_ifstream(int __id, ios_base::openmode __mod = ios_base::in) :
513 basic_ios<_CharT, _Traits>(), basic_istream<_CharT, _Traits>(0), _M_buf() {
515 if (!_M_buf.open(__id, __mod | ios_base::in))
516 this->setstate(ios_base::failbit);
518 basic_ifstream(const char* __s, ios_base::openmode __m,
520 basic_ios<_CharT, _Traits>(), basic_istream<_CharT, _Traits>(0), _M_buf() {
522 if (!_M_buf.open(__s, __m | ios_base::in, __protection))
523 this->setstate(ios_base::failbit);
526 # if defined (_STLP_USE_WIN32_IO)
527 explicit basic_ifstream(_STLP_fd __id, ios_base::openmode __mod = ios_base::in) :
528 basic_ios<_CharT, _Traits>(), basic_istream<_CharT, _Traits>(0), _M_buf() {
530 if (!_M_buf.open(__id, __mod | ios_base::in))
531 this->setstate(ios_base::failbit);
533 # endif /* _STLP_USE_WIN32_IO */
538 public: // File and buffer operations.
539 basic_filebuf<_CharT, _Traits>* rdbuf() const
540 { return __CONST_CAST(_Buf*,&_M_buf); }
543 return this->rdbuf()->is_open();
546 void open(const char* __s, ios_base::openmode __mod = ios_base::in) {
547 if (!this->rdbuf()->open(__s, __mod | ios_base::in))
548 this->setstate(ios_base::failbit);
552 if (!this->rdbuf()->close())
553 this->setstate(ios_base::failbit);
557 basic_filebuf<_CharT, _Traits> _M_buf;
561 //----------------------------------------------------------------------
562 // Class basic_ofstream<>
564 template <class _CharT, class _Traits>
565 class basic_ofstream : public basic_ostream<_CharT, _Traits> {
567 typedef _CharT char_type;
568 typedef typename _Traits::int_type int_type;
569 typedef typename _Traits::pos_type pos_type;
570 typedef typename _Traits::off_type off_type;
571 typedef _Traits traits_type;
573 typedef basic_ios<_CharT, _Traits> _Basic_ios;
574 typedef basic_ostream<_CharT, _Traits> _Base;
575 typedef basic_filebuf<_CharT, _Traits> _Buf;
577 public: // Constructors, destructor.
579 basic_ios<_CharT, _Traits>(),
580 basic_ostream<_CharT, _Traits>(0), _M_buf() {
583 explicit basic_ofstream(const char* __s, ios_base::openmode __mod = ios_base::out)
584 : basic_ios<_CharT, _Traits>(), basic_ostream<_CharT, _Traits>(0), _M_buf() {
586 if (!_M_buf.open(__s, __mod | ios_base::out))
587 this->setstate(ios_base::failbit);
590 #if !defined (_STLP_NO_EXTENSIONS)
591 explicit basic_ofstream(int __id, ios_base::openmode __mod = ios_base::out)
592 : basic_ios<_CharT, _Traits>(), basic_ostream<_CharT, _Traits>(0),
595 if (!_M_buf.open(__id, __mod | ios_base::out))
596 this->setstate(ios_base::failbit);
598 basic_ofstream(const char* __s, ios_base::openmode __m, long __protection) :
599 basic_ios<_CharT, _Traits>(), basic_ostream<_CharT, _Traits>(0), _M_buf() {
601 if (!_M_buf.open(__s, __m | ios_base::out, __protection))
602 this->setstate(ios_base::failbit);
604 # if defined (_STLP_USE_WIN32_IO)
605 explicit basic_ofstream(_STLP_fd __id, ios_base::openmode __mod = ios_base::out)
606 : basic_ios<_CharT, _Traits>(), basic_ostream<_CharT, _Traits>(0),
609 if (!_M_buf.open(__id, __mod | ios_base::out))
610 this->setstate(ios_base::failbit);
612 # endif /* _STLP_USE_WIN32_IO */
617 public: // File and buffer operations.
618 basic_filebuf<_CharT, _Traits>* rdbuf() const
619 { return __CONST_CAST(_Buf*,&_M_buf); }
622 return this->rdbuf()->is_open();
625 void open(const char* __s, ios_base::openmode __mod= ios_base::out) {
626 if (!this->rdbuf()->open(__s, __mod | ios_base::out))
627 this->setstate(ios_base::failbit);
631 if (!this->rdbuf()->close())
632 this->setstate(ios_base::failbit);
636 basic_filebuf<_CharT, _Traits> _M_buf;
640 //----------------------------------------------------------------------
641 // Class basic_fstream<>
643 template <class _CharT, class _Traits>
644 class basic_fstream : public basic_iostream<_CharT, _Traits> {
646 typedef _CharT char_type;
647 typedef typename _Traits::int_type int_type;
648 typedef typename _Traits::pos_type pos_type;
649 typedef typename _Traits::off_type off_type;
650 typedef _Traits traits_type;
652 typedef basic_ios<_CharT, _Traits> _Basic_ios;
653 typedef basic_iostream<_CharT, _Traits> _Base;
654 typedef basic_filebuf<_CharT, _Traits> _Buf;
656 public: // Constructors, destructor.
659 : basic_ios<_CharT, _Traits>(), basic_iostream<_CharT, _Traits>(0), _M_buf() {
663 explicit basic_fstream(const char* __s,
664 ios_base::openmode __mod = ios_base::in | ios_base::out) :
665 basic_ios<_CharT, _Traits>(), basic_iostream<_CharT, _Traits>(0), _M_buf() {
667 if (!_M_buf.open(__s, __mod))
668 this->setstate(ios_base::failbit);
671 #if !defined (_STLP_NO_EXTENSIONS)
672 explicit basic_fstream(int __id,
673 ios_base::openmode __mod = ios_base::in | ios_base::out) :
674 basic_ios<_CharT, _Traits>(), basic_iostream<_CharT, _Traits>(0), _M_buf() {
676 if (!_M_buf.open(__id, __mod))
677 this->setstate(ios_base::failbit);
679 basic_fstream(const char* __s, ios_base::openmode __m, long __protection) :
680 basic_ios<_CharT, _Traits>(), basic_iostream<_CharT, _Traits>(0), _M_buf() {
682 if (!_M_buf.open(__s, __m, __protection))
683 this->setstate(ios_base::failbit);
685 # if defined (_STLP_USE_WIN32_IO)
686 explicit basic_fstream(_STLP_fd __id,
687 ios_base::openmode __mod = ios_base::in | ios_base::out) :
688 basic_ios<_CharT, _Traits>(), basic_iostream<_CharT, _Traits>(0), _M_buf() {
690 if (!_M_buf.open(__id, __mod))
691 this->setstate(ios_base::failbit);
693 # endif /* _STLP_USE_WIN32_IO */
697 public: // File and buffer operations.
699 basic_filebuf<_CharT, _Traits>* rdbuf() const
700 { return __CONST_CAST(_Buf*,&_M_buf); }
703 return this->rdbuf()->is_open();
706 void open(const char* __s,
707 ios_base::openmode __mod =
708 ios_base::in | ios_base::out) {
709 if (!this->rdbuf()->open(__s, __mod))
710 this->setstate(ios_base::failbit);
714 if (!this->rdbuf()->close())
715 this->setstate(ios_base::failbit);
719 basic_filebuf<_CharT, _Traits> _M_buf;
721 #if defined (_STLP_MSVC) && (_STLP_MSVC >= 1300 && _STLP_MSVC <= 1310)
722 typedef basic_fstream<_CharT, _Traits> _Self;
723 //explicitely defined as private to avoid warnings:
724 basic_fstream(_Self const&);
725 _Self& operator = (_Self const&);
731 #if defined (_STLP_EXPOSE_STREAM_IMPLEMENTATION) && !defined (_STLP_LINK_TIME_INSTANTIATION)
732 # include <stl/_fstream.c>
735 _STLP_BEGIN_NAMESPACE
737 #if defined (_STLP_USE_TEMPLATE_EXPORT)
738 _STLP_EXPORT_TEMPLATE_CLASS basic_ifstream<char, char_traits<char> >;
739 _STLP_EXPORT_TEMPLATE_CLASS basic_ofstream<char, char_traits<char> >;
740 _STLP_EXPORT_TEMPLATE_CLASS basic_fstream<char, char_traits<char> >;
741 # if ! defined (_STLP_NO_WCHAR_T)
742 _STLP_EXPORT_TEMPLATE_CLASS basic_ifstream<wchar_t, char_traits<wchar_t> >;
743 _STLP_EXPORT_TEMPLATE_CLASS basic_ofstream<wchar_t, char_traits<wchar_t> >;
744 _STLP_EXPORT_TEMPLATE_CLASS basic_fstream<wchar_t, char_traits<wchar_t> >;
746 #endif /* _STLP_USE_TEMPLATE_EXPORT */
750 #endif /* _STLP_FSTREAM */