BiDi is a C++ wrapper class for UBiDi
Public Methods
-
BiDi()
- Default constructor, calls ubidi_open().
-
BiDi(UErrorCode &rErrorCode)
- Constructor, calls ubidi_open().
-
BiDi(UTextOffset maxLength, UTextOffset maxRunCount, UErrorCode &rErrorCode)
- Preallocating constructor, calls ubidi_openSized().
-
~BiDi()
- Destructor, calls ubidi_close().
-
BiDi& setPara(const UChar *text, UTextOffset length, UBiDiLevel paraLevel, UBiDiLevel *embeddingLevels, UErrorCode &rErrorCode)
- Set this object for one paragraph's text.
-
BiDi& setLine(const BiDi &rParaBiDi, UTextOffset start, UTextOffset limit, UErrorCode &rErrorCode)
- Set this object for one line of the paragraph object's text.
-
UBiDiDirection getDirection() const
- Get the directionality of the text.
-
UTextOffset getLength() const
- Get the length of the text.
-
UBiDiLevel getParaLevel() const
- Get the paragraph level of the text.
-
UBiDiLevel getLevelAt(UTextOffset charIndex) const
- Get the level for one character.
-
const UBiDiLevel* getLevels(UErrorCode &rErrorCode)
- Get an array of levels for each character.
-
void getLogicalRun(UTextOffset logicalStart, UTextOffset &rLogicalLimit, UBiDiLevel &rLevel) const
- Get a logical run.
-
UTextOffset countRuns(UErrorCode &rErrorCode)
- Get the number of runs.
-
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.
-
UTextOffset getVisualIndex(UTextOffset logicalIndex, UErrorCode &rErrorCode)
- Get the visual position from a logical text position.
-
UTextOffset getLogicalIndex(UTextOffset visualIndex, UErrorCode &rErrorCode)
- Get the logical text position from a visual position.
-
void getLogicalMap(UTextOffset *indexMap, UErrorCode &rErrorCode)
- Get a logical-to-visual index map (array) for the characters in the UBiDi
(paragraph or line) object.
-
void getVisualMap(UTextOffset *indexMap, UErrorCode &rErrorCode)
- Get a visual-to-logical index map (array) for the characters in the UBiDi
(paragraph or line) object.
-
static void reorderLogical(const UBiDiLevel *levels, UTextOffset length, UTextOffset *indexMap)
- Same as ubidi_reorderLogical().
-
static void reorderVisual(const UBiDiLevel *levels, UTextOffset length, UTextOffset *indexMap)
- Same as ubidi_reorderVisual().
-
static void invertMap(const UTextOffset *srcMap, UTextOffset *destMap, UTextOffset length)
- Same as ubidi_invertMap().
Documentation
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.
BiDi()
- Default constructor, calls ubidi_open().
BiDi(UErrorCode &rErrorCode)
- Constructor, calls ubidi_open().
BiDi(UTextOffset maxLength, UTextOffset maxRunCount, UErrorCode &rErrorCode)
- Preallocating constructor, calls ubidi_openSized().
~BiDi()
- Destructor, calls ubidi_close().
BiDi& setPara(const UChar *text, UTextOffset length, UBiDiLevel paraLevel, UBiDiLevel *embeddingLevels, UErrorCode &rErrorCode)
- Set this object for one paragraph's text.
BiDi& setLine(const BiDi &rParaBiDi, UTextOffset start, UTextOffset limit, UErrorCode &rErrorCode)
- Set this object for one line of the paragraph object's text.
UBiDiDirection getDirection() const
- Get the directionality of the text.
UTextOffset getLength() const
- Get the length of the text.
UBiDiLevel getParaLevel() const
- Get the paragraph level of the text.
UBiDiLevel getLevelAt(UTextOffset charIndex) const
- Get the level for one character.
const UBiDiLevel* getLevels(UErrorCode &rErrorCode)
- Get an array of levels for each character.
void getLogicalRun(UTextOffset logicalStart, UTextOffset &rLogicalLimit, UBiDiLevel &rLevel) const
- Get a logical run.
UTextOffset countRuns(UErrorCode &rErrorCode)
- Get the number of runs.
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.
UTextOffset getVisualIndex(UTextOffset logicalIndex, UErrorCode &rErrorCode)
- Get the visual position from a logical text position.
UTextOffset getLogicalIndex(UTextOffset visualIndex, UErrorCode &rErrorCode)
- Get the logical text position from a visual position.
void getLogicalMap(UTextOffset *indexMap, UErrorCode &rErrorCode)
- Get a logical-to-visual index map (array) for the characters in the UBiDi
(paragraph or line) object.
void getVisualMap(UTextOffset *indexMap, UErrorCode &rErrorCode)
- Get a visual-to-logical index map (array) for the characters in the UBiDi
(paragraph or line) object.
static void reorderLogical(const UBiDiLevel *levels, UTextOffset length, UTextOffset *indexMap)
- Same as ubidi_reorderLogical().
static void reorderVisual(const UBiDiLevel *levels, UTextOffset length, UTextOffset *indexMap)
- Same as ubidi_reorderVisual().
static void invertMap(const UTextOffset *srcMap, UTextOffset *destMap, UTextOffset length)
- Same as ubidi_invertMap().
- This class has no child classes.
- See Also:
- UBiDi
alphabetic index hierarchy of classes
this page has been generated automatically by doc++
(c)opyright by Malte Zöckler, Roland Wunderling
contact: doc++@zib.de