ldas-tools-al  2.6.3
Public Types | Public Member Functions | Protected Member Functions | Private Types | Private Member Functions | Private Attributes | Friends | List of all members
basic_filebuf< _CharT, _Traits > Class Template Reference

Buffer for file streams. More...

#include <fstream.hh>

Inheritance diagram for basic_filebuf< _CharT, _Traits >:
Inheritance graph
[legend]
Collaboration diagram for basic_filebuf< _CharT, _Traits >:
Collaboration graph
[legend]

Public Types

typedef _CharT char_type
 character type More...
 
typedef _Traits::int_type int_type
 integer type More...
 
typedef _Traits::pos_type pos_type
 position type More...
 
typedef _Traits::off_type off_type
 offset type More...
 
typedef _Traits traits_type
 traits type More...
 
typedef _Traits::state_type _State_type
 state type More...
 
typedef std::basic_streambuf< _CharT, _Traits > _Base
 stream buffer type More...
 
typedef basic_filebuf< _CharT, _Traits > _Self
 self reference type More...
 
typedef _CharT char_type
 character type More...
 
typedef _Traits::int_type int_type
 integer type More...
 
typedef _Traits::pos_type pos_type
 position type More...
 
typedef _Traits::off_type off_type
 offset type More...
 
typedef _Traits traits_type
 traits type More...
 
typedef _Traits::state_type _State_type
 state type More...
 
typedef std::basic_streambuf< _CharT, _Traits > _Base
 stream buffer type More...
 
typedef basic_filebuf< _CharT, _Traits > _Self
 self reference type More...
 
typedef _CharT char_type
 character type More...
 
typedef _Traits::int_type int_type
 integer type More...
 
typedef _Traits::pos_type pos_type
 position type More...
 
typedef _Traits::off_type off_type
 offset type More...
 
typedef _Traits traits_type
 traits type More...
 
typedef _Traits::state_type _State_type
 state type More...
 
typedef std::basic_streambuf< _CharT, _Traits > _Base
 stream buffer type More...
 
typedef basic_filebuf< _CharT, _Traits > _Self
 self reference type More...
 

Public Member Functions

 basic_filebuf ()
 Constructor. More...
 
 ~basic_filebuf ()
 Destructor. More...
 
bool is_open () const
 Check if stream is open. More...
 
_Selfopen (const char *__s, std::ios_base::openmode __m)
 Open a stream. More...
 
_Selfopen (const char *__s, std::ios_base::openmode __m, long __protection)
 Open a stream. More...
 
_STLP_fd fd () const
 Obtain file descriptor. More...
 
_Selfopen (int __id, std::ios_base::openmode _Init_mode=m_default_openmode)
 Attach a stream to a file descriptor. More...
 
_Self_M_open (int __id, std::ios_base::openmode _Init_mode=_Filebuf_base::m_default_openmode)
 Attach a stream to a file descriptor. More...
 
_Selfclose ()
 Close the stream. More...
 
void UseMemoryMappedIO (bool Value)
 Enable/disable use of memory mapped I/O for stream. More...
 
bool UseMemoryMappedIO () const
 Obtain the memory mapped I/O status use for the stream. More...
 
virtual std::basic_streambuf< _CharT, _Traits > * setbuf (char_type *, std::streamsize)
 Set buffer limit. More...
 
virtual pos_type seekoff (off_type Off, std::ios_base::seekdir Way, std::ios_base::openmode Mode=std::ios_base::in|std::ios_base::out)
 
virtual pos_type seekpos (pos_type Pos, std::ios_base::openmode Mode=std::ios_base::in|std::ios_base::out)
 
bool _M_write (char *__buf, std::ptrdiff_t __n)
 for _Noconv_output More...
 
int_type _M_do_noconv_input ()
 
 basic_filebuf ()
 Constructor. More...
 
 ~basic_filebuf ()
 Destructor. More...
 
bool is_open () const
 Check if stream is open. More...
 
_Selfopen (const char *__s, std::ios_base::openmode __m)
 Open a stream. More...
 
_Selfopen (const char *__s, std::ios_base::openmode __m, long __protection)
 Open a stream. More...
 
_STLP_fd fd () const
 Obtain file descriptor. More...
 
_Selfopen (int __id, std::ios_base::openmode _Init_mode=m_default_openmode)
 Attach a stream to a file descriptor. More...
 
_Self_M_open (int __id, std::ios_base::openmode _Init_mode=_Filebuf_base::m_default_openmode)
 Attach a stream to a file descriptor. More...
 
_Selfclose ()
 Close the stream. More...
 
void UseMemoryMappedIO (bool Value)
 Enable/disable use of memory mapped I/O for stream. More...
 
bool UseMemoryMappedIO () const
 Obtain the memory mapped I/O status use for the stream. More...
 
virtual std::basic_streambuf< _CharT, _Traits > * setbuf (char_type *, std::streamsize)
 Set buffer limit. More...
 
virtual pos_type seekoff (off_type Off, std::ios_base::seekdir Way, std::ios_base::openmode Mode=std::ios_base::in|std::ios_base::out)
 
virtual pos_type seekpos (pos_type Pos, std::ios_base::openmode Mode=std::ios_base::in|std::ios_base::out)
 
bool _M_write (char *__buf, std::ptrdiff_t __n)
 for _Noconv_output More...
 
int_type _M_do_noconv_input ()
 
 basic_filebuf ()
 Constructor. More...
 
 ~basic_filebuf ()
 Destructor. More...
 
bool is_open () const
 Check if stream is open. More...
 
_Selfopen (const char *__s, std::ios_base::openmode __m)
 Open a stream. More...
 
_Selfopen (const char *__s, std::ios_base::openmode __m, long __protection)
 Open a stream. More...
 
_STLP_fd fd () const
 Obtain file descriptor. More...
 
_Selfopen (int __id, std::ios_base::openmode _Init_mode=m_default_openmode)
 Attach a stream to a file descriptor. More...
 
_Self_M_open (int __id, std::ios_base::openmode _Init_mode=_Filebuf_base::m_default_openmode)
 Attach a stream to a file descriptor. More...
 
_Selfclose ()
 Close the stream. More...
 
void UseMemoryMappedIO (bool Value)
 Enable/disable use of memory mapped I/O for stream. More...
 
bool UseMemoryMappedIO () const
 Obtain the memory mapped I/O status use for the stream. More...
 
virtual std::basic_streambuf< _CharT, _Traits > * setbuf (char_type *, std::streamsize)
 Set buffer limit. More...
 
virtual pos_type seekoff (off_type Off, std::ios_base::seekdir Way, std::ios_base::openmode Mode=std::ios_base::in|std::ios_base::out)
 
virtual pos_type seekpos (pos_type Pos, std::ios_base::openmode Mode=std::ios_base::in|std::ios_base::out)
 
bool _M_write (char *__buf, std::ptrdiff_t __n)
 for _Noconv_output More...
 
int_type _M_do_noconv_input ()
 

Protected Member Functions

virtual int_type underflow ()
 
virtual int_type overflow (int_type c=_Traits::eof())
 
virtual std::streamsize showmanyc ()
 basic_filebuf<> overridden protected virtual member functions More...
 
virtual int_type pbackfail (int_type=traits_type::eof())
 
virtual int sync ()
 
virtual void imbue (const std::locale &)
 
virtual int_type underflow ()
 
virtual int_type overflow (int_type c=_Traits::eof())
 
virtual std::streamsize showmanyc ()
 
virtual int_type pbackfail (int_type=traits_type::eof())
 
virtual int sync ()
 
virtual void imbue (const std::locale &)
 
virtual int_type underflow ()
 
virtual int_type overflow (int_type c=_Traits::eof())
 
virtual std::streamsize showmanyc ()
 
virtual int_type pbackfail (int_type=traits_type::eof())
 
virtual int sync ()
 
virtual void imbue (const std::locale &)
 

Private Types

enum  { _S_pback_buf_size = 8 }
 
enum  { _S_pback_buf_size = 8 }
 
enum  { _S_pback_buf_size = 8 }
 
typedef std::codecvt< _CharT, char, _State_type_Codecvt
 
typedef std::codecvt< _CharT, char, _State_type_Codecvt
 
typedef std::codecvt< _CharT, char, _State_type_Codecvt
 

Private Member Functions

pos_type seekoff_core (off_type, std::ios_base::seekdir, std::ios_base::openmode)
 
pos_type seekpos_core (pos_type, std::ios_base::openmode)
 
virtual int_type underflow_core ()
 
virtual int_type overflow_core (int_type=traits_type::eof())
 
void _M_exit_putback_mode ()
 
bool _M_switch_to_input_mode ()
 basic_filebuf<> helper functions. More...
 
void _M_exit_input_mode ()
 
bool _M_switch_to_output_mode ()
 
int_type _M_input_error ()
 Helper functions for input. More...
 
int_type _M_underflow_aux ()
 
int_type _M_output_error ()
 Helper functions for output. More...
 
bool _M_unshift ()
 
bool _M_allocate_buffers (_CharT *__buf, std::streamsize __n)
 Helper functions for buffer allocation and deallocation. More...
 
bool _M_allocate_buffers ()
 Abbreviation for the most common case. More...
 
void _M_deallocate_buffers ()
 
pos_type _M_seek_return (off_type __off, _State_type __state)
 
bool _M_seek_init (bool __do_unshift)
 Helper functiosn for seek and imbue. More...
 
void _M_setup_codecvt (const std::locale &)
 
pos_type current_pos (std::ios_base::openmode Mode)
 
pos_type seekoff_core (off_type, std::ios_base::seekdir, std::ios_base::openmode)
 
pos_type seekpos_core (pos_type, std::ios_base::openmode)
 
virtual int_type underflow_core ()
 
virtual int_type overflow_core (int_type=traits_type::eof())
 
void _M_exit_putback_mode ()
 
bool _M_switch_to_input_mode ()
 
void _M_exit_input_mode ()
 
bool _M_switch_to_output_mode ()
 
int_type _M_input_error ()
 
int_type _M_underflow_aux ()
 
int_type _M_output_error ()
 
bool _M_unshift ()
 
bool _M_allocate_buffers (_CharT *__buf, std::streamsize __n)
 
bool _M_allocate_buffers ()
 
void _M_deallocate_buffers ()
 
pos_type _M_seek_return (off_type __off, _State_type __state)
 
bool _M_seek_init (bool __do_unshift)
 
void _M_setup_codecvt (const std::locale &)
 
pos_type current_pos (std::ios_base::openmode Mode)
 
pos_type seekoff_core (off_type, std::ios_base::seekdir, std::ios_base::openmode)
 
pos_type seekpos_core (pos_type, std::ios_base::openmode)
 
virtual int_type underflow_core ()
 
virtual int_type overflow_core (int_type=traits_type::eof())
 
void _M_exit_putback_mode ()
 
bool _M_switch_to_input_mode ()
 
void _M_exit_input_mode ()
 
bool _M_switch_to_output_mode ()
 
int_type _M_input_error ()
 
int_type _M_underflow_aux ()
 
int_type _M_output_error ()
 
bool _M_unshift ()
 
bool _M_allocate_buffers (_CharT *__buf, std::streamsize __n)
 
bool _M_allocate_buffers ()
 
void _M_deallocate_buffers ()
 
pos_type _M_seek_return (off_type __off, _State_type __state)
 
bool _M_seek_init (bool __do_unshift)
 
void _M_setup_codecvt (const std::locale &)
 
pos_type current_pos (std::ios_base::openmode Mode)
 

Private Attributes

_Filebuf_base _M_base
 
unsigned char _M_constant_width
 
unsigned char _M_always_noconv
 
bool _M_use_memory_mapped_io
 true unless disabled by user More...
 
unsigned char _M_int_buf_dynamic
 private: // Mode flags. More...
 
unsigned char _M_in_input_mode
 false if it was supplied by the user. More...
 
unsigned char _M_in_output_mode
 
unsigned char _M_in_error_mode
 
unsigned char _M_in_putback_mode
 
_CharT * _M_int_buf
 Internal buffer: characters seen by the filebuf's clients. More...
 
_CharT * _M_int_buf_EOS
 
char * _M_ext_buf
 External buffer: characters corresponding to the external file. More...
 
char * _M_ext_buf_EOS
 
char * _M_ext_buf_converted
 
char * _M_ext_buf_end
 
_State_type _M_state
 State corresponding to beginning of internal buffer. More...
 
_State_type _M_end_state
 
void * _M_mmap_base
 This is a null pointer unless we are in mmap input mode. More...
 
std::streamoff _M_mmap_len
 
pos_type m_pos
 For keeping trace of where we are (reduces lseek calls). More...
 
_CharT * _M_saved_eback
 
_CharT * _M_saved_gptr
 
_CharT * _M_saved_egptr
 
const _Codecvt_M_codecvt
 
int _M_width
 
int _M_max_width
 
_CharT _M_pback_buf [_S_pback_buf_size]
 

Friends

class _Underflow< _CharT, _Traits >
 

Detailed Description

template<class _CharT, class _Traits = std::char_traits< _CharT >>
class basic_filebuf< _CharT, _Traits >

Buffer for file streams.

Member Typedef Documentation

◆ _Base [1/3]

template<class _CharT, class _Traits = std::char_traits< _CharT >>
typedef std::basic_streambuf< _CharT, _Traits > basic_filebuf< _CharT, _Traits >::_Base

stream buffer type

◆ _Base [2/3]

template<class _CharT, class _Traits = std::char_traits< _CharT >>
typedef std::basic_streambuf< _CharT, _Traits > basic_filebuf< _CharT, _Traits >::_Base

stream buffer type

◆ _Base [3/3]

template<class _CharT, class _Traits = std::char_traits< _CharT >>
typedef std::basic_streambuf< _CharT, _Traits > basic_filebuf< _CharT, _Traits >::_Base

stream buffer type

◆ _Codecvt [1/3]

template<class _CharT, class _Traits = std::char_traits< _CharT >>
typedef std::codecvt< _CharT, char, _State_type > basic_filebuf< _CharT, _Traits >::_Codecvt
private

◆ _Codecvt [2/3]

template<class _CharT, class _Traits = std::char_traits< _CharT >>
typedef std::codecvt< _CharT, char, _State_type > basic_filebuf< _CharT, _Traits >::_Codecvt
private

◆ _Codecvt [3/3]

template<class _CharT, class _Traits = std::char_traits< _CharT >>
typedef std::codecvt< _CharT, char, _State_type > basic_filebuf< _CharT, _Traits >::_Codecvt
private

◆ _Self [1/3]

template<class _CharT, class _Traits = std::char_traits< _CharT >>
typedef basic_filebuf< _CharT, _Traits > basic_filebuf< _CharT, _Traits >::_Self

self reference type

◆ _Self [2/3]

template<class _CharT, class _Traits = std::char_traits< _CharT >>
typedef basic_filebuf< _CharT, _Traits > basic_filebuf< _CharT, _Traits >::_Self

self reference type

◆ _Self [3/3]

template<class _CharT, class _Traits = std::char_traits< _CharT >>
typedef basic_filebuf< _CharT, _Traits > basic_filebuf< _CharT, _Traits >::_Self

self reference type

◆ _State_type [1/3]

template<class _CharT, class _Traits = std::char_traits< _CharT >>
typedef _Traits::state_type basic_filebuf< _CharT, _Traits >::_State_type

state type

◆ _State_type [2/3]

template<class _CharT, class _Traits = std::char_traits< _CharT >>
typedef _Traits::state_type basic_filebuf< _CharT, _Traits >::_State_type

state type

◆ _State_type [3/3]

template<class _CharT, class _Traits = std::char_traits< _CharT >>
typedef _Traits::state_type basic_filebuf< _CharT, _Traits >::_State_type

state type

◆ char_type [1/3]

template<class _CharT, class _Traits = std::char_traits< _CharT >>
typedef _CharT basic_filebuf< _CharT, _Traits >::char_type

character type

◆ char_type [2/3]

template<class _CharT, class _Traits = std::char_traits< _CharT >>
typedef _CharT basic_filebuf< _CharT, _Traits >::char_type

character type

◆ char_type [3/3]

template<class _CharT, class _Traits = std::char_traits< _CharT >>
typedef _CharT basic_filebuf< _CharT, _Traits >::char_type

character type

◆ int_type [1/3]

template<class _CharT, class _Traits = std::char_traits< _CharT >>
typedef _Traits::int_type basic_filebuf< _CharT, _Traits >::int_type

integer type

◆ int_type [2/3]

template<class _CharT, class _Traits = std::char_traits< _CharT >>
typedef _Traits::int_type basic_filebuf< _CharT, _Traits >::int_type

integer type

◆ int_type [3/3]

template<class _CharT, class _Traits = std::char_traits< _CharT >>
typedef _Traits::int_type basic_filebuf< _CharT, _Traits >::int_type

integer type

◆ off_type [1/3]

template<class _CharT, class _Traits = std::char_traits< _CharT >>
typedef _Traits::off_type basic_filebuf< _CharT, _Traits >::off_type

offset type

◆ off_type [2/3]

template<class _CharT, class _Traits = std::char_traits< _CharT >>
typedef _Traits::off_type basic_filebuf< _CharT, _Traits >::off_type

offset type

◆ off_type [3/3]

template<class _CharT, class _Traits = std::char_traits< _CharT >>
typedef _Traits::off_type basic_filebuf< _CharT, _Traits >::off_type

offset type

◆ pos_type [1/3]

template<class _CharT, class _Traits = std::char_traits< _CharT >>
typedef _Traits::pos_type basic_filebuf< _CharT, _Traits >::pos_type

position type

◆ pos_type [2/3]

template<class _CharT, class _Traits = std::char_traits< _CharT >>
typedef _Traits::pos_type basic_filebuf< _CharT, _Traits >::pos_type

position type

◆ pos_type [3/3]

template<class _CharT, class _Traits = std::char_traits< _CharT >>
typedef _Traits::pos_type basic_filebuf< _CharT, _Traits >::pos_type

position type

◆ traits_type [1/3]

template<class _CharT, class _Traits = std::char_traits< _CharT >>
typedef _Traits basic_filebuf< _CharT, _Traits >::traits_type

traits type

◆ traits_type [2/3]

template<class _CharT, class _Traits = std::char_traits< _CharT >>
typedef _Traits basic_filebuf< _CharT, _Traits >::traits_type

traits type

◆ traits_type [3/3]

template<class _CharT, class _Traits = std::char_traits< _CharT >>
typedef _Traits basic_filebuf< _CharT, _Traits >::traits_type

traits type

Member Enumeration Documentation

◆ anonymous enum

template<class _CharT, class _Traits = std::char_traits< _CharT >>
anonymous enum
private
Enumerator
_S_pback_buf_size 

◆ anonymous enum

template<class _CharT, class _Traits = std::char_traits< _CharT >>
anonymous enum
private
Enumerator
_S_pback_buf_size 

◆ anonymous enum

template<class _CharT, class _Traits = std::char_traits< _CharT >>
anonymous enum
private
Enumerator
_S_pback_buf_size 

Constructor & Destructor Documentation

◆ basic_filebuf() [1/3]

template<class _CharT , class _Traits >
basic_filebuf< _CharT, _Traits >::basic_filebuf ( )

Constructor.

Public basic_filebuf<> member functions.

◆ ~basic_filebuf() [1/3]

template<class _CharT , class _Traits >
basic_filebuf< _CharT, _Traits >::~basic_filebuf ( )

Destructor.

◆ basic_filebuf() [2/3]

template<class _CharT, class _Traits = std::char_traits< _CharT >>
basic_filebuf< _CharT, _Traits >::basic_filebuf ( )

Constructor.

◆ ~basic_filebuf() [2/3]

template<class _CharT, class _Traits = std::char_traits< _CharT >>
basic_filebuf< _CharT, _Traits >::~basic_filebuf ( )

Destructor.

◆ basic_filebuf() [3/3]

template<class _CharT, class _Traits = std::char_traits< _CharT >>
basic_filebuf< _CharT, _Traits >::basic_filebuf ( )

Constructor.

◆ ~basic_filebuf() [3/3]

template<class _CharT, class _Traits = std::char_traits< _CharT >>
basic_filebuf< _CharT, _Traits >::~basic_filebuf ( )

Destructor.

Member Function Documentation

◆ _M_allocate_buffers() [1/6]

template<class _CharT, class _Traits >
bool basic_filebuf< _CharT, _Traits >::_M_allocate_buffers ( _CharT *  __buf,
std::streamsize  __n 
)
private

Helper functions for buffer allocation and deallocation.

This member function is called when we're initializing a filebuf's internal and external buffers. The argument is the size of the internal buffer; the external buffer is sized using the character width in the current encoding. Preconditions: the buffers are currently null. __n >= 1. __buf is either a null pointer or a pointer to an array show size is at least __n. We need __n >= 1 for two different reasons. For input, the base class always needs a buffer because of the sementics of underflow(). For output, we want to have an internal buffer that's larger by one element than the buffer that the base class knows about. (See basic_filebuf<>::overflow() for the reason.)

◆ _M_allocate_buffers() [2/6]

template<class _CharT, class _Traits = std::char_traits< _CharT >>
bool basic_filebuf< _CharT, _Traits >::_M_allocate_buffers ( _CharT *  __buf,
std::streamsize  __n 
)
private

◆ _M_allocate_buffers() [3/6]

template<class _CharT, class _Traits = std::char_traits< _CharT >>
bool basic_filebuf< _CharT, _Traits >::_M_allocate_buffers ( _CharT *  __buf,
std::streamsize  __n 
)
private

◆ _M_allocate_buffers() [4/6]

template<class _CharT, class _Traits >
bool basic_filebuf< _CharT, _Traits >::_M_allocate_buffers ( )
private

Abbreviation for the most common case.

Choose a buffer that's at least 4096 characters long and that's a multiple of the page size.

◆ _M_allocate_buffers() [5/6]

template<class _CharT, class _Traits = std::char_traits< _CharT >>
bool basic_filebuf< _CharT, _Traits >::_M_allocate_buffers ( )
private

◆ _M_allocate_buffers() [6/6]

template<class _CharT, class _Traits = std::char_traits< _CharT >>
bool basic_filebuf< _CharT, _Traits >::_M_allocate_buffers ( )
private

◆ _M_deallocate_buffers() [1/3]

template<class _CharT , class _Traits >
void basic_filebuf< _CharT, _Traits >::_M_deallocate_buffers ( )
private

◆ _M_deallocate_buffers() [2/3]

template<class _CharT, class _Traits = std::char_traits< _CharT >>
void basic_filebuf< _CharT, _Traits >::_M_deallocate_buffers ( )
private

◆ _M_deallocate_buffers() [3/3]

template<class _CharT, class _Traits = std::char_traits< _CharT >>
void basic_filebuf< _CharT, _Traits >::_M_deallocate_buffers ( )
private

◆ _M_do_noconv_input() [1/3]

template<class _CharT, class _Traits = std::char_traits< _CharT >>
int_type basic_filebuf< _CharT, _Traits >::_M_do_noconv_input ( )
inline

◆ _M_do_noconv_input() [2/3]

template<class _CharT, class _Traits = std::char_traits< _CharT >>
int_type basic_filebuf< _CharT, _Traits >::_M_do_noconv_input ( )
inline

◆ _M_do_noconv_input() [3/3]

template<class _CharT, class _Traits = std::char_traits< _CharT >>
int_type basic_filebuf< _CharT, _Traits >::_M_do_noconv_input ( )
inline

◆ _M_exit_input_mode() [1/3]

template<class _CharT, class _Traits = std::char_traits< _CharT >>
void basic_filebuf< _CharT, _Traits >::_M_exit_input_mode ( )
private

◆ _M_exit_input_mode() [2/3]

template<class _CharT , class _Traits >
void basic_filebuf< _CharT, _Traits >::_M_exit_input_mode ( )
private

This member function is called whenever we exit input mode. It unmaps the memory-mapped file, if any, and sets _M_in_input_mode to false.

◆ _M_exit_input_mode() [3/3]

template<class _CharT, class _Traits = std::char_traits< _CharT >>
void basic_filebuf< _CharT, _Traits >::_M_exit_input_mode ( )
private

◆ _M_exit_putback_mode() [1/3]

template<class _CharT, class _Traits = std::char_traits< _CharT >>
void basic_filebuf< _CharT, _Traits >::_M_exit_putback_mode ( )
inlineprivate

Precondition: we are currently in putback input mode. Effect: switches back to ordinary input mode.

◆ _M_exit_putback_mode() [2/3]

template<class _CharT, class _Traits = std::char_traits< _CharT >>
void basic_filebuf< _CharT, _Traits >::_M_exit_putback_mode ( )
inlineprivate

Precondition: we are currently in putback input mode. Effect: switches back to ordinary input mode.

◆ _M_exit_putback_mode() [3/3]

template<class _CharT, class _Traits = std::char_traits< _CharT >>
void basic_filebuf< _CharT, _Traits >::_M_exit_putback_mode ( )
inlineprivate

Precondition: we are currently in putback input mode. Effect: switches back to ordinary input mode.

◆ _M_input_error() [1/3]

template<class _CharT, class _Traits = std::char_traits< _CharT >>
int_type basic_filebuf< _CharT, _Traits >::_M_input_error ( )
private

◆ _M_input_error() [2/3]

template<class _CharT , class _Traits >
__BF_int_type__ basic_filebuf< _CharT, _Traits >::_M_input_error ( )
private

Helper functions for input.

This member function is called if there is an error during input. It puts the filebuf in error mode, clear the get area buffer, and returns eof. returns eof. Error mode is sticky; it is cleared only by close or seek.

◆ _M_input_error() [3/3]

template<class _CharT, class _Traits = std::char_traits< _CharT >>
int_type basic_filebuf< _CharT, _Traits >::_M_input_error ( )
private

◆ _M_open() [1/3]

template<class _CharT, class _Traits = std::char_traits< _CharT >>
_Self* basic_filebuf< _CharT, _Traits >::_M_open ( int  __id,
std::ios_base::openmode  _Init_mode = _Filebuf_base::m_default_openmode 
)
inline

Attach a stream to a file descriptor.

◆ _M_open() [2/3]

template<class _CharT, class _Traits = std::char_traits< _CharT >>
_Self* basic_filebuf< _CharT, _Traits >::_M_open ( int  __id,
std::ios_base::openmode  _Init_mode = _Filebuf_base::m_default_openmode 
)
inline

Attach a stream to a file descriptor.

◆ _M_open() [3/3]

template<class _CharT, class _Traits = std::char_traits< _CharT >>
_Self* basic_filebuf< _CharT, _Traits >::_M_open ( int  __id,
std::ios_base::openmode  _Init_mode = _Filebuf_base::m_default_openmode 
)
inline

Attach a stream to a file descriptor.

◆ _M_output_error() [1/3]

template<class _CharT, class _Traits = std::char_traits< _CharT >>
int_type basic_filebuf< _CharT, _Traits >::_M_output_error ( )
private

◆ _M_output_error() [2/3]

template<class _CharT, class _Traits = std::char_traits< _CharT >>
int_type basic_filebuf< _CharT, _Traits >::_M_output_error ( )
private

◆ _M_output_error() [3/3]

template<class _CharT , class _Traits >
__BF_int_type__ basic_filebuf< _CharT, _Traits >::_M_output_error ( )
private

Helper functions for output.

This member function is called if there is an error during output. It puts the filebuf in error mode, clear the put area buffer, and returns eof. Error mode is sticky; it is cleared only by close or seek.

◆ _M_seek_init() [1/3]

template<class _CharT , class _Traits >
bool basic_filebuf< _CharT, _Traits >::_M_seek_init ( bool  __do_unshift)
private

Helper functiosn for seek and imbue.

If we're in error mode, leave it.

Flush the output buffer if we're in output mode, and (conditionally) emit an unshift sequence.

Discard putback characters, if any.

◆ _M_seek_init() [2/3]

template<class _CharT, class _Traits = std::char_traits< _CharT >>
bool basic_filebuf< _CharT, _Traits >::_M_seek_init ( bool  __do_unshift)
private

◆ _M_seek_init() [3/3]

template<class _CharT, class _Traits = std::char_traits< _CharT >>
bool basic_filebuf< _CharT, _Traits >::_M_seek_init ( bool  __do_unshift)
private

◆ _M_seek_return() [1/3]

template<class _CharT, class _Traits = std::char_traits< _CharT >>
pos_type basic_filebuf< _CharT, _Traits >::_M_seek_return ( off_type  __off,
_State_type  __state 
)
inlineprivate

◆ _M_seek_return() [2/3]

template<class _CharT, class _Traits = std::char_traits< _CharT >>
pos_type basic_filebuf< _CharT, _Traits >::_M_seek_return ( off_type  __off,
_State_type  __state 
)
inlineprivate

◆ _M_seek_return() [3/3]

template<class _CharT, class _Traits = std::char_traits< _CharT >>
pos_type basic_filebuf< _CharT, _Traits >::_M_seek_return ( off_type  __off,
_State_type  __state 
)
inlineprivate

◆ _M_setup_codecvt() [1/3]

template<class _CharT, class _Traits = std::char_traits< _CharT >>
void basic_filebuf< _CharT, _Traits >::_M_setup_codecvt ( const std::locale &  )
private

◆ _M_setup_codecvt() [2/3]

template<class _CharT , class _Traits >
void basic_filebuf< _CharT, _Traits >::_M_setup_codecvt ( const std::locale &  __loc)
private

Change the filebuf's locale. This member function has no effect unless it is called before any I/O is performed on the stream.

◆ _M_setup_codecvt() [3/3]

template<class _CharT, class _Traits = std::char_traits< _CharT >>
void basic_filebuf< _CharT, _Traits >::_M_setup_codecvt ( const std::locale &  )
private

◆ _M_switch_to_input_mode() [1/3]

template<class _CharT, class _Traits = std::char_traits< _CharT >>
bool basic_filebuf< _CharT, _Traits >::_M_switch_to_input_mode ( )
private

◆ _M_switch_to_input_mode() [2/3]

template<class _CharT , class _Traits >
bool basic_filebuf< _CharT, _Traits >::_M_switch_to_input_mode ( )
private

basic_filebuf<> helper functions.

Helper functions for switching between modes. This member function is called if we're performing the first I/O operation on a filebuf, or if we're performing an input operation immediately after a seek.

◆ _M_switch_to_input_mode() [3/3]

template<class _CharT, class _Traits = std::char_traits< _CharT >>
bool basic_filebuf< _CharT, _Traits >::_M_switch_to_input_mode ( )
private

◆ _M_switch_to_output_mode() [1/3]

template<class _CharT, class _Traits = std::char_traits< _CharT >>
bool basic_filebuf< _CharT, _Traits >::_M_switch_to_output_mode ( )
private

◆ _M_switch_to_output_mode() [2/3]

template<class _CharT, class _Traits = std::char_traits< _CharT >>
bool basic_filebuf< _CharT, _Traits >::_M_switch_to_output_mode ( )
private

◆ _M_switch_to_output_mode() [3/3]

template<class _CharT , class _Traits >
bool basic_filebuf< _CharT, _Traits >::_M_switch_to_output_mode ( )
private

This member function is called if we're performing the first I/O operation on a filebuf, or if we're performing an output operation immediately after a seek.

In append mode, every write does an implicit seek to the end of the file. Whenever leaving output mode, the end of file get put in the initial shift state.

◆ _M_underflow_aux() [1/3]

template<class _CharT, class _Traits = std::char_traits< _CharT >>
int_type basic_filebuf< _CharT, _Traits >::_M_underflow_aux ( )
private

◆ _M_underflow_aux() [2/3]

template<class _CharT, class _Traits = std::char_traits< _CharT >>
int_type basic_filebuf< _CharT, _Traits >::_M_underflow_aux ( )
private

◆ _M_underflow_aux() [3/3]

template<class _CharT , class _Traits >
__BF_int_type__ basic_filebuf< _CharT, _Traits >::_M_underflow_aux ( )
private

We have the state and file position from the end of the internal buffer. This round, they become the beginning of the internal buffer.

Fill the external buffer. Start with any leftover characters that didn't get converted last time.

boris : copy_backward did not work _M_ext_buf_end = copy_backward(_M_ext_buf_converted, _M_ext_buf_end, _M_ext_buf+ (_M_ext_buf_end - _M_ext_buf_converted));

Now fill the external buffer with characters from the file. This is a loop because occasonally we don't get enough external characters to make progress.

Don't enter error mode for a failed read. Error mode is sticky, and we might succeed if we try again.

Convert the external buffer to internal characters.

Error conditions: (1) Return value of error. (2) Producing internal characters without consuming external characters. (3) In fixed-width encodings, producing an internal sequence whose length is inconsistent with that of the internal sequence. (4) Failure to produce any characters if we have enough characters in the external buffer, where "enough" means the largest possible width of a single character.

__inext - _M_int_buf != _M_width * (__enext - _M_ext_buf)) ||

We need to go around the loop again to get more external characters.

◆ _M_unshift() [1/3]

template<class _CharT, class _Traits = std::char_traits< _CharT >>
bool basic_filebuf< _CharT, _Traits >::_M_unshift ( )
private

◆ _M_unshift() [2/3]

template<class _CharT, class _Traits = std::char_traits< _CharT >>
bool basic_filebuf< _CharT, _Traits >::_M_unshift ( )
private

◆ _M_unshift() [3/3]

template<class _CharT , class _Traits >
bool basic_filebuf< _CharT, _Traits >::_M_unshift ( )
private

Write whatever sequence of characters is necessary to get back to the initial shift state. This function overwrites the external buffer, changes the external file position, and changes the state. Precondition: the internal buffer is empty.

◆ _M_write() [1/3]

template<class _CharT, class _Traits = std::char_traits< _CharT >>
bool basic_filebuf< _CharT, _Traits >::_M_write ( char *  __buf,
std::ptrdiff_t  __n 
)
inline

◆ _M_write() [2/3]

template<class _CharT, class _Traits = std::char_traits< _CharT >>
bool basic_filebuf< _CharT, _Traits >::_M_write ( char *  __buf,
std::ptrdiff_t  __n 
)
inline

◆ _M_write() [3/3]

template<class _CharT, class _Traits = std::char_traits< _CharT >>
bool basic_filebuf< _CharT, _Traits >::_M_write ( char *  __buf,
std::ptrdiff_t  __n 
)
inline

◆ close() [1/3]

template<class _CharT, class _Traits = std::char_traits< _CharT >>
_Self* basic_filebuf< _CharT, _Traits >::close ( )

Close the stream.

◆ close() [2/3]

template<class _CharT, class _Traits = std::char_traits< _CharT >>
_Self* basic_filebuf< _CharT, _Traits >::close ( )

Close the stream.

◆ close() [3/3]

template<class _CharT , class _Traits >
basic_filebuf< _CharT, _Traits > * basic_filebuf< _CharT, _Traits >::close ( )

Close the stream.

Note order of arguments. We close the file even if __ok is false.

Restore the initial state, except that we don't deallocate the buffer or mess with the cached codecvt information.

◆ current_pos() [1/3]

template<class _CharT, class _Traits = std::char_traits< _CharT >>
pos_type basic_filebuf< _CharT, _Traits >::current_pos ( std::ios_base::openmode  Mode)
private

◆ current_pos() [2/3]

template<typename CharT , typename Traits >
basic_filebuf< CharT, Traits >::pos_type basic_filebuf< CharT, Traits >::current_pos ( std::ios_base::openmode  Mode)
private

◆ current_pos() [3/3]

template<class _CharT, class _Traits = std::char_traits< _CharT >>
pos_type basic_filebuf< _CharT, _Traits >::current_pos ( std::ios_base::openmode  Mode)
private

◆ fd() [1/3]

template<class _CharT, class _Traits = std::char_traits< _CharT >>
_STLP_fd basic_filebuf< _CharT, _Traits >::fd ( ) const
inline

Obtain file descriptor.

◆ fd() [2/3]

template<class _CharT, class _Traits = std::char_traits< _CharT >>
_STLP_fd basic_filebuf< _CharT, _Traits >::fd ( ) const
inline

Obtain file descriptor.

◆ fd() [3/3]

template<class _CharT, class _Traits = std::char_traits< _CharT >>
_STLP_fd basic_filebuf< _CharT, _Traits >::fd ( ) const
inline

Obtain file descriptor.

◆ imbue() [1/3]

template<class _CharT , class _Traits >
void basic_filebuf< _CharT, _Traits >::imbue ( const std::locale &  __loc)
protectedvirtual

Change the filebuf's locale. This member function has no effect unless it is called before any I/O is performed on the stream.

◆ imbue() [2/3]

template<class _CharT, class _Traits = std::char_traits< _CharT >>
virtual void basic_filebuf< _CharT, _Traits >::imbue ( const std::locale &  )
protectedvirtual

◆ imbue() [3/3]

template<class _CharT, class _Traits = std::char_traits< _CharT >>
virtual void basic_filebuf< _CharT, _Traits >::imbue ( const std::locale &  )
protectedvirtual

◆ is_open() [1/3]

template<class _CharT, class _Traits = std::char_traits< _CharT >>
bool basic_filebuf< _CharT, _Traits >::is_open ( ) const
inline

Check if stream is open.

◆ is_open() [2/3]

template<class _CharT, class _Traits = std::char_traits< _CharT >>
bool basic_filebuf< _CharT, _Traits >::is_open ( ) const
inline

Check if stream is open.

◆ is_open() [3/3]

template<class _CharT, class _Traits = std::char_traits< _CharT >>
bool basic_filebuf< _CharT, _Traits >::is_open ( ) const
inline

Check if stream is open.

◆ open() [1/9]

template<class _CharT, class _Traits = std::char_traits< _CharT >>
_Self* basic_filebuf< _CharT, _Traits >::open ( const char *  __s,
std::ios_base::openmode  __m 
)
inline

Open a stream.

◆ open() [2/9]

template<class _CharT, class _Traits = std::char_traits< _CharT >>
_Self* basic_filebuf< _CharT, _Traits >::open ( const char *  __s,
std::ios_base::openmode  __m 
)
inline

Open a stream.

◆ open() [3/9]

template<class _CharT, class _Traits = std::char_traits< _CharT >>
_Self* basic_filebuf< _CharT, _Traits >::open ( const char *  __s,
std::ios_base::openmode  __m 
)
inline

Open a stream.

◆ open() [4/9]

template<class _CharT, class _Traits = std::char_traits< _CharT >>
_Self* basic_filebuf< _CharT, _Traits >::open ( const char *  __s,
std::ios_base::openmode  __m,
long  __protection 
)
inline

Open a stream.

◆ open() [5/9]

template<class _CharT, class _Traits = std::char_traits< _CharT >>
_Self* basic_filebuf< _CharT, _Traits >::open ( const char *  __s,
std::ios_base::openmode  __m,
long  __protection 
)
inline

Open a stream.

◆ open() [6/9]

template<class _CharT, class _Traits = std::char_traits< _CharT >>
_Self* basic_filebuf< _CharT, _Traits >::open ( const char *  __s,
std::ios_base::openmode  __m,
long  __protection 
)
inline

Open a stream.

◆ open() [7/9]

template<class _CharT, class _Traits = std::char_traits< _CharT >>
_Self* basic_filebuf< _CharT, _Traits >::open ( int  __id,
std::ios_base::openmode  _Init_mode = m_default_openmode 
)
inline

Attach a stream to a file descriptor.

◆ open() [8/9]

template<class _CharT, class _Traits = std::char_traits< _CharT >>
_Self* basic_filebuf< _CharT, _Traits >::open ( int  __id,
std::ios_base::openmode  _Init_mode = m_default_openmode 
)
inline

Attach a stream to a file descriptor.

◆ open() [9/9]

template<class _CharT, class _Traits = std::char_traits< _CharT >>
_Self* basic_filebuf< _CharT, _Traits >::open ( int  __id,
std::ios_base::openmode  _Init_mode = m_default_openmode 
)
inline

Attach a stream to a file descriptor.

◆ overflow() [1/3]

template<class _CharT, class _Traits = std::char_traits< _CharT >>
virtual int_type basic_filebuf< _CharT, _Traits >::overflow ( int_type  c = _Traits::eof())
protectedvirtual

◆ overflow() [2/3]

template<class _CharT, class _Traits = std::char_traits< _CharT >>
virtual int_type basic_filebuf< _CharT, _Traits >::overflow ( int_type  c = _Traits::eof())
protectedvirtual

◆ overflow() [3/3]

template<typename CharT , typename Traits >
basic_filebuf< CharT, Traits >::int_type basic_filebuf< CharT, Traits >::overflow ( int_type  c = _Traits::eof( ))
protectedvirtual

◆ overflow_core() [1/3]

template<class _CharT, class _Traits = std::char_traits< _CharT >>
virtual int_type basic_filebuf< _CharT, _Traits >::overflow_core ( int_type  = traits_type::eof())
privatevirtual

◆ overflow_core() [2/3]

template<class _CharT , class _Traits >
__BF_int_type__ basic_filebuf< _CharT, _Traits >::overflow_core ( int_type  __c = traits_type::eof( ))
privatevirtual

This member function flushes the put area, and also outputs the character __c (unless __c is eof). Invariant: we always leave room in the internal buffer for one character more than the base class knows about. We see the internal buffer as [_M_int_buf, _M_int_buf_EOS), but the base class only sees [_M_int_buf, _M_int_buf_EOS - 1).

Switch to output mode, if necessary.

Put __c at the end of the internal buffer.

For variable-width encodings, output may take more than one pass.

For a constant-width encoding we know that the external buffer is large enough, so failure to consume the entire internal buffer or to produce the correct number of external characters, is an error. For a variable-width encoding, however, we require only that we consume at least one internal character

We successfully converted part or all of the internal buffer.

◆ overflow_core() [3/3]

template<class _CharT, class _Traits = std::char_traits< _CharT >>
virtual int_type basic_filebuf< _CharT, _Traits >::overflow_core ( int_type  = traits_type::eof())
privatevirtual

◆ pbackfail() [1/3]

template<class _CharT , class _Traits >
__BF_int_type__ basic_filebuf< _CharT, _Traits >::pbackfail ( int_type  __c = traits_type::eof( ))
protectedvirtual

Make a putback position available, if necessary, by switching to a special internal buffer used only for putback. The buffer is [_M_pback_buf, _M_pback_buf + _S_pback_buf_size), but the base class only sees a piece of it at a time. (We want to make sure that we don't try to read a character that hasn't been initialized.) The end of the putback buffer is always _M_pback_buf + _S_pback_buf_size, but the beginning is usually not _M_pback_buf.

If we aren't already in input mode, pushback is impossible.

We can use the ordinary get buffer if there's enough space, and if it's a buffer that we're allowed to write to.

Are we in the putback buffer already?

Do we have more room in the putback buffer?

We have made a putback position available. Assign to it, and return.

◆ pbackfail() [2/3]

template<class _CharT, class _Traits = std::char_traits< _CharT >>
virtual int_type basic_filebuf< _CharT, _Traits >::pbackfail ( int_type  = traits_type::eof())
protectedvirtual

◆ pbackfail() [3/3]

template<class _CharT, class _Traits = std::char_traits< _CharT >>
virtual int_type basic_filebuf< _CharT, _Traits >::pbackfail ( int_type  = traits_type::eof())
protectedvirtual

◆ seekoff() [1/3]

template<class _CharT, class _Traits = std::char_traits< _CharT >>
virtual pos_type basic_filebuf< _CharT, _Traits >::seekoff ( off_type  Off,
std::ios_base::seekdir  Way,
std::ios_base::openmode  Mode = std::ios_base::in|std::ios_base::out 
)
virtual

◆ seekoff() [2/3]

template<typename CharT , typename Traits >
basic_filebuf< CharT, Traits >::pos_type basic_filebuf< CharT, Traits >::seekoff ( off_type  Off,
std::ios_base::seekdir  Way,
std::ios_base::openmode  Mode = std::ios_base::in | std::ios_base::out 
)
virtual

◆ seekoff() [3/3]

template<class _CharT, class _Traits = std::char_traits< _CharT >>
virtual pos_type basic_filebuf< _CharT, _Traits >::seekoff ( off_type  Off,
std::ios_base::seekdir  Way,
std::ios_base::openmode  Mode = std::ios_base::in|std::ios_base::out 
)
virtual

◆ seekoff_core() [1/3]

template<class _CharT , class _Traits >
__BF_pos_type__ basic_filebuf< _CharT, _Traits >::seekoff_core ( off_type  __off,
std::ios_base::seekdir  __whence,
std::ios_base::openmode   
)
private

Seek to beginning or end, regardless of whether we're in input mode.

Seek relative to current position. Complicated if we're in input mode.

__off is relative to gptr(). We need to do a bit of arithmetic to get an offset relative to the external file pointer.

if __off == 0, we do not need to exit input mode and to shift file pointer

Compensate for offset relative to gptr versus offset relative to external pointer. For a text-oriented stream, where the compensation is more than just pointer arithmetic, we may get but not set the current position.

Get position in internal buffer.

Get corresponding position in external buffer.

Sanity check (expensive): make sure __epos is the right answer.

Get the current position (at the end of the external buffer), then adjust it. Again, it might be a text-oriented stream.

◆ seekoff_core() [2/3]

template<class _CharT, class _Traits = std::char_traits< _CharT >>
pos_type basic_filebuf< _CharT, _Traits >::seekoff_core ( off_type  ,
std::ios_base::seekdir  ,
std::ios_base::openmode   
)
private

◆ seekoff_core() [3/3]

template<class _CharT, class _Traits = std::char_traits< _CharT >>
pos_type basic_filebuf< _CharT, _Traits >::seekoff_core ( off_type  ,
std::ios_base::seekdir  ,
std::ios_base::openmode   
)
private

◆ seekpos() [1/3]

template<class _CharT, class _Traits = std::char_traits< _CharT >>
virtual pos_type basic_filebuf< _CharT, _Traits >::seekpos ( pos_type  Pos,
std::ios_base::openmode  Mode = std::ios_base::in|std::ios_base::out 
)
virtual

◆ seekpos() [2/3]

template<typename CharT , typename Traits >
basic_filebuf< CharT, Traits >::pos_type basic_filebuf< CharT, Traits >::seekpos ( pos_type  Pos,
std::ios_base::openmode  Mode = std::ios_base::in | std::ios_base::out 
)
virtual

◆ seekpos() [3/3]

template<class _CharT, class _Traits = std::char_traits< _CharT >>
virtual pos_type basic_filebuf< _CharT, _Traits >::seekpos ( pos_type  Pos,
std::ios_base::openmode  Mode = std::ios_base::in|std::ios_base::out 
)
virtual

◆ seekpos_core() [1/3]

template<class _CharT, class _Traits = std::char_traits< _CharT >>
pos_type basic_filebuf< _CharT, _Traits >::seekpos_core ( pos_type  ,
std::ios_base::openmode   
)
private

◆ seekpos_core() [2/3]

template<class _CharT, class _Traits = std::char_traits< _CharT >>
pos_type basic_filebuf< _CharT, _Traits >::seekpos_core ( pos_type  ,
std::ios_base::openmode   
)
private

◆ seekpos_core() [3/3]

template<class _CharT , class _Traits >
__BF_pos_type__ basic_filebuf< _CharT, _Traits >::seekpos_core ( pos_type  __pos,
std::ios_base::openmode   
)
private

◆ setbuf() [1/3]

template<class _CharT , class _Traits >
std::basic_streambuf< _CharT, _Traits > * basic_filebuf< _CharT, _Traits >::setbuf ( char_type __buf,
std::streamsize  __n 
)
virtual

Set buffer limit.

This member function must be called before any I/O has been performed on the stream, otherwise it has no effect.

__buf == 0 && __n == 0 means to make ths stream unbuffered. __buf != 0 && __n > 0 means to use __buf as the stream's internal buffer, rather than the buffer that would otherwise be allocated automatically. __buf must be a pointer to an array of _CharT whose size is at least __n.

◆ setbuf() [2/3]

template<class _CharT, class _Traits = std::char_traits< _CharT >>
virtual std::basic_streambuf< _CharT, _Traits >* basic_filebuf< _CharT, _Traits >::setbuf ( char_type ,
std::streamsize   
)
virtual

Set buffer limit.

◆ setbuf() [3/3]

template<class _CharT, class _Traits = std::char_traits< _CharT >>
virtual std::basic_streambuf< _CharT, _Traits >* basic_filebuf< _CharT, _Traits >::setbuf ( char_type ,
std::streamsize   
)
virtual

Set buffer limit.

◆ showmanyc() [1/3]

template<class _CharT, class _Traits = std::char_traits< _CharT >>
virtual std::streamsize basic_filebuf< _CharT, _Traits >::showmanyc ( )
protectedvirtual

◆ showmanyc() [2/3]

template<class _CharT, class _Traits = std::char_traits< _CharT >>
virtual std::streamsize basic_filebuf< _CharT, _Traits >::showmanyc ( )
protectedvirtual

◆ showmanyc() [3/3]

template<class _CharT , class _Traits >
std::streamsize basic_filebuf< _CharT, _Traits >::showmanyc ( )
protectedvirtual

basic_filebuf<> overridden protected virtual member functions

Is there any possibility that reads can succeed?

◆ sync() [1/3]

template<class _CharT, class _Traits = std::char_traits< _CharT >>
virtual int basic_filebuf< _CharT, _Traits >::sync ( )
protectedvirtual

◆ sync() [2/3]

template<class _CharT , class _Traits >
int basic_filebuf< _CharT, _Traits >::sync ( )
protectedvirtual

◆ sync() [3/3]

template<class _CharT, class _Traits = std::char_traits< _CharT >>
virtual int basic_filebuf< _CharT, _Traits >::sync ( )
protectedvirtual

◆ underflow() [1/3]

template<class _CharT, class _Traits = std::char_traits< _CharT >>
virtual int_type basic_filebuf< _CharT, _Traits >::underflow ( )
protectedvirtual

◆ underflow() [2/3]

template<class _CharT, class _Traits = std::char_traits< _CharT >>
virtual int_type basic_filebuf< _CharT, _Traits >::underflow ( )
protectedvirtual

◆ underflow() [3/3]

template<typename CharT , typename Traits >
basic_filebuf< CharT, Traits >::int_type basic_filebuf< CharT, Traits >::underflow ( )
protectedvirtual

◆ underflow_core() [1/3]

template<class _CharT, class _Traits = std::char_traits< _CharT >>
virtual int_type basic_filebuf< _CharT, _Traits >::underflow_core ( )
privatevirtual

◆ underflow_core() [2/3]

template<class _CharT , class _Traits >
basic_filebuf< _CharT, _Traits >::int_type basic_filebuf< _CharT, _Traits >::underflow_core ( )
privatevirtual

◆ underflow_core() [3/3]

template<class _CharT, class _Traits = std::char_traits< _CharT >>
virtual int_type basic_filebuf< _CharT, _Traits >::underflow_core ( )
privatevirtual

◆ UseMemoryMappedIO() [1/6]

template<class _CharT, class _Traits = std::char_traits< _CharT >>
void basic_filebuf< _CharT, _Traits >::UseMemoryMappedIO ( bool  Value)
inline

Enable/disable use of memory mapped I/O for stream.

◆ UseMemoryMappedIO() [2/6]

template<class _CharT, class _Traits = std::char_traits< _CharT >>
void basic_filebuf< _CharT, _Traits >::UseMemoryMappedIO ( bool  Value)
inline

Enable/disable use of memory mapped I/O for stream.

◆ UseMemoryMappedIO() [3/6]

template<class _CharT, class _Traits = std::char_traits< _CharT >>
void basic_filebuf< _CharT, _Traits >::UseMemoryMappedIO ( bool  Value)
inline

Enable/disable use of memory mapped I/O for stream.

◆ UseMemoryMappedIO() [4/6]

template<class _CharT, class _Traits = std::char_traits< _CharT >>
bool basic_filebuf< _CharT, _Traits >::UseMemoryMappedIO ( ) const
inline

Obtain the memory mapped I/O status use for the stream.

◆ UseMemoryMappedIO() [5/6]

template<class _CharT, class _Traits = std::char_traits< _CharT >>
bool basic_filebuf< _CharT, _Traits >::UseMemoryMappedIO ( ) const
inline

Obtain the memory mapped I/O status use for the stream.

◆ UseMemoryMappedIO() [6/6]

template<class _CharT, class _Traits = std::char_traits< _CharT >>
bool basic_filebuf< _CharT, _Traits >::UseMemoryMappedIO ( ) const
inline

Obtain the memory mapped I/O status use for the stream.

Friends And Related Function Documentation

◆ _Underflow< _CharT, _Traits >

template<class _CharT, class _Traits = std::char_traits< _CharT >>
_Underflow< _CharT, _Traits >
friend

friend class _Noconv_input<_Traits>; friend class _Noconv_output<_Traits>;

Member Data Documentation

◆ _M_always_noconv

template<class _CharT, class _Traits = std::char_traits< _CharT >>
unsigned char basic_filebuf< _CharT, _Traits >::_M_always_noconv
private

◆ _M_base

template<class _CharT, class _Traits = std::char_traits< _CharT >>
_Filebuf_base basic_filebuf< _CharT, _Traits >::_M_base
private

◆ _M_codecvt

template<class _CharT, class _Traits = std::char_traits< _CharT >>
const _Codecvt * basic_filebuf< _CharT, _Traits >::_M_codecvt
private

◆ _M_constant_width

template<class _CharT, class _Traits = std::char_traits< _CharT >>
unsigned char basic_filebuf< _CharT, _Traits >::_M_constant_width
private

◆ _M_end_state

template<class _CharT, class _Traits = std::char_traits< _CharT >>
_State_type basic_filebuf< _CharT, _Traits >::_M_end_state
private

Similar to _M_state except that it corresponds to the end of the internal buffer instead of the beginning.

◆ _M_ext_buf

template<class _CharT, class _Traits = std::char_traits< _CharT >>
char * basic_filebuf< _CharT, _Traits >::_M_ext_buf
private

External buffer: characters corresponding to the external file.

◆ _M_ext_buf_converted

template<class _CharT, class _Traits = std::char_traits< _CharT >>
char * basic_filebuf< _CharT, _Traits >::_M_ext_buf_converted
private

The range [_M_ext_buf, _M_ext_buf_converted) contains the external characters corresponding to the sequence in the internal buffer. The range [_M_ext_buf_converted, _M_ext_buf_end) contains characters that have been read into the external buffer but have not been converted to an internal sequence.

◆ _M_ext_buf_end

template<class _CharT, class _Traits = std::char_traits< _CharT >>
char * basic_filebuf< _CharT, _Traits >::_M_ext_buf_end
private

◆ _M_ext_buf_EOS

template<class _CharT, class _Traits = std::char_traits< _CharT >>
char * basic_filebuf< _CharT, _Traits >::_M_ext_buf_EOS
private

◆ _M_in_error_mode

template<class _CharT, class _Traits = std::char_traits< _CharT >>
unsigned char basic_filebuf< _CharT, _Traits >::_M_in_error_mode
private

◆ _M_in_input_mode

template<class _CharT, class _Traits = std::char_traits< _CharT >>
unsigned char basic_filebuf< _CharT, _Traits >::_M_in_input_mode
private

false if it was supplied by the user.

◆ _M_in_output_mode

template<class _CharT, class _Traits = std::char_traits< _CharT >>
unsigned char basic_filebuf< _CharT, _Traits >::_M_in_output_mode
private

◆ _M_in_putback_mode

template<class _CharT, class _Traits = std::char_traits< _CharT >>
unsigned char basic_filebuf< _CharT, _Traits >::_M_in_putback_mode
private

◆ _M_int_buf

template<class _CharT, class _Traits = std::char_traits< _CharT >>
_CharT * basic_filebuf< _CharT, _Traits >::_M_int_buf
private

Internal buffer: characters seen by the filebuf's clients.

◆ _M_int_buf_dynamic

template<class _CharT, class _Traits = std::char_traits< _CharT >>
unsigned char basic_filebuf< _CharT, _Traits >::_M_int_buf_dynamic
private

private: // Mode flags.

◆ _M_int_buf_EOS

template<class _CharT, class _Traits = std::char_traits< _CharT >>
_CharT * basic_filebuf< _CharT, _Traits >::_M_int_buf_EOS
private

◆ _M_max_width

template<class _CharT, class _Traits = std::char_traits< _CharT >>
int basic_filebuf< _CharT, _Traits >::_M_max_width
private

◆ _M_mmap_base

template<class _CharT, class _Traits = std::char_traits< _CharT >>
void * basic_filebuf< _CharT, _Traits >::_M_mmap_base
private

This is a null pointer unless we are in mmap input mode.

◆ _M_mmap_len

template<class _CharT, class _Traits = std::char_traits< _CharT >>
std::streamoff basic_filebuf< _CharT, _Traits >::_M_mmap_len
private

◆ _M_pback_buf

template<class _CharT, class _Traits = std::char_traits< _CharT >>
_CharT basic_filebuf< _CharT, _Traits >::_M_pback_buf
private

◆ _M_saved_eback

template<class _CharT, class _Traits = std::char_traits< _CharT >>
_CharT * basic_filebuf< _CharT, _Traits >::_M_saved_eback
private

◆ _M_saved_egptr

template<class _CharT, class _Traits = std::char_traits< _CharT >>
_CharT * basic_filebuf< _CharT, _Traits >::_M_saved_egptr
private

◆ _M_saved_gptr

template<class _CharT, class _Traits = std::char_traits< _CharT >>
_CharT * basic_filebuf< _CharT, _Traits >::_M_saved_gptr
private

◆ _M_state

template<class _CharT, class _Traits = std::char_traits< _CharT >>
_State_type basic_filebuf< _CharT, _Traits >::_M_state
private

State corresponding to beginning of internal buffer.

◆ _M_use_memory_mapped_io

template<class _CharT, class _Traits = std::char_traits< _CharT >>
bool basic_filebuf< _CharT, _Traits >::_M_use_memory_mapped_io
private

true unless disabled by user

◆ _M_width

template<class _CharT, class _Traits = std::char_traits< _CharT >>
int basic_filebuf< _CharT, _Traits >::_M_width
private

◆ m_pos

template<class _CharT, class _Traits = std::char_traits< _CharT >>
pos_type basic_filebuf< _CharT, _Traits >::m_pos
private

For keeping trace of where we are (reduces lseek calls).


The documentation for this class was generated from the following file: