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 33 #ifndef _STLP_INTERNAL_ISTREAM 37 #ifndef _STLP_INTERNAL_CODECVT_H 41 #if defined (_STLP_USE_WIN32_IO) 42 typedef void* _STLP_fd;
43 #elif defined (_STLP_USE_UNIX_EMULATION_IO) || defined (_STLP_USE_STDIO_IO) || defined (_STLP_USE_UNIX_IO) 46 # error "Configure i/o !" 62 #if defined (_STLP_USE_STDIO_IO) 65 #if defined (_STLP_USE_WIN32_IO) 78 void _M_unmap(
void* __mmap_base,
streamoff __len);
89 #if defined (_STLP_UNIX) || defined (_STLP_MAC) 91 #else // defined (_STLP_WIN32) 101 #if defined (_STLP_UNIX) || defined (_STLP_MAC) || defined(__BEOS__) || defined (__amigaos__) 103 #elif defined (_STLP_WIN32) || defined (_STLP_VM) 110 static void _S_initialize();
117 #if defined (_STLP_USE_STDIO_IO) 126 #if defined (_STLP_USE_WIN32_IO) 148 template <
class _CharT,
class _Traits>
151 template <
class _CharT,
class _Traits>
175 #if !defined (_STLP_NO_EXTENSIONS) 185 return this->
_M_open(__id, _Init_mode);
188 # if defined (_STLP_USE_STDIO_IO) 194 # if defined (_STLP_USE_WIN32_IO) 259 pos_type __result(__off);
260 __result.state(__state);
342 #if defined (_STLP_USE_TEMPLATE_EXPORT) 344 # if ! defined (_STLP_NO_WCHAR_T) 353 template <
class _Traits>
367 char* __first,
char*
__last) {
369 return (__buf->_M_write(__first,
__n));
384 template <
class _Traits>
400 return __buf->_M_do_noconv_input();
408 template <
class _CharT,
class _Traits>
444 #if defined (_STLP_USE_TEMPLATE_EXPORT) && !defined (_STLP_NO_WCHAR_T) 451 template <
class _CharT,
class _Traits>
479 #if !defined (_STLP_NO_EXTENSIONS) 494 # if defined (_STLP_USE_WIN32_IO) 511 return this->
rdbuf()->is_open();
532 template <
class _CharT,
class _Traits>
558 #if !defined (_STLP_NO_EXTENSIONS) 572 # if defined (_STLP_USE_WIN32_IO) 590 return this->
rdbuf()->is_open();
611 template <
class _CharT,
class _Traits>
635 if (!
_M_buf.open(__s, __mod))
639 #if !defined (_STLP_NO_EXTENSIONS) 644 if (!
_M_buf.open(__id, __mod))
650 if (!
_M_buf.open(__s, __m, __protection))
653 # if defined (_STLP_USE_WIN32_IO) 658 if (!
_M_buf.open(__id, __mod))
671 return this->
rdbuf()->is_open();
689 #if defined (_STLP_MSVC) && (_STLP_MSVC >= 1300 && _STLP_MSVC <= 1310) 699 #if defined (_STLP_EXPOSE_STREAM_IMPLEMENTATION) && !defined (_STLP_LINK_TIME_INSTANTIATION) 705 #if defined (_STLP_USE_TEMPLATE_EXPORT) 709 # if ! defined (_STLP_NO_WCHAR_T)
bool _M_allocate_buffers()
static size_t _STLP_CALL __page_size()
char * _M_ext_buf_converted
_Traits::state_type _State_type
_Traits::char_type char_type
basic_istream< _CharT, _Traits > _Base
basic_ifstream(int __id, ios_base::openmode __mod=ios_base::in)
char_type * egptr() const
basic_filebuf< _CharT, _Traits > _Self
unsigned char _M_constant_width
basic_streambuf< _CharT, _Traits > _Base
static size_t _M_page_size
unsigned char _M_regular_file
virtual pos_type seekpos(pos_type, ios_base::openmode=ios_base::in|ios_base::out)
void _M_deallocate_buffers()
_Traits::int_type int_type
GLuint GLuint GLsizei count
void operator=(const ios_base &)
bool _M_seek_init(bool __do_unshift)
basic_ostream< _CharT, _Traits > _Base
virtual int_type pbackfail(int_type=traits_type::eof())
unsigned char _M_in_input_mode
basic_filebuf< _CharT, _Traits > * rdbuf() const
bool _M_in_binary_mode() const
void open(const char *__s, ios_base::openmode __mod=ios_base::out)
int_type _M_output_error()
basic_filebuf< _CharT, _Traits > * rdbuf() const
basic_filebuf< _CharT, _Traits > * rdbuf() const
virtual int_type overflow(int_type=traits_type::eof())
void setp(char_type *__pbegin, char_type *__pend)
bool _M_switch_to_output_mode()
void setg(char_type *__gbegin, char_type *__gnext, char_type *__gend)
codecvt< _CharT, char, _State_type > _Codecvt
unsigned char _M_should_close
_Traits::pos_type pos_type
_Traits::off_type off_type
basic_filebuf< _CharT, _Traits > _Buf
_Traits::pos_type pos_type
char_traits< char > traits_type
virtual int_type underflow()
static bool _STLP_CALL _M_doit(basic_filebuf< char_type, _Traits > *, char_type *, char_type *)
unsigned char _M_in_output_mode
ios_base::openmode _M_openmode
unsigned char _M_always_noconv
virtual void imbue(const locale &)
virtual streamsize showmanyc()
virtual basic_streambuf< _CharT, _Traits > * setbuf(char_type *, streamsize)
_Self * open(const char *__s, ios_base::openmode __m)
_STLP_INLINE_LOOP _InputIter __last
_Self * _M_open(int __id, ios_base::openmode _Init_mode=ios_base::__default_mode)
basic_fstream(const char *__s, ios_base::openmode __mod=ios_base::in|ios_base::out)
basic_filebuf< _CharT, _Traits > _Buf
basic_filebuf< _CharT, _Traits > _M_buf
_STLP_fd __get_fd() const
_Traits::int_type int_type
basic_ios< _CharT, _Traits > _Basic_ios
basic_ofstream(const char *__s, ios_base::openmode __m, long __protection)
basic_ios< _CharT, _Traits > _Basic_ios
int_type _M_input_error()
#define _STLP_EXPORT_TEMPLATE_CLASS
basic_filebuf< _CharT, _Traits > _M_buf
int_type _M_do_noconv_input()
_Traits::pos_type pos_type
const GLuint GLenum const GLvoid * binary
bool _M_switch_to_input_mode()
basic_fstream(int __id, ios_base::openmode __mod=ios_base::in|ios_base::out)
unsigned char _M_int_buf_dynamic
void init(basic_streambuf< _CharT, _Traits > *__streambuf)
unsigned char _M_in_putback_mode
bool __should_close() const
basic_ifstream(const char *__s, ios_base::openmode __mod=ios_base::in)
void open(const char *__s, ios_base::openmode __mod=ios_base::in)
void open(const char *__s, ios_base::openmode __mod=ios_base::in|ios_base::out)
#define _STLP_CLASS_DECLSPEC
void setstate(iostate __state)
_Traits::int_type int_type
_CharT _M_pback_buf[_S_pback_buf_size]
#define _STLP_TEMPLATE_NULL
unsigned char _M_in_error_mode
void _M_exit_input_mode()
_Check_return_ _CRTIMP int __cdecl __cdecl eof(_In_ int _FileHandle)
_Traits::off_type off_type
_Traits::int_type int_type
bool _M_write(char *__buf, ptrdiff_t __n)
#define __CONST_CAST(__x, __y)
streamoff _M_get_offset(char *__first, char *__last)
_Self * open(int __id, ios_base::openmode _Init_mode=ios_base::__default_mode)
static bool _STLP_CALL _M_doit(basic_filebuf< char, char_traits< char > > *__buf, char *__first, char *__last)
basic_ofstream(const char *__s, ios_base::openmode __mod=ios_base::out)
#define _STLP_END_NAMESPACE
char_traits< char >::int_type int_type
__kernel_ptrdiff_t ptrdiff_t
basic_ifstream(const char *__s, ios_base::openmode __m, long __protection)
basic_istream< _CharT, _Traits > _Self
_Self * open(const char *__s, ios_base::openmode __m, long __protection)
bool _M_open(const char *, ios_base::openmode, long __protection)
void _M_setup_codecvt(const locale &, bool __on_imbue=true)
_Traits::off_type off_type
_Traits::pos_type pos_type
virtual pos_type seekoff(off_type, ios_base::seekdir, ios_base::openmode=ios_base::in|ios_base::out)
_Traits::int_type int_type
#define _STLP_BEGIN_NAMESPACE
basic_ios< _CharT, _Traits > _Basic_ios
int_type _M_underflow_aux()
const _Codecvt * _M_codecvt
basic_fstream(const char *__s, ios_base::openmode __m, long __protection)
basic_iostream< _CharT, _Traits > _Base
_Traits::off_type off_type
basic_ofstream(int __id, ios_base::openmode __mod=ios_base::out)
bool _M_write(char *__buf, ptrdiff_t __n)
bool __regular_file() const
void _M_exit_putback_mode()
basic_filebuf< _CharT, _Traits > _M_buf
basic_filebuf< _CharT, _Traits > _Buf
static int_type _STLP_CALL _M_doit(basic_filebuf< _CharT, _Traits > *__this)
pos_type _M_seek_return(off_type __off, _State_type __state)