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)
42typedef 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)
92 return ( (_M_openmode & ios_base::binary) != 0 )
101#if defined (_STLP_UNIX) || defined (_STLP_MAC) || defined(__BEOS__) || defined (__amigaos__)
103#elif defined (_STLP_WIN32) || defined (_STLP_VM)
104 return (_M_openmode & ios_base::binary) != 0;
110 static void _S_initialize();
117#if defined (_STLP_USE_STDIO_IO)
126#if defined (_STLP_USE_WIN32_IO)
148template <
class _CharT,
class _Traits>
151template <
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)
353template <
class _Traits>
367 char* __first,
char*
__last) {
369 return (__buf->_M_write(__first,
__n));
384template <
class _Traits>
392 {
return _Traits::eof(); }
400 return __buf->_M_do_noconv_input();
408template <
class _CharT,
class _Traits>
419 return traits_type::eof();
444#if defined (_STLP_USE_TEMPLATE_EXPORT) && !defined (_STLP_NO_WCHAR_T)
451template <
class _CharT,
class _Traits>
475 if (!
_M_buf.open(__s, __mod | ios_base::in))
479#if !defined (_STLP_NO_EXTENSIONS)
483 if (!
_M_buf.open(__id, __mod | ios_base::in))
490 if (!
_M_buf.open(__s, __m | ios_base::in, __protection))
494# if defined (_STLP_USE_WIN32_IO)
498 if (!
_M_buf.open(__id, __mod | ios_base::in))
511 return this->
rdbuf()->is_open();
515 if (!this->
rdbuf()->
open(__s, __mod | ios_base::in))
532template <
class _CharT,
class _Traits>
554 if (!
_M_buf.open(__s, __mod | ios_base::out))
558#if !defined (_STLP_NO_EXTENSIONS)
563 if (!
_M_buf.open(__id, __mod | ios_base::out))
569 if (!
_M_buf.open(__s, __m | ios_base::out, __protection))
572# if defined (_STLP_USE_WIN32_IO)
577 if (!
_M_buf.open(__id, __mod | ios_base::out))
590 return this->
rdbuf()->is_open();
594 if (!this->
rdbuf()->
open(__s, __mod | ios_base::out))
611template <
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();
676 ios_base::in | ios_base::out) {
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)
_STLP_INLINE_LOOP _InputIter __last
bool _M_write(char *__buf, ptrdiff_t __n)
bool __should_close() const
bool __regular_file() const
ios_base::openmode _M_openmode
unsigned char _M_regular_file
static size_t _M_page_size
unsigned char _M_should_close
_STLP_fd __get_fd() const
streamoff _M_get_offset(char *__first, char *__last)
static size_t _STLP_CALL __page_size()
bool _M_in_binary_mode() const
bool _M_open(const char *, ios_base::openmode, long __protection)
static bool _STLP_CALL _M_doit(basic_filebuf< char, char_traits< char > > *__buf, char *__first, char *__last)
static bool _STLP_CALL _M_doit(basic_filebuf< char_type, _Traits > *, char_type *, char_type *)
_Traits::char_type char_type
char_traits< char > traits_type
char_traits< char >::int_type int_type
_Traits::int_type int_type
static int_type _STLP_CALL _M_doit(basic_filebuf< _CharT, _Traits > *__this)
virtual int_type underflow()
void _M_deallocate_buffers()
const _Codecvt * _M_codecvt
virtual basic_streambuf< _CharT, _Traits > * setbuf(char_type *, streamsize)
bool _M_switch_to_input_mode()
_Self * open(const char *__s, ios_base::openmode __m, long __protection)
unsigned char _M_in_error_mode
int_type _M_underflow_aux()
unsigned char _M_int_buf_dynamic
pos_type _M_seek_return(off_type __off, _State_type __state)
unsigned char _M_always_noconv
_Self * open(int __id, ios_base::openmode _Init_mode=ios_base::__default_mode)
virtual pos_type seekoff(off_type, ios_base::seekdir, ios_base::openmode=ios_base::in|ios_base::out)
void _M_exit_putback_mode()
bool _M_seek_init(bool __do_unshift)
bool _M_allocate_buffers()
unsigned char _M_in_putback_mode
bool _M_switch_to_output_mode()
void _M_exit_input_mode()
_Traits::pos_type pos_type
basic_filebuf< _CharT, _Traits > _Self
int_type _M_do_noconv_input()
int_type _M_input_error()
virtual streamsize showmanyc()
virtual int_type overflow(int_type=traits_type::eof())
_CharT _M_pback_buf[_S_pback_buf_size]
basic_streambuf< _CharT, _Traits > _Base
char * _M_ext_buf_converted
_Self * open(const char *__s, ios_base::openmode __m)
codecvt< _CharT, char, _State_type > _Codecvt
unsigned char _M_in_output_mode
_Traits::int_type int_type
_Traits::off_type off_type
bool _M_write(char *__buf, ptrdiff_t __n)
_Traits::state_type _State_type
_Self * _M_open(int __id, ios_base::openmode _Init_mode=ios_base::__default_mode)
int_type _M_output_error()
virtual int_type pbackfail(int_type=traits_type::eof())
void _M_setup_codecvt(const locale &, bool __on_imbue=true)
virtual pos_type seekpos(pos_type, ios_base::openmode=ios_base::in|ios_base::out)
unsigned char _M_constant_width
unsigned char _M_in_input_mode
virtual void imbue(const locale &)
_Traits::pos_type pos_type
basic_filebuf< _CharT, _Traits > * rdbuf() const
basic_fstream(const char *__s, ios_base::openmode __m, long __protection)
basic_filebuf< _CharT, _Traits > _Buf
basic_ios< _CharT, _Traits > _Basic_ios
void open(const char *__s, ios_base::openmode __mod=ios_base::in|ios_base::out)
_Traits::int_type int_type
_Traits::off_type off_type
basic_fstream(const char *__s, ios_base::openmode __mod=ios_base::in|ios_base::out)
basic_filebuf< _CharT, _Traits > _M_buf
basic_iostream< _CharT, _Traits > _Base
basic_fstream(int __id, ios_base::openmode __mod=ios_base::in|ios_base::out)
basic_filebuf< _CharT, _Traits > _M_buf
basic_ifstream(int __id, ios_base::openmode __mod=ios_base::in)
_Traits::pos_type pos_type
basic_ifstream(const char *__s, ios_base::openmode __mod=ios_base::in)
basic_filebuf< _CharT, _Traits > _Buf
void open(const char *__s, ios_base::openmode __mod=ios_base::in)
basic_ios< _CharT, _Traits > _Basic_ios
_Traits::off_type off_type
basic_filebuf< _CharT, _Traits > * rdbuf() const
basic_istream< _CharT, _Traits > _Base
_Traits::int_type int_type
basic_ifstream(const char *__s, ios_base::openmode __m, long __protection)
void setstate(iostate __state)
basic_istream< _CharT, _Traits > _Self
_Traits::off_type off_type
basic_ostream< _CharT, _Traits > _Base
_Traits::int_type int_type
basic_ofstream(const char *__s, ios_base::openmode __mod=ios_base::out)
_Traits::pos_type pos_type
basic_filebuf< _CharT, _Traits > * rdbuf() const
basic_ofstream(int __id, ios_base::openmode __mod=ios_base::out)
void open(const char *__s, ios_base::openmode __mod=ios_base::out)
basic_ofstream(const char *__s, ios_base::openmode __m, long __protection)
basic_ios< _CharT, _Traits > _Basic_ios
basic_filebuf< _CharT, _Traits > _M_buf
basic_filebuf< _CharT, _Traits > _Buf
char_type * egptr() const
void setp(char_type *__pbegin, char_type *__pend)
void setg(char_type *__gbegin, char_type *__gnext, char_type *__gend)
void operator=(const ios_base &)
__kernel_ptrdiff_t ptrdiff_t
#define _STLP_TEMPLATE_NULL
#define __CONST_CAST(__x, __y)
#define _STLP_CLASS_DECLSPEC
#define _STLP_EXPORT_TEMPLATE_CLASS
#define _STLP_BEGIN_NAMESPACE
#define _STLP_END_NAMESPACE
GLuint GLuint GLsizei count