const char RunArray::fgClassID = 0;
+RunArray::RunArray(le_int32 initialCapacity)
+ : fClientArrays(FALSE), fLimits(NULL), fCount(0), fCapacity(initialCapacity)
+{
+ if (initialCapacity > 0) {
+ fLimits = LE_NEW_ARRAY(le_int32, fCapacity);
+ }
+}
+
+RunArray::~RunArray()
+{
+ if (! fClientArrays) {
+ LE_DELETE_ARRAY(fLimits);
+ fLimits = NULL;
+ }
+}
+
le_int32 RunArray::ensureCapacity()
{
if (fCount >= fCapacity) {
const char FontRuns::fgClassID = 0;
+FontRuns::FontRuns(le_int32 initialCapacity)
+ : RunArray(initialCapacity), fFonts(NULL)
+{
+ if (initialCapacity > 0) {
+ fFonts = LE_NEW_ARRAY(const LEFontInstance *, initialCapacity);
+ }
+}
+
+FontRuns::~FontRuns()
+{
+ if (! fClientArrays) {
+ LE_DELETE_ARRAY(fFonts);
+ fFonts = NULL;
+ }
+}
+
void FontRuns::init(le_int32 capacity)
{
RunArray::init(capacity);
const char LocaleRuns::fgClassID = 0;
+LocaleRuns::LocaleRuns(le_int32 initialCapacity)
+ : RunArray(initialCapacity), fLocales(NULL)
+{
+ if (initialCapacity > 0) {
+ fLocales = LE_NEW_ARRAY(const Locale *, initialCapacity);
+ }
+}
+
+LocaleRuns::~LocaleRuns()
+{
+ if (! fClientArrays) {
+ LE_DELETE_ARRAY(fLocales);
+ fLocales = NULL;
+ }
+}
+
void LocaleRuns::init(le_int32 capacity)
{
RunArray::init(capacity);
const char ValueRuns::fgClassID = 0;
+ValueRuns::ValueRuns(le_int32 initialCapacity)
+ : RunArray(initialCapacity), fValues(NULL)
+{
+ if (initialCapacity > 0) {
+ fValues = LE_NEW_ARRAY(le_int32, initialCapacity);
+ }
+}
+
+ValueRuns::~ValueRuns()
+{
+ if (! fClientArrays) {
+ LE_DELETE_ARRAY(fValues);
+ fValues = NULL;
+ }
+}
+
void ValueRuns::init(le_int32 capacity)
{
RunArray::init(capacity);