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

LocaleRuns Class Reference

The LocaleRuns class associates pointers to Locale objects with runs of text. More...

#include <RunArrays.h>

Inheritance diagram for LocaleRuns::

RunArray UObject UMemory List of all members.

Public Methods

 LocaleRuns (const Locale **locales, const le_int32 *limits, le_int32 count)
 Construct a LocaleRuns object from pre-existing arrays of locales and limit indices. More...

 LocaleRuns (le_int32 initialCapacity)
 Construct an empty LocaleRuns object. More...

virtual ~LocaleRuns ()
 The destructor; virtual so that subclass destructors are invoked as well. More...

const LocalegetLocale (le_int32 run) const
 Get the Locale object assoicated with the given run of text. More...

le_int32 add (const Locale *locale, le_int32 limit)
 Add a Locale and limit index pair to the data arrays and return the run index where the data was stored. More...

virtual UClassID getDynamicClassID () const
 ICU "poor man's RTTI", returns a UClassID for the actual class. More...


Static Public Methods

UClassID getStaticClassID ()
 ICU "poor man's RTTI", returns a UClassID for this class. More...


Protected Methods

virtual void init (le_int32 capacity)
 Create a data array with the given initial size. More...

virtual void grow (le_int32 capacity)
 Grow a data array to the given initial size. More...


Private Methods

 LocaleRuns ()
 LocaleRuns (const LocaleRuns &other)
LocaleRuns & operator= (const LocaleRuns &)

Private Attributes

const Locale ** fLocales

Static Private Attributes

const char fgClassID
 The address of this static class variable serves as this class's ID for ICU "poor man's RTTI". More...


Detailed Description

The LocaleRuns class associates pointers to Locale objects with runs of text.

Draft:
This API has been introduced in ICU 2.6. It is still in draft state and may be modified in a future release.

Definition at line 382 of file RunArrays.h.


Constructor & Destructor Documentation

LocaleRuns::LocaleRuns const Locale **    locales,
const le_int32   limits,
le_int32    count
[inline]
 

Construct a LocaleRuns object from pre-existing arrays of locales and limit indices.

Parameters:
locales  is the address of an array of pointers to Locale objects.
limits  is the address of an array of limit indices.
count  is the number of entries in the two arrays.
Draft:
This API has been introduced in ICU 2.6. It is still in draft state and may be modified in a future release.

Definition at line 503 of file RunArrays.h.

LocaleRuns::LocaleRuns le_int32    initialCapacity
 

Construct an empty LocaleRuns object.

Clients can add locale and limit indices arrays using the add method.

Parameters:
initialCapacity  is the initial size of the locale and limit indices arrays. If this value is zero, no arrays will be allocated.
See also:
add
Draft:
This API has been introduced in ICU 2.6. It is still in draft state and may be modified in a future release.

virtual LocaleRuns::~LocaleRuns   [virtual]
 

The destructor; virtual so that subclass destructors are invoked as well.

Draft:
This API has been introduced in ICU 2.6. It is still in draft state and may be modified in a future release.

LocaleRuns::LocaleRuns   [inline, private]
 

Definition at line 491 of file RunArrays.h.

LocaleRuns::LocaleRuns const LocaleRuns &    other [inline, private]
 

Definition at line 497 of file RunArrays.h.


Member Function Documentation

le_int32 LocaleRuns::add const Locale   locale,
le_int32    limit
 

Add a Locale and limit index pair to the data arrays and return the run index where the data was stored.

This method calls RunArray::add(limit) which will create or grow the arrays as needed.

If the LocaleRuns object was created with a client-supplied locale and limit indices arrays, this method will return a run index of -1.

Subclasses should not override this method. Rather they should provide a new add method which takes a locale and a limit index along with whatever other data they implement. The new add method should first call this method to grow the font and limit indices arrays, and use the returned run index to store data their own arrays.

Parameters:
locale  is the address of the Locale to add
limit  is the limit index to add
Returns:
the run index where the locale and limit index were stored, or -1 if the data cannot be stored.
Draft:
This API has been introduced in ICU 2.6. It is still in draft state and may be modified in a future release.

virtual UClassID LocaleRuns::getDynamicClassID void    const [inline, virtual]
 

ICU "poor man's RTTI", returns a UClassID for the actual class.

Draft:
This API has been introduced in ICU 2.6. It is still in draft state and may be modified in a future release.

Reimplemented from RunArray.

Definition at line 463 of file RunArrays.h.

const Locale* LocaleRuns::getLocale le_int32    run const
 

Get the Locale object assoicated with the given run of text.

Use RunArray::getLimit(run) to get the corresponding limit index.

Parameters:
run  is the index into the font and limit indices arrays.
Returns:
the Locale associated with the given text run.
See also:
RunArray::getLimit
Draft:
This API has been introduced in ICU 2.6. It is still in draft state and may be modified in a future release.

UClassID LocaleRuns::getStaticClassID void    [inline, static]
 

ICU "poor man's RTTI", returns a UClassID for this class.

Draft:
This API has been introduced in ICU 2.6. It is still in draft state and may be modified in a future release.

Reimplemented from RunArray.

Definition at line 470 of file RunArrays.h.

virtual void LocaleRuns::grow le_int32    capacity [protected, virtual]
 

Grow a data array to the given initial size.

This method will be called by the add method if the limit indices array is full. Subclasses which override this method must also call it from the overriding method to grow the limit indices array.

Parameters:
capacity  is the initial size of the data array.
See also:
add
Draft:
This API has been introduced in ICU 2.6. It is still in draft state and may be modified in a future release.

Reimplemented from RunArray.

virtual void LocaleRuns::init le_int32    capacity [protected, virtual]
 

Create a data array with the given initial size.

This method will be called by the add method if there is no limit indices array. Subclasses which override this method must also call it from the overriding method to create the limit indices array.

Parameters:
capacity  is the initial size of the data array.
See also:
add
Draft:
This API has been introduced in ICU 2.6. It is still in draft state and may be modified in a future release.

Reimplemented from RunArray.

LocaleRuns& LocaleRuns::operator= const LocaleRuns &    [inline, private]
 

Definition at line 480 of file RunArrays.h.


Member Data Documentation

const Locale** LocaleRuns::fLocales [private]
 

Definition at line 488 of file RunArrays.h.

const char LocaleRuns::fgClassID [static, private]
 

The address of this static class variable serves as this class's ID for ICU "poor man's RTTI".

Reimplemented from RunArray.

Definition at line 486 of file RunArrays.h.


The documentation for this class was generated from the following file:
Generated on Mon Nov 24 14:36:38 2003 for ICU 2.8 by doxygen1.2.11.1 written by Dimitri van Heesch, © 1997-2001