Logo Search packages:      
Sourcecode: icu version File versions  Download package

UBiDiReorderingOption values indicate which options are specified to affect the Bidi algorithm.

See also:
ubidi_setReorderingOptions ICU 3.6
Enumerator:
UBIDI_OPTION_DEFAULT  option value for ubidi_setReorderingOptions: disable all the options which can be set with this function
See also:
ubidi_setReorderingOptions ICU 3.6
UBIDI_OPTION_INSERT_MARKS  option bit for ubidi_setReorderingOptions: insert Bidi marks (LRM or RLM) when needed to ensure correct result of a reordering to a Logical order

This option must be set or reset before calling ubidi_setPara.

This option is significant only with reordering modes which generate a result with Logical order, specifically:

If this option is set in conjunction with reordering mode UBIDI_REORDER_INVERSE_NUMBERS_AS_L or with calling ubidi_setInverse(TRUE), it implies option UBIDI_INSERT_LRM_FOR_NUMERIC in calls to function ubidi_writeReordered().

For other reordering modes, a minimum number of LRM or RLM characters will be added to the source text after reordering it so as to ensure round trip, i.e. when applying the inverse reordering mode on the resulting logical text with removal of Bidi marks (option UBIDI_OPTION_REMOVE_CONTROLS set before calling ubidi_setPara() or option UBIDI_REMOVE_BIDI_CONTROLS in ubidi_writeReordered), the result will be identical to the source text in the first transformation.

This option will be ignored if specified together with option UBIDI_OPTION_REMOVE_CONTROLS. It inhibits option UBIDI_REMOVE_BIDI_CONTROLS in calls to function ubidi_writeReordered() and it implies option UBIDI_INSERT_LRM_FOR_NUMERIC in calls to function ubidi_writeReordered() if the reordering mode is UBIDI_REORDER_INVERSE_NUMBERS_AS_L.

See also:
ubidi_setReorderingMode

ubidi_setReorderingOptions ICU 3.6

UBIDI_OPTION_REMOVE_CONTROLS  option bit for ubidi_setReorderingOptions: remove Bidi control characters

This option must be set or reset before calling ubidi_setPara.

This option nullifies option UBIDI_OPTION_INSERT_MARKS. It inhibits option UBIDI_INSERT_LRM_FOR_NUMERIC in calls to function ubidi_writeReordered() and it implies option UBIDI_REMOVE_BIDI_CONTROLS in calls to that function.

See also:
ubidi_setReorderingMode

ubidi_setReorderingOptions ICU 3.6

UBIDI_OPTION_STREAMING  option bit for ubidi_setReorderingOptions: process the output as part of a stream to be continued

This option must be set or reset before calling ubidi_setPara.

This option specifies that the caller is interested in processing large text object in parts. The results of the successive calls are expected to be concatenated by the caller. Only the call for the last part will have this option bit off.

When this option bit is on, ubidi_setPara() may process less than the full source text in order to truncate the text at a meaningful boundary. The caller should call ubidi_getProcessedLength() immediately after calling ubidi_setPara() in order to determine how much of the source text has been processed. Source text beyond that length should be resubmitted in following calls to ubidi_setPara. The processed length may be less than the length of the source text if a character preceding the last character of the source text constitutes a reasonable boundary (like a block separator) for text to be continued.
If the last character of the source text constitutes a reasonable boundary, the whole text will be processed at once.
If nowhere in the source text there exists such a reasonable boundary, the processed length will be zero.
The caller should check for such an occurrence and do one of the following:

  • submit a larger amount of text with a better chance to include a reasonable boundary.
  • resubmit the same text after turning off option UBIDI_OPTION_STREAMING.
In all cases, this option should be turned off before processing the last part of the text.

When the UBIDI_OPTION_STREAMING option is used, it is recommended to call ubidi_orderParagraphsLTR() with argument orderParagraphsLTR set to TRUE before calling ubidi_setPara so that later paragraphs may be concatenated to previous paragraphs on the right.

See also:
ubidi_setReorderingMode

ubidi_setReorderingOptions

ubidi_getProcessedLength

ubidi_orderParagraphsLTR ICU 3.6

Definition at line 867 of file ubidi.h.

                                   {
    /**
     * option value for <code>ubidi_setReorderingOptions</code>:
     * disable all the options which can be set with this function
     * @see ubidi_setReorderingOptions
     * @stable ICU 3.6
     */
    UBIDI_OPTION_DEFAULT = 0,

    /**
     * option bit for <code>ubidi_setReorderingOptions</code>:
     * insert Bidi marks (LRM or RLM) when needed to ensure correct result of
     * a reordering to a Logical order
     *
     * <p>This option must be set or reset before calling
     * <code>ubidi_setPara</code>.</p>
     *
     * <p>This option is significant only with reordering modes which generate
     * a result with Logical order, specifically:</p>
     * <ul>
     *   <li><code>#UBIDI_REORDER_RUNS_ONLY</code></li>
     *   <li><code>#UBIDI_REORDER_INVERSE_NUMBERS_AS_L</code></li>
     *   <li><code>#UBIDI_REORDER_INVERSE_LIKE_DIRECT</code></li>
     *   <li><code>#UBIDI_REORDER_INVERSE_FOR_NUMBERS_SPECIAL</code></li>
     * </ul>
     *
     * <p>If this option is set in conjunction with reordering mode
     * <code>#UBIDI_REORDER_INVERSE_NUMBERS_AS_L</code> or with calling
     * <code>ubidi_setInverse(TRUE)</code>, it implies
     * option <code>#UBIDI_INSERT_LRM_FOR_NUMERIC</code>
     * in calls to function <code>ubidi_writeReordered()</code>.</p>
     *
     * <p>For other reordering modes, a minimum number of LRM or RLM characters
     * will be added to the source text after reordering it so as to ensure
     * round trip, i.e. when applying the inverse reordering mode on the
     * resulting logical text with removal of Bidi marks
     * (option <code>#UBIDI_OPTION_REMOVE_CONTROLS</code> set before calling
     * <code>ubidi_setPara()</code> or option <code>#UBIDI_REMOVE_BIDI_CONTROLS</code>
     * in <code>ubidi_writeReordered</code>), the result will be identical to the
     * source text in the first transformation.
     *
     * <p>This option will be ignored if specified together with option
     * <code>#UBIDI_OPTION_REMOVE_CONTROLS</code>. It inhibits option
     * <code>UBIDI_REMOVE_BIDI_CONTROLS</code> in calls to function
     * <code>ubidi_writeReordered()</code> and it implies option
     * <code>#UBIDI_INSERT_LRM_FOR_NUMERIC</code> in calls to function
     * <code>ubidi_writeReordered()</code> if the reordering mode is
     * <code>#UBIDI_REORDER_INVERSE_NUMBERS_AS_L</code>.</p>
     *
     * @see ubidi_setReorderingMode
     * @see ubidi_setReorderingOptions
     * @stable ICU 3.6
     */
    UBIDI_OPTION_INSERT_MARKS = 1,

    /**
     * option bit for <code>ubidi_setReorderingOptions</code>:
     * remove Bidi control characters
     *
     * <p>This option must be set or reset before calling
     * <code>ubidi_setPara</code>.</p>
     *
     * <p>This option nullifies option <code>#UBIDI_OPTION_INSERT_MARKS</code>.
     * It inhibits option <code>#UBIDI_INSERT_LRM_FOR_NUMERIC</code> in calls
     * to function <code>ubidi_writeReordered()</code> and it implies option
     * <code>#UBIDI_REMOVE_BIDI_CONTROLS</code> in calls to that function.</p>
     *
     * @see ubidi_setReorderingMode
     * @see ubidi_setReorderingOptions
     * @stable ICU 3.6
     */
    UBIDI_OPTION_REMOVE_CONTROLS = 2,

    /**
     * option bit for <code>ubidi_setReorderingOptions</code>:
     * process the output as part of a stream to be continued
     *
     * <p>This option must be set or reset before calling
     * <code>ubidi_setPara</code>.</p>
     *
     * <p>This option specifies that the caller is interested in processing large
     * text object in parts.
     * The results of the successive calls are expected to be concatenated by the
     * caller. Only the call for the last part will have this option bit off.</p>
     *
     * <p>When this option bit is on, <code>ubidi_setPara()</code> may process
     * less than the full source text in order to truncate the text at a meaningful
     * boundary. The caller should call <code>ubidi_getProcessedLength()</code>
     * immediately after calling <code>ubidi_setPara()</code> in order to
     * determine how much of the source text has been processed.
     * Source text beyond that length should be resubmitted in following calls to
     * <code>ubidi_setPara</code>. The processed length may be less than
     * the length of the source text if a character preceding the last character of
     * the source text constitutes a reasonable boundary (like a block separator)
     * for text to be continued.<br>
     * If the last character of the source text constitutes a reasonable
     * boundary, the whole text will be processed at once.<br>
     * If nowhere in the source text there exists
     * such a reasonable boundary, the processed length will be zero.<br>
     * The caller should check for such an occurrence and do one of the following:
     * <ul><li>submit a larger amount of text with a better chance to include
     *         a reasonable boundary.</li>
     *     <li>resubmit the same text after turning off option
     *         <code>UBIDI_OPTION_STREAMING</code>.</li></ul>
     * In all cases, this option should be turned off before processing the last
     * part of the text.</p>
     *
     * <p>When the <code>UBIDI_OPTION_STREAMING</code> option is used,
     * it is recommended to call <code>ubidi_orderParagraphsLTR()</code> with
     * argument <code>orderParagraphsLTR</code> set to <code>TRUE</code> before
     * calling <code>ubidi_setPara</code> so that later paragraphs may be
     * concatenated to previous paragraphs on the right.</p>
     *
     * @see ubidi_setReorderingMode
     * @see ubidi_setReorderingOptions
     * @see ubidi_getProcessedLength
     * @see ubidi_orderParagraphsLTR
     * @stable ICU 3.6
     */
    UBIDI_OPTION_STREAMING = 4
} UBiDiReorderingOption;


Generated by  Doxygen 1.6.0   Back to index