logo
Free, unlimited AI code reviews that run on commit
git-lrc git-lrc GitHub Install Now We'd appreciate a star git-lrc - Free, unlimited AI code reviews that run on commit | Product Hunt git-lrc - Free, unlimited AI code reviews that run on commit | Product Hunt

std::codecvt< _InternT, _ExternT, _StateT > - Primary class template codecvt.

Author

       Generated automatically by Doxygen for libstdc++ from the source code.

                                                    libstdc++  std::codecvt<_InternT,_ExternT,_StateT>(3cxx)

Detailed Description

template<typename_InternT,typename_ExternT,typename_StateT>
       class std::codecvt< _InternT, _ExternT, _StateT >"Primary class template codecvt.

       NB: Generic, mostly useless implementation.

Member Function Documentation

template<typename_InternT,typename_ExternT,typename_StateT>virtualboolstd::codecvt<_InternT,_ExternT,_StateT>::do_always_noconv()const[protected],[virtual]
       Implements std::__codecvt_abstract_base<_InternT,_ExternT,_StateT>.

   template<typename_InternT,typename_ExternT,typename_StateT>virtualintstd::codecvt<_InternT,_ExternT,_StateT>::do_encoding()const[protected],[virtual]
       Implements std::__codecvt_abstract_base<_InternT,_ExternT,_StateT>.

   template<typename_InternT,typename_ExternT,typename_StateT>virtualresultstd::codecvt<_InternT,_ExternT,_StateT>::do_in(state_type&__state,constextern_type*__from,constextern_type*__from_end,constextern_type*&__from_next,intern_type*__to,intern_type*__to_end,intern_type*&__to_next)const[protected],[virtual]
       Implements std::__codecvt_abstract_base<_InternT,_ExternT,_StateT>.

   template<typename_InternT,typename_ExternT,typename_StateT>virtualintstd::codecvt<_InternT,_ExternT,_StateT>::do_length(state_type&,constextern_type*__from,constextern_type*__end,size_t__max)const[protected],[virtual]
       Implements std::__codecvt_abstract_base<_InternT,_ExternT,_StateT>.

   template<typename_InternT,typename_ExternT,typename_StateT>virtualintstd::codecvt<_InternT,_ExternT,_StateT>::do_max_length()const[protected],[virtual]
       Implements std::__codecvt_abstract_base<_InternT,_ExternT,_StateT>.

   template<typename_InternT,typename_ExternT,typename_StateT>virtualresultstd::codecvt<_InternT,_ExternT,_StateT>::do_out(state_type&__state,constintern_type*__from,constintern_type*__from_end,constintern_type*&__from_next,extern_type*__to,extern_type*__to_end,extern_type*&__to_next)const[protected],[virtual]
       Convert from internal to external character set. Converts input string of intern_type to output string of
       extern_type. This function is a hook for derived classes to change the value returned.

       Seealso
           out for more information.

       Implements std::__codecvt_abstract_base<_InternT,_ExternT,_StateT>.

   template<typename_InternT,typename_ExternT,typename_StateT>virtualresultstd::codecvt<_InternT,_ExternT,_StateT>::do_unshift(state_type&__state,extern_type*__to,extern_type*__to_end,extern_type*&__to_next)const[protected],[virtual]
       Implements std::__codecvt_abstract_base<_InternT,_ExternT,_StateT>.

   template<typename_InternT,typename_ExternT,typename_StateT>resultstd::__codecvt_abstract_base<_InternT,_ExternT,_StateT>::in(state_type&__state,constextern_type*__from,constextern_type*__from_end,constextern_type*&__from_next,intern_type*__to,intern_type*__to_end,intern_type*&__to_next)const[inline],[inherited]
       Convert from external to internal character set. Converts input string of extern_type to output string of
       intern_type. This is analogous to mbsrtowcs. It does this by calling codecvt::do_in.

       The source and destination character sets are determined by the facet's locale, internal and external
       types.

       The characters in [from,from_end) are converted and written to [to,to_end). from_next and to_next are set
       to point to the character following the last successfully converted character, respectively. If the
       result needed no conversion, from_next and to_next are not affected.

       The state argument should be initialized if the input is at the beginning and carried from a previous
       call if continuing conversion. There are no guarantees about how state is used.

       The result returned is a member of codecvt_base::result. If all the input is converted, returns
       codecvt_base::ok. If no conversion is necessary, returns codecvt_base::noconv. If the input ends early or
       there is insufficient space in the output, returns codecvt_base::partial. Otherwise the conversion failed
       and codecvt_base::error is returned.

       Parameters__state Persistent conversion state data.
           __from Start of input.
           __from_end End of input.
           __from_next Returns start of unconverted data.
           __to Start of output buffer.
           __to_end End of output buffer.
           __to_next Returns start of unused output area.

       Returns
           codecvt_base::result.

   template<typename_InternT,typename_ExternT,typename_StateT>resultstd::__codecvt_abstract_base<_InternT,_ExternT,_StateT>::out(state_type&__state,constintern_type*__from,constintern_type*__from_end,constintern_type*&__from_next,extern_type*__to,extern_type*__to_end,extern_type*&__to_next)const[inline],[inherited]
       Convert from internal to external character set. Converts input string of intern_type to output string of
       extern_type. This is analogous to wcsrtombs. It does this by calling codecvt::do_out.

       The source and destination character sets are determined by the facet's locale, internal and external
       types.

       The characters in [from,from_end) are converted and written to [to,to_end). from_next and to_next are set
       to point to the character following the last successfully converted character, respectively. If the
       result needed no conversion, from_next and to_next are not affected.

       The state argument should be initialized if the input is at the beginning and carried from a previous
       call if continuing conversion. There are no guarantees about how state is used.

       The result returned is a member of codecvt_base::result. If all the input is converted, returns
       codecvt_base::ok. If no conversion is necessary, returns codecvt_base::noconv. If the input ends early or
       there is insufficient space in the output, returns codecvt_base::partial. Otherwise the conversion failed
       and codecvt_base::error is returned.

       Parameters__state Persistent conversion state data.
           __from Start of input.
           __from_end End of input.
           __from_next Returns start of unconverted data.
           __to Start of output buffer.
           __to_end End of output buffer.
           __to_next Returns start of unused output area.

       Returns
           codecvt_base::result.

       References std::__codecvt_abstract_base<_InternT,_ExternT,_StateT>::do_out().

   template<typename_InternT,typename_ExternT,typename_StateT>resultstd::__codecvt_abstract_base<_InternT,_ExternT,_StateT>::unshift(state_type&__state,extern_type*__to,extern_type*__to_end,extern_type*&__to_next)const[inline],[inherited]
       Reset conversion state. Writes characters to output that would restore state to initial conditions. The
       idea is that if a partial conversion occurs, then the converting the characters written by this function
       would leave the state in initial conditions, rather than partial conversion state. It does this by
       calling codecvt::do_unshift().

       For example, if 4 external characters always converted to 1 internal character, and input to in() had 6
       external characters with state saved, this function would write two characters to the output and set the
       state to initialized conditions.

       The source and destination character sets are determined by the facet's locale, internal and external
       types.

       The result returned is a member of codecvt_base::result. If the state could be reset and data written,
       returns codecvt_base::ok. If no conversion is necessary, returns codecvt_base::noconv. If the output has
       insufficient space, returns codecvt_base::partial. Otherwise the reset failed and codecvt_base::error is
       returned.

       Parameters__state Persistent conversion state data.
           __to Start of output buffer.
           __to_end End of output buffer.
           __to_next Returns start of unused output area.

       Returns
           codecvt_base::result.

Name

       std::codecvt< _InternT, _ExternT, _StateT > - Primary class template codecvt.

Synopsis

       #include <locale>

       Inherits std::__codecvt_abstract_base<_InternT,_ExternT,_StateT>.

       Inherited by std::codecvt_byname<_InternT,_ExternT,_StateT>.

   PublicTypestypedef_ExternTextern_typetypedef_InternTintern_typetypedef codecvt_base::result resulttypedef _StateT state_typePublicMemberFunctionscodecvt (__c_locale __cloc, size_t __refs=0)
       codecvt (size_t __refs=0)
       bool always_noconv () const  throw ()
       int encoding () const  throw ()
       result in (state_type &__state, const extern_type *__from, const extern_type *__from_end, const
           extern_type *&__from_next, intern_type *__to, intern_type *__to_end, intern_type *&__to_next) const
           Convert from external to internal character set.
       int length (state_type &__state, const extern_type *__from, const extern_type *__end, size_t __max) const
       int max_length () const  throw ()
       result out (state_type &__state, const intern_type *__from, const intern_type *__from_end, const
           intern_type *&__from_next, extern_type *__to, extern_type *__to_end, extern_type *&__to_next) const
           Convert from internal to external character set.
       result unshift (state_type &__state, extern_type *__to, extern_type *__to_end, extern_type *&__to_next)
           const
           Reset conversion state.

   StaticPublicAttributesstaticlocale::ididProtectedMemberFunctionsvirtual bool do_always_noconv () const  throw ()
       virtual int do_encoding () const  throw ()
       virtual result do_in (state_type &__state, const extern_type *__from, const extern_type *__from_end,
           const extern_type *&__from_next, intern_type *__to, intern_type *__to_end, intern_type *&__to_next)
           const
       virtual int do_length (state_type &, const extern_type *__from, const extern_type *__end, size_t __max)
           const
       virtual int do_max_length () const  throw ()
       virtual result do_out (state_type &__state, const intern_type *__from, const intern_type *__from_end,
           const intern_type *&__from_next, extern_type *__to, extern_type *__to_end, extern_type *&__to_next)
           const
           Convert from internal to external character set.
       virtual result do_unshift (state_type &__state, extern_type *__to, extern_type *__to_end, extern_type
           *&__to_next) const

   StaticProtectedMemberFunctionsstatic __c_locale _S_clone_c_locale (__c_locale &__cloc)  throw ()
       staticvoid_S_create_c_locale (__c_locale &__cloc, const char *__s, __c_locale __old=0)
       staticvoid_S_destroy_c_locale (__c_locale &__cloc)
       static __c_locale _S_get_c_locale ()
       static const char * _S_get_c_name ()  throw ()
       static __c_locale _S_lc_ctype_c_locale (__c_locale __cloc, const char *__s)

   ProtectedAttributes
       __c_locale _M_c_locale_codecvt

See Also