📄 classpsortedstringlist.html
字号:
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN"><html><head><meta http-equiv="Content-Type" content="text/html;charset=iso-8859-1"><title>PSortedStringList class Reference</title><link href="doxygen.css" rel="stylesheet" type="text/css"></head><body><!-- Generated by Doxygen 1.2.18 --><center><a class="qindex" href="index.html">Main Page</a> <a class="qindex" href="namespaces.html">Namespace List</a> <a class="qindex" href="hierarchy.html">Class Hierarchy</a> <a class="qindex" href="annotated.html">Compound List</a> <a class="qindex" href="files.html">File List</a> <a class="qindex" href="functions.html">Compound Members</a> <a class="qindex" href="globals.html">File Members</a> </center><hr><h1>PSortedStringList Class Reference</h1><code>#include <<a class="el" href="pstring_8h-source.html">pstring.h</a>></code><p><a href="classPSortedStringList-members.html">List of all members.</a><table border=0 cellpadding=0 cellspacing=0><tr><td></td></tr><tr><td colspan=2><br><h2>Public Methods</h2></td></tr><tr><td colspan="2"><div class="groupHeader">Construction</div></td></tr><tr><td nowrap align=right valign=top> </td><td valign=bottom><a class="el" href="classPSortedStringList.html#z261_0">PSortedStringList</a> (PINDEX count, char const *const *strarr, BOOL caseless=FALSE)</td></tr><tr><td nowrap align=right valign=top> </td><td valign=bottom><a class="el" href="classPSortedStringList.html#z261_1">PSortedStringList</a> (const <a class="el" href="classPString.html">PString</a> &str)</td></tr><tr><td nowrap align=right valign=top> </td><td valign=bottom><a class="el" href="classPSortedStringList.html#z261_2">PSortedStringList</a> (const <a class="el" href="classPStringArray.html">PStringArray</a> &array)</td></tr><tr><td nowrap align=right valign=top> </td><td valign=bottom><a class="el" href="classPSortedStringList.html#z261_3">PSortedStringList</a> (const <a class="el" href="classPStringList.html">PStringList</a> &list)</td></tr><tr><td colspan="2"><div class="groupHeader">Overrides from class PObject</div></td></tr><tr><td nowrap align=right valign=top>virtual void </td><td valign=bottom><a class="el" href="classPSortedStringList.html#z263_0">ReadFrom</a> (istream &strm)</td></tr><tr><td colspan="2"><div class="groupHeader">Operations</div></td></tr><tr><td nowrap align=right valign=top>PINDEX </td><td valign=bottom><a class="el" href="classPSortedStringList.html#z265_0">AppendString</a> (const <a class="el" href="classPString.html">PString</a> &str)</td></tr><tr><td nowrap align=right valign=top>PINDEX </td><td valign=bottom><a class="el" href="classPSortedStringList.html#z265_1">GetStringsIndex</a> (const <a class="el" href="classPString.html">PString</a> &str) const</td></tr><tr><td nowrap align=right valign=top>PINDEX </td><td valign=bottom><a class="el" href="classPSortedStringList.html#z265_2">GetNextStringsIndex</a> (const <a class="el" href="classPString.html">PString</a> &str) const</td></tr><tr><td colspan=2><br><h2>Protected Methods</h2></td></tr><tr><td nowrap align=right valign=top>PINDEX </td><td valign=bottom><a class="el" href="classPSortedStringList.html#b0">InternalStringSelect</a> (const char *str, PINDEX len, Element *thisElement) const</td></tr></table><hr><a name="_details"></a><h2>Detailed Description</h2>This is a sorted list collection class of PString# objects. It has all the usual functions for a collection, with the object types set to PString# pointers.<p>In addition some addition functions are added that take a const PString# reference instead of a pointer as most standard collection functions do. This is more convenient for when string expressions are used as parameters to function in the collection.<p>See the PAbstractSortedList# and PSortedList# classes and PDECLARE_SORTEDLIST# macro for more information. <p><hr><h2>Constructor & Destructor Documentation</h2><a name="z261_0" doxytag="PSortedStringList::PSortedStringList"></a><p><table width="100%" cellpadding="2" cellspacing="0" border="0"> <tr> <td class="md"> <table cellpadding="0" cellspacing="0" border="0"> <tr> <td class="md" nowrap valign="top"> PSortedStringList::PSortedStringList </td> <td class="md" valign="top">( </td> <td class="md" nowrap valign="top">PINDEX </td> <td class="mdname" nowrap> <em>count</em>, </td> </tr> <tr> <td></td> <td></td> <td class="md" nowrap>char const *const * </td> <td class="mdname" nowrap> <em>strarr</em>, </td> </tr> <tr> <td></td> <td></td> <td class="md" nowrap>BOOL </td> <td class="mdname" nowrap> <em>caseless</em> = FALSE</td> </tr> <tr> <td></td> <td class="md">) </td> <td class="md" colspan="2"></td> </tr> </table> </td> </tr></table><table cellspacing=5 cellpadding=0 border=0> <tr> <td> </td> <td><p>Create a <a class="el" href="classPStringArray.html">PStringArray</a> from the array of C strings. <dl compact><dt><b>Parameters: </b></dt><dd><table border=0 cellspacing=2 cellpadding=0><tr><td valign=top><em>strarr</em> </td><td>Count of strings in array </td></tr><tr><td valign=top><em>caseless</em> </td><td>Array of C strings New strings are to be PCaselessStrings </td></tr></table></dl> </td> </tr></table><a name="z261_1" doxytag="PSortedStringList::PSortedStringList"></a><p><table width="100%" cellpadding="2" cellspacing="0" border="0"> <tr> <td class="md"> <table cellpadding="0" cellspacing="0" border="0"> <tr> <td class="md" nowrap valign="top"> PSortedStringList::PSortedStringList </td> <td class="md" valign="top">( </td> <td class="md" nowrap valign="top">const <a class="el" href="classPString.html">PString</a> & </td> <td class="mdname1" valign="top" nowrap> <em>str</em> </td> <td class="md" valign="top">) </td> <td class="md" nowrap></td> </tr> </table> </td> </tr></table><table cellspacing=5 cellpadding=0 border=0> <tr> <td> </td> <td><p>Create a PSortedStringList of length one from the single string. <dl compact><dt><b>Parameters: </b></dt><dd><table border=0 cellspacing=2 cellpadding=0><tr><td valign=top><em>str</em> </td><td>Single string to convert to a list of one. </td></tr></table></dl> </td> </tr></table><a name="z261_2" doxytag="PSortedStringList::PSortedStringList"></a><p><table width="100%" cellpadding="2" cellspacing="0" border="0"> <tr> <td class="md"> <table cellpadding="0" cellspacing="0" border="0"> <tr> <td class="md" nowrap valign="top"> PSortedStringList::PSortedStringList </td> <td class="md" valign="top">( </td> <td class="md" nowrap valign="top">const <a class="el" href="classPStringArray.html">PStringArray</a> & </td> <td class="mdname1" valign="top" nowrap> <em>array</em> </td> <td class="md" valign="top">) </td> <td class="md" nowrap></td> </tr> </table> </td> </tr></table><table cellspacing=5 cellpadding=0 border=0> <tr> <td> </td> <td><p>Create a PSortedStringList from the array of strings. <dl compact><dt><b>Parameters: </b></dt><dd><table border=0 cellspacing=2 cellpadding=0><tr><td valign=top><em>array</em> </td><td>Array of strings to convert to list </td></tr></table></dl> </td> </tr></table><a name="z261_3" doxytag="PSortedStringList::PSortedStringList"></a><p><table width="100%" cellpadding="2" cellspacing="0" border="0"> <tr> <td class="md"> <table cellpadding="0" cellspacing="0" border="0"> <tr> <td class="md" nowrap valign="top"> PSortedStringList::PSortedStringList </td> <td class="md" valign="top">( </td> <td class="md" nowrap valign="top">const <a class="el" href="classPStringList.html">PStringList</a> & </td> <td class="mdname1" valign="top" nowrap> <em>list</em> </td> <td class="md" valign="top">) </td> <td class="md" nowrap></td> </tr> </table> </td> </tr></table><table cellspacing=5 cellpadding=0 border=0> <tr> <td> </td> <td><p>Create a PSortedStringList from the list of strings. <dl compact><dt><b>Parameters: </b></dt><dd><table border=0 cellspacing=2 cellpadding=0><tr><td valign=top><em>list</em> </td><td>List of strings to convert to list. </td></tr></table></dl> </td> </tr></table><hr><h2>Member Function Documentation</h2><a name="z265_0" doxytag="PSortedStringList::AppendString"></a><p><table width="100%" cellpadding="2" cellspacing="0" border="0"> <tr> <td class="md"> <table cellpadding="0" cellspacing="0" border="0"> <tr> <td class="md" nowrap valign="top"> PINLINE PINDEX PSortedStringList::AppendString </td> <td class="md" valign="top">( </td> <td class="md" nowrap valign="top">const <a class="el" href="classPString.html">PString</a> & </td> <td class="mdname1" valign="top" nowrap> <em>str</em> </td> <td class="md" valign="top">) </td> <td class="md" nowrap></td> </tr> </table> </td> </tr></table><table cellspacing=5 cellpadding=0 border=0> <tr> <td> </td> <td><p>Add a string to the list. This will place the string in the correct position in the sorted list. <dl compact><dt><b>Parameters: </b></dt><dd><table border=0 cellspacing=2 cellpadding=0><tr><td valign=top><em>str</em> </td><td>String to append. </td></tr></table></dl> </td> </tr></table><a name="z265_2" doxytag="PSortedStringList::GetNextStringsIndex"></a><p><table width="100%" cellpadding="2" cellspacing="0" border="0"> <tr> <td class="md"> <table cellpadding="0" cellspacing="0" border="0"> <tr> <td class="md" nowrap valign="top"> PINDEX PSortedStringList::GetNextStringsIndex </td> <td class="md" valign="top">( </td> <td class="md" nowrap valign="top">const <a class="el" href="classPString.html">PString</a> & </td> <td class="mdname1" valign="top" nowrap> <em>str</em> </td> <td class="md" valign="top">) </td> <td class="md" nowrap> const</td> </tr> </table> </td> </tr></table><table cellspacing=5 cellpadding=0 border=0> <tr> <td> </td> <td><p>Get the index of the next string after specified value. A binary search of tree is performed to find the string greater than or equal to the specified string value. <dl compact><dt><b>Parameters: </b></dt><dd><table border=0 cellspacing=2 cellpadding=0><tr><td valign=top><em>str</em> </td><td>String value to search for. </td></tr></table></dl> </td> </tr></table><a name="z265_1" doxytag="PSortedStringList::GetStringsIndex"></a><p><table width="100%" cellpadding="2" cellspacing="0" border="0"> <tr> <td class="md"> <table cellpadding="0" cellspacing="0" border="0"> <tr> <td class="md" nowrap valign="top"> PINLINE PINDEX PSortedStringList::GetStringsIndex </td> <td class="md" valign="top">( </td> <td class="md" nowrap valign="top">const <a class="el" href="classPString.html">PString</a> & </td> <td class="mdname1" valign="top" nowrap> <em>str</em> </td> <td class="md" valign="top">) </td> <td class="md" nowrap> const</td> </tr> </table> </td> </tr></table><table cellspacing=5 cellpadding=0 border=0> <tr> <td> </td> <td><p>Get the index of the string with the specified value. A binary search of tree is performed to find the string value. <dl compact><dt><b>Parameters: </b></dt><dd><table border=0 cellspacing=2 cellpadding=0><tr><td valign=top><em>str</em> </td><td>String value to search for. </td></tr></table></dl> </td> </tr></table><a name="b0" doxytag="PSortedStringList::InternalStringSelect"></a><p><table width="100%" cellpadding="2" cellspacing="0" border="0"> <tr> <td class="md"> <table cellpadding="0" cellspacing="0" border="0"> <tr> <td class="md" nowrap valign="top"> PINDEX PSortedStringList::InternalStringSelect </td> <td class="md" valign="top">( </td> <td class="md" nowrap valign="top">const char * </td> <td class="mdname" nowrap> <em>str</em>, </td> </tr> <tr> <td></td> <td></td> <td class="md" nowrap>PINDEX </td> <td class="mdname" nowrap> <em>len</em>, </td> </tr> <tr> <td></td> <td></td> <td class="md" nowrap>Element * </td> <td class="mdname" nowrap> <em>thisElement</em></td> </tr> <tr> <td></td> <td class="md">) </td> <td class="md" colspan="2"> const<code> [protected]</code></td> </tr> </table> </td> </tr></table><table cellspacing=5 cellpadding=0 border=0> <tr> <td> </td> <td><p> </td> </tr></table><a name="z263_0" doxytag="PSortedStringList::ReadFrom"></a><p><table width="100%" cellpadding="2" cellspacing="0" border="0"> <tr> <td class="md"> <table cellpadding="0" cellspacing="0" border="0"> <tr> <td class="md" nowrap valign="top"> virtual void PSortedStringList::ReadFrom </td> <td class="md" valign="top">( </td> <td class="md" nowrap valign="top">istream & </td> <td class="mdname1" valign="top" nowrap> <em>strm</em> </td> <td class="md" valign="top">) </td> <td class="md" nowrap><code> [virtual]</code></td> </tr> </table> </td> </tr></table><table cellspacing=5 cellpadding=0 border=0> <tr> <td> </td> <td><p>Input the contents of the object from the stream. This is primarily used by the standard operator>># function.<p>The default behaviour reads '<br>' separated strings until !strm.good(). </td> </tr></table><hr>The documentation for this class was generated from the following files:<ul><li><a class="el" href="pstring_8h-source.html">pstring.h</a><li><a class="el" href="contain_8inl.html">contain.inl</a></ul><hr><address style="align: right;"><small>Generated on Wed Sep 29 22:44:19 2004 for PWLib by<a href="http://www.doxygen.org/index.html"><img src="doxygen.png" alt="doxygen" align="middle" border=0 width=110 height=53></a>1.2.18 </small></address></body></html>
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -