<!-- This comment will put IE 6, 7 and 8 in quirks mode --> <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> <html xmlns="http://www.w3.org/1999/xhtml"> <head> <meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/> <title>ICU 4.4.1: StringList Class Reference</title> <link href="tabs.css" rel="stylesheet" type="text/css"/> <link href="search/search.css" rel="stylesheet" type="text/css"/> <script type="text/javaScript" src="search/search.js"></script> <link href="doxygen.css" rel="stylesheet" type="text/css"/> </head> <body onload='searchBox.OnSelectItem(0);'> <!-- Generated by Doxygen 1.6.2-20100208 --> <script type="text/javascript"><!-- var searchBox = new SearchBox("searchBox", "search",false,'Search'); --></script> <div class="navigation" id="top"> <div class="tabs"> <ul> <li><a href="index.html"><span>Main Page</span></a></li> <li><a href="pages.html"><span>Related Pages</span></a></li> <li><a href="modules.html"><span>Modules</span></a></li> <li class="current"><a href="annotated.html"><span>Data Structures</span></a></li> <li><a href="files.html"><span>Files</span></a></li> <li> <div id="MSearchBox" class="MSearchBoxInactive"> <img id="MSearchSelect" src="search/search.png" onmouseover="return searchBox.OnSearchSelectShow()" onmouseout="return searchBox.OnSearchSelectHide()" alt=""/> <input type="text" id="MSearchField" value="Search" accesskey="S" onfocus="searchBox.OnSearchFieldFocus(true)" onblur="searchBox.OnSearchFieldFocus(false)" onkeyup="searchBox.OnSearchFieldChange(event)"/> <a id="MSearchClose" href="javascript:searchBox.CloseResultsWindow()"><img id="MSearchCloseImg" border="0" src="search/close.png" alt=""/></a> </div> </li> </ul> </div> <div class="tabs"> <ul> <li><a href="annotated.html"><span>Data Structures</span></a></li> <li><a href="classes.html"><span>Data Structure Index</span></a></li> <li><a href="hierarchy.html"><span>Class Hierarchy</span></a></li> <li><a href="functions.html"><span>Data Fields</span></a></li> </ul> </div> </div> <div class="contents"> <h1>StringList Class Reference</h1><!-- doxytag: class="StringList" --><!-- doxytag: inherits="UObject" --> <p><a class="el" href="classStringList.html" title="StringList.">StringList</a>. <a href="#_details">More...</a></p> <p><code>#include <<a class="el" href="colldata_8h_source.html">colldata.h</a>></code></p> <div class="dynheader"> Inheritance diagram for StringList:</div> <div class="dynsection"> <div class="center"> <img src="classStringList.png" usemap="#StringList_map" alt=""/> <map id="StringList_map" name="StringList_map"> <area href="classUObject.html" alt="UObject" shape="rect" coords="0,56,66,80"/> <area href="classUMemory.html" alt="UMemory" shape="rect" coords="0,0,66,24"/> </map> </div> </div> <table border="0" cellpadding="0" cellspacing="0"> <tr><td colspan="2"><h2>Public Member Functions</h2></td></tr> <tr><td class="memItemLeft" align="right" valign="top"> </td><td class="memItemRight" valign="bottom"><a class="el" href="classStringList.html#a5043788e664be269fd431cf2b5ffad8f">StringList</a> (<a class="el" href="utypes_8h.html#a3343c1c8a8377277046774691c98d78c">UErrorCode</a> &status)</td></tr> <tr><td class="mdescLeft"> </td><td class="mdescRight">Construct an empty <code><a class="el" href="classStringList.html" title="StringList.">StringList</a></code>. <a href="#a5043788e664be269fd431cf2b5ffad8f"></a><br/></td></tr> <tr><td class="memItemLeft" align="right" valign="top"> </td><td class="memItemRight" valign="bottom"><a class="el" href="classStringList.html#a578ccde3ffad1066142964a8f63b609e">~StringList</a> ()</td></tr> <tr><td class="mdescLeft"> </td><td class="mdescRight">The destructor. <a href="#a578ccde3ffad1066142964a8f63b609e"></a><br/></td></tr> <tr><td class="memItemLeft" align="right" valign="top">void </td><td class="memItemRight" valign="bottom"><a class="el" href="classStringList.html#a65ee667958ec2f511358b22f19236303">add</a> (const <a class="el" href="classUnicodeString.html">UnicodeString</a> *string, <a class="el" href="utypes_8h.html#a3343c1c8a8377277046774691c98d78c">UErrorCode</a> &status)</td></tr> <tr><td class="mdescLeft"> </td><td class="mdescRight">Add a string to the list. <a href="#a65ee667958ec2f511358b22f19236303"></a><br/></td></tr> <tr><td class="memItemLeft" align="right" valign="top">void </td><td class="memItemRight" valign="bottom"><a class="el" href="classStringList.html#a29eaf472df275e5214e73a45f1b512be">add</a> (const <a class="el" href="umachine_8h.html#a6bb9fad572d65b305324ef288165e2ac">UChar</a> *chars, int32_t count, <a class="el" href="utypes_8h.html#a3343c1c8a8377277046774691c98d78c">UErrorCode</a> &status)</td></tr> <tr><td class="mdescLeft"> </td><td class="mdescRight">Add an array of Unicode code points to the list. <a href="#a29eaf472df275e5214e73a45f1b512be"></a><br/></td></tr> <tr><td class="memItemLeft" align="right" valign="top">const <a class="el" href="classUnicodeString.html">UnicodeString</a> * </td><td class="memItemRight" valign="bottom"><a class="el" href="classStringList.html#ac6c3ceb4e84d10f65e537e8249e84d34">get</a> (int32_t index) const </td></tr> <tr><td class="mdescLeft"> </td><td class="mdescRight">Get a particular string from the list. <a href="#ac6c3ceb4e84d10f65e537e8249e84d34"></a><br/></td></tr> <tr><td class="memItemLeft" align="right" valign="top">int32_t </td><td class="memItemRight" valign="bottom"><a class="el" href="classStringList.html#ac237ec117eb953ab268a1d9c24e5fb6e">size</a> () const </td></tr> <tr><td class="mdescLeft"> </td><td class="mdescRight">Get the number of stings in the list. <a href="#ac237ec117eb953ab268a1d9c24e5fb6e"></a><br/></td></tr> <tr><td class="memItemLeft" align="right" valign="top">virtual <a class="el" href="utypes_8h.html#a22af10545208a455a6e884008df48e9f">UClassID</a> </td><td class="memItemRight" valign="bottom"><a class="el" href="classStringList.html#a589945e6af343714532e7be10a9ee6d5">getDynamicClassID</a> () const </td></tr> <tr><td class="mdescLeft"> </td><td class="mdescRight">the <a class="el" href="classUObject.html" title="UObject is the common ICU "boilerplate" class.">UObject</a> glue. <a href="#a589945e6af343714532e7be10a9ee6d5"></a><br/></td></tr> <tr><td colspan="2"><h2>Static Public Member Functions</h2></td></tr> <tr><td class="memItemLeft" align="right" valign="top">static <a class="el" href="utypes_8h.html#a22af10545208a455a6e884008df48e9f">UClassID</a> </td><td class="memItemRight" valign="bottom"><a class="el" href="classStringList.html#ae59244f2368068aba86a8085666c4dd2">getStaticClassID</a> ()</td></tr> <tr><td class="mdescLeft"> </td><td class="mdescRight">the <a class="el" href="classUObject.html" title="UObject is the common ICU "boilerplate" class.">UObject</a> glue. <a href="#ae59244f2368068aba86a8085666c4dd2"></a><br/></td></tr> </table> <hr/><a name="_details"></a><h2>Detailed Description</h2> <p><a class="el" href="classStringList.html" title="StringList.">StringList</a>. </p> <p>This object holds a list of <code><a class="el" href="classUnicodeString.html" title="UnicodeString is a string class that stores Unicode characters directly and provides...">UnicodeString</a></code> objects.</p> <dl class="internal"><dt><b><a class="el" href="internal.html#_internal000225">Internal:</a></b></dt><dd>Do not use. This API is for internal use only. ICU 4.0.1 technology preview </dd></dl> <p>Definition at line <a class="el" href="colldata_8h_source.html#l00166">166</a> of file <a class="el" href="colldata_8h_source.html">colldata.h</a>.</p> <hr/><h2>Constructor & Destructor Documentation</h2> <a class="anchor" id="a5043788e664be269fd431cf2b5ffad8f"></a><!-- doxytag: member="StringList::StringList" ref="a5043788e664be269fd431cf2b5ffad8f" args="(UErrorCode &status)" --> <div class="memitem"> <div class="memproto"> <table class="memname"> <tr> <td class="memname">StringList::StringList </td> <td>(</td> <td class="paramtype"><a class="el" href="utypes_8h.html#a3343c1c8a8377277046774691c98d78c">UErrorCode</a> & </td> <td class="paramname"> <em>status</em></td> <td> ) </td> <td></td> </tr> </table> </div> <div class="memdoc"> <p>Construct an empty <code><a class="el" href="classStringList.html" title="StringList.">StringList</a></code>. </p> <dl><dt><b>Parameters:</b></dt><dd> <table border="0" cellspacing="2" cellpadding="0"> <tr><td valign="top"></td><td valign="top"><em>status</em> </td><td>- will be set if any errors occur.</td></tr> </table> </dd> </dl> <p>Note: if on return, status is set to an error code, the only safe thing to do with this object is to call the destructor.</p> <dl class="internal"><dt><b><a class="el" href="internal.html#_internal000235">Internal:</a></b></dt><dd>Do not use. This API is for internal use only. ICU 4.0.1 technology preview </dd></dl> </div> </div> <a class="anchor" id="a578ccde3ffad1066142964a8f63b609e"></a><!-- doxytag: member="StringList::~StringList" ref="a578ccde3ffad1066142964a8f63b609e" args="()" --> <div class="memitem"> <div class="memproto"> <table class="memname"> <tr> <td class="memname">StringList::~StringList </td> <td>(</td> <td class="paramname"></td> <td> ) </td> <td></td> </tr> </table> </div> <div class="memdoc"> <p>The destructor. </p> <dl class="internal"><dt><b><a class="el" href="internal.html#_internal000236">Internal:</a></b></dt><dd>Do not use. This API is for internal use only. ICU 4.0.1 technology preview </dd></dl> </div> </div> <hr/><h2>Member Function Documentation</h2> <a class="anchor" id="a29eaf472df275e5214e73a45f1b512be"></a><!-- doxytag: member="StringList::add" ref="a29eaf472df275e5214e73a45f1b512be" args="(const UChar *chars, int32_t count, UErrorCode &status)" --> <div class="memitem"> <div class="memproto"> <table class="memname"> <tr> <td class="memname">void StringList::add </td> <td>(</td> <td class="paramtype">const <a class="el" href="umachine_8h.html#a6bb9fad572d65b305324ef288165e2ac">UChar</a> * </td> <td class="paramname"> <em>chars</em>, </td> </tr> <tr> <td class="paramkey"></td> <td></td> <td class="paramtype">int32_t </td> <td class="paramname"> <em>count</em>, </td> </tr> <tr> <td class="paramkey"></td> <td></td> <td class="paramtype"><a class="el" href="utypes_8h.html#a3343c1c8a8377277046774691c98d78c">UErrorCode</a> & </td> <td class="paramname"> <em>status</em></td><td> </td> </tr> <tr> <td></td> <td>)</td> <td></td><td></td><td></td> </tr> </table> </div> <div class="memdoc"> <p>Add an array of Unicode code points to the list. </p> <dl><dt><b>Parameters:</b></dt><dd> <table border="0" cellspacing="2" cellpadding="0"> <tr><td valign="top"></td><td valign="top"><em>chars</em> </td><td>- the address of the array of code points </td></tr> <tr><td valign="top"></td><td valign="top"><em>count</em> </td><td>- the number of code points in the array </td></tr> <tr><td valign="top"></td><td valign="top"><em>status</em> </td><td>- will be set if any errors occur.</td></tr> </table> </dd> </dl> <dl class="internal"><dt><b><a class="el" href="internal.html#_internal000238">Internal:</a></b></dt><dd>Do not use. This API is for internal use only. ICU 4.0.1 technology preview </dd></dl> </div> </div> <a class="anchor" id="a65ee667958ec2f511358b22f19236303"></a><!-- doxytag: member="StringList::add" ref="a65ee667958ec2f511358b22f19236303" args="(const UnicodeString *string, UErrorCode &status)" --> <div class="memitem"> <div class="memproto"> <table class="memname"> <tr> <td class="memname">void StringList::add </td> <td>(</td> <td class="paramtype">const <a class="el" href="classUnicodeString.html">UnicodeString</a> * </td> <td class="paramname"> <em>string</em>, </td> </tr> <tr> <td class="paramkey"></td> <td></td> <td class="paramtype"><a class="el" href="utypes_8h.html#a3343c1c8a8377277046774691c98d78c">UErrorCode</a> & </td> <td class="paramname"> <em>status</em></td><td> </td> </tr> <tr> <td></td> <td>)</td> <td></td><td></td><td></td> </tr> </table> </div> <div class="memdoc"> <p>Add a string to the list. </p> <dl><dt><b>Parameters:</b></dt><dd> <table border="0" cellspacing="2" cellpadding="0"> <tr><td valign="top"></td><td valign="top"><em>string</em> </td><td>- the string to add </td></tr> <tr><td valign="top"></td><td valign="top"><em>status</em> </td><td>- will be set if any errors occur.</td></tr> </table> </dd> </dl> <dl class="internal"><dt><b><a class="el" href="internal.html#_internal000237">Internal:</a></b></dt><dd>Do not use. This API is for internal use only. ICU 4.0.1 technology preview </dd></dl> </div> </div> <a class="anchor" id="ac6c3ceb4e84d10f65e537e8249e84d34"></a><!-- doxytag: member="StringList::get" ref="ac6c3ceb4e84d10f65e537e8249e84d34" args="(int32_t index) const " --> <div class="memitem"> <div class="memproto"> <table class="memname"> <tr> <td class="memname">const <a class="el" href="classUnicodeString.html">UnicodeString</a>* StringList::get </td> <td>(</td> <td class="paramtype">int32_t </td> <td class="paramname"> <em>index</em></td> <td> ) </td> <td> const</td> </tr> </table> </div> <div class="memdoc"> <p>Get a particular string from the list. </p> <dl><dt><b>Parameters:</b></dt><dd> <table border="0" cellspacing="2" cellpadding="0"> <tr><td valign="top"></td><td valign="top"><em>index</em> </td><td>- the index of the string</td></tr> </table> </dd> </dl> <dl class="return"><dt><b>Returns:</b></dt><dd>a pointer to the <code><a class="el" href="classUnicodeString.html" title="UnicodeString is a string class that stores Unicode characters directly and provides...">UnicodeString</a></code> or <code>NULL</code> if <code>index</code> is out of bounds.</dd></dl> <dl class="internal"><dt><b><a class="el" href="internal.html#_internal000239">Internal:</a></b></dt><dd>Do not use. This API is for internal use only. ICU 4.0.1 technology preview </dd></dl> </div> </div> <a class="anchor" id="a589945e6af343714532e7be10a9ee6d5"></a><!-- doxytag: member="StringList::getDynamicClassID" ref="a589945e6af343714532e7be10a9ee6d5" args="() const " --> <div class="memitem"> <div class="memproto"> <table class="memname"> <tr> <td class="memname">virtual <a class="el" href="utypes_8h.html#a22af10545208a455a6e884008df48e9f">UClassID</a> StringList::getDynamicClassID </td> <td>(</td> <td class="paramname"></td> <td> ) </td> <td> const<code> [virtual]</code></td> </tr> </table> </div> <div class="memdoc"> <p>the <a class="el" href="classUObject.html" title="UObject is the common ICU "boilerplate" class.">UObject</a> glue. </p> <p>.. </p> <dl class="internal"><dt><b><a class="el" href="internal.html#_internal000241">Internal:</a></b></dt><dd>Do not use. This API is for internal use only. ICU 4.0.1 technology preview </dd></dl> <p>Implements <a class="el" href="classUObject.html#a9b1acc95efd89cb86ec31f2dc947a262">UObject</a>.</p> </div> </div> <a class="anchor" id="ae59244f2368068aba86a8085666c4dd2"></a><!-- doxytag: member="StringList::getStaticClassID" ref="ae59244f2368068aba86a8085666c4dd2" args="()" --> <div class="memitem"> <div class="memproto"> <table class="memname"> <tr> <td class="memname">static <a class="el" href="utypes_8h.html#a22af10545208a455a6e884008df48e9f">UClassID</a> StringList::getStaticClassID </td> <td>(</td> <td class="paramname"></td> <td> ) </td> <td><code> [static]</code></td> </tr> </table> </div> <div class="memdoc"> <p>the <a class="el" href="classUObject.html" title="UObject is the common ICU "boilerplate" class.">UObject</a> glue. </p> <p>.. </p> <dl class="internal"><dt><b><a class="el" href="internal.html#_internal000242">Internal:</a></b></dt><dd>Do not use. This API is for internal use only. ICU 4.0.1 technology preview </dd></dl> </div> </div> <a class="anchor" id="ac237ec117eb953ab268a1d9c24e5fb6e"></a><!-- doxytag: member="StringList::size" ref="ac237ec117eb953ab268a1d9c24e5fb6e" args="() const " --> <div class="memitem"> <div class="memproto"> <table class="memname"> <tr> <td class="memname">int32_t StringList::size </td> <td>(</td> <td class="paramname"></td> <td> ) </td> <td> const</td> </tr> </table> </div> <div class="memdoc"> <p>Get the number of stings in the list. </p> <dl class="return"><dt><b>Returns:</b></dt><dd>the number of strings in the list.</dd></dl> <dl class="internal"><dt><b><a class="el" href="internal.html#_internal000240">Internal:</a></b></dt><dd>Do not use. This API is for internal use only. ICU 4.0.1 technology preview </dd></dl> </div> </div> <hr/>The documentation for this class was generated from the following file:<ul> <li><a class="el" href="colldata_8h_source.html">colldata.h</a></li> </ul> </div> <!--- window showing the filter options --> <div id="MSearchSelectWindow" onmouseover="return searchBox.OnSearchSelectShow()" onmouseout="return searchBox.OnSearchSelectHide()" onkeydown="return searchBox.OnSearchSelectKey(event)"> <a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(0)"><span class="SelectionMark"> </span>All</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(1)"><span class="SelectionMark"> </span>Data Structures</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(2)"><span class="SelectionMark"> </span>Files</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(3)"><span class="SelectionMark"> </span>Functions</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(4)"><span class="SelectionMark"> </span>Variables</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(5)"><span class="SelectionMark"> </span>Typedefs</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(6)"><span class="SelectionMark"> </span>Enumerations</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(7)"><span class="SelectionMark"> </span>Enumerator</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(8)"><span class="SelectionMark"> </span>Friends</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(9)"><span class="SelectionMark"> </span>Defines</a></div> <!-- iframe showing the search results (closed by default) --> <div id="MSearchResultsWindow"> <iframe src="" frameborder="0" name="MSearchResults" id="MSearchResults"> </iframe> </div> <hr class="footer"/><address style="text-align: right;"><small>Generated by <a href="http://www.doxygen.org/index.html"> <img class="footer" src="doxygen.png" alt="doxygen"/></a> 1.6.2-20100208 </small></address> </body> </html>