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 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
906  { // construct from current locale
907  _Init(_Locinfo());
908  }
Definition: xlocinfo:54
_Atomic_counter_t _Refs
Definition: xlocale:157
void __CLR_OR_THIS_CALL _Init(const _Locinfo &)
Definition: xlocale:930
__CLR_OR_THIS_CALL codecvt_base(size_t _Refs=0)
Definition: xlocale:819
template<class _Elem, class _Byte, class _Statype>
__CLR_OR_THIS_CALL codecvt< _Elem, _Byte, _Statype >::codecvt ( const _Locinfo _Lobj,
size_t  _Refs = 0 
)
inline
912  { // construct from specified locale
913  _Init(_Lobj);
914  }
_Atomic_counter_t _Refs
Definition: xlocale:157
void __CLR_OR_THIS_CALL _Init(const _Locinfo &)
Definition: xlocale:930
__CLR_OR_THIS_CALL codecvt_base(size_t _Refs=0)
Definition: xlocale:819
template<class _Elem, class _Byte, class _Statype>
virtual __CLR_OR_THIS_CALL codecvt< _Elem, _Byte, _Statype >::~codecvt ( )
inlineprotectedvirtual
927  { // destroy the object
928  }

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
918  { // return locale category mask and construct standard facet
919  if (_Ppf != 0 && *_Ppf == 0)
921  _Locinfo(_Ploc->c_str()));
922  return (_X_CTYPE);
923  }
#define _NEW_CRT
Definition: xdebug:69
Definition: xlocinfo:54
Definition: xlocale:866
const char * c_str() const
Definition: xlocale:460
#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
931  { // initialize from _Locinfo object
932  }
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 >.

935  { // return true if conversions never change input (from codecvt)
937  }
Definition: xtr1common:94
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 >.

942  { // convert bytes [_First1, _Last1) to [_First2, _Last)
943  _Mid1 = _First1, _Mid2 = _First2;
945  return (noconv); // convert nothing
946  else
947  { // types differ, copy one for one
948  for (; _Mid1 != _Last1 && _Mid2 != _Last2; ++_Mid1, ++_Mid2)
949  *_Mid2 = (_Elem)*_Mid1;
950  return (ok);
951  }
952  }
Definition: xlocale:816
Definition: xlocale:816
Definition: xtr1common:94
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 >.

978  { // return min(_Count, converted length of bytes [_First1, _Last1))
979  return ((int)(_Count < (size_t)(_Last1 - _First1)
980  ? _Count : _Last1 - _First1)); // assume 1-to-1 conversion
981  }
_Diff _Count
Definition: algorithm:1941
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 >.

957  { // convert [_First1, _Last1) to bytes [_First2, _Last)
958  _Mid1 = _First1, _Mid2 = _First2;
960  return (noconv); // convert nothing
961  else
962  { // types differ, copy one for one
963  for (; _Mid1 != _Last1 && _Mid2 != _Last2; ++_Mid1, ++_Mid2)
964  *_Mid2 = (_Byte)*_Mid1;
965  return (ok);
966  }
967  }
Definition: xlocale:816
Definition: xlocale:816
Definition: xtr1common:94
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 >.

971  { // generate bytes to return to default shift state
972  _Mid2 = _First2;
973  return (ok); // convert nothing
974  }
Definition: xlocale:816
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
877  { // convert bytes [_First1, _Last1) to [_First2, _Last)
878  return (do_in(_State,
879  _First1, _Last1, _Mid1, _First2, _Last2, _Mid2));
880  }
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:939
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
898  { // return min(_Count, converted length of bytes [_First1, _Last1))
899  return (do_length(_State, _First1, _Last1, _Count));
900  }
virtual int __CLR_OR_THIS_CALL do_length(_Statype &, const _Byte *_First1, const _Byte *_Last1, size_t _Count) const
Definition: xlocale:976
_Diff _Count
Definition: algorithm:1941
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
885  { // convert [_First1, _Last1) to bytes [_First2, _Last2)
886  return (do_out(_State,
887  _First1, _Last1, _Mid1, _First2, _Last2, _Mid2));
888  }
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:954
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
892  { // generate bytes to return to default shift state
893  return (do_unshift(_State, _First2, _Last2, _Mid2));
894  }
virtual result __CLR_OR_THIS_CALL do_unshift(_Statype &, _Byte *_First2, _Byte *, _Byte *&_Mid2) const
Definition: xlocale:969

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: