📄 collate.htm
字号:
<html>
<head>
<title>collate</title>
<head>
<body bgcolor="#FFFFFF">
<a name="here"></a>
<img src="collban.gif">
<pre>
<font size=5>Class Name</font> collate
<font size=5>Header File</font> <locale>
<font size=5>Classification</font> abstract data type
</pre>
<a href="collate.htm#crd">Class Relationship Diagram</a><br>
<br>
<a href="collate.htm#class-descrip">Class Description</a>
<h1>Member Classes</h1>
<a href="collate.htm#id">locale::id</a>
<h1>Methods</h1>
<pre>
<a href="collate.htm#collate">
explicit collate(size_t refs = 0);</a>
<a href="collate.htm#~collate">
~collate();</a>
<a href="collate.htm#compare">
int compare(const charT* low1, const charT* high1, const charT* low2,
const charT* high2) const;</a>
<a href="collate.htm#do-compare">
virtual int do_compare(const charT* low1, const charT* high1,
const charT* low2, const charT* high2) const;</a>
<a href="collate.htm#do-hash">
virtual long do_hash (const charT* low, const charT* high) const;</a>
<a href="collate.htm#do-transform">
virtual string_type do_transform(const charT* low, const charT* high) const;</a>
<a href="collate.htm#hash">
long hash(const charT* low, const charT* high) const;</a>
<a href="collate.htm#transform">
string_type transform(const charT* low, const charT* high) const;</a>
</pre>
<hr>
<a name="class-descrip"><h3>Class Description</h3></a>
<p>
The collate template class describes a class used to provide string collation, comparisons,
and hashing facilities.
</p>
<hr>
<a name="id"><h3>locale::id</h3></a>
<p>
<em>locale::id</em> is a class used to provide an identification of a locale facet interfaces used as
an index for lookup and to encapsulate initialization.
</p>
<hr>
<pre>
<a name="collate">
Method collate()</a>
Access Public
Classification Constructor
Syntax explicit collate(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 collate facet object.
</p>
<hr>
<pre>
<a name="~collate">
Method collate()</a>
Access Protected
Classification Destructor
Syntax ~collate();
Parameters None
Returns None
</pre>
<h3>Description</h3>
<p>
This destructor destroys a collate facet object.
</p>
<hr>
<pre>
<a name="compare">
Method compare()</a>
Access Public
Classification Accessor
Syntax int compare(const charT* low1, const charT* high1,
const charT* low2, const charT* high2) const;
Parameters <em>low1</em> is the beginning of the character sequence of
the first string.
<em>high1</em> is the end of the character sequence of
the first string.
<em>low2</em> is the beginning of the character sequence of
the second string.
<em>high2</em> is the end of the character sequence of the
second string.
Return This method returns 1 if the first string is
greater than the second string.
</pre>
<h3>Description</h3>
<p>
The compare() member function returns do_compare(low1, high1, low2, high2).
</p>
<hr>
<pre>
<a name="do-compare">
Method do_compare()</a>
Access Protected
Classification Accessor
Syntax virtual int do_compare(const charT* low1,
const charT* high1,
const charT* low2,
const charT* high2) const;
Parameters <em>low1</em> is the beginning of the first string's
character sequence.
<em>high1</em> is the end of the first string's
character sequence.
<em>low2</em> is the beginning of the second string's
character sequence.
<em>high2</em> is the end of the second string's
character sequence.
Return Type int
</pre>
<h3>Description</h3>
<p>
The compare() method compares the sequence at
[low1, high1) with the sequence at [low2, high2). It performs a
lexicographical comparison. It returns -1 if the first sequence compares
less than the second sequence. It returns 1 if the second sequence compares
less. The function returns zero otherwise.
<p/>
<hr>
<pre>
<a name="do-hash">
Method do_hash()</a>
Access Protected
Classification Accessor
Syntax virtual long do_hash(const charT* low,
const charT* high) const;
Parameters <em>low</em> is the beginning of the string's character
sequence.
<em>high</em> is the end of the string's character sequence.
Return Type long
</pre>
<h3>Description</h3>
<p>
The do_hash() method returns an integer derived from the values of the elements in the string's character sequence [low, high].
</p>
<hr>
<pre>
<a name="do-transform">
Method do_transform()</a>
Access Protected
Classification Accessor
Syntax virtual string_type do_transform(const charT* low,
const charT* high) const;
Parameters <em>low</em> is the beginning of the string's character
sequence.
<em>high</em> is the end of the string's character sequence.
Return Type string_type
</pre>
<h3>Description</h3>
<p>
The do_transfom() method returns a basic_string<charT> object that when compared lexicographically
with the result of calling the transform() member function on another string will
produce the same result as calling do_compare() on the same two strings.
</p>
<hr>
<pre>
<a name="hash">
Method hash()</a>
Access Protected
Classification Accessor
Syntax long hash(const charT* low, const charT* high) const;
Parameters <em>low</em> is the beginning of the string's character
sequence.
<em>high</em> is the end of the string's character
sequence.
Return Type long
</pre>
<h3>Description</h3>
<p>
The hash() member function returns do_hash(low, high).
</p>
<hr>
<pre>
<a name="transform">
Method transform()</a>
Access Public
Classification Accessor
Syntax string_type transform(const charT* low,
const charT* high) const;
Parameters <em>low</em> is the beginning of the string's character
sequence.
<em>high</em> is the end of the string's character
sequence.
Return Type string_type
</pre>
<h3>Description</h3>
<p>
The transform() member function returns do_transform(low, high).
</p>
<hr>
<a name="crd"><h2>The Class Relationship Diagram for collate</h2></a>
<img src="collate.gif">
<hr>
</body>
</html>
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -