14 #include "layout/LETypes.h" 15 #include "layout/LEFontInstance.h" 32 #define INITIAL_CAPACITY 16 40 #define CAPACITY_GROW_LIMIT 128 64 inline RunArray(
const le_int32 *limits, le_int32 count);
93 inline le_int32 getCount()
const;
113 inline le_int32 getLimit()
const;
124 inline le_int32 getLimit(le_int32 run)
const;
150 le_int32 add(le_int32 limit);
179 virtual void init(le_int32 capacity);
193 virtual void grow(le_int32 capacity);
211 static const char fgClassID;
213 le_int32 ensureCapacity();
219 const le_int32 *fLimits;
224 inline RunArray::RunArray()
230 inline RunArray::RunArray(
const RunArray & )
236 inline RunArray::RunArray(
const le_int32 *limits, le_int32 count)
254 if (run < 0 || run >= fCount) {
290 inline FontRuns(
const LEFontInstance **fonts,
const le_int32 *limits, le_int32 count);
325 const LEFontInstance *getFont(le_int32 run)
const;
350 le_int32
add(
const LEFontInstance *font, le_int32 limit);
367 virtual void init(le_int32 capacity);
368 virtual void grow(le_int32 capacity);
380 static const char fgClassID;
382 const LEFontInstance **fFonts;
385 inline FontRuns::FontRuns()
391 inline FontRuns::FontRuns(
const FontRuns & )
397 inline FontRuns::FontRuns(
const LEFontInstance **fonts,
const le_int32 *limits, le_int32 count)
398 :
RunArray(limits, count), fFonts(fonts)
427 inline LocaleRuns(
const Locale **locales,
const le_int32 *limits, le_int32 count);
462 const Locale *getLocale(le_int32 run)
const;
487 le_int32
add(
const Locale *locale, le_int32 limit);
504 virtual void init(le_int32 capacity);
505 virtual void grow(le_int32 capacity);
522 static const char fgClassID;
525 inline LocaleRuns::LocaleRuns()
531 inline LocaleRuns::LocaleRuns(
const LocaleRuns & )
537 inline LocaleRuns::LocaleRuns(
const Locale **locales,
const le_int32 *limits, le_int32 count)
565 inline ValueRuns(
const le_int32 *values,
const le_int32 *limits, le_int32 count);
600 le_int32 getValue(le_int32 run)
const;
624 le_int32
add(le_int32 value, le_int32 limit);
641 virtual void init(le_int32 capacity);
642 virtual void grow(le_int32 capacity);
654 static const char fgClassID;
656 const le_int32 *fValues;
659 inline ValueRuns::ValueRuns()
665 inline ValueRuns::ValueRuns(
const ValueRuns & )
671 inline ValueRuns::ValueRuns(
const le_int32 *values,
const le_int32 *limits, le_int32 count)
672 :
RunArray(limits, count), fValues(values)
virtual void grow(le_int32 capacity)
Grow a data array to the given initial size.
static UClassID getStaticClassID()
ICU "poor man's RTTI", returns a UClassID for this class.
static UClassID getStaticClassID()
ICU "poor man's RTTI", returns a UClassID for this class.
virtual UClassID getDynamicClassID() const
ICU "poor man's RTTI", returns a UClassID for the actual class.
virtual void init(le_int32 capacity)
Create a data array with the given initial size.
void * UClassID
UClassID is used to identify classes without using the compiler's RTTI.
virtual UClassID getDynamicClassID() const
ICU "poor man's RTTI", returns a UClassID for the actual class.
static UClassID getStaticClassID()
ICU "poor man's RTTI", returns a UClassID for this class.
The FontRuns class associates pointers to LEFontInstance objects with runs of text.
The LocaleRuns class associates pointers to Locale objects with runs of text.
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 stor...
le_int32 getCount() const
Get the number of entries in the limit indices array.
#define U_NAMESPACE_BEGIN
This is used to begin a declaration of a public ICU C++ API.
virtual void grow(le_int32 capacity)
Grow a data array to the given initial size.
virtual void init(le_int32 capacity)
Create a data array with the given initial size.
#define NULL
Define NULL if necessary, to nullptr for C++ and to ((void *)0) for C.
le_bool fClientArrays
Set by the constructors to indicate whether or not the client supplied the data arrays.
void reset()
Reset the limit indices array.
#define TRUE
The TRUE value of a UBool.
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...
#define U_NAMESPACE_END
This is used to end a declaration of a public ICU C++ API.
#define U_LAYOUTEX_API
Set to export library symbols from inside the layout extensions library, and to import them from outs...
The ValueRuns class associates integer values with runs of text.
virtual UClassID getDynamicClassID() const
ICU "poor man's RTTI", returns a UClassID for the actual class.
static UClassID getStaticClassID()
ICU "poor man's RTTI", returns a UClassID for this class.
C++ API: Locale ID object.
le_int32 add(le_int32 limit)
Add a limit index to the limit indices array and return the run index where it was stored...
virtual void init(le_int32 capacity)
Create a data array with the given initial size.
Basic definitions for ICU, for both C and C++ APIs.
#define FALSE
The FALSE value of a UBool.
le_int32 getLimit() const
Get the last limit index.
UObject is the common ICU "boilerplate" class.
virtual void grow(le_int32 capacity)
Grow a data array to the given initial size.
virtual UClassID getDynamicClassID() const
ICU "poor man's RTTI", returns a UClassID for the actual class.
The RunArray class is a base class for building classes which represent data that is associated with ...
A Locale object represents a specific geographical, political, or cultural region.