<!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 52.1: 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 style="padding-left: 0.5em;"> <div id="projectname">ICU 52.1  <span id="projectnumber">52.1</span> </div> </td> </tr> </tbody> </table> </div> <!-- end header part --> <!-- Generated by Doxygen 1.8.1.2 --> <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><a name="pub-attribs"></a> Data Fields</h2></td></tr> <tr class="memitem:abe20b175db7fe49c652d32b0047bd44d"><td class="memItemLeft" align="right" valign="top">int32_t(* </td><td class="memItemRight" valign="bottom"><a class="el" href="structUReplaceableCallbacks.html#abe20b175db7fe49c652d32b0047bd44d">length</a> )(const <a class="el" href="urep_8h.html#a22b35ca6677ac47c2f5b0d01ffbead60">UReplaceable</a> *rep)</td></tr> <tr class="memdesc:abe20b175db7fe49c652d32b0047bd44d"><td class="mdescLeft"> </td><td class="mdescRight">Function pointer that returns the number of UChar code units in this text. <a href="#abe20b175db7fe49c652d32b0047bd44d"></a><br/></td></tr> <tr class="memitem:add37b2389b812250b661fe51fe193941"><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#add37b2389b812250b661fe51fe193941">charAt</a> )(const <a class="el" href="urep_8h.html#a22b35ca6677ac47c2f5b0d01ffbead60">UReplaceable</a> *rep, int32_t offset)</td></tr> <tr class="memdesc:add37b2389b812250b661fe51fe193941"><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="#add37b2389b812250b661fe51fe193941"></a><br/></td></tr> <tr class="memitem:a6eb341066f05c7799cd13f6b0f1c56e7"><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#a6eb341066f05c7799cd13f6b0f1c56e7">char32At</a> )(const <a class="el" href="urep_8h.html#a22b35ca6677ac47c2f5b0d01ffbead60">UReplaceable</a> *rep, int32_t offset)</td></tr> <tr class="memdesc:a6eb341066f05c7799cd13f6b0f1c56e7"><td class="mdescLeft"> </td><td class="mdescRight">Function pointer that returns a UChar32 code point at the given offset into this text. <a href="#a6eb341066f05c7799cd13f6b0f1c56e7"></a><br/></td></tr> <tr class="memitem:a2c289af568adb2040768e83ae847c4b7"><td class="memItemLeft" align="right" valign="top">void(* </td><td class="memItemRight" valign="bottom"><a class="el" href="structUReplaceableCallbacks.html#a2c289af568adb2040768e83ae847c4b7">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:a2c289af568adb2040768e83ae847c4b7"><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="#a2c289af568adb2040768e83ae847c4b7"></a><br/></td></tr> <tr class="memitem:a0973de83b91b9d436c268de9bc878316"><td class="memItemLeft" align="right" valign="top">void(* </td><td class="memItemRight" valign="bottom"><a class="el" href="structUReplaceableCallbacks.html#a0973de83b91b9d436c268de9bc878316">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:a0973de83b91b9d436c268de9bc878316"><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="#a0973de83b91b9d436c268de9bc878316"></a><br/></td></tr> <tr class="memitem:afe7d8ea1241deed1c92c7209c99199d7"><td class="memItemLeft" align="right" valign="top">void(* </td><td class="memItemRight" valign="bottom"><a class="el" href="structUReplaceableCallbacks.html#afe7d8ea1241deed1c92c7209c99199d7">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:afe7d8ea1241deed1c92c7209c99199d7"><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="#afe7d8ea1241deed1c92c7209c99199d7"></a><br/></td></tr> </table> <a name="details" id="details"></a><h2>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#_stable002136">Stable:</a></b></dt><dd>ICU 2.0 </dd></dl> <p>Definition at line <a class="el" href="urep_8h_source.html#l00051">51</a> of file <a class="el" href="urep_8h_source.html">urep.h</a>.</p> </div><h2>Field Documentation</h2> <a class="anchor" id="a6eb341066f05c7799cd13f6b0f1c56e7"></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#add37b2389b812250b661fe51fe193941" 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#a6eb341066f05c7799cd13f6b0f1c56e7" 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#_stable002139">Stable:</a></b></dt><dd>ICU 2.0 </dd></dl> <p>Definition at line <a class="el" href="urep_8h_source.html#l00087">87</a> of file <a class="el" href="urep_8h_source.html">urep.h</a>.</p> </div> </div> <a class="anchor" id="add37b2389b812250b661fe51fe193941"></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#add37b2389b812250b661fe51fe193941" 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#a6eb341066f05c7799cd13f6b0f1c56e7" 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#_stable002138">Stable:</a></b></dt><dd>ICU 2.0 </dd></dl> <p>Definition at line <a class="el" href="urep_8h_source.html#l00074">74</a> of file <a class="el" href="urep_8h_source.html">urep.h</a>.</p> </div> </div> <a class="anchor" id="afe7d8ea1241deed1c92c7209c99199d7"></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#_stable002142">Stable:</a></b></dt><dd>ICU 2.0 </dd></dl> <p>Definition at line <a class="el" href="urep_8h_source.html#l00146">146</a> of file <a class="el" href="urep_8h_source.html">urep.h</a>.</p> </div> </div> <a class="anchor" id="a0973de83b91b9d436c268de9bc878316"></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#_stable002141">Stable:</a></b></dt><dd>ICU 2.1 </dd></dl> <p>Definition at line <a class="el" href="urep_8h_source.html#l00125">125</a> of file <a class="el" href="urep_8h_source.html">urep.h</a>.</p> </div> </div> <a class="anchor" id="abe20b175db7fe49c652d32b0047bd44d"></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#_stable002137">Stable:</a></b></dt><dd>ICU 2.0 </dd></dl> <p>Definition at line <a class="el" href="urep_8h_source.html#l00061">61</a> of file <a class="el" href="urep_8h_source.html">urep.h</a>.</p> </div> </div> <a class="anchor" id="a2c289af568adb2040768e83ae847c4b7"></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#_stable002140">Stable:</a></b></dt><dd>ICU 2.0 </dd></dl> <p>Definition at line <a class="el" href="urep_8h_source.html#l00106">106</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 on Fri Oct 4 2013 14:10:24 for ICU 52.1 by  <a href="http://www.doxygen.org/index.html"> <img class="footer" src="doxygen.png" alt="doxygen"/> </a> 1.8.1.2 </small></address> </body> </html>