|
|
Whole document tree
Templatestd::basic_filebuf class Reference
Main Page Namespace List Class Hierarchy Alphabetical List Compound List File List Namespace Members Compound Members File Members
std::basic_filebuf< _CharT, _Traits > Class Template Reference#include <std_fstream.h>
Inheritance diagram for std::basic_filebuf:
[legend]Collaboration diagram for std::basic_filebuf< _CharT, _Traits >:
[legend]List of all members.
Public Types |
typedef _CharT | char_type |
typedef _Traits | traits_type |
typedef traits_type::int_type | int_type |
typedef traits_type::pos_type | pos_type |
typedef traits_type::off_type | off_type |
typedef basic_streambuf< char_type,
traits_type > | __streambuf_type |
typedef basic_filebuf< char_type,
traits_type > | __filebuf_type |
typedef __basic_file< char_type > | __file_type |
typedef traits_type::state_type | __state_type |
typedef codecvt< char_type,
char, __state_type > | __codecvt_type |
typedef __codecvt_type::result | __res_type |
typedef ctype< char_type > | __ctype_type |
Public Methods |
| basic_filebuf () |
| basic_filebuf (__c_file_type *__f, ios_base::openmode __mode, int_type __s=static_cast< int_type >(BUFSIZ)) |
virtual | ~basic_filebuf () |
bool | is_open (void) const |
__filebuf_type * | open (const char *__s, ios_base::openmode __mode) |
__filebuf_type * | close (void) |
Protected Methods |
void | _M_allocate_internal_buffer () |
void | _M_destroy_internal_buffer () |
void | _M_allocate_pback_buffer () |
void | _M_allocate_file () |
virtual streamsize | showmanyc (void) |
virtual int_type | underflow (void) |
virtual int_type | pbackfail (int_type __c=_Traits::eof()) |
virtual int_type | overflow (int_type __c=_Traits::eof()) |
int_type | _M_really_overflow (int_type __c=_Traits::eof()) |
virtual __streambuf_type * | setbuf (char_type *__s, streamsize __n) |
virtual pos_type | seekoff (off_type __off, ios_base::seekdir __way, ios_base::openmode __mode=ios_base::in|ios_base::out) |
virtual pos_type | seekpos (pos_type __pos, ios_base::openmode __mode=ios_base::in|ios_base::out) |
virtual int | sync (void) |
virtual void | imbue (const locale &__loc) |
virtual streamsize | xsgetn (char_type *__s, streamsize __n) |
virtual streamsize | xsputn (const char_type *__s, streamsize __n) |
void | _M_output_unshift () |
Private Attributes |
__file_type * | _M_file |
__state_type | _M_state_cur |
__state_type | _M_state_beg |
__c_lock | _M_lock |
bool | _M_buf_allocated |
bool | _M_last_overflowed |
Friends |
class | ios_base |
template<typename _CharT, typename _Traits>
class std::basic_filebuf< _CharT, _Traits >
Member Typedef Documentation
template<typename _CharT, typename _Traits> |
typedef codecvt<char_type, char, __state_type> std::basic_filebuf< _CharT, _Traits >::__codecvt_type
|
|
template<typename _CharT, typename _Traits> |
typedef ctype<char_type> std::basic_filebuf< _CharT, _Traits >::__ctype_type
|
|
template<typename _CharT, typename _Traits> |
typedef __basic_file<char_type> std::basic_filebuf< _CharT, _Traits >::__file_type
|
|
template<typename _CharT, typename _Traits> |
typedef basic_filebuf<char_type, traits_type> std::basic_filebuf< _CharT, _Traits >::__filebuf_type
|
|
template<typename _CharT, typename _Traits> |
typedef __codecvt_type::result std::basic_filebuf< _CharT, _Traits >::__res_type
|
|
template<typename _CharT, typename _Traits> |
typedef traits_type::state_type std::basic_filebuf< _CharT, _Traits >::__state_type
|
|
template<typename _CharT, typename _Traits> |
typedef _CharT std::basic_filebuf< _CharT, _Traits >::char_type
|
|
|
Reimplemented from std::basic_streambuf< _CharT, _Traits >.
Definition at line 52 of file std_fstream.h.
Referenced by std::basic_filebuf< _CharT, _Traits >::_M_allocate_internal_buffer(), std::basic_filebuf< _CharT, _Traits >::_M_allocate_pback_buffer(), std::basic_filebuf< _CharT, _Traits >::_M_really_overflow(), std::basic_filebuf< _CharT, _Traits >::pbackfail(), std::basic_filebuf< char_type, traits_type >::xsgetn(), and std::basic_filebuf< char_type, traits_type >::xsputn(). |
template<typename _CharT, typename _Traits> |
typedef traits_type::int_type std::basic_filebuf< _CharT, _Traits >::int_type
|
|
template<typename _CharT, typename _Traits> |
typedef traits_type::off_type std::basic_filebuf< _CharT, _Traits >::off_type
|
|
template<typename _CharT, typename _Traits> |
typedef traits_type::pos_type std::basic_filebuf< _CharT, _Traits >::pos_type
|
|
template<typename _CharT, typename _Traits> |
typedef _Traits std::basic_filebuf< _CharT, _Traits >::traits_type
|
|
Constructor & Destructor Documentation
template<typename _CharT, typename _Traits> |
std::basic_filebuf< _CharT, _Traits >::basic_filebuf |
( |
|
) |
|
|
template<typename _CharT, typename _Traits> |
std::basic_filebuf< _CharT, _Traits >::basic_filebuf |
( |
__c_file_type * |
__f, |
|
|
ios_base::openmode |
__mode, |
|
|
int_type |
__s = static_cast< int_type >(BUFSIZ) |
|
) |
|
|
|
Definition at line 121 of file fstream.tcc.
References std::basic_filebuf< _CharT, _Traits >::_M_allocate_file(), std::basic_filebuf< _CharT, _Traits >::_M_allocate_internal_buffer(), std::basic_filebuf< _CharT, _Traits >::_M_allocate_pback_buffer(), std::basic_streambuf< _CharT, _Traits >::_M_buf_size_opt, std::basic_filebuf< _CharT, _Traits >::_M_file, std::basic_streambuf< _CharT, _Traits >::_M_mode, std::basic_streambuf< _CharT, _Traits >::_M_set_indeterminate(), and std::basic_filebuf< _CharT, _Traits >::is_open(). |
template<typename _CharT, typename _Traits> |
virtual std::basic_filebuf< _CharT, _Traits >::~basic_filebuf |
( |
|
) |
[inline, virtual] |
|
Member Function Documentation
template<typename _CharT, typename _Traits> |
void std::basic_filebuf< _CharT, _Traits >::_M_allocate_file |
( |
|
) |
[protected] |
|
|
Definition at line 42 of file fstream.tcc.
References std::basic_filebuf< _CharT, _Traits >::__file_type, __throw_exception_again, std::basic_streambuf< _CharT, _Traits >::_M_buf_unified, std::basic_filebuf< _CharT, _Traits >::_M_file, and std::basic_filebuf< _CharT, _Traits >::_M_lock.
Referenced by std::basic_filebuf< _CharT, _Traits >::basic_filebuf(), and std::basic_filebuf< _CharT, _Traits >::open(). |
template<typename _CharT, typename _Traits> |
void std::basic_filebuf< _CharT, _Traits >::_M_allocate_internal_buffer |
( |
|
) |
[protected] |
|
|
Definition at line 60 of file fstream.tcc.
References __throw_exception_again, std::basic_streambuf< _CharT, _Traits >::_M_buf, std::basic_filebuf< _CharT, _Traits >::_M_buf_allocated, std::basic_streambuf< _CharT, _Traits >::_M_buf_size, std::basic_streambuf< _CharT, _Traits >::_M_buf_size_opt, and std::basic_filebuf< _CharT, _Traits >::char_type.
Referenced by std::basic_filebuf< _CharT, _Traits >::basic_filebuf(), and std::basic_filebuf< _CharT, _Traits >::open(). |
template<typename _CharT, typename _Traits> |
void std::basic_filebuf< _CharT, _Traits >::_M_allocate_pback_buffer |
( |
|
) |
[protected] |
|
|
Definition at line 96 of file fstream.tcc.
References __throw_exception_again, std::basic_streambuf< _CharT, _Traits >::_M_pback, std::basic_streambuf< _CharT, _Traits >::_M_pback_size, and std::basic_filebuf< _CharT, _Traits >::char_type.
Referenced by std::basic_filebuf< _CharT, _Traits >::basic_filebuf(), std::basic_filebuf< _CharT, _Traits >::open(), and std::basic_filebuf< _CharT, _Traits >::setbuf(). |
template<typename _CharT, typename _Traits> |
void std::basic_filebuf< _CharT, _Traits >::_M_destroy_internal_buffer |
( |
|
) |
[protected] |
|
|
Definition at line 81 of file fstream.tcc.
References std::basic_streambuf< _CharT, _Traits >::_M_buf, std::basic_filebuf< _CharT, _Traits >::_M_buf_allocated, std::basic_streambuf< _CharT, _Traits >::setg(), and std::basic_streambuf< _CharT, _Traits >::setp().
Referenced by std::basic_filebuf< _CharT, _Traits >::close(), and std::basic_filebuf< _CharT, _Traits >::setbuf(). |
template<typename _CharT, typename _Traits> |
void std::basic_filebuf< _CharT, _Traits >::_M_output_unshift |
( |
|
) |
[protected] |
|
template<typename _CharT, typename _Traits> |
basic_filebuf< _CharT, _Traits >::int_type std::basic_filebuf< _CharT, _Traits >::_M_really_overflow |
( |
int_type |
__c = _Traits::eof() |
) |
[protected] |
|
|
Definition at line 401 of file fstream.tcc.
References std::basic_filebuf< _CharT, _Traits >::__res_type, std::basic_streambuf< _CharT, _Traits >::_M_buf_size, std::basic_filebuf< _CharT, _Traits >::_M_file, std::basic_filebuf< _CharT, _Traits >::_M_last_overflowed, std::basic_streambuf< _CharT, _Traits >::_M_out_beg, std::basic_streambuf< _CharT, _Traits >::_M_out_cur, std::basic_streambuf< _CharT, _Traits >::_M_out_end, std::basic_streambuf< _CharT, _Traits >::_M_set_indeterminate(), std::basic_filebuf< _CharT, _Traits >::_M_state_beg, std::basic_filebuf< _CharT, _Traits >::_M_state_cur, std::basic_filebuf< _CharT, _Traits >::char_type, codecvt_base::error, and std::basic_filebuf< _CharT, _Traits >::int_type.
Referenced by std::basic_filebuf< _CharT, _Traits >::close(), std::basic_filebuf< _CharT, _Traits >::overflow(), std::basic_filebuf< char_type, traits_type >::sync(), and std::basic_filebuf< _CharT, _Traits >::underflow(). |
template<typename _CharT, typename _Traits> |
basic_filebuf< _CharT, _Traits >::__filebuf_type * std::basic_filebuf< _CharT, _Traits >::close |
( |
void |
|
) |
|
|
|
Definition at line 171 of file fstream.tcc.
References std::basic_filebuf< _CharT, _Traits >::__filebuf_type, std::basic_filebuf< _CharT, _Traits >::_M_destroy_internal_buffer(), std::basic_filebuf< _CharT, _Traits >::_M_file, std::basic_filebuf< _CharT, _Traits >::_M_last_overflowed, std::basic_streambuf< _CharT, _Traits >::_M_mode, std::basic_streambuf< _CharT, _Traits >::_M_out_beg, std::basic_streambuf< _CharT, _Traits >::_M_out_cur, std::basic_streambuf< _CharT, _Traits >::_M_out_end, std::basic_filebuf< _CharT, _Traits >::_M_output_unshift(), std::basic_streambuf< _CharT, _Traits >::_M_pback, std::basic_streambuf< _CharT, _Traits >::_M_pback_destroy(), std::basic_filebuf< _CharT, _Traits >::_M_really_overflow(), and std::basic_filebuf< _CharT, _Traits >::is_open().
Referenced by std::basic_filebuf< _CharT, _Traits >::open(), and std::basic_filebuf< char_type, traits_type >::~basic_filebuf(). |
template<typename _CharT, typename _Traits> |
void std::basic_filebuf< _CharT, _Traits >::imbue |
( |
const locale & |
__loc |
) |
[protected, virtual] |
|
|
Reimplemented from std::basic_streambuf< _CharT, _Traits >.
Definition at line 584 of file fstream.tcc.
References std::basic_streambuf< _CharT, _Traits >::_M_buf_locale, std::basic_streambuf< _CharT, _Traits >::_M_buf_locale_init, std::basic_filebuf< _CharT, _Traits >::_M_last_overflowed, std::basic_streambuf< _CharT, _Traits >::eback(), std::basic_streambuf< _CharT, _Traits >::gptr(), std::basic_streambuf< _CharT, _Traits >::pbase(), and std::basic_streambuf< _CharT, _Traits >::pptr(). |
template<typename _CharT, typename _Traits> |
bool std::basic_filebuf< _CharT, _Traits >::is_open |
( |
void |
|
) |
const [inline] |
|
template<typename _CharT, typename _Traits> |
basic_filebuf< _CharT, _Traits >::__filebuf_type * std::basic_filebuf< _CharT, _Traits >::open |
( |
const char * |
__s, |
|
|
ios_base::openmode |
__mode |
|
) |
|
|
|
Definition at line 144 of file fstream.tcc.
References std::basic_filebuf< _CharT, _Traits >::__filebuf_type, std::basic_filebuf< _CharT, _Traits >::_M_allocate_file(), std::basic_filebuf< _CharT, _Traits >::_M_allocate_internal_buffer(), std::basic_filebuf< _CharT, _Traits >::_M_allocate_pback_buffer(), std::basic_filebuf< _CharT, _Traits >::_M_file, std::basic_streambuf< _CharT, _Traits >::_M_mode, std::basic_streambuf< _CharT, _Traits >::_M_set_indeterminate(), std::basic_filebuf< _CharT, _Traits >::close(), std::basic_filebuf< _CharT, _Traits >::is_open(), and std::basic_filebuf< _CharT, _Traits >::seekoff(). |
template<typename _CharT, typename _Traits> |
basic_filebuf< _CharT, _Traits >::int_type std::basic_filebuf< _CharT, _Traits >::overflow |
( |
int_type |
__c = _Traits::eof() |
) |
[protected, virtual] |
|
|
Reimplemented from std::basic_streambuf< _CharT, _Traits >.
Definition at line 376 of file fstream.tcc.
References std::basic_streambuf< _CharT, _Traits >::_M_buf, std::basic_streambuf< _CharT, _Traits >::_M_buf_size, std::basic_filebuf< _CharT, _Traits >::_M_last_overflowed, std::basic_streambuf< _CharT, _Traits >::_M_mode, std::basic_streambuf< _CharT, _Traits >::_M_out_cur, std::basic_streambuf< _CharT, _Traits >::_M_out_cur_move(), std::basic_filebuf< _CharT, _Traits >::_M_really_overflow(), and std::basic_filebuf< _CharT, _Traits >::int_type. |
template<typename _CharT, typename _Traits> |
basic_filebuf< _CharT, _Traits >::int_type std::basic_filebuf< _CharT, _Traits >::pbackfail |
( |
int_type |
__c = _Traits::eof() |
) |
[protected, virtual] |
|
|
Reimplemented from std::basic_streambuf< _CharT, _Traits >.
Definition at line 308 of file fstream.tcc.
References std::basic_streambuf< _CharT, _Traits >::_M_in_beg, std::basic_streambuf< _CharT, _Traits >::_M_in_cur, std::basic_filebuf< _CharT, _Traits >::_M_last_overflowed, std::basic_streambuf< _CharT, _Traits >::_M_mode, std::basic_streambuf< _CharT, _Traits >::_M_out_cur, std::basic_streambuf< _CharT, _Traits >::_M_pback_create(), std::basic_filebuf< _CharT, _Traits >::char_type, std::basic_filebuf< _CharT, _Traits >::int_type, std::basic_filebuf< _CharT, _Traits >::seekoff(), and std::basic_filebuf< _CharT, _Traits >::underflow(). |
|
Reimplemented from std::basic_streambuf< _CharT, _Traits >.
Definition at line 508 of file fstream.tcc.
References std::basic_streambuf< _CharT, _Traits >::_M_buf, std::basic_filebuf< _CharT, _Traits >::_M_file, std::basic_streambuf< _CharT, _Traits >::_M_in_beg, std::basic_streambuf< _CharT, _Traits >::_M_in_cur, std::basic_streambuf< _CharT, _Traits >::_M_in_end, std::basic_filebuf< _CharT, _Traits >::_M_last_overflowed, std::basic_streambuf< _CharT, _Traits >::_M_mode, std::basic_streambuf< _CharT, _Traits >::_M_out_beg, std::basic_streambuf< _CharT, _Traits >::_M_out_cur, std::basic_streambuf< _CharT, _Traits >::_M_out_end, std::basic_filebuf< _CharT, _Traits >::_M_output_unshift(), std::basic_streambuf< _CharT, _Traits >::_M_pback_destroy(), std::basic_streambuf< _CharT, _Traits >::_M_set_indeterminate(), std::basic_filebuf< _CharT, _Traits >::is_open(), std::max(), std::basic_filebuf< _CharT, _Traits >::off_type, std::basic_filebuf< _CharT, _Traits >::pos_type, and std::basic_filebuf< _CharT, _Traits >::sync().
Referenced by std::basic_filebuf< _CharT, _Traits >::open(), std::basic_filebuf< _CharT, _Traits >::pbackfail(), and std::basic_filebuf< _CharT, _Traits >::seekpos(). |
template<typename _CharT, typename _Traits> |
basic_filebuf< _CharT, _Traits >::__streambuf_type * std::basic_filebuf< _CharT, _Traits >::setbuf |
( |
char_type * |
__s, |
|
|
streamsize |
__n |
|
) |
[protected, virtual] |
|
|
Reimplemented from std::basic_streambuf< _CharT, _Traits >.
Definition at line 480 of file fstream.tcc.
References std::basic_filebuf< _CharT, _Traits >::_M_allocate_pback_buffer(), std::basic_streambuf< _CharT, _Traits >::_M_buf, std::basic_streambuf< _CharT, _Traits >::_M_buf_size, std::basic_streambuf< _CharT, _Traits >::_M_buf_size_opt, std::basic_filebuf< _CharT, _Traits >::_M_destroy_internal_buffer(), std::basic_filebuf< _CharT, _Traits >::_M_last_overflowed, std::basic_streambuf< _CharT, _Traits >::_M_set_indeterminate(), and std::basic_filebuf< _CharT, _Traits >::is_open(). |
template<typename _CharT, typename _Traits> |
streamsize std::basic_filebuf< _CharT, _Traits >::showmanyc |
( |
void |
|
) |
[protected, virtual] |
|
|
Reimplemented from std::basic_streambuf< _CharT, _Traits >.
Definition at line 217 of file fstream.tcc.
References std::basic_streambuf< _CharT, _Traits >::_M_in_cur, std::basic_streambuf< _CharT, _Traits >::_M_in_end, std::basic_filebuf< _CharT, _Traits >::_M_last_overflowed, std::basic_streambuf< _CharT, _Traits >::_M_mode, and std::basic_filebuf< _CharT, _Traits >::underflow(). |
template<typename _CharT, typename _Traits> |
virtual int std::basic_filebuf< _CharT, _Traits >::sync |
( |
void |
|
) |
[inline, protected, virtual] |
|
template<typename _CharT, typename _Traits> |
basic_filebuf< _CharT, _Traits >::int_type std::basic_filebuf< _CharT, _Traits >::underflow |
( |
void |
|
) |
[protected, virtual] |
|
|
Reimplemented from std::basic_streambuf< _CharT, _Traits >.
Definition at line 237 of file fstream.tcc.
References std::basic_streambuf< _CharT, _Traits >::_M_buf_size, std::basic_filebuf< _CharT, _Traits >::_M_file, std::basic_streambuf< _CharT, _Traits >::_M_in_beg, std::basic_streambuf< _CharT, _Traits >::_M_in_cur, std::basic_streambuf< _CharT, _Traits >::_M_in_end, std::basic_streambuf< _CharT, _Traits >::_M_is_indeterminate(), std::basic_filebuf< _CharT, _Traits >::_M_last_overflowed, std::basic_streambuf< _CharT, _Traits >::_M_mode, std::basic_streambuf< _CharT, _Traits >::_M_out_cur, std::basic_streambuf< _CharT, _Traits >::_M_pback_destroy(), std::basic_filebuf< _CharT, _Traits >::_M_really_overflow(), std::basic_streambuf< _CharT, _Traits >::_M_set_determinate(), and std::basic_filebuf< _CharT, _Traits >::int_type.
Referenced by std::basic_filebuf< _CharT, _Traits >::pbackfail(), and std::basic_filebuf< _CharT, _Traits >::showmanyc(). |
template<typename _CharT, typename _Traits> |
virtual streamsize std::basic_filebuf< _CharT, _Traits >::xsgetn |
( |
char_type * |
__s, |
|
|
streamsize |
__n |
|
) |
[inline, protected, virtual] |
|
template<typename _CharT, typename _Traits> |
virtual streamsize std::basic_filebuf< _CharT, _Traits >::xsputn |
( |
const char_type * |
__s, |
|
|
streamsize |
__n |
|
) |
[inline, protected, virtual] |
|
Friends And Related Function Documentation
template<typename _CharT, typename _Traits> |
friend class ios_base [friend]
|
|
Member Data Documentation
template<typename _CharT, typename _Traits> |
bool std::basic_filebuf< _CharT, _Traits >::_M_buf_allocated [private]
|
|
template<typename _CharT, typename _Traits> |
__file_type* std::basic_filebuf< _CharT, _Traits >::_M_file [private]
|
|
|
Definition at line 72 of file std_fstream.h.
Referenced by std::basic_filebuf< _CharT, _Traits >::_M_allocate_file(), std::basic_filebuf< _CharT, _Traits >::_M_really_overflow(), std::basic_filebuf< _CharT, _Traits >::basic_filebuf(), std::basic_filebuf< _CharT, _Traits >::close(), std::basic_filebuf< char_type, traits_type >::is_open(), std::basic_filebuf< _CharT, _Traits >::open(), std::basic_filebuf< _CharT, _Traits >::seekoff(), std::basic_filebuf< char_type, traits_type >::sync(), and std::basic_filebuf< _CharT, _Traits >::underflow(). |
template<typename _CharT, typename _Traits> |
bool std::basic_filebuf< _CharT, _Traits >::_M_last_overflowed [private]
|
|
|
Definition at line 85 of file std_fstream.h.
Referenced by std::basic_filebuf< _CharT, _Traits >::_M_really_overflow(), std::basic_filebuf< _CharT, _Traits >::close(), std::basic_filebuf< _CharT, _Traits >::imbue(), std::basic_filebuf< _CharT, _Traits >::overflow(), std::basic_filebuf< _CharT, _Traits >::pbackfail(), std::basic_filebuf< _CharT, _Traits >::seekoff(), std::basic_filebuf< _CharT, _Traits >::seekpos(), std::basic_filebuf< _CharT, _Traits >::setbuf(), std::basic_filebuf< _CharT, _Traits >::showmanyc(), std::basic_filebuf< char_type, traits_type >::sync(), std::basic_filebuf< _CharT, _Traits >::underflow(), and std::basic_filebuf< char_type, traits_type >::~basic_filebuf(). |
template<typename _CharT, typename _Traits> |
__c_lock std::basic_filebuf< _CharT, _Traits >::_M_lock [private]
|
|
template<typename _CharT, typename _Traits> |
__state_type std::basic_filebuf< _CharT, _Traits >::_M_state_beg [private]
|
|
template<typename _CharT, typename _Traits> |
__state_type std::basic_filebuf< _CharT, _Traits >::_M_state_cur [private]
|
|
The documentation for this class was generated from the following files:
Generated on Mon Apr 8 03:18:01 2002 for libstdc++-v3 Source by
1.2.15
|