Main Page   Class Hierarchy   Alphabetical List   Compound List   File List   Compound Members   File Members  

BiDi Class Reference

BiDi is a C++ wrapper class for UBiDi. More...

#include <bidi.h>

List of all members.

Public Methods

 BiDi ()
 Default constructor, calls ubidi_open(). More...

 BiDi (UErrorCode &rErrorCode)
 Constructor, calls ubidi_open(). More...

 BiDi (UTextOffset maxLength, UTextOffset maxRunCount, UErrorCode &rErrorCode)
 Preallocating constructor, calls ubidi_openSized(). More...

 ~BiDi ()
 Destructor, calls ubidi_close(). More...

void setInverse (UBool isInverse)
 Modify the operation of the BiDi algorithm such that it approximates an "inverse BiDi" algorithm. More...

UBool isInverse ()
 Is this BiDi object set to perform the inverse BiDi algorithm? More...

BiDi& setPara (const UChar *text, UTextOffset length, UBiDiLevel paraLevel, UBiDiLevel *embeddingLevels, UErrorCode &rErrorCode)
 Set this object for one paragraph's text. More...

BiDi& setLine (const BiDi &rParaBiDi, UTextOffset start, UTextOffset limit, UErrorCode &rErrorCode)
 Set this object for one line of the paragraph object's text. More...

UBiDiDirection getDirection () const
 Get the directionality of the text. More...

const UChargetText () const
 Get the pointer to the text. More...

UTextOffset getLength () const
 Get the length of the text. More...

UBiDiLevel getParaLevel () const
 Get the paragraph level of the text. More...

UBiDiLevel getLevelAt (UTextOffset charIndex) const
 Get the level for one character. More...

const UBiDiLevelgetLevels (UErrorCode &rErrorCode)
 Get an array of levels for each character. More...

void getLogicalRun (UTextOffset logicalStart, UTextOffset &rLogicalLimit, UBiDiLevel &rLevel) const
 Get a logical run. More...

UTextOffset countRuns (UErrorCode &rErrorCode)
 Get the number of runs. More...

UBiDiDirection getVisualRun (UTextOffset runIndex, UTextOffset &rLogicalStart, UTextOffset &rLength)
 Get one run's logical start, length, and directionality, which can be 0 for LTR or 1 for RTL. More...

UTextOffset getVisualIndex (UTextOffset logicalIndex, UErrorCode &rErrorCode)
 Get the visual position from a logical text position. More...

UTextOffset getLogicalIndex (UTextOffset visualIndex, UErrorCode &rErrorCode)
 Get the logical text position from a visual position. More...

void getLogicalMap (UTextOffset *indexMap, UErrorCode &rErrorCode)
 Get a logical-to-visual index map (array) for the characters in the UBiDi (paragraph or line) object. More...

void getVisualMap (UTextOffset *indexMap, UErrorCode &rErrorCode)
 Get a visual-to-logical index map (array) for the characters in the UBiDi (paragraph or line) object. More...

UTextOffset writeReordered (UChar *dest, int32_t destSize, uint16_t options, UErrorCode &rErrorCode)
 Use the BiDi object containing the reordering information for one paragraph or line of text as set by setPara() or setLine() and write a reordered string to the destination buffer. More...


Static Public Methods

void reorderLogical (const UBiDiLevel *levels, UTextOffset length, UTextOffset *indexMap)
 Same as ubidi_reorderLogical(). More...

void reorderVisual (const UBiDiLevel *levels, UTextOffset length, UTextOffset *indexMap)
 Same as ubidi_reorderVisual(). More...

void invertMap (const UTextOffset *srcMap, UTextOffset *destMap, UTextOffset length)
 Same as ubidi_invertMap(). More...

UTextOffset writeReverse (const UChar *src, int32_t srcLength, UChar *dest, int32_t destSize, uint16_t options, UErrorCode &rErrorCode)
 Reverse a Right-To-Left run of Unicode text. More...


Protected Attributes

UBiDipBiDi


Detailed Description

BiDi is a C++ wrapper class for UBiDi.

You need one BiDi object in place of one UBiDi object. For details on the API and implementation of the Unicode BiDi algorithm, see ubidi.h.

See also:
UBiDi
Stable:

Definition at line 36 of file bidi.h.


Constructor & Destructor Documentation

BiDi::BiDi ( ) [inline]
 

Default constructor, calls ubidi_open().

Stable:

Definition at line 233 of file bidi.h.

BiDi::BiDi ( UErrorCode & rErrorCode ) [inline]
 

Constructor, calls ubidi_open().

Stable:

Definition at line 237 of file bidi.h.

BiDi::BiDi ( UTextOffset maxLength,
UTextOffset maxRunCount,
UErrorCode & rErrorCode ) [inline]
 

Preallocating constructor, calls ubidi_openSized().

Stable:

Definition at line 248 of file bidi.h.

BiDi::~BiDi ( ) [inline]
 

Destructor, calls ubidi_close().

Stable:

Definition at line 252 of file bidi.h.


Member Function Documentation

UTextOffset BiDi::countRuns ( UErrorCode & rErrorCode ) [inline]
 

Get the number of runs.

Stable:

Definition at line 321 of file bidi.h.

UBiDiDirection BiDi::getDirection ( ) const [inline]
 

Get the directionality of the text.

Stable:

Definition at line 285 of file bidi.h.

UTextOffset BiDi::getLength ( ) const [inline]
 

Get the length of the text.

Stable:

Definition at line 295 of file bidi.h.

UBiDiLevel BiDi::getLevelAt ( UTextOffset charIndex ) const [inline]
 

Get the level for one character.

Stable:

Definition at line 305 of file bidi.h.

const UBiDiLevel * BiDi::getLevels ( UErrorCode & rErrorCode ) [inline]
 

Get an array of levels for each character.

Stable:

Definition at line 310 of file bidi.h.

UTextOffset BiDi::getLogicalIndex ( UTextOffset visualIndex,
UErrorCode & rErrorCode ) [inline]
 

Get the logical text position from a visual position.

Stable:

Definition at line 336 of file bidi.h.

void BiDi::getLogicalMap ( UTextOffset * indexMap,
UErrorCode & rErrorCode ) [inline]
 

Get a logical-to-visual index map (array) for the characters in the UBiDi (paragraph or line) object.

Stable:

Definition at line 341 of file bidi.h.

void BiDi::getLogicalRun ( UTextOffset logicalStart,
UTextOffset & rLogicalLimit,
UBiDiLevel & rLevel ) const [inline]
 

Get a logical run.

Stable:

Definition at line 315 of file bidi.h.

UBiDiLevel BiDi::getParaLevel ( ) const [inline]
 

Get the paragraph level of the text.

Stable:

Definition at line 300 of file bidi.h.

const UChar * BiDi::getText ( ) const [inline]
 

Get the pointer to the text.

Draft:

Definition at line 290 of file bidi.h.

UTextOffset BiDi::getVisualIndex ( UTextOffset logicalIndex,
UErrorCode & rErrorCode ) [inline]
 

Get the visual position from a logical text position.

Stable:

Definition at line 331 of file bidi.h.

void BiDi::getVisualMap ( UTextOffset * indexMap,
UErrorCode & rErrorCode ) [inline]
 

Get a visual-to-logical index map (array) for the characters in the UBiDi (paragraph or line) object.

Stable:

Definition at line 346 of file bidi.h.

UBiDiDirection BiDi::getVisualRun ( UTextOffset runIndex,
UTextOffset & rLogicalStart,
UTextOffset & rLength ) [inline]
 

Get one run's logical start, length, and directionality, which can be 0 for LTR or 1 for RTL.

Stable:

Definition at line 326 of file bidi.h.

void BiDi::invertMap ( const UTextOffset * srcMap,
UTextOffset * destMap,
UTextOffset length ) [inline, static]
 

Same as ubidi_invertMap().

Stable:

Definition at line 361 of file bidi.h.

UBool BiDi::isInverse ( ) [inline]
 

Is this BiDi object set to perform the inverse BiDi algorithm?

See also:
setInverse
Draft:

Definition at line 263 of file bidi.h.

void BiDi::reorderLogical ( const UBiDiLevel * levels,
UTextOffset length,
UTextOffset * indexMap ) [inline, static]
 

Same as ubidi_reorderLogical().

Stable:

Definition at line 351 of file bidi.h.

void BiDi::reorderVisual ( const UBiDiLevel * levels,
UTextOffset length,
UTextOffset * indexMap ) [inline, static]
 

Same as ubidi_reorderVisual().

Stable:

Definition at line 356 of file bidi.h.

void BiDi::setInverse ( UBool isInverse ) [inline]
 

Modify the operation of the BiDi algorithm such that it approximates an "inverse BiDi" algorithm.

This function must be called before setPara().

Parameters:
isInverse   specifies "forward" or "inverse" BiDi operation

See also:
setPara , writeReordered
Draft:

Definition at line 258 of file bidi.h.

BiDi & BiDi::setLine ( const BiDi & rParaBiDi,
UTextOffset start,
UTextOffset limit,
UErrorCode & rErrorCode ) [inline]
 

Set this object for one line of the paragraph object's text.

Stable:

Definition at line 277 of file bidi.h.

BiDi & BiDi::setPara ( const UChar * text,
UTextOffset length,
UBiDiLevel paraLevel,
UBiDiLevel * embeddingLevels,
UErrorCode & rErrorCode ) [inline]
 

Set this object for one paragraph's text.

Stable:

Definition at line 268 of file bidi.h.

UTextOffset BiDi::writeReordered ( UChar * dest,
int32_t destSize,
uint16_t options,
UErrorCode & rErrorCode ) [inline]
 

Use the BiDi object containing the reordering information for one paragraph or line of text as set by setPara() or setLine() and write a reordered string to the destination buffer.

See also:
ubidi_writeReordered
Draft:

Definition at line 366 of file bidi.h.

UTextOffset BiDi::writeReverse ( const UChar * src,
int32_t srcLength,
UChar * dest,
int32_t destSize,
uint16_t options,
UErrorCode & rErrorCode ) [inline, static]
 

Reverse a Right-To-Left run of Unicode text.

See also:
ubidi_writeReverse
Draft:

Definition at line 373 of file bidi.h.


Member Data Documentation

UBiDi * BiDi::pBiDi [protected]
 

Definition at line 228 of file bidi.h.


The documentation for this class was generated from the following file:
Generated at Fri Dec 15 12:13:02 2000 for ICU 1.7 by doxygen1.2.3 written by Dimitri van Heesch, © 1997-2000