Public Types | Public Member Functions | Protected Attributes

CEGUI::BiDiVisualMapping Class Reference

Abstract class to wrap a BiDi visual mapping of a text string. More...

Inheritance diagram for CEGUI::BiDiVisualMapping:
Collaboration diagram for CEGUI::BiDiVisualMapping:

List of all members.

Public Types

typedef std::vector< int > StrIndexList
 type definition for collection used to hold mapping index lists.

Public Member Functions

virtual ~BiDiVisualMapping ()
 Destructor.
virtual BidiCharType getBidiCharType (const utf32 char_to_check) const =0
 Gets the BiDi char type of a char.
virtual bool reorderFromLogicalToVisual (const String &logical, String &visual, StrIndexList &l2v, StrIndexList &v2l) const =0
 Reorder a string from a logical (type order) bidi string to a visual (the way it displayed) string.
bool updateVisual (const String &logical)
 Use reorderFromLogicalToVisual to update the internal visual mapping data and visual string representation based upon the logical string logical.
const StrIndexList getL2vMapping () const
const StrIndexList getV2lMapping () const
const StringgetTextVisual () const

Protected Attributes

StrIndexList d_l2vMapping
StrIndexList d_v2lMapping
String d_textVisual

Detailed Description

Abstract class to wrap a BiDi visual mapping of a text string.


Member Function Documentation

virtual BidiCharType CEGUI::BiDiVisualMapping::getBidiCharType ( const utf32  char_to_check  )  const [pure virtual]

Gets the BiDi char type of a char.

Parameters:
charToCheck The utf32 character code that will be checked.
Returns:
One of the BidiCharType enumerated values indicating the BiDi char type.

Implemented in CEGUI::FribidiVisualMapping, and CEGUI::MinibidiVisualMapping.

virtual bool CEGUI::BiDiVisualMapping::reorderFromLogicalToVisual ( const String logical,
String visual,
StrIndexList l2v,
StrIndexList v2l 
) const [pure virtual]

Reorder a string from a logical (type order) bidi string to a visual (the way it displayed) string.

Parameters:
logical String object to be reordered.
visual String object containing the result reordered string.
l2vMapping List of integers that map the pos of each char from logical string in the visual string.
v2lMapping List of integers that map the pos of each char from visual string in the logical string.
Returns:
  • true if successful.
  • false if the operation failed.

Implemented in CEGUI::FribidiVisualMapping, and CEGUI::MinibidiVisualMapping.

bool CEGUI::BiDiVisualMapping::updateVisual ( const String logical  ) 

Use reorderFromLogicalToVisual to update the internal visual mapping data and visual string representation based upon the logical string logical.

Parameters:
logical String object representing the logical text order.
Returns:
  • true if the update was a success.
  • false if something went wrong.