ICU 66.0.1
66.0.1
|
The FontRuns
class associates pointers to LEFontInstance
objects with runs of text.
More...
#include <RunArrays.h>
Public Member Functions | |
FontRuns (const LEFontInstance **fonts, const le_int32 *limits, le_int32 count) | |
Construct a FontRuns object from pre-existing arrays of fonts and limit indices. More... | |
FontRuns (le_int32 initialCapacity) | |
Construct an empty FontRuns object. More... | |
virtual | ~FontRuns () |
The destructor; virtual so that subclass destructors are invoked as well. More... | |
const LEFontInstance * | getFont (le_int32 run) const |
Get the LEFontInstance object assoicated with the given run of text. More... | |
le_int32 | add (const LEFontInstance *font, le_int32 limit) |
Add an LEFontInstance 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... | |
Public Member Functions inherited from icu::RunArray | |
RunArray (const le_int32 *limits, le_int32 count) | |
Construct a RunArray object from a pre-existing array of limit indices. More... | |
RunArray (le_int32 initialCapacity) | |
Construct an empty RunArray object. More... | |
virtual | ~RunArray () |
The destructor; virtual so that subclass destructors are invoked as well. More... | |
le_int32 | getCount () const |
Get the number of entries in the limit indices array. More... | |
void | reset () |
Reset the limit indices array. More... | |
le_int32 | getLimit () const |
Get the last limit index. More... | |
le_int32 | getLimit (le_int32 run) const |
Get the limit index for a particular run of text. More... | |
le_int32 | add (le_int32 limit) |
Add a limit index to the limit indices array and return the run index where it was stored. More... | |
Public Member Functions inherited from icu::UObject | |
virtual | ~UObject () |
Destructor. More... | |
Static Public Member Functions | |
static UClassID | getStaticClassID () |
ICU "poor man's RTTI", returns a UClassID for this class. More... | |
Static Public Member Functions inherited from icu::RunArray | |
static UClassID | getStaticClassID () |
ICU "poor man's RTTI", returns a UClassID for this class. More... | |
Protected Member Functions | |
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... | |
Additional Inherited Members | |
Protected Attributes inherited from icu::RunArray | |
le_bool | fClientArrays |
Set by the constructors to indicate whether or not the client supplied the data arrays. More... | |
The FontRuns
class associates pointers to LEFontInstance
objects with runs of text.
Definition at line 272 of file RunArrays.h.
|
inline |
Construct a FontRuns
object from pre-existing arrays of fonts and limit indices.
fonts | is the address of an array of pointers to LEFontInstance objects. This array, and the LEFontInstance objects to which it points must remain valid until the FontRuns object is destroyed. |
limits | is the address of an array of limit indices. This array must remain valid until the FontRuns object is destroyed. |
count | is the number of entries in the two arrays. |
Definition at line 397 of file RunArrays.h.
icu::FontRuns::FontRuns | ( | le_int32 | initialCapacity | ) |
|
virtual |
The destructor; virtual so that subclass destructors are invoked as well.
le_int32 icu::FontRuns::add | ( | const LEFontInstance * | font, |
le_int32 | limit | ||
) |
Add an LEFontInstance
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 FontRuns
object was created with a client-supplied font 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 font 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.
font | is the address of the LEFontInstance to add. This object must remain valid until the FontRuns object is destroyed. |
limit | is the limit index to add |
|
inlinevirtual |
ICU "poor man's RTTI", returns a UClassID for the actual class.
Reimplemented from icu::RunArray.
Definition at line 364 of file RunArrays.h.
References icu::RunArray::getStaticClassID(), icu::RunArray::grow(), icu::RunArray::init(), and NULL.
const LEFontInstance* icu::FontRuns::getFont | ( | le_int32 | run | ) | const |
Get the LEFontInstance
object assoicated with the given run of text.
Use RunArray::getLimit(run)
to get the corresponding limit index.
run | is the index into the font and limit indices arrays. |
LEFontInstance
associated with the given text run.
|
inlinestatic |
ICU "poor man's RTTI", returns a UClassID for this class.
Definition at line 357 of file RunArrays.h.
Referenced by icu::LocaleRuns::getDynamicClassID().
|
protectedvirtual |
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.
capacity | is the initial size of the data array. |
Reimplemented from icu::RunArray.
Referenced by icu::LocaleRuns::getDynamicClassID().
|
protectedvirtual |
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.
capacity | is the initial size of the data array. |
Reimplemented from icu::RunArray.
Referenced by icu::LocaleRuns::getDynamicClassID().