<!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"/> <meta name="generator" content="Doxygen 1.8.11"/> <title>ICU 58.2: UReplaceableCallbacks Struct 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="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 id="projectalign" style="padding-left: 0.5em;"> <div id="projectname">ICU 58.2  <span id="projectnumber">58.2</span> </div> </td> </tr> </tbody> </table> </div> <!-- end header part --> <!-- Generated by Doxygen 1.8.11 --> <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><a href="namespaces.html"><span>Namespaces</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> </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> </div><!-- top --> <div class="header"> <div class="summary"> <a href="#pub-attribs">Data Fields</a> </div> <div class="headertitle"> <div class="title">UReplaceableCallbacks Struct Reference</div> </div> </div><!--header--> <div class="contents"> <p>A set of function pointers that transliterators use to manipulate a UReplaceable. <a href="structUReplaceableCallbacks.html#details">More...</a></p> <p><code>#include <<a class="el" href="urep_8h_source.html">urep.h</a>></code></p> <table class="memberdecls"> <tr class="heading"><td colspan="2"><h2 class="groupheader"><a name="pub-attribs"></a> Data Fields</h2></td></tr> <tr class="memitem:a6c4bfa47b6752f364e4dd3f2991cedbe"><td class="memItemLeft" align="right" valign="top">int32_t(* </td><td class="memItemRight" valign="bottom"><a class="el" href="structUReplaceableCallbacks.html#a6c4bfa47b6752f364e4dd3f2991cedbe">length</a> )(const <a class="el" href="urep_8h.html#a22b35ca6677ac47c2f5b0d01ffbead60">UReplaceable</a> *rep)</td></tr> <tr class="memdesc:a6c4bfa47b6752f364e4dd3f2991cedbe"><td class="mdescLeft"> </td><td class="mdescRight">Function pointer that returns the number of UChar code units in this text. <a href="#a6c4bfa47b6752f364e4dd3f2991cedbe">More...</a><br /></td></tr> <tr class="separator:a6c4bfa47b6752f364e4dd3f2991cedbe"><td class="memSeparator" colspan="2"> </td></tr> <tr class="memitem:acde97b3ed22a24127c66ecf38c698a72"><td class="memItemLeft" align="right" valign="top"><a class="el" href="umachine_8h.html#a6bb9fad572d65b305324ef288165e2ac">UChar</a>(* </td><td class="memItemRight" valign="bottom"><a class="el" href="structUReplaceableCallbacks.html#acde97b3ed22a24127c66ecf38c698a72">charAt</a> )(const <a class="el" href="urep_8h.html#a22b35ca6677ac47c2f5b0d01ffbead60">UReplaceable</a> *rep, int32_t offset)</td></tr> <tr class="memdesc:acde97b3ed22a24127c66ecf38c698a72"><td class="mdescLeft"> </td><td class="mdescRight">Function pointer that returns a UChar code units at the given offset into this text; 0 <= offset < n, where n is the value returned by (*length)(rep). <a href="#acde97b3ed22a24127c66ecf38c698a72">More...</a><br /></td></tr> <tr class="separator:acde97b3ed22a24127c66ecf38c698a72"><td class="memSeparator" colspan="2"> </td></tr> <tr class="memitem:abeff06f74d058735c8ca083f034daa0f"><td class="memItemLeft" align="right" valign="top"><a class="el" href="umachine_8h.html#a09fff5c3b5a5b015324dc3ec3cf92809">UChar32</a>(* </td><td class="memItemRight" valign="bottom"><a class="el" href="structUReplaceableCallbacks.html#abeff06f74d058735c8ca083f034daa0f">char32At</a> )(const <a class="el" href="urep_8h.html#a22b35ca6677ac47c2f5b0d01ffbead60">UReplaceable</a> *rep, int32_t offset)</td></tr> <tr class="memdesc:abeff06f74d058735c8ca083f034daa0f"><td class="mdescLeft"> </td><td class="mdescRight">Function pointer that returns a UChar32 code point at the given offset into this text. <a href="#abeff06f74d058735c8ca083f034daa0f">More...</a><br /></td></tr> <tr class="separator:abeff06f74d058735c8ca083f034daa0f"><td class="memSeparator" colspan="2"> </td></tr> <tr class="memitem:a6fe116cc3825cc6c749a95f1bd0d2315"><td class="memItemLeft" align="right" valign="top">void(* </td><td class="memItemRight" valign="bottom"><a class="el" href="structUReplaceableCallbacks.html#a6fe116cc3825cc6c749a95f1bd0d2315">replace</a> )(<a class="el" href="urep_8h.html#a22b35ca6677ac47c2f5b0d01ffbead60">UReplaceable</a> *rep, int32_t start, int32_t limit, const <a class="el" href="umachine_8h.html#a6bb9fad572d65b305324ef288165e2ac">UChar</a> *text, int32_t textLength)</td></tr> <tr class="memdesc:a6fe116cc3825cc6c749a95f1bd0d2315"><td class="mdescLeft"> </td><td class="mdescRight">Function pointer that replaces text between start and limit in this text with the given text. <a href="#a6fe116cc3825cc6c749a95f1bd0d2315">More...</a><br /></td></tr> <tr class="separator:a6fe116cc3825cc6c749a95f1bd0d2315"><td class="memSeparator" colspan="2"> </td></tr> <tr class="memitem:a423aefebaa21d2194334a795f7ae1809"><td class="memItemLeft" align="right" valign="top">void(* </td><td class="memItemRight" valign="bottom"><a class="el" href="structUReplaceableCallbacks.html#a423aefebaa21d2194334a795f7ae1809">extract</a> )(<a class="el" href="urep_8h.html#a22b35ca6677ac47c2f5b0d01ffbead60">UReplaceable</a> *rep, int32_t start, int32_t limit, <a class="el" href="umachine_8h.html#a6bb9fad572d65b305324ef288165e2ac">UChar</a> *dst)</td></tr> <tr class="memdesc:a423aefebaa21d2194334a795f7ae1809"><td class="mdescLeft"> </td><td class="mdescRight">Function pointer that copies the characters in the range [<code>start</code>, <code>limit</code>) into the array <code>dst</code>. <a href="#a423aefebaa21d2194334a795f7ae1809">More...</a><br /></td></tr> <tr class="separator:a423aefebaa21d2194334a795f7ae1809"><td class="memSeparator" colspan="2"> </td></tr> <tr class="memitem:a7affba31f6d3e5a31f8cd33358420fc6"><td class="memItemLeft" align="right" valign="top">void(* </td><td class="memItemRight" valign="bottom"><a class="el" href="structUReplaceableCallbacks.html#a7affba31f6d3e5a31f8cd33358420fc6">copy</a> )(<a class="el" href="urep_8h.html#a22b35ca6677ac47c2f5b0d01ffbead60">UReplaceable</a> *rep, int32_t start, int32_t limit, int32_t dest)</td></tr> <tr class="memdesc:a7affba31f6d3e5a31f8cd33358420fc6"><td class="mdescLeft"> </td><td class="mdescRight">Function pointer that copies text between start and limit in this text to another index in the text. <a href="#a7affba31f6d3e5a31f8cd33358420fc6">More...</a><br /></td></tr> <tr class="separator:a7affba31f6d3e5a31f8cd33358420fc6"><td class="memSeparator" colspan="2"> </td></tr> </table> <a name="details" id="details"></a><h2 class="groupheader">Detailed Description</h2> <div class="textblock"><p>A set of function pointers that transliterators use to manipulate a UReplaceable. </p> <p>The caller should supply the required functions to manipulate their text appropriately. Related to the C++ class Replaceable. </p><dl class="stable"><dt><b><a class="el" href="stable.html#_stable002300">Stable:</a></b></dt><dd>ICU 2.0 </dd></dl> <p>Definition at line <a class="el" href="urep_8h_source.html#l00053">53</a> of file <a class="el" href="urep_8h_source.html">urep.h</a>.</p> </div><h2 class="groupheader">Field Documentation</h2> <a class="anchor" id="abeff06f74d058735c8ca083f034daa0f"></a> <div class="memitem"> <div class="memproto"> <table class="memname"> <tr> <td class="memname"><a class="el" href="umachine_8h.html#a09fff5c3b5a5b015324dc3ec3cf92809">UChar32</a>(* UReplaceableCallbacks::char32At) (const <a class="el" href="urep_8h.html#a22b35ca6677ac47c2f5b0d01ffbead60">UReplaceable</a> *rep, int32_t offset)</td> </tr> </table> </div><div class="memdoc"> <p>Function pointer that returns a UChar32 code point at the given offset into this text. </p> <p>See <a class="el" href="unistr_8h.html" title="C++ API: Unicode String. ">unistr.h</a> for a description of <a class="el" href="structUReplaceableCallbacks.html#acde97b3ed22a24127c66ecf38c698a72" title="Function pointer that returns a UChar code units at the given offset into this text; 0 <= offset < n...">charAt()</a> vs. <a class="el" href="structUReplaceableCallbacks.html#abeff06f74d058735c8ca083f034daa0f" title="Function pointer that returns a UChar32 code point at the given offset into this text. ">char32At()</a>.</p> <dl class="params"><dt>Parameters</dt><dd> <table class="params"> <tr><td class="paramname">rep</td><td>A pointer to "this" UReplaceable object. </td></tr> <tr><td class="paramname">offset</td><td>The index at which to fetch the UChar32 (code point). </td></tr> </table> </dd> </dl> <dl class="section return"><dt>Returns</dt><dd>The UChar32 (code point) at offset, or U+FFFF if the offset is out of bounds. </dd></dl> <dl class="stable"><dt><b><a class="el" href="stable.html#_stable002303">Stable:</a></b></dt><dd>ICU 2.0 </dd></dl> <p>Definition at line <a class="el" href="urep_8h_source.html#l00089">89</a> of file <a class="el" href="urep_8h_source.html">urep.h</a>.</p> </div> </div> <a class="anchor" id="acde97b3ed22a24127c66ecf38c698a72"></a> <div class="memitem"> <div class="memproto"> <table class="memname"> <tr> <td class="memname"><a class="el" href="umachine_8h.html#a6bb9fad572d65b305324ef288165e2ac">UChar</a>(* UReplaceableCallbacks::charAt) (const <a class="el" href="urep_8h.html#a22b35ca6677ac47c2f5b0d01ffbead60">UReplaceable</a> *rep, int32_t offset)</td> </tr> </table> </div><div class="memdoc"> <p>Function pointer that returns a UChar code units at the given offset into this text; 0 <= offset < n, where n is the value returned by (*length)(rep). </p> <p>See <a class="el" href="unistr_8h.html" title="C++ API: Unicode String. ">unistr.h</a> for a description of <a class="el" href="structUReplaceableCallbacks.html#acde97b3ed22a24127c66ecf38c698a72" title="Function pointer that returns a UChar code units at the given offset into this text; 0 <= offset < n...">charAt()</a> vs. <a class="el" href="structUReplaceableCallbacks.html#abeff06f74d058735c8ca083f034daa0f" title="Function pointer that returns a UChar32 code point at the given offset into this text. ">char32At()</a>.</p> <dl class="params"><dt>Parameters</dt><dd> <table class="params"> <tr><td class="paramname">rep</td><td>A pointer to "this" UReplaceable object. </td></tr> <tr><td class="paramname">offset</td><td>The index at which to fetch the UChar (code unit). </td></tr> </table> </dd> </dl> <dl class="section return"><dt>Returns</dt><dd>The UChar (code unit) at offset, or U+FFFF if the offset is out of bounds. </dd></dl> <dl class="stable"><dt><b><a class="el" href="stable.html#_stable002302">Stable:</a></b></dt><dd>ICU 2.0 </dd></dl> <p>Definition at line <a class="el" href="urep_8h_source.html#l00076">76</a> of file <a class="el" href="urep_8h_source.html">urep.h</a>.</p> </div> </div> <a class="anchor" id="a7affba31f6d3e5a31f8cd33358420fc6"></a> <div class="memitem"> <div class="memproto"> <table class="memname"> <tr> <td class="memname">void(* UReplaceableCallbacks::copy) (<a class="el" href="urep_8h.html#a22b35ca6677ac47c2f5b0d01ffbead60">UReplaceable</a> *rep, int32_t start, int32_t limit, int32_t dest)</td> </tr> </table> </div><div class="memdoc"> <p>Function pointer that copies text between start and limit in this text to another index in the text. </p> <p>Attributes (out of band info) should be retained. After this call, there will be (at least) two copies of the characters originally located at start..limit-1.</p> <dl class="params"><dt>Parameters</dt><dd> <table class="params"> <tr><td class="paramname">rep</td><td>A pointer to "this" UReplaceable object. </td></tr> <tr><td class="paramname">start</td><td>the starting index of the text to be copied, inclusive. </td></tr> <tr><td class="paramname">limit</td><td>the ending index of the text to be copied, exclusive. </td></tr> <tr><td class="paramname">dest</td><td>the index at which the copy of the UChars should be inserted. </td></tr> </table> </dd> </dl> <dl class="stable"><dt><b><a class="el" href="stable.html#_stable002306">Stable:</a></b></dt><dd>ICU 2.0 </dd></dl> <p>Definition at line <a class="el" href="urep_8h_source.html#l00148">148</a> of file <a class="el" href="urep_8h_source.html">urep.h</a>.</p> </div> </div> <a class="anchor" id="a423aefebaa21d2194334a795f7ae1809"></a> <div class="memitem"> <div class="memproto"> <table class="memname"> <tr> <td class="memname">void(* UReplaceableCallbacks::extract) (<a class="el" href="urep_8h.html#a22b35ca6677ac47c2f5b0d01ffbead60">UReplaceable</a> *rep, int32_t start, int32_t limit, <a class="el" href="umachine_8h.html#a6bb9fad572d65b305324ef288165e2ac">UChar</a> *dst)</td> </tr> </table> </div><div class="memdoc"> <p>Function pointer that copies the characters in the range [<code>start</code>, <code>limit</code>) into the array <code>dst</code>. </p> <dl class="params"><dt>Parameters</dt><dd> <table class="params"> <tr><td class="paramname">rep</td><td>A pointer to "this" UReplaceable object. </td></tr> <tr><td class="paramname">start</td><td>offset of first character which will be copied into the array </td></tr> <tr><td class="paramname">limit</td><td>offset immediately following the last character to be copied </td></tr> <tr><td class="paramname">dst</td><td>array in which to copy characters. The length of <code>dst</code> must be at least <code>(limit - start)</code>. </td></tr> </table> </dd> </dl> <dl class="stable"><dt><b><a class="el" href="stable.html#_stable002305">Stable:</a></b></dt><dd>ICU 2.1 </dd></dl> <p>Definition at line <a class="el" href="urep_8h_source.html#l00127">127</a> of file <a class="el" href="urep_8h_source.html">urep.h</a>.</p> </div> </div> <a class="anchor" id="a6c4bfa47b6752f364e4dd3f2991cedbe"></a> <div class="memitem"> <div class="memproto"> <table class="memname"> <tr> <td class="memname">int32_t(* UReplaceableCallbacks::length) (const <a class="el" href="urep_8h.html#a22b35ca6677ac47c2f5b0d01ffbead60">UReplaceable</a> *rep)</td> </tr> </table> </div><div class="memdoc"> <p>Function pointer that returns the number of UChar code units in this text. </p> <dl class="params"><dt>Parameters</dt><dd> <table class="params"> <tr><td class="paramname">rep</td><td>A pointer to "this" UReplaceable object. </td></tr> </table> </dd> </dl> <dl class="section return"><dt>Returns</dt><dd>The length of the text. </dd></dl> <dl class="stable"><dt><b><a class="el" href="stable.html#_stable002301">Stable:</a></b></dt><dd>ICU 2.0 </dd></dl> <p>Definition at line <a class="el" href="urep_8h_source.html#l00063">63</a> of file <a class="el" href="urep_8h_source.html">urep.h</a>.</p> </div> </div> <a class="anchor" id="a6fe116cc3825cc6c749a95f1bd0d2315"></a> <div class="memitem"> <div class="memproto"> <table class="memname"> <tr> <td class="memname">void(* UReplaceableCallbacks::replace) (<a class="el" href="urep_8h.html#a22b35ca6677ac47c2f5b0d01ffbead60">UReplaceable</a> *rep, int32_t start, int32_t limit, const <a class="el" href="umachine_8h.html#a6bb9fad572d65b305324ef288165e2ac">UChar</a> *text, int32_t textLength)</td> </tr> </table> </div><div class="memdoc"> <p>Function pointer that replaces text between start and limit in this text with the given text. </p> <p>Attributes (out of band info) should be retained.</p> <dl class="params"><dt>Parameters</dt><dd> <table class="params"> <tr><td class="paramname">rep</td><td>A pointer to "this" UReplaceable object. </td></tr> <tr><td class="paramname">start</td><td>the starting index of the text to be replaced, inclusive. </td></tr> <tr><td class="paramname">limit</td><td>the ending index of the text to be replaced, exclusive. </td></tr> <tr><td class="paramname">text</td><td>the new text to replace the UChars from start..limit-1. </td></tr> <tr><td class="paramname">textLength</td><td>the number of UChars at text, or -1 if text is null-terminated. </td></tr> </table> </dd> </dl> <dl class="stable"><dt><b><a class="el" href="stable.html#_stable002304">Stable:</a></b></dt><dd>ICU 2.0 </dd></dl> <p>Definition at line <a class="el" href="urep_8h_source.html#l00108">108</a> of file <a class="el" href="urep_8h_source.html">urep.h</a>.</p> </div> </div> <hr/>The documentation for this struct was generated from the following file:<ul> <li><a class="el" href="urep_8h_source.html">urep.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.11 </small></address> </body> </html>