📄 codename.htm
字号:
<html>
<head>
<title>codecvt</title>
<head>
<body bgcolor="#FFFFFF">
<a name="here"></a>
<img src="codeban.gif">
<pre>
<font size=5>Class Name</font> codecvt_byname
<font size=5>Header File</font> <locale>
<font size=5>Classification</font> abstract data type
</pre>
<a href="codename.htm#crd">Class Relationship Diagram</a><br>
<br>
<a href="codename.htm#class-descrip">Class Description</a>
<h1>Member Classes</h1>
<p>
None
</p>
<h1>Methods</h1>
<pre>
<a href="codename.htm#codecvt-byname">
explicit codecvt_byname(const char* name, size_t refs = 0);</a>
<a href="codename.htm#~codecvt-byname">
~codecvt_byname();</a>
<a href="codename.htm#do-always-noconv">
virtual bool do_always_noconv() const throw();</a>
<a href="codename.htm#do-encoding">
virtual int do_encoding() const throw();</a>
<a href="codename.htm#do-in">
virtual result do_in(stateT& state, const externT* from,
const externT* from_end, const externT*& from_next, internT* to,
internT* to_limit, internT*& to_next) const;</a>
<a href="codename.htm#do-length">
virtual int do_length(const stateT&, const externT* from,
const externT* end, size_t max) const;</a>
<a href="codename.htm#do-max-length">
virtual int do_max_length() const throw();</a>
<a href="codename.htm#do-out">
virtual result do_out(stateT& state, const internT* from,
const internT* from_end, const internT*& from_next, externT* to,
externT* to_limit, externT*& to_next) const;</a>
</pre>
<hr>
<a name="class-descrip"><h3>Class Description</h3></a>
<p>
The codecvt_byname template class describes a class that controls conversions
between one codeset to another for a named locale.
</p>
<hr>
<pre>
<a name="codecvt-byname">
Method codecvt_byname()</a>
Access Public
Classification Constructor
Syntax explicit codecvt_byname(size_t refs = 0);
Parameters <em>refs</em>, if the refs argument = 0 then the destruction
of the object is delegated to the locale or locales
which contain it. If refs = 1 then the object must
be explicitly deleted. The locale will not delete
it. The object can then be maintained across the
lifetime of multiple locales.
Return None
</pre>
<h3>Description</h3>
<p>
The constructor constructs a codecvt_byname facet object.
</p>
<hr>
<pre>
<a name="~codecvt-byname">
Method codecvt_byname()</a>
Access Protected
Classification Destructor
Syntax ~codecvt_byname();
Parameters None
Return None
</pre>
<h3>Description</h3>
<p>
The destructor destroys a codecvt_byname facet object.
</p>
<hr>
<pre>
<a name="do-always-noconv">
Method do_always_noconv()</a>
Access Protected
Classification Accessor
Syntax virtual bool do_always_noconv() const throw();
Parameters None
Return Type bool
</pre>
<h3>Description</h3>
<p>
The do_always_noconv() method will return true
only if for all valid arguments value do_convert() returns noconv.
</p>
<hr>
<pre>
<a name="do-encoding">
Method do_encoding()</a>
Access Protected
Classification Accessor
Syntax virtual int do_encoding() const throw();
Parameters None
Return This method returns the constant number of externT
characters needed to produce an internal character.
</pre>
<h3>Description</h3>
<p>
The do_encoding() method returns -1 if the
encoding of the externT sequence is state dependent, returns the constant
number of externT characters that are needed in the encoding to produce an
internal character or returns 0 if that number is not a constant.
</p>
<hr>
<pre>
<a name="do-in">
Method do_in()</a>
Access Protected
Classification Modifier
Syntax virtual result do_in(stateT& state,
const externT* from,
const externT* from_end,
const externT*& from_next,
internT* to, internT* to_limit,
internT*& to_next) const;
Parameters <em>state</em> is unspecified.
<em>from</em> is the beginning of the source character
sequence.
<em>from_end</em> is the end of the source character sequence.
<em>from_next</em> points to character in the source sequence.
<em>to</em> is the beginning of the destination sequence.
<em>to_limit</em> is the end of the destination sequence.
<em>to_next</em> points to character in the destination
sequence.
Return Type <a href="codecvt.htm#Table1">result</a>
</pre>
<h3>Description</h3>
<p>
The do_in() method translates the sequence at [from,from_end)
to a destination sequence stored at [to, to_limit). It translates no more than
(from_end - from) source character elements and stores no more than (to_limit - to)
destination character elements. The method will stop when it encounters
a character in the source sequence that it cannot convert. The <em>from_next</em> and <em>to_next</em>
pointers will point one beyond the last element that was successfully translated.
If no translation takes place then the method will return <em>noconv</em>. The
pointer <em>to_next</em> will be equal to the argument <em>to</em> and the pointer <em>from_next</em> will
be equal to the argument <em>from</em>. If only some of the characters are translated then
the method will return <em>partial</em>. If <em>from_next</em> == <em>from_end</em> then either
the destination character sequence has not taken in all of the available
destination character elements or that additional source character elements
are required before any another destination character elements can be produced.
</p>
<hr>
<pre>
<a name="do-length">
Method do_length()</a>
Access Protected
Classification Accessor
Syntax virtual int do_length(stateT& state,
const externT* from,
const externT* end,
size_t max) const throw();
Parameters <em>state</em> is initialized either for the beginning of a
sequence or equal to the result of the previous
conversion of the sequence.
<em>from</em> is the beginning of the character sequence.
<em>end</em> is the end of the character sequence.
<em>max</em> is maximum value of internT characters available
in the specified range.
Return Type int
</pre>
<h3>Description</h3>
<p>
The do_length() method returns the largest number of characters less than max internT
characters that are available in the range [from, end].
</p>
<pre>
<a name="do-max-length">
Method do_max_length()</a>
Access Protected
Classification Accessor
Syntax virtual int do_max_length() const throw();
Parameters None
Return This method returns an int that contains the maximum
value that do_length() returns.
</pre>
<h3>Description</h3>
<p>
The do_max_length() method returns the maximum value
that can be returned by do_length(state, from, from_end, 1) for any valid range
[from,from_end) and state value.
</p>
<hr>
<pre>
<a name="do-out">
Method do_out()</a>
Access Protected
Classification Modifier
Syntax virtual result do_out(stateT& state,
const internT* from,
const internT* from_end,
const internT*& from_next,
externT* to, externT* to_limit,
externT*& to_next) const;
Parameters <em>state</em> is unspecified.
<em>from</em> is the beginning of the source character
sequence.
<em>from_end</em> is the end of the source character
sequence.
<em>from_next</em> points to character in the source
sequence.
<em>to</em> is the beginning of the destination sequence.
<em>to_limit</em> is the end of the destination sequence.
<em>to_next</em> points to character in the destination
sequence.
Return Type <a href="codecvt.htm#Table1">result</a>
</pre>
<h3>Description</h3>
<p>
The do_out() method translates the sequence at [from,from_end)
to a destination sequence stored at [to, to_limit). It translates no more than
(from_end - from) source character elements and stores no more than (to_limit - to)
destination character elements. The method will stop when it encounters
a character in the source sequence that it cannot convert. The <em>from_next</em> and <em>to_next</em>
pointers will point one beyond the last element that was successfully translated.
If no translation takes place then the member function will return <em>noconv</em>. The
pointer to_next will be equal to the argument <em>to</em> and the pointer <em>from_next</em> will
be equal to the argument <em>from</em>. If only some of the characters are translated then
the method will return <em>partial</em>. If <em>from_next</em> == <em>from_end</em> then either
the destination character sequence has not taken in all of the available
destination character elements or that additional source character elements
are required before any another destination character elements can be produced.
</p>
<hr>
<a name="crd"><h2>The Class Relationship Diagram for codecvt_byname</h2></a>
<img src="codename.gif">
<hr>
</body>
</html>
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -