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 
24 {_STRING_INC = 8};
Definition: xlocbuf:24
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:23
Definition: xlocbuf:23
Definition: xlocbuf:23
Definition: xlocbuf:23
Definition: xlocbuf:23

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
36  : _State(), _Pcvt(new _Codecvt),
37  _Mystrbuf(_Strbuf), _Status(_Unused), _Nback(0)
38  { // construct with byte stream buffer pointer
39  _Loc = locale(_Loc, _Pcvt);
40  }
locale _Loc
Definition: xlocbuf:298
size_t _Nback
Definition: xlocbuf:295
_Mysb * _Mystrbuf
Definition: xlocbuf:293
Definition: xlocale:98
const _Codecvt * _Pcvt
Definition: xlocbuf:292
_Mode _Status
Definition: xlocbuf:294
state_type _State
Definition: xlocbuf:291
Definition: xlocbuf:23
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
43  : _State(), _Pcvt(_Pcvt_arg),
44  _Mystrbuf(_Strbuf), _Status(_Unused), _Nback(0)
45  { // construct with byte stream buffer pointer and codecvt
46  _Loc = locale(_Loc, _Pcvt);
47  }
locale _Loc
Definition: xlocbuf:298
size_t _Nback
Definition: xlocbuf:295
_Mysb * _Mystrbuf
Definition: xlocbuf:293
Definition: xlocale:98
const _Codecvt * _Pcvt
Definition: xlocbuf:292
_Mode _Status
Definition: xlocbuf:294
state_type _State
Definition: xlocbuf:291
Definition: xlocbuf:23
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
51  : _State(_State_arg), _Pcvt(_Pcvt_arg),
52  _Mystrbuf(_Strbuf), _Status(_Unused), _Nback(0)
53  { // construct with byte stream buffer pointer, codecvt, and state
54  _Loc = locale(_Loc, _Pcvt);
55  }
locale _Loc
Definition: xlocbuf:298
size_t _Nback
Definition: xlocbuf:295
_Mysb * _Mystrbuf
Definition: xlocbuf:293
Definition: xlocale:98
const _Codecvt * _Pcvt
Definition: xlocbuf:292
_Mode _Status
Definition: xlocbuf:294
state_type _State
Definition: xlocbuf:291
Definition: xlocbuf:23
template<class _Codecvt , class _Elem = wchar_t, class _Traits = char_traits<_Elem>>
virtual wbuffer_convert< _Codecvt, _Elem, _Traits >::~wbuffer_convert ( )
inlinevirtual
58  { // destroy the object
59  char *_Buf = (char *)_Str.c_str();
60 
61  for (; _Status == _Wrote ; )
62  { // put any trailing homing shift
63  char *_Dest;
64 
65  if (_Str.size() < _STRING_INC)
66  _Str.assign(_STRING_INC, '\0');
67  switch (_Pcvt->unshift(_State,
68  _Buf, _Buf + _Str.size(), _Dest))
69  { // test result of homing conversion
70  case _Codecvt::ok:
71  _Status = _Unused; // homed successfully
72 
73  case _Codecvt::partial: // fall through
74  { // put any generated bytes
75  int _Count = (int)(_Dest - _Buf);
76  if (0 < _Count
80  _Count)))
81  return; // write failed
82 
83  if (_Status == _Wrote && _Count == 0)
84  _Str.append(_STRING_INC, '\0'); // try with more space
85  break;
86  }
87 
88  case _Codecvt::noconv:
89  return; // nothing to do
90 
91  default:
92  return; // conversion failed
93  }
94  }
95  }
unsigned int _Count
Definition: xcomplex:668
Definition: regex:1539
Definition: xlocbuf:24
static constexpr bool __CLRCALL_OR_CDECL eq_int_type(const int_type &_Left, const int_type &_Right) _NOEXCEPT
Definition: iosfwd:592
_Mysb * _Mystrbuf
Definition: xlocbuf:293
unsigned int
Definition: vccorlib.h:2468
const _Elem * c_str() const _NOEXCEPT
Definition: xstring:1741
const _Codecvt * _Pcvt
Definition: xlocbuf:292
_Mode _Status
Definition: xlocbuf:294
int int_type
Definition: iosfwd:509
Definition: xlocbuf:23
state_type _State
Definition: xlocbuf:291
_Myt & assign(_Myt &&_Right) _NOEXCEPT
Definition: xstring:945
size_type size() const _NOEXCEPT
Definition: xstring:1763
Definition: xlocbuf:23
string _Str
Definition: xlocbuf:297
_Myt & append(_XSTD initializer_list< _Elem > _Ilist)
Definition: xstring:998
static constexpr int_type __CLRCALL_OR_CDECL eof() _NOEXCEPT
Definition: iosfwd:604
streamsize __CLR_OR_THIS_CALL sputn(const _Elem *_Ptr, streamsize _Count)
Definition: streambuf:205
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
237  { // compose an element from byte stream buffer
238  if (_Mystrbuf != 0 && _Status != _Wrote)
239  { // got buffer, haven't written, try to compose an element
240  if (_Status == _Eof)
241  ;
242  else if (_Str.size() == 0)
243  _Status = _Need;
244  else
245  _Status = _Got;
246 
247  for (; _Status != _Eof; )
248  { // get using codecvt facet
249  char *_Buf = (char *)_Str.c_str();
250  _Elem _Ch, *_Dest;
251  const char *_Src;
252  int _Meta;
253 
254  if (_Status != _Need)
255  ;
257  _Meta = _Mystrbuf->sbumpc()))
258  _Status = _Eof;
259  else
261 
262  switch (_Pcvt->in(_State,
263  _Buf, _Buf + _Str.size(), _Src,
264  &_Ch, &_Ch + 1, _Dest))
265  { // test result of converting one element
266  case _Codecvt::partial:
267  case _Codecvt::ok:
268  _Str.erase((size_t)0, // discard any used input
269  (size_t)(_Src - _Buf));
270  if (_Dest != &_Ch)
271  return (_Traits::to_int_type(_Ch));
272  break;
273 
274  case _Codecvt::noconv:
275  if (_Str.size() < sizeof (_Elem))
276  break; // no conversion, but need more chars
277  _CSTD memcpy(&_Ch, _Buf,
278  sizeof (_Elem)); // copy raw bytes to element
279  _Str.erase((size_t)0, sizeof (_Elem));
280  return (_Traits::to_int_type(_Ch)); // return result
281 
282  default:
283  _Status = _Eof; // conversion failed
284  }
285  }
286  }
287 
288  return (_Traits::eof());
289  }
Definition: regex:1539
static constexpr bool __CLRCALL_OR_CDECL eq_int_type(const int_type &_Left, const int_type &_Right) _NOEXCEPT
Definition: iosfwd:592
_Mysb * _Mystrbuf
Definition: xlocbuf:293
Definition: xlocbuf:23
Definition: xlocbuf:23
const _Elem * c_str() const _NOEXCEPT
Definition: xstring:1741
_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:580
int_type __CLR_OR_THIS_CALL sbumpc()
Definition: streambuf:148
const _Codecvt * _Pcvt
Definition: xlocbuf:292
_Mode _Status
Definition: xlocbuf:294
Definition: xlocbuf:23
state_type _State
Definition: xlocbuf:291
_Myt & erase(size_type _Off=0)
Definition: xstring:1339
size_type size() const _NOEXCEPT
Definition: xstring:1763
#define _CSTD
Definition: yvals.h:570
string _Str
Definition: xlocbuf:297
_Myt & append(_XSTD initializer_list< _Elem > _Ilist)
Definition: xstring:998
static constexpr int_type __CLRCALL_OR_CDECL eof() _NOEXCEPT
Definition: iosfwd:604
Definition: xlocbuf:23
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 >.

119  { // put an element to stream
120  if (_Traits::eq_int_type(_Traits::eof(), _Meta))
121  return (_Traits::not_eof(_Meta)); // EOF, return success code
122  else if (_Mystrbuf == 0 || 0 < _Nback
123  || (_Status != _Unused && _Status != _Wrote))
124  return (_Traits::eof()); // no buffer or reading, fail
125  else
126  { // put using codecvt facet
127  char *_Buf = (char *)_Str.c_str();
128  const _Elem _Ch = _Traits::to_char_type(_Meta);
129  const _Elem *_Src;
130  char *_Dest;
131 
132  if (_Str.size() < _STRING_INC)
133  _Str.assign(_STRING_INC, '\0');
134  for (_Status = _Wrote; ; )
135  switch (_Pcvt->out(_State,
136  &_Ch, &_Ch + 1, _Src,
137  _Buf, _Buf + _Str.size(), _Dest))
138  { // test result of converting one element
139  case _Codecvt::partial:
140  case _Codecvt::ok:
141  { // converted something, try to put it out
142  int _Count = (int)(_Dest - _Buf);
143  if (0 < _Count
147  _Count)))
148  return (_Traits::eof()); // write failed
149 
150  if (_Src != &_Ch)
151  return (_Meta); // converted whole element
152 
153  if (0 < _Count)
154  ;
155  else if (_Str.size() < 4 * _STRING_INC)
156  _Str.append(_STRING_INC, '\0'); // try with more space
157  else
158  return (_Traits::eof()); // conversion failed
159  break;
160  }
161 
162  case _Codecvt::noconv:
163  if (_Traits::eq_int_type(
164  _Traits::eof(),
165  (typename _Traits::int_type)_Mystrbuf->sputn(
166  (char *)&_Ch,
167  (streamsize)sizeof (_Elem))))
168  return (_Traits::eof());
169  else
170  return (_Meta); // put native byte order
171 
172  default:
173  return (_Traits::eof()); // conversion failed
174  }
175  }
176  }
_Longlong streamsize
Definition: iosfwd:22
unsigned int _Count
Definition: xcomplex:668
Definition: regex:1539
Definition: xlocbuf:24
size_t _Nback
Definition: xlocbuf:295
static constexpr bool __CLRCALL_OR_CDECL eq_int_type(const int_type &_Left, const int_type &_Right) _NOEXCEPT
Definition: iosfwd:592
_Mysb * _Mystrbuf
Definition: xlocbuf:293
unsigned int
Definition: vccorlib.h:2468
const _Elem * c_str() const _NOEXCEPT
Definition: xstring:1741
_Check_return_ _In_ wchar_t _Ch
Definition: vcruntime_string.h:89
const _Codecvt * _Pcvt
Definition: xlocbuf:292
_Mode _Status
Definition: xlocbuf:294
int int_type
Definition: iosfwd:509
Definition: xlocbuf:23
state_type _State
Definition: xlocbuf:291
_Myt & assign(_Myt &&_Right) _NOEXCEPT
Definition: xstring:945
size_type size() const _NOEXCEPT
Definition: xstring:1763
Definition: xlocbuf:23
string _Str
Definition: xlocbuf:297
_Myt & append(_XSTD initializer_list< _Elem > _Ilist)
Definition: xstring:998
static constexpr int_type __CLRCALL_OR_CDECL eof() _NOEXCEPT
Definition: iosfwd:604
streamsize __CLR_OR_THIS_CALL sputn(const _Elem *_Ptr, streamsize _Count)
Definition: streambuf:205
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 >.

179  { // put an element back to stream
180  if (sizeof (_Myback) / sizeof (_Myback[0]) <= _Nback
181  || _Status == _Wrote)
182  return (_Traits::eof()); // nowhere to put back
183  else
184  { // enough room, put it back
185  if (!_Traits::eq_int_type(_Traits::eof(), _Meta))
186  _Myback[_Nback] = _Traits::to_char_type(_Meta);
187  ++_Nback;
188  if (_Status == _Unused)
189  _Status = _Got;
190  return (_Meta);
191  }
192  }
size_t _Nback
Definition: xlocbuf:295
Definition: xlocbuf:23
_Mode _Status
Definition: xlocbuf:294
_Elem _Myback[8]
Definition: xlocbuf:296
Definition: xlocbuf:23
Definition: xlocbuf:23
template<class _Codecvt , class _Elem = wchar_t, class _Traits = char_traits<_Elem>>
_Mysb* wbuffer_convert< _Codecvt, _Elem, _Traits >::rdbuf ( ) const
inline
98  { // return byte stream buffer pointer
99  return (_Mystrbuf);
100  }
_Mysb * _Mystrbuf
Definition: xlocbuf:293
template<class _Codecvt , class _Elem = wchar_t, class _Traits = char_traits<_Elem>>
_Mysb* wbuffer_convert< _Codecvt, _Elem, _Traits >::rdbuf ( _Mysb _Strbuf)
inline
103  { // set byte stream buffer pointer
104  _Mysb *_Oldstrbuf = _Mystrbuf;
105  _Mystrbuf = _Strbuf;
106  return (_Oldstrbuf);
107  }
_Mysb * _Mystrbuf
Definition: xlocbuf:293
streambuf _Mysb
Definition: xlocbuf:27
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
224  { // change position by _Off
225  return (pos_type(-1)); // always fail
226  }
_Traits::pos_type pos_type
Definition: xlocbuf:31
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
231  { // change position to _Pos
232  return (pos_type(-1)); // always fail
233  }
_Traits::pos_type pos_type
Definition: xlocbuf:31
template<class _Codecvt , class _Elem = wchar_t, class _Traits = char_traits<_Elem>>
state_type wbuffer_convert< _Codecvt, _Elem, _Traits >::state ( ) const
inline
110  { // get state
111  return (_State);
112  }
state_type _State
Definition: xlocbuf:291
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 >.

208  { // get an element from stream, point past it
209  int_type _Meta;
210 
211  if (0 < _Nback)
212  ;
213  else if (_Traits::eq_int_type(_Traits::eof(), _Meta = _Get_elem()))
214  return (_Meta); // _Get_elem failed, return EOF
215  else
216  _Myback[_Nback++] = _Traits::to_char_type(_Meta);
217  return (_Traits::to_int_type(_Myback[--_Nback]));
218  }
size_t _Nback
Definition: xlocbuf:295
int_type _Get_elem()
Definition: xlocbuf:236
_Elem _Myback[8]
Definition: xlocbuf:296
_Traits::int_type int_type
Definition: xlocbuf:30
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 >.

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

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: