Sophie

Sophie

distrib > Mageia > 6 > x86_64 > by-pkgid > 3a4e91bde08970529a0aa07935652fe8 > files > 925

icu-doc-58.2-3.mga6.noarch.rpm

<!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: ubiditransform.h File 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
   &#160;<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&#160;Page</span></a></li>
      <li><a href="pages.html"><span>Related&#160;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><a href="annotated.html"><span>Data&#160;Structures</span></a></li>
      <li class="current"><a href="files.html"><span>Files</span></a></li>
    </ul>
  </div>
  <div id="navrow2" class="tabs2">
    <ul class="tablist">
      <li><a href="files.html"><span>File&#160;List</span></a></li>
      <li><a href="globals.html"><span>Globals</span></a></li>
    </ul>
  </div>
<div id="nav-path" class="navpath">
  <ul>
<li class="navelem"><a class="el" href="dir_b2f33c71d4aa5e7af42a1ca61ff5af1b.html">source</a></li><li class="navelem"><a class="el" href="dir_30087b5439e04c85304dbcf15650710b.html">common</a></li><li class="navelem"><a class="el" href="dir_8bf9c54ed6ca2fd1e2117fb037e4ad06.html">unicode</a></li>  </ul>
</div>
</div><!-- top -->
<div class="header">
  <div class="summary">
<a href="#namespaces">Namespaces</a> &#124;
<a href="#typedef-members">Typedefs</a> &#124;
<a href="#enum-members">Enumerations</a> &#124;
<a href="#func-members">Functions</a>  </div>
  <div class="headertitle">
<div class="title">ubiditransform.h File Reference</div>  </div>
</div><!--header-->
<div class="contents">

<p>Bidi Transformations.  
<a href="#details">More...</a></p>
<div class="textblock"><code>#include &quot;<a class="el" href="utypes_8h_source.html">unicode/utypes.h</a>&quot;</code><br />
<code>#include &quot;<a class="el" href="ubidi_8h_source.html">unicode/ubidi.h</a>&quot;</code><br />
<code>#include &quot;<a class="el" href="uchar_8h_source.html">unicode/uchar.h</a>&quot;</code><br />
<code>#include &quot;<a class="el" href="localpointer_8h_source.html">unicode/localpointer.h</a>&quot;</code><br />
</div>
<p><a href="ubiditransform_8h_source.html">Go to the source code of this file.</a></p>
<table class="memberdecls">
<tr class="heading"><td colspan="2"><h2 class="groupheader"><a name="namespaces"></a>
Namespaces</h2></td></tr>
<tr class="memitem:namespaceicu"><td class="memItemLeft" align="right" valign="top"> &#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="namespaceicu.html">icu</a></td></tr>
<tr class="memdesc:namespaceicu"><td class="mdescLeft">&#160;</td><td class="mdescRight">File <a class="el" href="coll_8h.html" title="C++ API: Collation Service. ">coll.h</a>. <br /></td></tr>
<tr class="separator:"><td class="memSeparator" colspan="2">&#160;</td></tr>
</table><table class="memberdecls">
<tr class="heading"><td colspan="2"><h2 class="groupheader"><a name="typedef-members"></a>
Typedefs</h2></td></tr>
<tr class="memitem:a3dec2965749dcf801e9f6aec852ef9ae"><td class="memItemLeft" align="right" valign="top">typedef struct <a class="el" href="ubiditransform_8h.html#a3dec2965749dcf801e9f6aec852ef9ae">UBiDiTransform</a>&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="ubiditransform_8h.html#a3dec2965749dcf801e9f6aec852ef9ae">UBiDiTransform</a></td></tr>
<tr class="memdesc:a3dec2965749dcf801e9f6aec852ef9ae"><td class="mdescLeft">&#160;</td><td class="mdescRight">Forward declaration of the <code>UBiDiTransform</code> structure that stores information used by the layout transformation engine.  <a href="#a3dec2965749dcf801e9f6aec852ef9ae">More...</a><br /></td></tr>
<tr class="separator:a3dec2965749dcf801e9f6aec852ef9ae"><td class="memSeparator" colspan="2">&#160;</td></tr>
</table><table class="memberdecls">
<tr class="heading"><td colspan="2"><h2 class="groupheader"><a name="enum-members"></a>
Enumerations</h2></td></tr>
<tr class="memitem:a6f638f184d3f60e874b15f587fe6bbab"><td class="memItemLeft" align="right" valign="top">enum &#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="ubiditransform_8h.html#a6f638f184d3f60e874b15f587fe6bbab">UBiDiOrder</a> { <a class="el" href="ubiditransform_8h.html#a6f638f184d3f60e874b15f587fe6bbaba77a9eda64f63fabb0e15c5750d8f5362">UBIDI_LOGICAL</a> = 0, 
<a class="el" href="ubiditransform_8h.html#a6f638f184d3f60e874b15f587fe6bbaba9d3eef20b888d608876010b59b28b627">UBIDI_VISUAL</a>
 }</td></tr>
<tr class="separator:a6f638f184d3f60e874b15f587fe6bbab"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:aa10286fa01a861e22070ba2e47f03140"><td class="memItemLeft" align="right" valign="top">enum &#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="ubiditransform_8h.html#aa10286fa01a861e22070ba2e47f03140">UBiDiMirroring</a> { <a class="el" href="ubiditransform_8h.html#aa10286fa01a861e22070ba2e47f03140ae69f35f936883ae2bc592a79abac03f8">UBIDI_MIRRORING_OFF</a> = 0, 
<a class="el" href="ubiditransform_8h.html#aa10286fa01a861e22070ba2e47f03140a29d12daa732e047e5d2ecf49ab5a4b15">UBIDI_MIRRORING_ON</a>
 }<tr class="memdesc:aa10286fa01a861e22070ba2e47f03140"><td class="mdescLeft">&#160;</td><td class="mdescRight"><code>UBiDiMirroring</code> indicates whether or not characters with the "mirrored" property in RTL runs should be replaced with their mirror-image counterparts.  <a href="ubiditransform_8h.html#aa10286fa01a861e22070ba2e47f03140">More...</a><br /></td></tr>
</td></tr>
<tr class="separator:aa10286fa01a861e22070ba2e47f03140"><td class="memSeparator" colspan="2">&#160;</td></tr>
</table><table class="memberdecls">
<tr class="heading"><td colspan="2"><h2 class="groupheader"><a name="func-members"></a>
Functions</h2></td></tr>
<tr class="memitem:a455d3c94a03ae1adf0523d2a328ceabb"><td class="memItemLeft" align="right" valign="top">uint32_t&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="ubiditransform_8h.html#a455d3c94a03ae1adf0523d2a328ceabb">ubiditransform_transform</a> (<a class="el" href="ubiditransform_8h.html#a3dec2965749dcf801e9f6aec852ef9ae">UBiDiTransform</a> *pBiDiTransform, const <a class="el" href="umachine_8h.html#a6bb9fad572d65b305324ef288165e2ac">UChar</a> *src, int32_t srcLength, <a class="el" href="umachine_8h.html#a6bb9fad572d65b305324ef288165e2ac">UChar</a> *dest, int32_t destSize, <a class="el" href="ubidi_8h.html#ab2460a19f323ab9787a79a95db91a606">UBiDiLevel</a> inParaLevel, <a class="el" href="ubiditransform_8h.html#a6f638f184d3f60e874b15f587fe6bbab">UBiDiOrder</a> inOrder, <a class="el" href="ubidi_8h.html#ab2460a19f323ab9787a79a95db91a606">UBiDiLevel</a> outParaLevel, <a class="el" href="ubiditransform_8h.html#a6f638f184d3f60e874b15f587fe6bbab">UBiDiOrder</a> outOrder, <a class="el" href="ubiditransform_8h.html#aa10286fa01a861e22070ba2e47f03140">UBiDiMirroring</a> doMirroring, uint32_t shapingOptions, <a class="el" href="utypes_8h.html#a3343c1c8a8377277046774691c98d78c">UErrorCode</a> *pErrorCode)</td></tr>
<tr class="memdesc:a455d3c94a03ae1adf0523d2a328ceabb"><td class="mdescLeft">&#160;</td><td class="mdescRight">Performs transformation of text from the bidi layout defined by the input ordering scheme to the bidi layout defined by the output ordering scheme, and applies character mirroring and Arabic shaping operations.  <a href="#a455d3c94a03ae1adf0523d2a328ceabb">More...</a><br /></td></tr>
<tr class="separator:a455d3c94a03ae1adf0523d2a328ceabb"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a3c71478d028fb6d01f84c9b0d9470bfb"><td class="memItemLeft" align="right" valign="top"><a class="el" href="ubiditransform_8h.html#a3dec2965749dcf801e9f6aec852ef9ae">UBiDiTransform</a> *&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="ubiditransform_8h.html#a3c71478d028fb6d01f84c9b0d9470bfb">ubiditransform_open</a> (<a class="el" href="utypes_8h.html#a3343c1c8a8377277046774691c98d78c">UErrorCode</a> *pErrorCode)</td></tr>
<tr class="memdesc:a3c71478d028fb6d01f84c9b0d9470bfb"><td class="mdescLeft">&#160;</td><td class="mdescRight">Allocates a <code>UBiDiTransform</code> object.  <a href="#a3c71478d028fb6d01f84c9b0d9470bfb">More...</a><br /></td></tr>
<tr class="separator:a3c71478d028fb6d01f84c9b0d9470bfb"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a8fd902c6ad890b8ffb2b85f3c3a1a6bb"><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="ubiditransform_8h.html#a8fd902c6ad890b8ffb2b85f3c3a1a6bb">ubiditransform_close</a> (<a class="el" href="ubiditransform_8h.html#a3dec2965749dcf801e9f6aec852ef9ae">UBiDiTransform</a> *pBidiTransform)</td></tr>
<tr class="memdesc:a8fd902c6ad890b8ffb2b85f3c3a1a6bb"><td class="mdescLeft">&#160;</td><td class="mdescRight">Deallocates the given <code>UBiDiTransform</code> object.  <a href="#a8fd902c6ad890b8ffb2b85f3c3a1a6bb">More...</a><br /></td></tr>
<tr class="separator:a8fd902c6ad890b8ffb2b85f3c3a1a6bb"><td class="memSeparator" colspan="2">&#160;</td></tr>
</table>
<a name="details" id="details"></a><h2 class="groupheader">Detailed Description</h2>
<div class="textblock"><p>Bidi Transformations. </p>
<p><code>UBiDiOrder</code> indicates the order of text.</p>
<p>This bidi transformation engine supports all possible combinations (4 in total) of input and output text order: </p><ul>
<li>
&lt;logical input, visual output&gt;: unless the output direction is RTL, this corresponds to a normal operation of the Bidi algorithm as described in the Unicode Technical Report and implemented by <code>UBiDi</code> when the reordering mode is set to <code>UBIDI_REORDER_DEFAULT</code>. Visual RTL mode is not supported by <code>UBiDi</code> and is accomplished through reversing a visual LTR string, </li>
<li>
&lt;visual input, logical output&gt;: unless the input direction is RTL, this corresponds to an "inverse bidi algorithm" in <code>UBiDi</code> with the reordering mode set to <code>UBIDI_REORDER_INVERSE_LIKE_DIRECT</code>. Visual RTL mode is not not supported by <code>UBiDi</code> and is accomplished through reversing a visual LTR string, </li>
<li>
&lt;logical input, logical output&gt;: if the input and output base directions mismatch, this corresponds to the <code>UBiDi</code> implementation with the reordering mode set to <code>UBIDI_REORDER_RUNS_ONLY</code>; and if the input and output base directions are identical, the transformation engine will only handle character mirroring and Arabic shaping operations without reordering, </li>
<li>
&lt;visual input, visual output&gt;: this reordering mode is not supported by the <code>UBiDi</code> engine; it implies character mirroring, Arabic shaping, and - if the input/output base directions mismatch - string reverse operations. </li>
</ul>
<dl class="section see"><dt>See also</dt><dd><a class="el" href="ubidi_8h.html#a836b2eaf83ca712cf28e69cd4ba934f4" title="Modify the operation of the Bidi algorithm such that it approximates an &quot;inverse Bidi&quot; algorithm...">ubidi_setInverse</a> </dd>
<dd>
<a class="el" href="ubidi_8h.html#afe123acc1196c4d7363f968ca6af6faa" title="Modify the operation of the Bidi algorithm such that it implements some variant to the basic Bidi alg...">ubidi_setReorderingMode</a> </dd>
<dd>
<a class="el" href="ubidi_8h.html#a88693e5a8ad4be974dc90ec6b8db56dfac366446a9080bf062aca0080e9effc5b" title="Regular Logical to Visual Bidi algorithm according to Unicode. ">UBIDI_REORDER_DEFAULT</a> </dd>
<dd>
<a class="el" href="ubidi_8h.html#a88693e5a8ad4be974dc90ec6b8db56dfa8ca4fe9b9d87e67c37c8a80bed3147aa" title="Visual to Logical algorithm equivalent to the regular Logical to Visual algorithm. ">UBIDI_REORDER_INVERSE_LIKE_DIRECT</a> </dd>
<dd>
<a class="el" href="ubidi_8h.html#a88693e5a8ad4be974dc90ec6b8db56dfa103b373c5933dd91cbfb2382b77bde8d" title="Reorder runs only to transform a Logical LTR string to the Logical RTL string with the same display...">UBIDI_REORDER_RUNS_ONLY</a> </dd></dl>
<dl class="draft"><dt><b><a class="el" href="draft.html#_draft000019">Draft:</a></b></dt><dd>This API may be changed in the future versions and was introduced in ICU 58 </dd></dl>

<p>Definition in file <a class="el" href="ubiditransform_8h_source.html">ubiditransform.h</a>.</p>
</div><h2 class="groupheader">Typedef Documentation</h2>
<a class="anchor" id="a3dec2965749dcf801e9f6aec852ef9ae"></a>
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">typedef struct <a class="el" href="ubiditransform_8h.html#a3dec2965749dcf801e9f6aec852ef9ae">UBiDiTransform</a> <a class="el" href="ubiditransform_8h.html#a3dec2965749dcf801e9f6aec852ef9ae">UBiDiTransform</a></td>
        </tr>
      </table>
</div><div class="memdoc">

<p>Forward declaration of the <code>UBiDiTransform</code> structure that stores information used by the layout transformation engine. </p>
<dl class="draft"><dt><b><a class="el" href="draft.html#_draft000021">Draft:</a></b></dt><dd>This API may be changed in the future versions and was introduced in ICU 58 </dd></dl>

<p>Definition at line <a class="el" href="ubiditransform_8h_source.html#l00109">109</a> of file <a class="el" href="ubiditransform_8h_source.html">ubiditransform.h</a>.</p>

</div>
</div>
<h2 class="groupheader">Enumeration Type Documentation</h2>
<a class="anchor" id="aa10286fa01a861e22070ba2e47f03140"></a>
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">enum <a class="el" href="ubiditransform_8h.html#aa10286fa01a861e22070ba2e47f03140">UBiDiMirroring</a></td>
        </tr>
      </table>
</div><div class="memdoc">

<p><code>UBiDiMirroring</code> indicates whether or not characters with the "mirrored" property in RTL runs should be replaced with their mirror-image counterparts. </p>
<dl class="section see"><dt>See also</dt><dd><a class="el" href="ubidi_8h.html#a0b1370dda1e3ad8ef9c94fd28320153d" title="option bit for ubidi_writeReordered(): replace characters with the &quot;mirrored&quot; property in RTL runs by...">UBIDI_DO_MIRRORING</a> </dd>
<dd>
<a class="el" href="ubidi_8h.html#a25dd2aba9db100133217b9fe76de01de" title="Specify which of the reordering options should be applied during Bidi transformations. ">ubidi_setReorderingOptions</a> </dd>
<dd>
<a class="el" href="ubidi_8h.html#a26790ff71c59f223ded4047da5626725" title="Take a UBiDi object containing the reordering information for a piece of text (one or more paragraphs...">ubidi_writeReordered</a> </dd>
<dd>
<a class="el" href="ubidi_8h.html#a2b0dd2bc3a984509545449d76cb1ed2e" title="Reverse a Right-To-Left run of Unicode text. ">ubidi_writeReverse</a> </dd></dl>
<dl class="draft"><dt><b><a class="el" href="draft.html#_draft000020">Draft:</a></b></dt><dd>This API may be changed in the future versions and was introduced in ICU 58 </dd></dl>
<table class="fieldtable">
<tr><th colspan="2">Enumerator</th></tr><tr><td class="fieldname"><a class="anchor" id="aa10286fa01a861e22070ba2e47f03140ae69f35f936883ae2bc592a79abac03f8"></a>UBIDI_MIRRORING_OFF&#160;</td><td class="fielddoc">
<p>0: Constant indicating that character mirroring should not be performed. </p>
<p>This is the default. </p><dl class="draft"><dt><b><a class="el" href="draft.html#_draft000027">Draft:</a></b></dt><dd>This API may be changed in the future versions and was introduced in ICU 58 </dd></dl>
</td></tr>
<tr><td class="fieldname"><a class="anchor" id="aa10286fa01a861e22070ba2e47f03140a29d12daa732e047e5d2ecf49ab5a4b15"></a>UBIDI_MIRRORING_ON&#160;</td><td class="fielddoc">
<p>1: Constant indicating that character mirroring should be performed. </p>
<p>This corresponds to calling <code>ubidi_writeReordered</code> or <code>ubidi_writeReverse</code> with the <code>UBIDI_DO_MIRRORING</code> option bit set. </p><dl class="draft"><dt><b><a class="el" href="draft.html#_draft000028">Draft:</a></b></dt><dd>This API may be changed in the future versions and was introduced in ICU 58 </dd></dl>
</td></tr>
</table>

<p>Definition at line <a class="el" href="ubiditransform_8h_source.html#l00088">88</a> of file <a class="el" href="ubiditransform_8h_source.html">ubiditransform.h</a>.</p>

</div>
</div>
<a class="anchor" id="a6f638f184d3f60e874b15f587fe6bbab"></a>
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">enum <a class="el" href="ubiditransform_8h.html#a6f638f184d3f60e874b15f587fe6bbab">UBiDiOrder</a></td>
        </tr>
      </table>
</div><div class="memdoc">
<table class="fieldtable">
<tr><th colspan="2">Enumerator</th></tr><tr><td class="fieldname"><a class="anchor" id="a6f638f184d3f60e874b15f587fe6bbaba77a9eda64f63fabb0e15c5750d8f5362"></a>UBIDI_LOGICAL&#160;</td><td class="fielddoc">
<p>0: Constant indicating a logical order. </p>
<p>This is the default for input text. </p><dl class="draft"><dt><b><a class="el" href="draft.html#_draft000025">Draft:</a></b></dt><dd>This API may be changed in the future versions and was introduced in ICU 58 </dd></dl>
</td></tr>
<tr><td class="fieldname"><a class="anchor" id="a6f638f184d3f60e874b15f587fe6bbaba9d3eef20b888d608876010b59b28b627"></a>UBIDI_VISUAL&#160;</td><td class="fielddoc">
<p>1: Constant indicating a visual order. </p>
<p>This is a default for output text. </p><dl class="draft"><dt><b><a class="el" href="draft.html#_draft000026">Draft:</a></b></dt><dd>This API may be changed in the future versions and was introduced in ICU 58 </dd></dl>
</td></tr>
</table>

<p>Definition at line <a class="el" href="ubiditransform_8h_source.html#l00065">65</a> of file <a class="el" href="ubiditransform_8h_source.html">ubiditransform.h</a>.</p>

</div>
</div>
<h2 class="groupheader">Function Documentation</h2>
<a class="anchor" id="a8fd902c6ad890b8ffb2b85f3c3a1a6bb"></a>
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">void ubiditransform_close </td>
          <td>(</td>
          <td class="paramtype"><a class="el" href="ubiditransform_8h.html#a3dec2965749dcf801e9f6aec852ef9ae">UBiDiTransform</a> *&#160;</td>
          <td class="paramname"><em>pBidiTransform</em></td><td>)</td>
          <td></td>
        </tr>
      </table>
</div><div class="memdoc">

<p>Deallocates the given <code>UBiDiTransform</code> object. </p>
<dl class="draft"><dt><b><a class="el" href="draft.html#_draft000024">Draft:</a></b></dt><dd>This API may be changed in the future versions and was introduced in ICU 58 </dd></dl>

</div>
</div>
<a class="anchor" id="a3c71478d028fb6d01f84c9b0d9470bfb"></a>
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname"><a class="el" href="ubiditransform_8h.html#a3dec2965749dcf801e9f6aec852ef9ae">UBiDiTransform</a>* ubiditransform_open </td>
          <td>(</td>
          <td class="paramtype"><a class="el" href="utypes_8h.html#a3343c1c8a8377277046774691c98d78c">UErrorCode</a> *&#160;</td>
          <td class="paramname"><em>pErrorCode</em></td><td>)</td>
          <td></td>
        </tr>
      </table>
</div><div class="memdoc">

<p>Allocates a <code>UBiDiTransform</code> object. </p>
<p>This object can be reused, e.g. with different ordering schemes, mirroring or shaping options.</p>
<p><b>Note:</b>The object can only be reused in the same thread. All other threads should allocate a new <code>UBiDiTransform</code> object before using it.</p>
<p>Example of usage:</p>
<pre>
<div class="fragment"><div class="line"><a name="l00001"></a><span class="lineno">    1</span>&#160;  UErrorCode errorCode = U_ZERO_ERROR;</div><div class="line"><a name="l00002"></a><span class="lineno">    2</span>&#160;  // Open a new UBiDiTransform.</div><div class="line"><a name="l00003"></a><span class="lineno">    3</span>&#160;  UBiDiTransform* transform = ubiditransform_open(&amp;errorCode);</div><div class="line"><a name="l00004"></a><span class="lineno">    4</span>&#160;  // Run a transformation.</div><div class="line"><a name="l00005"></a><span class="lineno">    5</span>&#160;  ubiditransform_transform(transform,</div><div class="line"><a name="l00006"></a><span class="lineno">    6</span>&#160;           text1, -1, text2, -1,</div><div class="line"><a name="l00007"></a><span class="lineno">    7</span>&#160;           UBIDI_RTL, UBIDI_LOGICAL,</div><div class="line"><a name="l00008"></a><span class="lineno">    8</span>&#160;           UBIDI_LTR, UBIDI_VISUAL,</div><div class="line"><a name="l00009"></a><span class="lineno">    9</span>&#160;           UBIDI_MIRRORING_ON,</div><div class="line"><a name="l00010"></a><span class="lineno">   10</span>&#160;           U_SHAPE_DIGITS_EN2AN,</div><div class="line"><a name="l00011"></a><span class="lineno">   11</span>&#160;           &amp;errorCode);</div><div class="line"><a name="l00012"></a><span class="lineno">   12</span>&#160;  // Do something with the output text and invoke another transformation using</div><div class="line"><a name="l00013"></a><span class="lineno">   13</span>&#160;  //   that text as input.</div><div class="line"><a name="l00014"></a><span class="lineno">   14</span>&#160;  ubiditransform_transform(transform,</div><div class="line"><a name="l00015"></a><span class="lineno">   15</span>&#160;           text2, -1, text3, -1,</div><div class="line"><a name="l00016"></a><span class="lineno">   16</span>&#160;           UBIDI_LTR, UBIDI_VISUAL,</div><div class="line"><a name="l00017"></a><span class="lineno">   17</span>&#160;           UBIDI_RTL, UBIDI_VISUAL,</div><div class="line"><a name="l00018"></a><span class="lineno">   18</span>&#160;           UBIDI_MIRRORING_ON,</div><div class="line"><a name="l00019"></a><span class="lineno">   19</span>&#160;           0, &amp;errorCode);</div><div class="line"><a name="l00020"></a><span class="lineno">   20</span>&#160;*</div></div><!-- fragment -->
  </pre> <p>The <code>UBiDiTransform</code> object must be deallocated by calling <code><a class="el" href="ubiditransform_8h.html#a8fd902c6ad890b8ffb2b85f3c3a1a6bb" title="Deallocates the given UBiDiTransform object. ">ubiditransform_close()</a></code>.</p>
<dl class="section return"><dt>Returns</dt><dd>An empty <code>UBiDiTransform</code> object. </dd></dl>
<dl class="draft"><dt><b><a class="el" href="draft.html#_draft000023">Draft:</a></b></dt><dd>This API may be changed in the future versions and was introduced in ICU 58 </dd></dl>

</div>
</div>
<a class="anchor" id="a455d3c94a03ae1adf0523d2a328ceabb"></a>
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">uint32_t ubiditransform_transform </td>
          <td>(</td>
          <td class="paramtype"><a class="el" href="ubiditransform_8h.html#a3dec2965749dcf801e9f6aec852ef9ae">UBiDiTransform</a> *&#160;</td>
          <td class="paramname"><em>pBiDiTransform</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">const <a class="el" href="umachine_8h.html#a6bb9fad572d65b305324ef288165e2ac">UChar</a> *&#160;</td>
          <td class="paramname"><em>src</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">int32_t&#160;</td>
          <td class="paramname"><em>srcLength</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype"><a class="el" href="umachine_8h.html#a6bb9fad572d65b305324ef288165e2ac">UChar</a> *&#160;</td>
          <td class="paramname"><em>dest</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">int32_t&#160;</td>
          <td class="paramname"><em>destSize</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype"><a class="el" href="ubidi_8h.html#ab2460a19f323ab9787a79a95db91a606">UBiDiLevel</a>&#160;</td>
          <td class="paramname"><em>inParaLevel</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype"><a class="el" href="ubiditransform_8h.html#a6f638f184d3f60e874b15f587fe6bbab">UBiDiOrder</a>&#160;</td>
          <td class="paramname"><em>inOrder</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype"><a class="el" href="ubidi_8h.html#ab2460a19f323ab9787a79a95db91a606">UBiDiLevel</a>&#160;</td>
          <td class="paramname"><em>outParaLevel</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype"><a class="el" href="ubiditransform_8h.html#a6f638f184d3f60e874b15f587fe6bbab">UBiDiOrder</a>&#160;</td>
          <td class="paramname"><em>outOrder</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype"><a class="el" href="ubiditransform_8h.html#aa10286fa01a861e22070ba2e47f03140">UBiDiMirroring</a>&#160;</td>
          <td class="paramname"><em>doMirroring</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">uint32_t&#160;</td>
          <td class="paramname"><em>shapingOptions</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype"><a class="el" href="utypes_8h.html#a3343c1c8a8377277046774691c98d78c">UErrorCode</a> *&#160;</td>
          <td class="paramname"><em>pErrorCode</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
</div><div class="memdoc">

<p>Performs transformation of text from the bidi layout defined by the input ordering scheme to the bidi layout defined by the output ordering scheme, and applies character mirroring and Arabic shaping operations. </p>
<p>In terms of <code>UBiDi</code>, such a transformation implies: </p><ul>
<li>
calling <code>ubidi_setReorderingMode</code> as needed (when the reordering mode is other than normal), </li>
<li>
calling <code>ubidi_setInverse</code> as needed (when text should be transformed from a visual to a logical form), </li>
<li>
resolving embedding levels of each character in the input text by calling <code>ubidi_setPara</code>, </li>
<li>
reordering the characters based on the computed embedding levels, also performing character mirroring as needed, and streaming the result to the output, by calling <code>ubidi_writeReordered</code>, </li>
<li>
performing Arabic digit and letter shaping on the output text by calling <code>u_shapeArabic</code>. </li>
</ul>
<p>An "ordering scheme" encompasses the base direction and the order of text, and these characteristics must be defined by the caller for both input and output explicitly .</p>
<p>There are 36 possible combinations of &lt;input, output&gt; ordering schemes, which are partially supported by <code>UBiDi</code> already. Examples of the currently supported combinations: </p><ul>
<li>
&lt;Logical LTR, Visual LTR&gt;: this is equivalent to calling <code>ubidi_setPara</code> with <code>paraLevel == UBIDI_LTR</code>, </li>
<li>
&lt;Logical RTL, Visual LTR&gt;: this is equivalent to calling <code>ubidi_setPara</code> with <code>paraLevel == UBIDI_RTL</code>, </li>
<li>
&lt;Logical Default ("Auto") LTR, Visual LTR&gt;: this is equivalent to calling <code>ubidi_setPara</code> with <code>paraLevel == UBIDI_DEFAULT_LTR</code>, </li>
<li>
&lt;Logical Default ("Auto") RTL, Visual LTR&gt;: this is equivalent to calling <code>ubidi_setPara</code> with <code>paraLevel == UBIDI_DEFAULT_RTL</code>, </li>
<li>
&lt;Visual LTR, Logical LTR&gt;: this is equivalent to calling <code>ubidi_setInverse(UBiDi*, TRUE)</code> and then <code>ubidi_setPara</code> with <code>paraLevel == UBIDI_LTR</code>, </li>
<li>
&lt;Visual LTR, Logical RTL&gt;: this is equivalent to calling <code>ubidi_setInverse(UBiDi*, TRUE)</code> and then <code>ubidi_setPara</code> with <code>paraLevel == UBIDI_RTL</code>. </li>
</ul>
<p>All combinations that involve the Visual RTL scheme are unsupported by <code>UBiDi</code>, for instance: </p><ul>
<li>
&lt;Logical LTR, Visual RTL&gt;, </li>
<li>
&lt;Visual RTL, Logical RTL&gt;. </li>
</ul>
<p>Example of usage of the transformation engine:<br />
 </p><pre>
<div class="fragment"><div class="line"><a name="l00001"></a><span class="lineno">    1</span>&#160;  UChar text1[] = {&#39;a&#39;, &#39;b&#39;, &#39;c&#39;, 0x0625, &#39;1&#39;, 0};</div><div class="line"><a name="l00002"></a><span class="lineno">    2</span>&#160;  UChar text2[] = {&#39;a&#39;, &#39;b&#39;, &#39;c&#39;, 0x0625, &#39;1&#39;, 0};</div><div class="line"><a name="l00003"></a><span class="lineno">    3</span>&#160;  UErrorCode errorCode = U_ZERO_ERROR;</div><div class="line"><a name="l00004"></a><span class="lineno">    4</span>&#160;  // Run a transformation.</div><div class="line"><a name="l00005"></a><span class="lineno">    5</span>&#160;  ubiditransform_transform(pBidiTransform,</div><div class="line"><a name="l00006"></a><span class="lineno">    6</span>&#160;           text1, -1, text2, -1,</div><div class="line"><a name="l00007"></a><span class="lineno">    7</span>&#160;           UBIDI_LTR, UBIDI_VISUAL,</div><div class="line"><a name="l00008"></a><span class="lineno">    8</span>&#160;           UBIDI_RTL, UBIDI_LOGICAL,</div><div class="line"><a name="l00009"></a><span class="lineno">    9</span>&#160;           UBIDI_MIRRORING_OFF,</div><div class="line"><a name="l00010"></a><span class="lineno">   10</span>&#160;           U_SHAPE_DIGITS_AN2EN | U_SHAPE_DIGIT_TYPE_AN_EXTENDED,</div><div class="line"><a name="l00011"></a><span class="lineno">   11</span>&#160;           &amp;errorCode);</div><div class="line"><a name="l00012"></a><span class="lineno">   12</span>&#160;  // Do something with text2.</div><div class="line"><a name="l00013"></a><span class="lineno">   13</span>&#160;   text2[4] = &#39;2&#39;;</div><div class="line"><a name="l00014"></a><span class="lineno">   14</span>&#160;  // Run a reverse transformation.</div><div class="line"><a name="l00015"></a><span class="lineno">   15</span>&#160;  ubiditransform_transform(pBidiTransform,</div><div class="line"><a name="l00016"></a><span class="lineno">   16</span>&#160;           text2, -1, text1, -1,</div><div class="line"><a name="l00017"></a><span class="lineno">   17</span>&#160;           UBIDI_RTL, UBIDI_LOGICAL,</div><div class="line"><a name="l00018"></a><span class="lineno">   18</span>&#160;           UBIDI_LTR, UBIDI_VISUAL,</div><div class="line"><a name="l00019"></a><span class="lineno">   19</span>&#160;           UBIDI_MIRRORING_OFF,</div><div class="line"><a name="l00020"></a><span class="lineno">   20</span>&#160;           U_SHAPE_DIGITS_EN2AN | U_SHAPE_DIGIT_TYPE_AN_EXTENDED,</div><div class="line"><a name="l00021"></a><span class="lineno">   21</span>&#160;           &amp;errorCode);</div><div class="line"><a name="l00022"></a><span class="lineno">   22</span>&#160;*</div></div><!-- fragment -->
  </pre> <dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramname">pBiDiTransform</td><td>A pointer to a <code>UBiDiTransform</code> object allocated with <code><a class="el" href="ubiditransform_8h.html#a3c71478d028fb6d01f84c9b0d9470bfb" title="Allocates a UBiDiTransform object. ">ubiditransform_open()</a></code> or <code>NULL</code>.</td></tr>
  </table>
  </dd>
</dl>
<p>This object serves for one-time setup to amortize initialization overheads. Use of this object is not thread-safe. All other threads should allocate a new <code>UBiDiTransform</code> object by calling <code><a class="el" href="ubiditransform_8h.html#a3c71478d028fb6d01f84c9b0d9470bfb" title="Allocates a UBiDiTransform object. ">ubiditransform_open()</a></code> before using it. Alternatively, a caller can set this parameter to <code>NULL</code>, in which case the object will be allocated by the engine on the fly.</p>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramname">src</td><td>A pointer to the text that the Bidi layout transformations will be performed on. </td></tr>
  </table>
  </dd>
</dl>
<p><b>Note:</b> the text must be (at least) <code>srcLength</code> long.</p>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramname">srcLength</td><td>The length of the text, in number of UChars. If <code>length == -1</code> then the text must be zero-terminated. </td></tr>
    <tr><td class="paramname">dest</td><td>A pointer to where the processed text is to be copied. </td></tr>
    <tr><td class="paramname">destSize</td><td>The size of the <code>dest</code> buffer, in number of UChars. If the <code>U_SHAPE_LETTERS_UNSHAPE</code> option is set, then the destination length could be as large as <code>srcLength * 2</code>. Otherwise, the destination length will not exceed <code>srcLength</code>. If the caller reserves the last position for zero-termination, it should be excluded from <code>destSize</code>. </td></tr>
  </table>
  </dd>
</dl>
<p><code>destSize == -1</code> is allowed and makes sense when <code>dest</code> was holds some meaningful value, e.g. that of <code>src</code>. In this case <code>dest</code> must be zero-terminated.</p>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramname">inParaLevel</td><td>A base embedding level of the input as defined in <code>ubidi_setPara</code> documentation for the <code>paraLevel</code> parameter. </td></tr>
    <tr><td class="paramname">inOrder</td><td>An order of the input, which can be one of the <code>UBiDiOrder</code> values. </td></tr>
    <tr><td class="paramname">outParaLevel</td><td>A base embedding level of the output as defined in <code>ubidi_setPara</code> documentation for the <code>paraLevel</code> parameter. </td></tr>
    <tr><td class="paramname">outOrder</td><td>An order of the output, which can be one of the <code>UBiDiOrder</code> values. </td></tr>
    <tr><td class="paramname">doMirroring</td><td>Indicates whether or not to perform character mirroring, and can accept one of the <code>UBiDiMirroring</code> values. </td></tr>
    <tr><td class="paramname">shapingOptions</td><td>Arabic digit and letter shaping options defined in the <a class="el" href="ushape_8h.html" title="C API: Arabic shaping. ">ushape.h</a> documentation. </td></tr>
  </table>
  </dd>
</dl>
<p><b>Note:</b> Direction indicator options are computed by the transformation engine based on the effective ordering schemes, so user-defined direction indicators will be ignored.</p>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramname">pErrorCode</td><td>A pointer to an error code value.</td></tr>
  </table>
  </dd>
</dl>
<dl class="section return"><dt>Returns</dt><dd>The destination length, i.e. the number of UChars written to <code>dest</code>. If the transformation fails, the return value will be 0 (and the error code will be written to <code>pErrorCode</code>).</dd></dl>
<dl class="section see"><dt>See also</dt><dd><a class="el" href="ubidi_8h.html#ab2460a19f323ab9787a79a95db91a606" title="UBiDiLevel is the type of the level values in this Bidi implementation. ">UBiDiLevel</a> </dd>
<dd>
<a class="el" href="ubiditransform_8h.html#a6f638f184d3f60e874b15f587fe6bbab">UBiDiOrder</a> </dd>
<dd>
<a class="el" href="ubiditransform_8h.html#aa10286fa01a861e22070ba2e47f03140" title="UBiDiMirroring indicates whether or not characters with the &quot;mirrored&quot; property in RTL runs should be...">UBiDiMirroring</a> </dd>
<dd>
<a class="el" href="ubidi_8h.html#abdfe9e113a19dd8521d3b7ac8220fe11" title="Perform the Unicode Bidi algorithm. ">ubidi_setPara</a> </dd>
<dd>
<a class="el" href="ushape_8h.html#a1f89291c5a24a50b8f6dcad5eb4668f7" title="Shape Arabic text on a character basis. ">u_shapeArabic</a> </dd></dl>
<dl class="draft"><dt><b><a class="el" href="draft.html#_draft000022">Draft:</a></b></dt><dd>This API may be changed in the future versions and was introduced in ICU 58 </dd></dl>

</div>
</div>
</div><!-- contents -->
<!-- start footer part -->
<hr class="footer"/><address class="footer"><small>
Generated by &#160;<a href="http://www.doxygen.org/index.html">
<img class="footer" src="doxygen.png" alt="doxygen"/>
</a> 1.8.11
</small></address>
</body>
</html>