STLdoc
STLdocumentation
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros
Public Types | Public Member Functions | Protected Member Functions | Private Types | Private Member Functions | Private Attributes | List of all members
wbuffer_convert< _Codecvt, _Elem, _Traits > Class Template Reference
Inheritance diagram for wbuffer_convert< _Codecvt, _Elem, _Traits >:
basic_streambuf< _Elem, _Traits >

Public Types

typedef wbuffer_convert< _Codecvt, _Elem, _Traits > _Myt
 
typedef streambuf _Mysb
 
typedef char_traits< char_Byte_traits
 
typedef _Traits::int_type int_type
 
typedef _Traits::pos_type pos_type
 
typedef _Traits::off_type off_type
 
typedef _Codecvt::state_type state_type
 
- Public Types inherited from basic_streambuf< _Elem, _Traits >
typedef _Elem char_type
 
typedef _Traits traits_type
 
typedef _Traits::int_type int_type
 
typedef _Traits::pos_type pos_type
 
typedef _Traits::off_type off_type
 

Public Member Functions

 wbuffer_convert (_Mysb *_Strbuf=0)
 
 wbuffer_convert (_Mysb *_Strbuf, const _Codecvt *_Pcvt_arg)
 
 wbuffer_convert (_Mysb *_Strbuf, const _Codecvt *_Pcvt_arg, state_type _State_arg)
 
virtual ~wbuffer_convert () _NOEXCEPT
 
_Mysbrdbuf () const
 
_Mysbrdbuf (_Mysb *_Strbuf)
 
state_type state () const
 
 wbuffer_convert (const wbuffer_convert &)=delete
 
wbuffer_convertoperator= (const wbuffer_convert &)=delete
 
- Public Member Functions inherited from basic_streambuf< _Elem, _Traits >
virtual __CLR_OR_THIS_CALL ~basic_streambuf () _NOEXCEPT
 
pos_type __CLR_OR_THIS_CALL pubseekoff (off_type _Off, ios_base::seekdir _Way, ios_base::openmode _Mode=ios_base::in|ios_base::out)
 
pos_type __CLR_OR_THIS_CALL pubseekpos (pos_type _Pos, ios_base::openmode _Mode=ios_base::in|ios_base::out)
 
_Myt *__CLR_OR_THIS_CALL pubsetbuf (_Elem *_Buffer, streamsize _Count)
 
locale __CLR_OR_THIS_CALL pubimbue (const locale &_Newlocale)
 
locale __CLR_OR_THIS_CALL getloc () const
 
streamsize __CLR_OR_THIS_CALL in_avail ()
 
int __CLR_OR_THIS_CALL pubsync ()
 
int_type __CLR_OR_THIS_CALL sbumpc ()
 
int_type __CLR_OR_THIS_CALL sgetc ()
 
streamsize __CLR_OR_THIS_CALL sgetn (_Elem *_Ptr, streamsize _Count)
 
int_type __CLR_OR_THIS_CALL snextc ()
 
int_type __CLR_OR_THIS_CALL sputbackc (_Elem _Ch)
 
int_type __CLR_OR_THIS_CALL sungetc ()
 
int_type __CLR_OR_THIS_CALL sputc (_Elem _Ch)
 
streamsize __CLR_OR_THIS_CALL sputn (const _Elem *_Ptr, streamsize _Count)
 
virtual void __CLR_OR_THIS_CALL _Lock ()
 
virtual void __CLR_OR_THIS_CALL _Unlock ()
 

Protected Member Functions

virtual int_type overflow (int_type _Meta=_Traits::eof())
 
virtual int_type pbackfail (int_type _Meta=_Traits::eof())
 
virtual int_type underflow ()
 
virtual int_type uflow ()
 
virtual pos_type seekoff (off_type, ios::seekdir, ios::openmode=(ios::openmode)(ios::in|ios::out))
 
virtual pos_type seekpos (pos_type, ios::openmode=(ios::openmode)(ios::in|ios::out))
 
- Protected Member Functions inherited from basic_streambuf< _Elem, _Traits >
__CLR_OR_THIS_CALL basic_streambuf ()
 
__CLR_OR_THIS_CALL basic_streambuf (_Uninitialized)
 
__CLR_OR_THIS_CALL basic_streambuf (const _Myt &_Right)
 
_Myt &__CLR_OR_THIS_CALL operator= (const _Myt &_Right)
 
void __CLR_OR_THIS_CALL swap (_Myt &_Right)
 
_Elem *__CLR_OR_THIS_CALL eback () const
 
_Elem *__CLR_OR_THIS_CALL gptr () const
 
_Elem *__CLR_OR_THIS_CALL pbase () const
 
_Elem *__CLR_OR_THIS_CALL pptr () const
 
_Elem *__CLR_OR_THIS_CALL egptr () const
 
void __CLR_OR_THIS_CALL gbump (int _Off)
 
void __CLR_OR_THIS_CALL setg (_Elem *_First, _Elem *_Next, _Elem *_Last)
 
_Elem *__CLR_OR_THIS_CALL epptr () const
 
_Elem *__CLR_OR_THIS_CALL _Gndec ()
 
_Elem *__CLR_OR_THIS_CALL _Gninc ()
 
_Elem *__CLR_OR_THIS_CALL _Gnpreinc ()
 
streamsize __CLR_OR_THIS_CALL _Gnavail () const
 
void __CLR_OR_THIS_CALL pbump (int _Off)
 
void __CLR_OR_THIS_CALL setp (_Elem *_First, _Elem *_Last)
 
void __CLR_OR_THIS_CALL setp (_Elem *_First, _Elem *_Next, _Elem *_Last)
 
_Elem *__CLR_OR_THIS_CALL _Pninc ()
 
streamsize __CLR_OR_THIS_CALL _Pnavail () const
 
void __CLR_OR_THIS_CALL _Init ()
 
void __CLR_OR_THIS_CALL _Init (_Elem **_Gf, _Elem **_Gn, int *_Gc, _Elem **_Pf, _Elem **_Pn, int *_Pc)
 
virtual streamsize __CLR_OR_THIS_CALL showmanyc ()
 
virtual streamsize __CLR_OR_THIS_CALL xsgetn (_Elem *_Ptr, streamsize _Count)
 
virtual streamsize __CLR_OR_THIS_CALL xsputn (const _Elem *_Ptr, streamsize _Count)
 
virtual pos_type __CLR_OR_THIS_CALL seekoff (off_type, ios_base::seekdir, ios_base::openmode=ios_base::in|ios_base::out)
 
virtual pos_type __CLR_OR_THIS_CALL seekpos (pos_type, ios_base::openmode=ios_base::in|ios_base::out)
 
virtual _Myt *__CLR_OR_THIS_CALL setbuf (_Elem *, streamsize)
 
virtual int __CLR_OR_THIS_CALL sync ()
 
virtual void __CLR_OR_THIS_CALL imbue (const locale &)
 

Private Types

enum  _Mode {
  _Unused, _Wrote, _Need, _Got,
  _Eof
}
 
enum  { _STRING_INC = 8 }
 

Private Member Functions

int_type _Get_elem ()
 

Private Attributes

state_type _State
 
const _Codecvt * _Pcvt
 
_Mysb_Mystrbuf
 
_Mode _Status
 
size_t _Nback
 
_Elem _Myback [8]
 
string _Str
 
locale _Loc
 

Additional Inherited Members

- Protected Attributes inherited from basic_streambuf< _Elem, _Traits >
locale_Plocale
 

Member Typedef Documentation

template<class _Codecvt , class _Elem = wchar_t, class _Traits = char_traits<_Elem>>
typedef char_traits<char> wbuffer_convert< _Codecvt, _Elem, _Traits >::_Byte_traits
template<class _Codecvt , class _Elem = wchar_t, class _Traits = char_traits<_Elem>>
typedef streambuf wbuffer_convert< _Codecvt, _Elem, _Traits >::_Mysb
template<class _Codecvt , class _Elem = wchar_t, class _Traits = char_traits<_Elem>>
typedef wbuffer_convert<_Codecvt, _Elem, _Traits> wbuffer_convert< _Codecvt, _Elem, _Traits >::_Myt
template<class _Codecvt , class _Elem = wchar_t, class _Traits = char_traits<_Elem>>
typedef _Traits::int_type wbuffer_convert< _Codecvt, _Elem, _Traits >::int_type
template<class _Codecvt , class _Elem = wchar_t, class _Traits = char_traits<_Elem>>
typedef _Traits::off_type wbuffer_convert< _Codecvt, _Elem, _Traits >::off_type
template<class _Codecvt , class _Elem = wchar_t, class _Traits = char_traits<_Elem>>
typedef _Traits::pos_type wbuffer_convert< _Codecvt, _Elem, _Traits >::pos_type
template<class _Codecvt , class _Elem = wchar_t, class _Traits = char_traits<_Elem>>
typedef _Codecvt::state_type wbuffer_convert< _Codecvt, _Elem, _Traits >::state_type

Member Enumeration Documentation

template<class _Codecvt , class _Elem = wchar_t, class _Traits = char_traits<_Elem>>
anonymous enum
private
Enumerator
_STRING_INC 
23 {_STRING_INC = 8};
Definition: xlocbuf:23
template<class _Codecvt , class _Elem = wchar_t, class _Traits = char_traits<_Elem>>
enum wbuffer_convert::_Mode
private
Enumerator
_Unused 
_Wrote 
_Need 
_Got 
_Eof 
Definition: xlocbuf:22
Definition: xlocbuf:22
Definition: xlocbuf:22
Definition: xlocbuf:22
Definition: xlocbuf:22

Constructor & Destructor Documentation

template<class _Codecvt , class _Elem = wchar_t, class _Traits = char_traits<_Elem>>
wbuffer_convert< _Codecvt, _Elem, _Traits >::wbuffer_convert ( _Mysb _Strbuf = 0)
inlineexplicit
35  : _State(), _Pcvt(new _Codecvt),
36  _Mystrbuf(_Strbuf), _Status(_Unused), _Nback(0)
37  { // construct with byte stream buffer pointer
38  _Loc = locale(_Loc, _Pcvt);
39  }
locale _Loc
Definition: xlocbuf:301
size_t _Nback
Definition: xlocbuf:298
_Mysb * _Mystrbuf
Definition: xlocbuf:296
Definition: xlocale:97
const _Codecvt * _Pcvt
Definition: xlocbuf:295
_Mode _Status
Definition: xlocbuf:297
state_type _State
Definition: xlocbuf:294
Definition: xlocbuf:22
template<class _Codecvt , class _Elem = wchar_t, class _Traits = char_traits<_Elem>>
wbuffer_convert< _Codecvt, _Elem, _Traits >::wbuffer_convert ( _Mysb _Strbuf,
const _Codecvt *  _Pcvt_arg 
)
inline
42  : _State(), _Pcvt(_Pcvt_arg),
43  _Mystrbuf(_Strbuf), _Status(_Unused), _Nback(0)
44  { // construct with byte stream buffer pointer and codecvt
45  _Loc = locale(_Loc, _Pcvt);
46  }
locale _Loc
Definition: xlocbuf:301
size_t _Nback
Definition: xlocbuf:298
_Mysb * _Mystrbuf
Definition: xlocbuf:296
Definition: xlocale:97
const _Codecvt * _Pcvt
Definition: xlocbuf:295
_Mode _Status
Definition: xlocbuf:297
state_type _State
Definition: xlocbuf:294
Definition: xlocbuf:22
template<class _Codecvt , class _Elem = wchar_t, class _Traits = char_traits<_Elem>>
wbuffer_convert< _Codecvt, _Elem, _Traits >::wbuffer_convert ( _Mysb _Strbuf,
const _Codecvt *  _Pcvt_arg,
state_type  _State_arg 
)
inline
50  : _State(_State_arg), _Pcvt(_Pcvt_arg),
51  _Mystrbuf(_Strbuf), _Status(_Unused), _Nback(0)
52  { // construct with byte stream buffer pointer, codecvt, and state
53  _Loc = locale(_Loc, _Pcvt);
54  }
locale _Loc
Definition: xlocbuf:301
size_t _Nback
Definition: xlocbuf:298
_Mysb * _Mystrbuf
Definition: xlocbuf:296
Definition: xlocale:97
const _Codecvt * _Pcvt
Definition: xlocbuf:295
_Mode _Status
Definition: xlocbuf:297
state_type _State
Definition: xlocbuf:294
Definition: xlocbuf:22
template<class _Codecvt , class _Elem = wchar_t, class _Traits = char_traits<_Elem>>
virtual wbuffer_convert< _Codecvt, _Elem, _Traits >::~wbuffer_convert ( )
inlinevirtual
57  { // destroy the object
58  char *_Buf = (char *)_Str.c_str();
59 
60  for (; _Status == _Wrote ; )
61  { // put any trailing homing shift
62  char *_Dest;
63 
64  if (_Str.size() < _STRING_INC)
65  _Str.assign(_STRING_INC, '\0');
66  switch (_Pcvt->unshift(_State,
67  _Buf, _Buf + _Str.size(), _Dest))
68  { // test result of homing conversion
69  case _Codecvt::ok:
70  _Status = _Unused; // homed successfully
71 
72  case _Codecvt::partial: // fall through
73  { // put any generated bytes
74  int _Count = (int)(_Dest - _Buf);
75  if (0 < _Count
79  _Count)))
80  return; // write failed
81 
82  if (_Status == _Wrote && _Count == 0)
83  _Str.append(_STRING_INC, '\0'); // try with more space
84  break;
85  }
86 
87  case _Codecvt::noconv:
88  return; // nothing to do
89 
90  default:
91  return; // conversion failed
92  }
93  }
94  }
_Ret_z_ const _Elem * c_str() const _NOEXCEPT
Definition: xstring:3001
Definition: regex:1559
unsigned _Dest
Definition: mbstring.h:107
static constexpr bool __CLRCALL_OR_CDECL eq_int_type(const int_type &_Left, const int_type &_Right) _NOEXCEPT
Definition: iosfwd:540
_Mysb * _Mystrbuf
Definition: xlocbuf:296
Definition: xlocbuf:23
_Myt & assign(_Myt &&_Right) _NOEXCEPT_OP(_Alty
Definition: xstring:2090
_Myt & append(initializer_list< _Elem > _Ilist)
Definition: xstring:2199
const _Codecvt * _Pcvt
Definition: xlocbuf:295
_Mode _Status
Definition: xlocbuf:297
char int *typedef int(__CRTDECL *_CRT_REPORT_HOOKW)(int
Definition: crtdbg.h:45
int int_type
Definition: iosfwd:467
Definition: xlocbuf:22
state_type _State
Definition: xlocbuf:294
size_type size() const _NOEXCEPT
Definition: xstring:3023
_Diff _Count
Definition: algorithm:1941
Definition: xlocbuf:22
string _Str
Definition: xlocbuf:300
static constexpr int_type __CLRCALL_OR_CDECL eof() _NOEXCEPT
Definition: iosfwd:550
streamsize __CLR_OR_THIS_CALL sputn(const _Elem *_Ptr, streamsize _Count)
Definition: streambuf:204
template<class _Codecvt , class _Elem = wchar_t, class _Traits = char_traits<_Elem>>
wbuffer_convert< _Codecvt, _Elem, _Traits >::wbuffer_convert ( const wbuffer_convert< _Codecvt, _Elem, _Traits > &  )
delete

Member Function Documentation

template<class _Codecvt , class _Elem = wchar_t, class _Traits = char_traits<_Elem>>
int_type wbuffer_convert< _Codecvt, _Elem, _Traits >::_Get_elem ( )
inlineprivate
240  { // compose an element from byte stream buffer
241  if (_Mystrbuf != 0 && _Status != _Wrote)
242  { // got buffer, haven't written, try to compose an element
243  if (_Status == _Eof)
244  ;
245  else if (_Str.size() == 0)
246  _Status = _Need;
247  else
248  _Status = _Got;
249 
250  for (; _Status != _Eof; )
251  { // get using codecvt facet
252  char *_Buf = (char *)_Str.c_str();
253  _Elem _Ch, *_Dest;
254  const char *_Src;
255  int _Meta;
256 
257  if (_Status != _Need)
258  ;
260  _Meta = _Mystrbuf->sbumpc()))
261  _Status = _Eof;
262  else
264 
265  switch (_Pcvt->in(_State,
266  _Buf, _Buf + _Str.size(), _Src,
267  &_Ch, &_Ch + 1, _Dest))
268  { // test result of converting one element
269  case _Codecvt::partial:
270  case _Codecvt::ok:
271  _Str.erase((size_t)0, // discard any used input
272  (size_t)(_Src - _Buf));
273  if (_Dest != &_Ch)
274  return (_Traits::to_int_type(_Ch));
275  break;
276 
277  case _Codecvt::noconv:
278  if (_Str.size() < sizeof (_Elem))
279  break; // no conversion, but need more chars
280  _CSTD memcpy(&_Ch, _Buf,
281  sizeof (_Elem)); // copy raw bytes to element
282  _Str.erase((size_t)0, sizeof (_Elem));
283  return (_Traits::to_int_type(_Ch)); // return result
284 
285  default:
286  _Status = _Eof; // conversion failed
287  }
288  }
289  }
290 
291  return (_Traits::eof());
292  }
_Ret_z_ const _Elem * c_str() const _NOEXCEPT
Definition: xstring:3001
Definition: regex:1559
unsigned _Dest
Definition: mbstring.h:107
static constexpr bool __CLRCALL_OR_CDECL eq_int_type(const int_type &_Left, const int_type &_Right) _NOEXCEPT
Definition: iosfwd:540
_Mysb * _Mystrbuf
Definition: xlocbuf:296
Definition: xlocbuf:22
Definition: xlocbuf:22
_Check_return_ _In_ wchar_t _Ch
Definition: vcruntime_string.h:89
static constexpr _Elem __CLRCALL_OR_CDECL to_char_type(const int_type &_Meta) _NOEXCEPT
Definition: iosfwd:530
int_type __CLR_OR_THIS_CALL sbumpc()
Definition: streambuf:147
_Myt & append(initializer_list< _Elem > _Ilist)
Definition: xstring:2199
const _Codecvt * _Pcvt
Definition: xlocbuf:295
_In_ size_t _Out_opt_ int _In_z_ unsigned char const * _Src
Definition: mbstring.h:1039
_Mode _Status
Definition: xlocbuf:297
_Myt & erase(const size_type _Off=0)
Definition: xstring:2584
memcpy(_Destination, _Source, _SourceSize)
Definition: xlocbuf:22
state_type _State
Definition: xlocbuf:294
size_type size() const _NOEXCEPT
Definition: xstring:3023
#define _CSTD
Definition: yvals.h:570
string _Str
Definition: xlocbuf:300
static constexpr int_type __CLRCALL_OR_CDECL eof() _NOEXCEPT
Definition: iosfwd:550
Definition: xlocbuf:22
template<class _Codecvt , class _Elem = wchar_t, class _Traits = char_traits<_Elem>>
wbuffer_convert& wbuffer_convert< _Codecvt, _Elem, _Traits >::operator= ( const wbuffer_convert< _Codecvt, _Elem, _Traits > &  )
delete
template<class _Codecvt , class _Elem = wchar_t, class _Traits = char_traits<_Elem>>
virtual int_type wbuffer_convert< _Codecvt, _Elem, _Traits >::overflow ( int_type  _Meta = _Traits::eof())
inlineprotectedvirtual

Reimplemented from basic_streambuf< _Elem, _Traits >.

118  { // put an element to stream
119  if (_Traits::eq_int_type(_Traits::eof(), _Meta))
120  return (_Traits::not_eof(_Meta)); // EOF, return success code
121  else if (_Mystrbuf == 0 || 0 < _Nback
122  || (_Status != _Unused && _Status != _Wrote))
123  return (_Traits::eof()); // no buffer or reading, fail
124  else
125  { // put using codecvt facet
126  char *_Buf = (char *)_Str.c_str();
127  const _Elem _Ch = _Traits::to_char_type(_Meta);
128  const _Elem *_Src;
129  char *_Dest;
130 
131  if (_Str.size() < _STRING_INC)
132  _Str.assign(_STRING_INC, '\0');
133  for (_Status = _Wrote; ; )
134  switch (_Pcvt->out(_State,
135  &_Ch, &_Ch + 1, _Src,
136  _Buf, _Buf + _Str.size(), _Dest))
137  { // test result of converting one element
138  case _Codecvt::partial:
139  case _Codecvt::ok:
140  { // converted something, try to put it out
141  int _Count = (int)(_Dest - _Buf);
142  if (0 < _Count
146  _Count)))
147  return (_Traits::eof()); // write failed
148 
149  if (_Src != &_Ch)
150  return (_Meta); // converted whole element
151 
152  if (0 < _Count)
153  ;
154  else if (_Str.size() < 4 * _STRING_INC)
155  _Str.append(_STRING_INC, '\0'); // try with more space
156  else
157  return (_Traits::eof()); // conversion failed
158  break;
159  }
160 
161  case _Codecvt::noconv:
162  if (_Traits::eq_int_type(
163  _Traits::eof(),
164  (typename _Traits::int_type)_Mystrbuf->sputn(
165  (char *)&_Ch,
166  (streamsize)sizeof (_Elem))))
167  return (_Traits::eof());
168  else
169  return (_Meta); // put native byte order
170 
171  default:
172  return (_Traits::eof()); // conversion failed
173  }
174  }
175  }
_Ret_z_ const _Elem * c_str() const _NOEXCEPT
Definition: xstring:3001
long long streamsize
Definition: iosfwd:23
Definition: regex:1559
unsigned _Dest
Definition: mbstring.h:107
size_t _Nback
Definition: xlocbuf:298
static constexpr bool __CLRCALL_OR_CDECL eq_int_type(const int_type &_Left, const int_type &_Right) _NOEXCEPT
Definition: iosfwd:540
_Mysb * _Mystrbuf
Definition: xlocbuf:296
_Check_return_ _In_ wchar_t _Ch
Definition: vcruntime_string.h:89
Definition: xlocbuf:23
_Myt & assign(_Myt &&_Right) _NOEXCEPT_OP(_Alty
Definition: xstring:2090
_Myt & append(initializer_list< _Elem > _Ilist)
Definition: xstring:2199
const _Codecvt * _Pcvt
Definition: xlocbuf:295
_In_ size_t _Out_opt_ int _In_z_ unsigned char const * _Src
Definition: mbstring.h:1039
_Mode _Status
Definition: xlocbuf:297
char int *typedef int(__CRTDECL *_CRT_REPORT_HOOKW)(int
Definition: crtdbg.h:45
int int_type
Definition: iosfwd:467
Definition: xlocbuf:22
state_type _State
Definition: xlocbuf:294
size_type size() const _NOEXCEPT
Definition: xstring:3023
_Diff _Count
Definition: algorithm:1941
Definition: xlocbuf:22
string _Str
Definition: xlocbuf:300
static constexpr int_type __CLRCALL_OR_CDECL eof() _NOEXCEPT
Definition: iosfwd:550
streamsize __CLR_OR_THIS_CALL sputn(const _Elem *_Ptr, streamsize _Count)
Definition: streambuf:204
template<class _Codecvt , class _Elem = wchar_t, class _Traits = char_traits<_Elem>>
virtual int_type wbuffer_convert< _Codecvt, _Elem, _Traits >::pbackfail ( int_type  _Meta = _Traits::eof())
inlineprotectedvirtual

Reimplemented from basic_streambuf< _Elem, _Traits >.

178  { // put an element back to stream
179  if (sizeof (_Myback) / sizeof (_Myback[0]) <= _Nback
180  || _Status == _Wrote)
181  return (_Traits::eof()); // nowhere to put back
182  else
183  { // enough room, put it back
184  if (!_Traits::eq_int_type(_Traits::eof(), _Meta))
185  _Myback[_Nback] = _Traits::to_char_type(_Meta);
186  ++_Nback;
187  if (_Status == _Unused)
188  _Status = _Got;
189  return (_Meta);
190  }
191  }
size_t _Nback
Definition: xlocbuf:298
Definition: xlocbuf:22
_Mode _Status
Definition: xlocbuf:297
_Elem _Myback[8]
Definition: xlocbuf:299
Definition: xlocbuf:22
Definition: xlocbuf:22
template<class _Codecvt , class _Elem = wchar_t, class _Traits = char_traits<_Elem>>
_Mysb* wbuffer_convert< _Codecvt, _Elem, _Traits >::rdbuf ( ) const
inline
97  { // return byte stream buffer pointer
98  return (_Mystrbuf);
99  }
_Mysb * _Mystrbuf
Definition: xlocbuf:296
template<class _Codecvt , class _Elem = wchar_t, class _Traits = char_traits<_Elem>>
_Mysb* wbuffer_convert< _Codecvt, _Elem, _Traits >::rdbuf ( _Mysb _Strbuf)
inline
102  { // set byte stream buffer pointer
103  _Mysb *_Oldstrbuf = _Mystrbuf;
104  _Mystrbuf = _Strbuf;
105  return (_Oldstrbuf);
106  }
_Mysb * _Mystrbuf
Definition: xlocbuf:296
streambuf _Mysb
Definition: xlocbuf:26
template<class _Codecvt , class _Elem = wchar_t, class _Traits = char_traits<_Elem>>
virtual pos_type wbuffer_convert< _Codecvt, _Elem, _Traits >::seekoff ( off_type  ,
ios::seekdir  ,
ios::openmode  = (ios::openmode)(ios::in | ios::out) 
)
inlineprotectedvirtual
227  { // change position by _Off
228  return (pos_type(-1)); // always fail
229  }
_Traits::pos_type pos_type
Definition: xlocbuf:30
template<class _Codecvt , class _Elem = wchar_t, class _Traits = char_traits<_Elem>>
virtual pos_type wbuffer_convert< _Codecvt, _Elem, _Traits >::seekpos ( pos_type  ,
ios::openmode  = (ios::openmode)(ios::in | ios::out) 
)
inlineprotectedvirtual
234  { // change position to _Pos
235  return (pos_type(-1)); // always fail
236  }
_Traits::pos_type pos_type
Definition: xlocbuf:30
template<class _Codecvt , class _Elem = wchar_t, class _Traits = char_traits<_Elem>>
state_type wbuffer_convert< _Codecvt, _Elem, _Traits >::state ( ) const
inline
109  { // get state
110  return (_State);
111  }
state_type _State
Definition: xlocbuf:294
template<class _Codecvt , class _Elem = wchar_t, class _Traits = char_traits<_Elem>>
virtual int_type wbuffer_convert< _Codecvt, _Elem, _Traits >::uflow ( )
inlineprotectedvirtual

Reimplemented from basic_streambuf< _Elem, _Traits >.

210  { // get an element from stream, point past it
211  int_type _Meta;
212 
213  if (0 < _Nback)
214  ;
215  else if (_Traits::eq_int_type(_Traits::eof(), _Meta = _Get_elem()))
216  return (_Meta); // _Get_elem failed, return EOF
217  else
218  _Myback[_Nback++] = _Traits::to_char_type(_Meta);
219  return (_Traits::to_int_type(_Myback[--_Nback]));
220  }
size_t _Nback
Definition: xlocbuf:298
int_type _Get_elem()
Definition: xlocbuf:239
_Elem _Myback[8]
Definition: xlocbuf:299
_Traits::int_type int_type
Definition: xlocbuf:29
template<class _Codecvt , class _Elem = wchar_t, class _Traits = char_traits<_Elem>>
virtual int_type wbuffer_convert< _Codecvt, _Elem, _Traits >::underflow ( )
inlineprotectedvirtual

Reimplemented from basic_streambuf< _Elem, _Traits >.

194  { // get an element from stream, but don't point past it
195  int_type _Meta;
196 
197  if (0 < _Nback)
198  ;
199  else if (_Traits::eq_int_type(_Traits::eof(), _Meta = _Get_elem()))
200  return (_Meta); // _Get_elem failed, return EOF
201  else
202  _Myback[_Nback++] = _Traits::to_char_type(_Meta);
203  return (_Traits::to_int_type(_Myback[_Nback - 1]));
204  }
size_t _Nback
Definition: xlocbuf:298
int_type _Get_elem()
Definition: xlocbuf:239
_Elem _Myback[8]
Definition: xlocbuf:299
_Traits::int_type int_type
Definition: xlocbuf:29

Member Data Documentation

template<class _Codecvt , class _Elem = wchar_t, class _Traits = char_traits<_Elem>>
locale wbuffer_convert< _Codecvt, _Elem, _Traits >::_Loc
private
template<class _Codecvt , class _Elem = wchar_t, class _Traits = char_traits<_Elem>>
_Elem wbuffer_convert< _Codecvt, _Elem, _Traits >::_Myback[8]
private
template<class _Codecvt , class _Elem = wchar_t, class _Traits = char_traits<_Elem>>
_Mysb* wbuffer_convert< _Codecvt, _Elem, _Traits >::_Mystrbuf
private
template<class _Codecvt , class _Elem = wchar_t, class _Traits = char_traits<_Elem>>
size_t wbuffer_convert< _Codecvt, _Elem, _Traits >::_Nback
private
template<class _Codecvt , class _Elem = wchar_t, class _Traits = char_traits<_Elem>>
const _Codecvt* wbuffer_convert< _Codecvt, _Elem, _Traits >::_Pcvt
private
template<class _Codecvt , class _Elem = wchar_t, class _Traits = char_traits<_Elem>>
state_type wbuffer_convert< _Codecvt, _Elem, _Traits >::_State
private
template<class _Codecvt , class _Elem = wchar_t, class _Traits = char_traits<_Elem>>
_Mode wbuffer_convert< _Codecvt, _Elem, _Traits >::_Status
private
template<class _Codecvt , class _Elem = wchar_t, class _Traits = char_traits<_Elem>>
string wbuffer_convert< _Codecvt, _Elem, _Traits >::_Str
private

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