Main Page | Class Hierarchy | Alphabetical List | Data Structures | Directories | File List | Data Fields | Globals | Related Pages

BiDi Class Reference

This class is deprecated and will be removed. More...

#include <bidi.h>


Public Member Functions

 BiDi ()
 Default constructor, calls ubidi_open().
 BiDi (UErrorCode &rErrorCode)
 Constructor, calls ubidi_open().
 BiDi (int32_t maxLength, int32_t maxRunCount, UErrorCode &rErrorCode)
 Preallocating constructor, calls ubidi_openSized().
 ~BiDi ()
 Destructor, calls ubidi_close().
void setInverse (UBool isInverse)
 Modify the operation of the BiDi algorithm such that it approximates an "inverse BiDi" algorithm.
UBool isInverse ()
 Is this BiDi object set to perform the inverse BiDi algorithm?
BiDi & setPara (const UChar *text, int32_t length, UBiDiLevel paraLevel, UBiDiLevel *embeddingLevels, UErrorCode &rErrorCode)
 Set this object for one paragraph's text.
BiDi & setLine (const BiDi &rParaBiDi, int32_t start, int32_t limit, UErrorCode &rErrorCode)
 Set this object for one line of the paragraph object's text.
UBiDiDirection getDirection () const
 Get the directionality of the text.
const UChar * getText () const
 Get the pointer to the text.
int32_t getLength () const
 Get the length of the text.
UBiDiLevel getParaLevel () const
 Get the paragraph level of the text.
UBiDiLevel getLevelAt (int32_t charIndex) const
 Get the level for one character.
const UBiDiLevel * getLevels (UErrorCode &rErrorCode)
 Get an array of levels for each character.
void getLogicalRun (int32_t logicalStart, int32_t &rLogicalLimit, UBiDiLevel &rLevel) const
 Get a logical run.
int32_t countRuns (UErrorCode &rErrorCode)
 Get the number of runs.
UBiDiDirection getVisualRun (int32_t runIndex, int32_t &rLogicalStart, int32_t &rLength)
 Get one run's logical start, length, and directionality, which can be 0 for LTR or 1 for RTL.
int32_t getVisualIndex (int32_t logicalIndex, UErrorCode &rErrorCode)
 Get the visual position from a logical text position.
int32_t getLogicalIndex (int32_t visualIndex, UErrorCode &rErrorCode)
 Get the logical text position from a visual position.
void getLogicalMap (int32_t *indexMap, UErrorCode &rErrorCode)
 Get a logical-to-visual index map (array) for the characters in the UBiDi (paragraph or line) object.
void getVisualMap (int32_t *indexMap, UErrorCode &rErrorCode)
 Get a visual-to-logical index map (array) for the characters in the UBiDi (paragraph or line) object.
int32_t 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.

Static Public Member Functions

static void reorderLogical (const UBiDiLevel *levels, int32_t length, int32_t *indexMap)
 Same as ubidi_reorderLogical().
static void reorderVisual (const UBiDiLevel *levels, int32_t length, int32_t *indexMap)
 Same as ubidi_reorderVisual().
static void invertMap (const int32_t *srcMap, int32_t *destMap, int32_t length)
 Same as ubidi_invertMap().
static int32_t 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.

Protected Attributes

UBiDi * pBiDi


Detailed Description

This class is deprecated and will be removed.

Use the C API with the UBiDi type and ubidi_... functions. The BiDi class was just a pure 1:1 wrapper for the ubidi_ API.

Old 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.

See also:
UBiDi
Deprecated:
To be removed after 2002-sep-30; use the C API with UBiDi and ubidi_.
.. functions.


Constructor & Destructor Documentation

BiDi::BiDi (   )  [inline]
 

Default constructor, calls ubidi_open().

Deprecated:

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

Constructor, calls ubidi_open().

Deprecated:

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

Preallocating constructor, calls ubidi_openSized().

Deprecated:

BiDi::~BiDi (   )  [inline]
 

Destructor, calls ubidi_close().

Deprecated:


Member Function Documentation

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

Get the number of runs.

Deprecated:

UBiDiDirection BiDi::getDirection (   )  const [inline]
 

Get the directionality of the text.

Deprecated:

int32_t BiDi::getLength (   )  const [inline]
 

Get the length of the text.

Deprecated:

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

Get the level for one character.

Deprecated:

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

Get an array of levels for each character.

Deprecated:

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

Get the logical text position from a visual position.

Deprecated:

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

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

Deprecated:

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

Get a logical run.

Deprecated:

UBiDiLevel BiDi::getParaLevel (   )  const [inline]
 

Get the paragraph level of the text.

Deprecated:

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

Get the pointer to the text.

Deprecated:

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

Get the visual position from a logical text position.

Deprecated:

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

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

Deprecated:

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

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

Deprecated:

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

Same as ubidi_invertMap().

Deprecated:

UBool BiDi::isInverse (   )  [inline]
 

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

See also:
setInverse
Deprecated:

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

Same as ubidi_reorderLogical().

Deprecated:

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

Same as ubidi_reorderVisual().

Deprecated:

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

Deprecated:

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

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

Deprecated:

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

Set this object for one paragraph's text.

Deprecated:

int32_t 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
Deprecated:

int32_t 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
Deprecated:


The documentation for this class was generated from the following file:
Generated on Sun May 22 20:18:09 2005 for ICU 2.1 by  doxygen 1.4.2