<!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"/> <meta http-equiv="X-UA-Compatible" content="IE=9"/> <title>ICU 4.8.1.1: Appendable Class Reference</title> <link href="tabs.css" rel="stylesheet" type="text/css"/> <script type="text/javascript" src="jquery.js"></script> <script type="text/javascript" src="dynsections.js"></script> <link href="search/search.css" rel="stylesheet" type="text/css"/> <script type="text/javascript" src="search/search.js"></script> <script type="text/javascript"> $(document).ready(function() { searchBox.OnSelectItem(0); }); </script> <link href="doxygen.css" rel="stylesheet" type="text/css" /> </head> <body> <div id="top"><!-- do not remove this div, it is closed by doxygen! --> <div id="titlearea"> <table cellspacing="0" cellpadding="0"> <tbody> <tr style="height: 56px;"> <td style="padding-left: 0.5em;"> <div id="projectname">ICU 4.8.1.1  <span id="projectnumber">4.8.1.1</span> </div> </td> </tr> </tbody> </table> </div> <!-- end header part --> <!-- Generated by Doxygen 1.8.1.1 --> <script type="text/javascript"> var searchBox = new SearchBox("searchBox", "search",false,'Search'); </script> <div id="navrow1" class="tabs"> <ul class="tablist"> <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"> <span class="left"> <img id="MSearchSelect" src="search/mag_sel.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)"/> </span><span class="right"> <a id="MSearchClose" href="javascript:searchBox.CloseResultsWindow()"><img id="MSearchCloseImg" border="0" src="search/close.png" alt=""/></a> </span> </div> </li> </ul> </div> <div id="navrow2" class="tabs2"> <ul class="tablist"> <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> <!-- 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>Macros</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(10)"><span class="SelectionMark"> </span>Groups</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(11)"><span class="SelectionMark"> </span>Pages</a></div> <!-- iframe showing the search results (closed by default) --> <div id="MSearchResultsWindow"> <iframe src="javascript:void(0)" frameborder="0" name="MSearchResults" id="MSearchResults"> </iframe> </div> </div><!-- top --> <div class="header"> <div class="summary"> <a href="#pub-methods">Public Member Functions</a> </div> <div class="headertitle"> <div class="title">Appendable Class Reference</div> </div> </div><!--header--> <div class="contents"> <p>Base class for objects to which Unicode characters and strings can be appended. <a href="classAppendable.html#details">More...</a></p> <p><code>#include <<a class="el" href="appendable_8h_source.html">appendable.h</a>></code></p> <div class="dynheader"> Inheritance diagram for Appendable:</div> <div class="dyncontent"> <div class="center"> <img src="classAppendable.png" usemap="#Appendable_map" alt=""/> <map id="Appendable_map" name="Appendable_map"> <area href="classUObject.html" title="UObject is the common ICU "boilerplate" class." alt="UObject" shape="rect" coords="0,56,159,80"/> <area href="classUMemory.html" title="UMemory is the common ICU base class." alt="UMemory" shape="rect" coords="0,0,159,24"/> <area href="classUnicodeStringAppendable.html" title="An Appendable implementation which writes to a UnicodeString." alt="UnicodeStringAppendable" shape="rect" coords="0,168,159,192"/> </map> </div></div> <table class="memberdecls"> <tr class="heading"><td colspan="2"><h2><a name="pub-methods"></a> Public Member Functions</h2></td></tr> <tr class="memitem:a5e9851386b9f3b63e750d4d31149f023"><td class="memItemLeft" align="right" valign="top">virtual <a class="el" href="umachine_8h.html#a349ef00011f20ccd1d3b424445681aa5">UBool</a> </td><td class="memItemRight" valign="bottom"><a class="el" href="classAppendable.html#a5e9851386b9f3b63e750d4d31149f023">appendCodeUnit</a> (<a class="el" href="umachine_8h.html#a6bb9fad572d65b305324ef288165e2ac">UChar</a> c)=0</td></tr> <tr class="memdesc:a5e9851386b9f3b63e750d4d31149f023"><td class="mdescLeft"> </td><td class="mdescRight">Appends a 16-bit code unit. <a href="#a5e9851386b9f3b63e750d4d31149f023"></a><br/></td></tr> <tr class="memitem:a5292cdc7ee62dc99a9ac58fecfbba9b5"><td class="memItemLeft" align="right" valign="top">virtual <a class="el" href="umachine_8h.html#a349ef00011f20ccd1d3b424445681aa5">UBool</a> </td><td class="memItemRight" valign="bottom"><a class="el" href="classAppendable.html#a5292cdc7ee62dc99a9ac58fecfbba9b5">appendCodePoint</a> (<a class="el" href="umachine_8h.html#a09fff5c3b5a5b015324dc3ec3cf92809">UChar32</a> c)</td></tr> <tr class="memdesc:a5292cdc7ee62dc99a9ac58fecfbba9b5"><td class="mdescLeft"> </td><td class="mdescRight">Appends a code point. <a href="#a5292cdc7ee62dc99a9ac58fecfbba9b5"></a><br/></td></tr> <tr class="memitem:a5edf68de9d036d3bcf1cac6d3131c933"><td class="memItemLeft" align="right" valign="top">virtual <a class="el" href="umachine_8h.html#a349ef00011f20ccd1d3b424445681aa5">UBool</a> </td><td class="memItemRight" valign="bottom"><a class="el" href="classAppendable.html#a5edf68de9d036d3bcf1cac6d3131c933">appendString</a> (const <a class="el" href="umachine_8h.html#a6bb9fad572d65b305324ef288165e2ac">UChar</a> *s, <a class="el" href="pwin32_8h.html#ab1967d8591af1a4e48c37fd2b0f184d0">int32_t</a> length)</td></tr> <tr class="memdesc:a5edf68de9d036d3bcf1cac6d3131c933"><td class="mdescLeft"> </td><td class="mdescRight">Appends a string. <a href="#a5edf68de9d036d3bcf1cac6d3131c933"></a><br/></td></tr> <tr class="memitem:ad6db9e7d1a842f22d0b03882719204d5"><td class="memItemLeft" align="right" valign="top">virtual <a class="el" href="umachine_8h.html#a349ef00011f20ccd1d3b424445681aa5">UBool</a> </td><td class="memItemRight" valign="bottom"><a class="el" href="classAppendable.html#ad6db9e7d1a842f22d0b03882719204d5">reserveAppendCapacity</a> (<a class="el" href="pwin32_8h.html#ab1967d8591af1a4e48c37fd2b0f184d0">int32_t</a> appendCapacity)</td></tr> <tr class="memdesc:ad6db9e7d1a842f22d0b03882719204d5"><td class="mdescLeft"> </td><td class="mdescRight">Tells the object that the caller is going to append roughly appendCapacity UChars. <a href="#ad6db9e7d1a842f22d0b03882719204d5"></a><br/></td></tr> <tr class="memitem:ace1dc7b1d182e77f31932c6f99d6cd6a"><td class="memItemLeft" align="right" valign="top">virtual <a class="el" href="umachine_8h.html#a6bb9fad572d65b305324ef288165e2ac">UChar</a> * </td><td class="memItemRight" valign="bottom"><a class="el" href="classAppendable.html#ace1dc7b1d182e77f31932c6f99d6cd6a">getAppendBuffer</a> (<a class="el" href="pwin32_8h.html#ab1967d8591af1a4e48c37fd2b0f184d0">int32_t</a> minCapacity, <a class="el" href="pwin32_8h.html#ab1967d8591af1a4e48c37fd2b0f184d0">int32_t</a> desiredCapacityHint, <a class="el" href="umachine_8h.html#a6bb9fad572d65b305324ef288165e2ac">UChar</a> *scratch, <a class="el" href="pwin32_8h.html#ab1967d8591af1a4e48c37fd2b0f184d0">int32_t</a> scratchCapacity, <a class="el" href="pwin32_8h.html#ab1967d8591af1a4e48c37fd2b0f184d0">int32_t</a> *resultCapacity)</td></tr> <tr class="memdesc:ace1dc7b1d182e77f31932c6f99d6cd6a"><td class="mdescLeft"> </td><td class="mdescRight">Returns a writable buffer for appending and writes the buffer's capacity to *resultCapacity. <a href="#ace1dc7b1d182e77f31932c6f99d6cd6a"></a><br/></td></tr> <tr class="inherit_header pub_methods_classUObject"><td colspan="2" onclick="javascript:toggleInherit('pub_methods_classUObject')"><img src="closed.png" alt="-"/> Public Member Functions inherited from <a class="el" href="classUObject.html">UObject</a></td></tr> <tr class="memitem:ace22cf29a90641ef43350deae5bedb85 inherit pub_methods_classUObject"><td class="memItemLeft" align="right" valign="top">virtual </td><td class="memItemRight" valign="bottom"><a class="el" href="classUObject.html#ace22cf29a90641ef43350deae5bedb85">~UObject</a> ()</td></tr> <tr class="memdesc:ace22cf29a90641ef43350deae5bedb85 inherit pub_methods_classUObject"><td class="mdescLeft"> </td><td class="mdescRight">Destructor. <a href="#ace22cf29a90641ef43350deae5bedb85"></a><br/></td></tr> </table> <hr/><a name="details" id="details"></a><h2>Detailed Description</h2> <div class="textblock"><p>Base class for objects to which Unicode characters and strings can be appended. </p> <p>Combines elements of Java <a class="el" href="classAppendable.html" title="Base class for objects to which Unicode characters and strings can be appended.">Appendable</a> and ICU4C <a class="el" href="classByteSink.html" title="A ByteSink can be filled with bytes.">ByteSink</a>.</p> <p>This class can be used in APIs where it does not matter whether the actual destination is a <a class="el" href="classUnicodeString.html" title="UnicodeString is a string class that stores Unicode characters directly and provides similar function...">UnicodeString</a>, a UChar[] array, a <a class="el" href="classUnicodeSet.html" title="A mutable set of Unicode characters and multicharacter strings.">UnicodeSet</a>, or any other object that receives and processes characters and/or strings.</p> <p>Implementation classes must implement at least <a class="el" href="classAppendable.html#a5e9851386b9f3b63e750d4d31149f023" title="Appends a 16-bit code unit.">appendCodeUnit(UChar)</a>. The base class provides default implementations for the other methods.</p> <p>The methods do not take UErrorCode parameters. If an error occurs (e.g., out-of-memory), in addition to returning FALSE from failing operations, the implementation must prevent unexpected behavior (e.g., crashes) from further calls and should make the error condition available separately (e.g., store a UErrorCode, make/keep a <a class="el" href="classUnicodeString.html" title="UnicodeString is a string class that stores Unicode characters directly and provides similar function...">UnicodeString</a> bogus). </p> <dl class="draft"><dt><b><a class="el" href="draft.html#_draft000001">Draft:</a></b></dt><dd>This API may be changed in the future versions and was introduced in ICU 4.8 </dd></dl> <p>Definition at line <a class="el" href="appendable_8h_source.html#l00049">49</a> of file <a class="el" href="appendable_8h_source.html">appendable.h</a>.</p> </div><hr/><h2>Member Function Documentation</h2> <a class="anchor" id="a5292cdc7ee62dc99a9ac58fecfbba9b5"></a> <div class="memitem"> <div class="memproto"> <table class="mlabels"> <tr> <td class="mlabels-left"> <table class="memname"> <tr> <td class="memname">virtual <a class="el" href="umachine_8h.html#a349ef00011f20ccd1d3b424445681aa5">UBool</a> Appendable::appendCodePoint </td> <td>(</td> <td class="paramtype"><a class="el" href="umachine_8h.html#a09fff5c3b5a5b015324dc3ec3cf92809">UChar32</a> </td> <td class="paramname"><em>c</em></td><td>)</td> <td></td> </tr> </table> </td> <td class="mlabels-right"> <span class="mlabels"><span class="mlabel">virtual</span></span> </td> </tr> </table> </div><div class="memdoc"> <p>Appends a code point. </p> <p>The default implementation calls <a class="el" href="classAppendable.html#a5e9851386b9f3b63e750d4d31149f023" title="Appends a 16-bit code unit.">appendCodeUnit(UChar)</a> once or twice. </p> <dl class="params"><dt>Parameters:</dt><dd> <table class="params"> <tr><td class="paramname">c</td><td>code point 0..0x10ffff </td></tr> </table> </dd> </dl> <dl class="section return"><dt>Returns:</dt><dd>TRUE if the operation succeeded </dd></dl> <dl class="draft"><dt><b><a class="el" href="draft.html#_draft000004">Draft:</a></b></dt><dd>This API may be changed in the future versions and was introduced in ICU 4.8 </dd></dl> <p>Reimplemented in <a class="el" href="classUnicodeStringAppendable.html#a26befc8629e1c015d56ca25eccb54148">UnicodeStringAppendable</a>.</p> </div> </div> <a class="anchor" id="a5e9851386b9f3b63e750d4d31149f023"></a> <div class="memitem"> <div class="memproto"> <table class="mlabels"> <tr> <td class="mlabels-left"> <table class="memname"> <tr> <td class="memname">virtual <a class="el" href="umachine_8h.html#a349ef00011f20ccd1d3b424445681aa5">UBool</a> Appendable::appendCodeUnit </td> <td>(</td> <td class="paramtype"><a class="el" href="umachine_8h.html#a6bb9fad572d65b305324ef288165e2ac">UChar</a> </td> <td class="paramname"><em>c</em></td><td>)</td> <td></td> </tr> </table> </td> <td class="mlabels-right"> <span class="mlabels"><span class="mlabel">pure virtual</span></span> </td> </tr> </table> </div><div class="memdoc"> <p>Appends a 16-bit code unit. </p> <dl class="params"><dt>Parameters:</dt><dd> <table class="params"> <tr><td class="paramname">c</td><td>code unit </td></tr> </table> </dd> </dl> <dl class="section return"><dt>Returns:</dt><dd>TRUE if the operation succeeded </dd></dl> <dl class="draft"><dt><b><a class="el" href="draft.html#_draft000003">Draft:</a></b></dt><dd>This API may be changed in the future versions and was introduced in ICU 4.8 </dd></dl> <p>Implemented in <a class="el" href="classUnicodeStringAppendable.html#acb282259414852552a876814e530ae76">UnicodeStringAppendable</a>.</p> </div> </div> <a class="anchor" id="a5edf68de9d036d3bcf1cac6d3131c933"></a> <div class="memitem"> <div class="memproto"> <table class="mlabels"> <tr> <td class="mlabels-left"> <table class="memname"> <tr> <td class="memname">virtual <a class="el" href="umachine_8h.html#a349ef00011f20ccd1d3b424445681aa5">UBool</a> Appendable::appendString </td> <td>(</td> <td class="paramtype">const <a class="el" href="umachine_8h.html#a6bb9fad572d65b305324ef288165e2ac">UChar</a> * </td> <td class="paramname"><em>s</em>, </td> </tr> <tr> <td class="paramkey"></td> <td></td> <td class="paramtype"><a class="el" href="pwin32_8h.html#ab1967d8591af1a4e48c37fd2b0f184d0">int32_t</a> </td> <td class="paramname"><em>length</em> </td> </tr> <tr> <td></td> <td>)</td> <td></td><td></td> </tr> </table> </td> <td class="mlabels-right"> <span class="mlabels"><span class="mlabel">virtual</span></span> </td> </tr> </table> </div><div class="memdoc"> <p>Appends a string. </p> <p>The default implementation calls <a class="el" href="classAppendable.html#a5e9851386b9f3b63e750d4d31149f023" title="Appends a 16-bit code unit.">appendCodeUnit(UChar)</a> for each code unit. </p> <dl class="params"><dt>Parameters:</dt><dd> <table class="params"> <tr><td class="paramname">s</td><td>string, must not be NULL if length!=0 </td></tr> <tr><td class="paramname">length</td><td>string length, or -1 if NUL-terminated </td></tr> </table> </dd> </dl> <dl class="section return"><dt>Returns:</dt><dd>TRUE if the operation succeeded </dd></dl> <dl class="draft"><dt><b><a class="el" href="draft.html#_draft000005">Draft:</a></b></dt><dd>This API may be changed in the future versions and was introduced in ICU 4.8 </dd></dl> <p>Reimplemented in <a class="el" href="classUnicodeStringAppendable.html#a84caac9ce2e592c17526f79821bf2e55">UnicodeStringAppendable</a>.</p> </div> </div> <a class="anchor" id="ace1dc7b1d182e77f31932c6f99d6cd6a"></a> <div class="memitem"> <div class="memproto"> <table class="mlabels"> <tr> <td class="mlabels-left"> <table class="memname"> <tr> <td class="memname">virtual <a class="el" href="umachine_8h.html#a6bb9fad572d65b305324ef288165e2ac">UChar</a>* Appendable::getAppendBuffer </td> <td>(</td> <td class="paramtype"><a class="el" href="pwin32_8h.html#ab1967d8591af1a4e48c37fd2b0f184d0">int32_t</a> </td> <td class="paramname"><em>minCapacity</em>, </td> </tr> <tr> <td class="paramkey"></td> <td></td> <td class="paramtype"><a class="el" href="pwin32_8h.html#ab1967d8591af1a4e48c37fd2b0f184d0">int32_t</a> </td> <td class="paramname"><em>desiredCapacityHint</em>, </td> </tr> <tr> <td class="paramkey"></td> <td></td> <td class="paramtype"><a class="el" href="umachine_8h.html#a6bb9fad572d65b305324ef288165e2ac">UChar</a> * </td> <td class="paramname"><em>scratch</em>, </td> </tr> <tr> <td class="paramkey"></td> <td></td> <td class="paramtype"><a class="el" href="pwin32_8h.html#ab1967d8591af1a4e48c37fd2b0f184d0">int32_t</a> </td> <td class="paramname"><em>scratchCapacity</em>, </td> </tr> <tr> <td class="paramkey"></td> <td></td> <td class="paramtype"><a class="el" href="pwin32_8h.html#ab1967d8591af1a4e48c37fd2b0f184d0">int32_t</a> * </td> <td class="paramname"><em>resultCapacity</em> </td> </tr> <tr> <td></td> <td>)</td> <td></td><td></td> </tr> </table> </td> <td class="mlabels-right"> <span class="mlabels"><span class="mlabel">virtual</span></span> </td> </tr> </table> </div><div class="memdoc"> <p>Returns a writable buffer for appending and writes the buffer's capacity to *resultCapacity. </p> <p>Guarantees *resultCapacity>=minCapacity. May return a pointer to the caller-owned scratch buffer which must have scratchCapacity>=minCapacity. The returned buffer is only valid until the next operation on this <a class="el" href="classAppendable.html" title="Base class for objects to which Unicode characters and strings can be appended.">Appendable</a>.</p> <p>After writing at most *resultCapacity UChars, call <a class="el" href="classAppendable.html#a5edf68de9d036d3bcf1cac6d3131c933" title="Appends a string.">appendString()</a> with the pointer returned from this function and the number of UChars written. Many <a class="el" href="classAppendable.html#a5edf68de9d036d3bcf1cac6d3131c933" title="Appends a string.">appendString()</a> implementations will avoid copying UChars if this function returned an internal buffer.</p> <p>Partial usage example: </p> <div class="fragment"><div class="line"> int32_t capacity;</div> <div class="line"> <a class="code" href="umachine_8h.html#a6bb9fad572d65b305324ef288165e2ac" title="Define UChar to be wchar_t if that is 16 bits wide; always assumed to be unsigned.">UChar</a>* buffer = app.getAppendBuffer(..., &capacity);</div> <div class="line"> ... Write n UChars into buffer, with n <= capacity.</div> <div class="line"> app.appendString(buffer, n);</div> </div><!-- fragment --><p> In many implementations, that call to append will avoid copying UChars.</p> <p>If the <a class="el" href="classAppendable.html" title="Base class for objects to which Unicode characters and strings can be appended.">Appendable</a> allocates or reallocates an internal buffer, it should use the desiredCapacityHint if appropriate. If a caller cannot provide a reasonable guess at the desired capacity, it should pass desiredCapacityHint=0.</p> <p>If a non-scratch buffer is returned, the caller may only pass a prefix to it to <a class="el" href="classAppendable.html#a5edf68de9d036d3bcf1cac6d3131c933" title="Appends a string.">appendString()</a>. That is, it is not correct to pass an interior pointer to <a class="el" href="classAppendable.html#a5edf68de9d036d3bcf1cac6d3131c933" title="Appends a string.">appendString()</a>.</p> <p>The default implementation always returns the scratch buffer.</p> <dl class="params"><dt>Parameters:</dt><dd> <table class="params"> <tr><td class="paramname">minCapacity</td><td>required minimum capacity of the returned buffer; must be non-negative </td></tr> <tr><td class="paramname">desiredCapacityHint</td><td>desired capacity of the returned buffer; must be non-negative </td></tr> <tr><td class="paramname">scratch</td><td>default caller-owned buffer </td></tr> <tr><td class="paramname">scratchCapacity</td><td>capacity of the scratch buffer </td></tr> <tr><td class="paramname">resultCapacity</td><td>pointer to an integer which will be set to the capacity of the returned buffer </td></tr> </table> </dd> </dl> <dl class="section return"><dt>Returns:</dt><dd>a buffer with *resultCapacity>=minCapacity </dd></dl> <dl class="draft"><dt><b><a class="el" href="draft.html#_draft000007">Draft:</a></b></dt><dd>This API may be changed in the future versions and was introduced in ICU 4.8 </dd></dl> <p>Reimplemented in <a class="el" href="classUnicodeStringAppendable.html#ad99a80e66648f44fb12c9a6c7a3aeeed">UnicodeStringAppendable</a>.</p> </div> </div> <a class="anchor" id="ad6db9e7d1a842f22d0b03882719204d5"></a> <div class="memitem"> <div class="memproto"> <table class="mlabels"> <tr> <td class="mlabels-left"> <table class="memname"> <tr> <td class="memname">virtual <a class="el" href="umachine_8h.html#a349ef00011f20ccd1d3b424445681aa5">UBool</a> Appendable::reserveAppendCapacity </td> <td>(</td> <td class="paramtype"><a class="el" href="pwin32_8h.html#ab1967d8591af1a4e48c37fd2b0f184d0">int32_t</a> </td> <td class="paramname"><em>appendCapacity</em></td><td>)</td> <td></td> </tr> </table> </td> <td class="mlabels-right"> <span class="mlabels"><span class="mlabel">virtual</span></span> </td> </tr> </table> </div><div class="memdoc"> <p>Tells the object that the caller is going to append roughly appendCapacity UChars. </p> <p>A subclass might use this to pre-allocate a larger buffer if necessary. The default implementation does nothing. (It always returns TRUE.) </p> <dl class="params"><dt>Parameters:</dt><dd> <table class="params"> <tr><td class="paramname">appendCapacity</td><td>estimated number of UChars that will be appended </td></tr> </table> </dd> </dl> <dl class="section return"><dt>Returns:</dt><dd>TRUE if the operation succeeded </dd></dl> <dl class="draft"><dt><b><a class="el" href="draft.html#_draft000006">Draft:</a></b></dt><dd>This API may be changed in the future versions and was introduced in ICU 4.8 </dd></dl> <p>Reimplemented in <a class="el" href="classUnicodeStringAppendable.html#af01525d2244ebf0d19e9f440d69d1c44">UnicodeStringAppendable</a>.</p> </div> </div> <hr/>The documentation for this class was generated from the following file:<ul> <li><a class="el" href="appendable_8h_source.html">appendable.h</a></li> </ul> </div><!-- contents --> <!-- start footer part --> <hr class="footer"/><address class="footer"><small> Generated by  <a href="http://www.doxygen.org/index.html"> <img class="footer" src="doxygen.png" alt="doxygen"/> </a> 1.8.1.1 </small></address> </body> </html>