STLdoc
STLdocumentation
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros
Public Types | Public Member Functions | Static Public Member Functions | Static Public Attributes | Protected Member Functions | List of all members
codecvt< _Elem, _Byte, _Statype > Class Template Reference
Inheritance diagram for codecvt< _Elem, _Byte, _Statype >:
codecvt_base locale::facet _Facet_base _Crt_new_delete codecvt_byname< _Elem, _Byte, _Statype >

Public Types

typedef _Elem intern_type
 
typedef _Byte extern_type
 
typedef _Statype state_type
 
- Public Types inherited from codecvt_base
enum  { ok, partial, error, noconv }
 
typedef int result
 

Public Member Functions

result __CLR_OR_THIS_CALL in (_Statype &_State, const _Byte *_First1, const _Byte *_Last1, const _Byte *&_Mid1, _Elem *_First2, _Elem *_Last2, _Elem *&_Mid2) const
 
result __CLR_OR_THIS_CALL out (_Statype &_State, const _Elem *_First1, const _Elem *_Last1, const _Elem *&_Mid1, _Byte *_First2, _Byte *_Last2, _Byte *&_Mid2) const
 
result __CLR_OR_THIS_CALL unshift (_Statype &_State, _Byte *_First2, _Byte *_Last2, _Byte *&_Mid2) const
 
int __CLR_OR_THIS_CALL length (_Statype &_State, const _Byte *_First1, const _Byte *_Last1, size_t _Count) const
 
__CLR_OR_THIS_CALL codecvt (size_t _Refs=0)
 
__CLR_OR_THIS_CALL codecvt (const _Locinfo &_Lobj, size_t _Refs=0)
 
- Public Member Functions inherited from codecvt_base
__CLR_OR_THIS_CALL codecvt_base (size_t _Refs=0)
 
bool __CLR_OR_THIS_CALL always_noconv () const _THROW0()
 
int __CLR_OR_THIS_CALL max_length () const _THROW0()
 
int __CLR_OR_THIS_CALL encoding () const _THROW0()
 
__CLR_OR_THIS_CALL ~codecvt_base () _NOEXCEPT
 
- Public Member Functions inherited from locale::facet
virtual void __CLR_OR_THIS_CALL _Incref ()
 
virtual _Facet_base *__CLR_OR_THIS_CALL _Decref ()
 
__CLR_OR_THIS_CALL facet (const facet &)=delete
 
facet &__CLR_OR_THIS_CALL operator= (const facet &)=delete
 
- Public Member Functions inherited from _Facet_base
virtual __CLR_OR_THIS_CALL ~_Facet_base () _NOEXCEPT
 

Static Public Member Functions

static size_t __CLRCALL_OR_CDECL _Getcat (const locale::facet **_Ppf=0, const locale *_Ploc=0)
 
- Static Public Member Functions inherited from locale::facet
static size_t __CLRCALL_OR_CDECL _Getcat (const facet **=0, const locale *=0)
 

Static Public Attributes

static __PURE_APPDOMAIN_GLOBAL locale::id id
 

Protected Member Functions

virtual __CLR_OR_THIS_CALL ~codecvt () _NOEXCEPT
 
void __CLR_OR_THIS_CALL _Init (const _Locinfo &)
 
virtual bool __CLR_OR_THIS_CALL do_always_noconv () const _THROW0()
 
virtual result __CLR_OR_THIS_CALL do_in (_Statype &, const _Byte *_First1, const _Byte *_Last1, const _Byte *&_Mid1, _Elem *_First2, _Elem *_Last2, _Elem *&_Mid2) const
 
virtual result __CLR_OR_THIS_CALL do_out (_Statype &, const _Elem *_First1, const _Elem *_Last1, const _Elem *&_Mid1, _Byte *_First2, _Byte *_Last2, _Byte *&_Mid2) const
 
virtual result __CLR_OR_THIS_CALL do_unshift (_Statype &, _Byte *_First2, _Byte *, _Byte *&_Mid2) const
 
virtual int __CLR_OR_THIS_CALL do_length (_Statype &, const _Byte *_First1, const _Byte *_Last1, size_t _Count) const
 
- Protected Member Functions inherited from codecvt_base
virtual int __CLR_OR_THIS_CALL do_max_length () const _THROW0()
 
virtual int __CLR_OR_THIS_CALL do_encoding () const _THROW0()
 
- Protected Member Functions inherited from locale::facet
__CLR_OR_THIS_CALL facet (size_t _Initrefs=0)
 
virtual __CLR_OR_THIS_CALL ~facet () _NOEXCEPT
 

Member Typedef Documentation

template<class _Elem, class _Byte, class _Statype>
typedef _Byte codecvt< _Elem, _Byte, _Statype >::extern_type
template<class _Elem, class _Byte, class _Statype>
typedef _Elem codecvt< _Elem, _Byte, _Statype >::intern_type
template<class _Elem, class _Byte, class _Statype>
typedef _Statype codecvt< _Elem, _Byte, _Statype >::state_type

Constructor & Destructor Documentation

template<class _Elem, class _Byte, class _Statype>
__CLR_OR_THIS_CALL codecvt< _Elem, _Byte, _Statype >::codecvt ( size_t  _Refs = 0)
inlineexplicit
911  : codecvt_base(_Refs)
912  { // construct from current locale
913  _Init(_Locinfo());
914  }
Definition: xlocinfo:54
void __CLR_OR_THIS_CALL _Init(const _Locinfo &)
Definition: xlocale:936
__CLR_OR_THIS_CALL codecvt_base(size_t _Refs=0)
Definition: xlocale:825
template<class _Elem, class _Byte, class _Statype>
__CLR_OR_THIS_CALL codecvt< _Elem, _Byte, _Statype >::codecvt ( const _Locinfo _Lobj,
size_t  _Refs = 0 
)
inline
917  : codecvt_base(_Refs)
918  { // construct from specified locale
919  _Init(_Lobj);
920  }
void __CLR_OR_THIS_CALL _Init(const _Locinfo &)
Definition: xlocale:936
__CLR_OR_THIS_CALL codecvt_base(size_t _Refs=0)
Definition: xlocale:825
template<class _Elem, class _Byte, class _Statype>
virtual __CLR_OR_THIS_CALL codecvt< _Elem, _Byte, _Statype >::~codecvt ( )
inlineprotectedvirtual
933  { // destroy the object
934  }

Member Function Documentation

template<class _Elem, class _Byte, class _Statype>
static size_t __CLRCALL_OR_CDECL codecvt< _Elem, _Byte, _Statype >::_Getcat ( const locale::facet **  _Ppf = 0,
const locale _Ploc = 0 
)
inlinestatic
924  { // return locale category mask and construct standard facet
925  if (_Ppf != 0 && *_Ppf == 0)
927  _Locinfo(_Ploc->c_str()));
928  return (_X_CTYPE);
929  }
Definition: xlocinfo:54
Definition: xlocale:872
const char * c_str() const
Definition: xlocale:452
#define _X_CTYPE
Definition: xlocinfo.h:39
template<class _Elem, class _Byte, class _Statype>
void __CLR_OR_THIS_CALL codecvt< _Elem, _Byte, _Statype >::_Init ( const _Locinfo )
inlineprotected
937  { // initialize from _Locinfo object
938  }
template<class _Elem, class _Byte, class _Statype>
virtual bool __CLR_OR_THIS_CALL codecvt< _Elem, _Byte, _Statype >::do_always_noconv ( ) const
inlineprotectedvirtual

Reimplemented from codecvt_base.

Reimplemented in codecvt_utf8_utf16< _Elem, _Mymax, _Mymode >, codecvt_utf16< _Elem, _Mymax, _Mymode >, and codecvt_utf8< _Elem, _Mymax, _Mymode >.

941  { // return true if conversions never change input (from codecvt)
943  }
Definition: xtr1common:86
template<class _Elem, class _Byte, class _Statype>
virtual result __CLR_OR_THIS_CALL codecvt< _Elem, _Byte, _Statype >::do_in ( _Statype ,
const _Byte *  _First1,
const _Byte *  _Last1,
const _Byte *&  _Mid1,
_Elem *  _First2,
_Elem *  _Last2,
_Elem *&  _Mid2 
) const
inlineprotectedvirtual

Reimplemented in codecvt_utf8_utf16< _Elem, _Mymax, _Mymode >, codecvt_utf16< _Elem, _Mymax, _Mymode >, and codecvt_utf8< _Elem, _Mymax, _Mymode >.

948  { // convert bytes [_First1, _Last1) to [_First2, _Last)
949  _Mid1 = _First1, _Mid2 = _First2;
951  return (noconv); // convert nothing
952  else
953  { // types differ, copy one for one
954  for (; _Mid1 != _Last1 && _Mid2 != _Last2; ++_Mid1, ++_Mid2)
955  *_Mid2 = (_Elem)*_Mid1;
956  return (ok);
957  }
958  }
Definition: xlocale:822
Definition: xlocale:822
Definition: xtr1common:86
template<class _Elem, class _Byte, class _Statype>
virtual int __CLR_OR_THIS_CALL codecvt< _Elem, _Byte, _Statype >::do_length ( _Statype ,
const _Byte *  _First1,
const _Byte *  _Last1,
size_t  _Count 
) const
inlineprotectedvirtual

Reimplemented in codecvt_utf8_utf16< _Elem, _Mymax, _Mymode >, codecvt_utf16< _Elem, _Mymax, _Mymode >, and codecvt_utf8< _Elem, _Mymax, _Mymode >.

984  { // return min(_Count, converted length of bytes [_First1, _Last1))
985  return ((int)(_Count < (size_t)(_Last1 - _First1)
986  ? _Count : _Last1 - _First1)); // assume 1-to-1 conversion
987  }
unsigned int _Count
Definition: xcomplex:668
template<class _Elem, class _Byte, class _Statype>
virtual result __CLR_OR_THIS_CALL codecvt< _Elem, _Byte, _Statype >::do_out ( _Statype ,
const _Elem *  _First1,
const _Elem *  _Last1,
const _Elem *&  _Mid1,
_Byte *  _First2,
_Byte *  _Last2,
_Byte *&  _Mid2 
) const
inlineprotectedvirtual

Reimplemented in codecvt_utf8_utf16< _Elem, _Mymax, _Mymode >, codecvt_utf16< _Elem, _Mymax, _Mymode >, and codecvt_utf8< _Elem, _Mymax, _Mymode >.

963  { // convert [_First1, _Last1) to bytes [_First2, _Last)
964  _Mid1 = _First1, _Mid2 = _First2;
966  return (noconv); // convert nothing
967  else
968  { // types differ, copy one for one
969  for (; _Mid1 != _Last1 && _Mid2 != _Last2; ++_Mid1, ++_Mid2)
970  *_Mid2 = (_Byte)*_Mid1;
971  return (ok);
972  }
973  }
Definition: xlocale:822
Definition: xlocale:822
Definition: xtr1common:86
template<class _Elem, class _Byte, class _Statype>
virtual result __CLR_OR_THIS_CALL codecvt< _Elem, _Byte, _Statype >::do_unshift ( _Statype ,
_Byte *  _First2,
_Byte *  ,
_Byte *&  _Mid2 
) const
inlineprotectedvirtual

Reimplemented in codecvt_utf8_utf16< _Elem, _Mymax, _Mymode >, codecvt_utf16< _Elem, _Mymax, _Mymode >, and codecvt_utf8< _Elem, _Mymax, _Mymode >.

977  { // generate bytes to return to default shift state
978  _Mid2 = _First2;
979  return (ok); // convert nothing
980  }
Definition: xlocale:822
template<class _Elem, class _Byte, class _Statype>
result __CLR_OR_THIS_CALL codecvt< _Elem, _Byte, _Statype >::in ( _Statype _State,
const _Byte *  _First1,
const _Byte *  _Last1,
const _Byte *&  _Mid1,
_Elem *  _First2,
_Elem *  _Last2,
_Elem *&  _Mid2 
) const
inline
883  { // convert bytes [_First1, _Last1) to [_First2, _Last)
884  return (do_in(_State,
885  _First1, _Last1, _Mid1, _First2, _Last2, _Mid2));
886  }
virtual result __CLR_OR_THIS_CALL do_in(_Statype &, const _Byte *_First1, const _Byte *_Last1, const _Byte *&_Mid1, _Elem *_First2, _Elem *_Last2, _Elem *&_Mid2) const
Definition: xlocale:945
template<class _Elem, class _Byte, class _Statype>
int __CLR_OR_THIS_CALL codecvt< _Elem, _Byte, _Statype >::length ( _Statype _State,
const _Byte *  _First1,
const _Byte *  _Last1,
size_t  _Count 
) const
inline
904  { // return min(_Count, converted length of bytes [_First1, _Last1))
905  return (do_length(_State, _First1, _Last1, _Count));
906  }
unsigned int _Count
Definition: xcomplex:668
virtual int __CLR_OR_THIS_CALL do_length(_Statype &, const _Byte *_First1, const _Byte *_Last1, size_t _Count) const
Definition: xlocale:982
template<class _Elem, class _Byte, class _Statype>
result __CLR_OR_THIS_CALL codecvt< _Elem, _Byte, _Statype >::out ( _Statype _State,
const _Elem *  _First1,
const _Elem *  _Last1,
const _Elem *&  _Mid1,
_Byte *  _First2,
_Byte *  _Last2,
_Byte *&  _Mid2 
) const
inline
891  { // convert [_First1, _Last1) to bytes [_First2, _Last2)
892  return (do_out(_State,
893  _First1, _Last1, _Mid1, _First2, _Last2, _Mid2));
894  }
virtual result __CLR_OR_THIS_CALL do_out(_Statype &, const _Elem *_First1, const _Elem *_Last1, const _Elem *&_Mid1, _Byte *_First2, _Byte *_Last2, _Byte *&_Mid2) const
Definition: xlocale:960
template<class _Elem, class _Byte, class _Statype>
result __CLR_OR_THIS_CALL codecvt< _Elem, _Byte, _Statype >::unshift ( _Statype _State,
_Byte *  _First2,
_Byte *  _Last2,
_Byte *&  _Mid2 
) const
inline
898  { // generate bytes to return to default shift state
899  return (do_unshift(_State, _First2, _Last2, _Mid2));
900  }
virtual result __CLR_OR_THIS_CALL do_unshift(_Statype &, _Byte *_First2, _Byte *, _Byte *&_Mid2) const
Definition: xlocale:975

Member Data Documentation

template<class _Elem, class _Byte, class _Statype>
__PURE_APPDOMAIN_GLOBAL locale::id codecvt< _Elem, _Byte, _Statype >::id
static

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