.TH "std::__codecvt_abstract_base< _InternT, _ExternT, _StateT >" 3cxx "libstdc++" \" -*- nroff -*- .ad l .nh .SH NAME std::__codecvt_abstract_base< _InternT, _ExternT, _StateT > \- Common base for codecvt functions\&. .SH SYNOPSIS .br .PP .PP \fC#include \fP .PP Inherits \fBstd::locale::facet\fP, and \fBstd::codecvt_base\fP\&. .PP Inherited by \fBstd::codecvt< _Elem, char, mbstate_t >\fP, and \fBstd::codecvt< _InternT, _ExternT, _StateT >\fP\&. .SS "Public Types" .in +1c .ti -1c .RI "\fBtypedef\fP \fB_ExternT\fP \fBextern_type\fP" .br .ti -1c .RI "\fBtypedef\fP \fB_InternT\fP \fBintern_type\fP" .br .ti -1c .RI "\fBtypedef\fP codecvt_base::result \fBresult\fP" .br .ti -1c .RI "\fBtypedef\fP _StateT \fBstate_type\fP" .br .in -1c .SS "Public Member Functions" .in +1c .ti -1c .RI "bool \fBalways_noconv\fP () \fBconst\fP \fBthrow\fP ()" .br .ti -1c .RI "int \fBencoding\fP () \fBconst\fP \fBthrow\fP ()" .br .ti -1c .RI "result \fBin\fP (state_type &\fB__state\fP, \fBconst\fP extern_type *\fB__from\fP, \fBconst\fP extern_type *\fB__from_end\fP, \fBconst\fP extern_type *&\fB__from_next\fP, intern_type *\fB__to\fP, intern_type *\fB__to_end\fP, intern_type *&\fB__to_next\fP) \fBconst\fP" .br .RI "Convert from external to internal character set\&. " .ti -1c .RI "int \fBlength\fP (state_type &\fB__state\fP, \fBconst\fP extern_type *\fB__from\fP, \fBconst\fP extern_type *__end, size_t __max) \fBconst\fP" .br .ti -1c .RI "int \fBmax_length\fP () \fBconst\fP \fBthrow\fP ()" .br .ti -1c .RI "result \fBout\fP (state_type &\fB__state\fP, \fBconst\fP intern_type *\fB__from\fP, \fBconst\fP intern_type *\fB__from_end\fP, \fBconst\fP intern_type *&\fB__from_next\fP, extern_type *\fB__to\fP, extern_type *\fB__to_end\fP, extern_type *&\fB__to_next\fP) \fBconst\fP" .br .RI "Convert from internal to external character set\&. " .ti -1c .RI "result \fBunshift\fP (state_type &\fB__state\fP, extern_type *\fB__to\fP, extern_type *\fB__to_end\fP, extern_type *&\fB__to_next\fP) \fBconst\fP" .br .RI "Reset conversion state\&. " .in -1c .SS "Protected Member Functions" .in +1c .ti -1c .RI "\fB__codecvt_abstract_base\fP (size_t \fB__refs\fP=0)" .br .ti -1c .RI "\fBvirtual\fP bool \fBdo_always_noconv\fP () \fBconst\fP \fBthrow\fP () =0" .br .ti -1c .RI "\fBvirtual\fP int \fBdo_encoding\fP () \fBconst\fP \fBthrow\fP () =0" .br .ti -1c .RI "\fBvirtual\fP result \fBdo_in\fP (state_type &\fB__state\fP, \fBconst\fP extern_type *\fB__from\fP, \fBconst\fP extern_type *\fB__from_end\fP, \fBconst\fP extern_type *&\fB__from_next\fP, intern_type *\fB__to\fP, intern_type *\fB__to_end\fP, intern_type *&\fB__to_next\fP) \fBconst\fP =0" .br .ti -1c .RI "\fBvirtual\fP int \fBdo_length\fP (state_type &, \fBconst\fP extern_type *\fB__from\fP, \fBconst\fP extern_type *__end, size_t __max) \fBconst\fP =0" .br .ti -1c .RI "\fBvirtual\fP int \fBdo_max_length\fP () \fBconst\fP \fBthrow\fP () =0" .br .ti -1c .RI "\fBvirtual\fP result \fBdo_out\fP (state_type &\fB__state\fP, \fBconst\fP intern_type *\fB__from\fP, \fBconst\fP intern_type *\fB__from_end\fP, \fBconst\fP intern_type *&\fB__from_next\fP, extern_type *\fB__to\fP, extern_type *\fB__to_end\fP, extern_type *&\fB__to_next\fP) \fBconst\fP =0" .br .RI "Convert from internal to external character set\&. " .ti -1c .RI "\fBvirtual\fP result \fBdo_unshift\fP (state_type &\fB__state\fP, extern_type *\fB__to\fP, extern_type *\fB__to_end\fP, extern_type *&\fB__to_next\fP) \fBconst\fP =0" .br .in -1c .SS "Static Protected Member Functions" .in +1c .ti -1c .RI "\fBstatic\fP __c_locale \fB_S_clone_c_locale\fP (__c_locale &\fB__cloc\fP) \fBthrow\fP ()" .br .ti -1c .RI "\fBstatic\fP \fBvoid\fP \fB_S_create_c_locale\fP (__c_locale &\fB__cloc\fP, \fBconst\fP char *\fB__s\fP, __c_locale \fB__old\fP=0)" .br .ti -1c .RI "\fBstatic\fP \fBvoid\fP \fB_S_destroy_c_locale\fP (__c_locale &\fB__cloc\fP)" .br .ti -1c .RI "\fBstatic\fP __c_locale \fB_S_get_c_locale\fP ()" .br .ti -1c .RI "\fBstatic\fP \fBconst\fP char * \fB_S_get_c_name\fP () \fBthrow\fP ()" .br .ti -1c .RI "\fBstatic\fP __c_locale \fB_S_lc_ctype_c_locale\fP (__c_locale \fB__cloc\fP, \fBconst\fP char *\fB__s\fP)" .br .in -1c .SH "Detailed Description" .PP .SS "template<\fBtypename\fP \fB_InternT\fP, \fBtypename\fP \fB_ExternT\fP, \fBtypename\fP _StateT> .br class std::__codecvt_abstract_base< _InternT, _ExternT, _StateT >"Common base for codecvt functions\&. This template class provides implementations of the public functions that forward to the protected virtual functions\&. .PP This template also provides abstract stubs for the protected virtual functions\&. .SH "Member Function Documentation" .PP .SS "template<\fBtypename\fP \fB_InternT\fP , \fBtypename\fP \fB_ExternT\fP , \fBtypename\fP _StateT > \fBvirtual\fP result \fBstd::__codecvt_abstract_base\fP< \fB_InternT\fP, \fB_ExternT\fP, _StateT >::do_out (state_type & __state, \fBconst\fP intern_type * __from, \fBconst\fP intern_type * __from_end, \fBconst\fP intern_type *& __from_next, extern_type * __to, extern_type * __to_end, extern_type *& __to_next) const\fC [protected]\fP, \fC [pure virtual]\fP" .PP 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\&. .PP \fBSee also\fP .RS 4 out for more information\&. .RE .PP .PP Implemented in \fBstd::codecvt< _InternT, _ExternT, _StateT >\fP, \fBstd::codecvt< char, char, mbstate_t >\fP, \fBstd::codecvt< wchar_t, char, mbstate_t >\fP, \fBstd::codecvt< char16_t, char, mbstate_t >\fP, \fBstd::codecvt< char32_t, char, mbstate_t >\fP, and \fBstd::codecvt< _InternT, _ExternT, encoding_state >\fP\&. .PP Referenced by \fBstd::__codecvt_abstract_base< _InternT, _ExternT, _StateT >::out()\fP\&. .SS "template<\fBtypename\fP \fB_InternT\fP , \fBtypename\fP \fB_ExternT\fP , \fBtypename\fP _StateT > result \fBstd::__codecvt_abstract_base\fP< \fB_InternT\fP, \fB_ExternT\fP, _StateT >::in (state_type & __state, \fBconst\fP extern_type * __from, \fBconst\fP extern_type * __from_end, \fBconst\fP extern_type *& __from_next, intern_type * __to, intern_type * __to_end, intern_type *& __to_next) const\fC [inline]\fP" .PP 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\&. .PP The source and destination character sets are determined by the facet's locale, internal and external types\&. .PP 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\&. .PP The \fIstate\fP 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 \fIstate\fP is used\&. .PP 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\&. .PP \fBParameters\fP .RS 4 \fI__state\fP Persistent conversion state data\&. .br \fI__from\fP Start of input\&. .br \fI__from_end\fP End of input\&. .br \fI__from_next\fP Returns start of unconverted data\&. .br \fI__to\fP Start of output buffer\&. .br \fI__to_end\fP End of output buffer\&. .br \fI__to_next\fP Returns start of unused output area\&. .RE .PP \fBReturns\fP .RS 4 codecvt_base::result\&. .RE .PP .SS "template<\fBtypename\fP \fB_InternT\fP , \fBtypename\fP \fB_ExternT\fP , \fBtypename\fP _StateT > result \fBstd::__codecvt_abstract_base\fP< \fB_InternT\fP, \fB_ExternT\fP, _StateT >::out (state_type & __state, \fBconst\fP intern_type * __from, \fBconst\fP intern_type * __from_end, \fBconst\fP intern_type *& __from_next, extern_type * __to, extern_type * __to_end, extern_type *& __to_next) const\fC [inline]\fP" .PP 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\&. .PP The source and destination character sets are determined by the facet's locale, internal and external types\&. .PP 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\&. .PP The \fIstate\fP 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 \fIstate\fP is used\&. .PP 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\&. .PP \fBParameters\fP .RS 4 \fI__state\fP Persistent conversion state data\&. .br \fI__from\fP Start of input\&. .br \fI__from_end\fP End of input\&. .br \fI__from_next\fP Returns start of unconverted data\&. .br \fI__to\fP Start of output buffer\&. .br \fI__to_end\fP End of output buffer\&. .br \fI__to_next\fP Returns start of unused output area\&. .RE .PP \fBReturns\fP .RS 4 codecvt_base::result\&. .RE .PP .PP References \fBstd::__codecvt_abstract_base< _InternT, _ExternT, _StateT >::do_out()\fP\&. .SS "template<\fBtypename\fP \fB_InternT\fP , \fBtypename\fP \fB_ExternT\fP , \fBtypename\fP _StateT > result \fBstd::__codecvt_abstract_base\fP< \fB_InternT\fP, \fB_ExternT\fP, _StateT >::unshift (state_type & __state, extern_type * __to, extern_type * __to_end, extern_type *& __to_next) const\fC [inline]\fP" .PP Reset conversion state\&. Writes characters to output that would restore \fIstate\fP 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()\&. .PP 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\&. .PP The source and destination character sets are determined by the facet's locale, internal and external types\&. .PP 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\&. .PP \fBParameters\fP .RS 4 \fI__state\fP Persistent conversion state data\&. .br \fI__to\fP Start of output buffer\&. .br \fI__to_end\fP End of output buffer\&. .br \fI__to_next\fP Returns start of unused output area\&. .RE .PP \fBReturns\fP .RS 4 codecvt_base::result\&. .RE .PP .SH "Author" .PP Generated automatically by Doxygen for libstdc++ from the source code\&.