for (int32_t i = 0; i < length; ++i) {
Locale *locale = list.orphanLocaleAt(i);
if (locale == nullptr) { continue; }
- supportedLocales_->addElement(locale, errorCode_);
+ supportedLocales_->addElementX(locale, errorCode_);
if (U_FAILURE(errorCode_)) {
delete locale;
break;
errorCode_ = U_MEMORY_ALLOCATION_ERROR;
break;
}
- supportedLocales_->addElement(clone, errorCode_);
+ supportedLocales_->addElementX(clone, errorCode_);
if (U_FAILURE(errorCode_)) {
delete clone;
break;
errorCode_ = U_MEMORY_ALLOCATION_ERROR;
return *this;
}
- supportedLocales_->addElement(clone, errorCode_);
+ supportedLocales_->addElementX(clone, errorCode_);
if (U_FAILURE(errorCode_)) {
delete clone;
}
status = U_MEMORY_ALLOCATION_ERROR;
return;
}
- toBeFreed.addElement(str, status);
+ toBeFreed.addElementX(str, status);
char* data = str->data();
replacedLanguage = (const char*) data;
char* endOfField = uprv_strchr(data, '_');
return false;
}
replacedRegion = item->data();
- toBeFreed.addElement(item.orphan(), status);
+ toBeFreed.addElementX(item.orphan(), status);
}
U_ASSERT(!same(region, replacedRegion));
region = replacedRegion;
while ((end = uprv_strchr(start, SEP_CHAR)) != nullptr &&
U_SUCCESS(status)) {
*end = NULL_CHAR; // null terminate inside variantsBuff
- variants.addElement(start, status);
+ variants.addElementX(start, status);
start = end + 1;
}
- variants.addElement(start, status);
+ variants.addElementX(start, status);
}
if (U_FAILURE(status)) { return false; }
UChar32 firstOrigin=(UChar32)(canonValue&CANON_VALUE_MASK);
canonValue=(canonValue&~CANON_VALUE_MASK)|CANON_HAS_SET|(uint32_t)canonStartSets.size();
umutablecptrie_set(mutableTrie, decompLead, canonValue, &errorCode);
- canonStartSets.addElement(set, errorCode);
+ canonStartSets.addElementX(set, errorCode);
if(firstOrigin!=0) {
set->add(firstOrigin);
}
return;
}
if (fType == kind) {
- dest->addElement(this, status);
+ dest->addElementX(this, status);
}
if (fLeftChild != NULL) {
fLeftChild->findNodes(dest, kind, status);
//
// Add the new uset node to the list of all uset nodes.
//
- fRB->fUSetNodes->addElement(usetNode, *fRB->fStatus);
+ fRB->fUSetNodes->addElementX(usetNode, *fRB->fStatus);
//
// The current rlRange is now entirely within the UnicodeSet range.
// Add this unicode set to the list of sets for this rlRange
if (rlRange->fIncludesSets->indexOf(usetNode) == -1) {
- rlRange->fIncludesSets->addElement(usetNode, *fStatus);
+ rlRange->fIncludesSets->addElementX(usetNode, *fStatus);
if (U_FAILURE(*fStatus)) {
return;
}
}
for (int32_t i=0; i<other.fIncludesSets->size(); i++) {
- this->fIncludesSets->addElement(other.fIncludesSets->elementAt(i), status);
+ this->fIncludesSets->addElementX(other.fIncludesSets->elementAt(i), status);
}
}
// Note: In order to maintain the sort invariant on the set,
// this function should only be called on a node whose set is
// empty to start with.
- n->fFirstPosSet->addElement(n, *fStatus);
+ n->fFirstPosSet->addElementX(n, *fStatus);
return;
}
// Note: In order to maintain the sort invariant on the set,
// this function should only be called on a node whose set is
// empty to start with.
- n->fLastPosSet->addElement(n, *fStatus);
+ n->fLastPosSet->addElementX(n, *fStatus);
return;
}
return;
}
if (node->fRuleRoot) {
- dest->addElement(node, *fStatus);
+ dest->addElementX(node, *fStatus);
// Note: rules cannot nest. If we found a rule start node,
// no child node can also be a start node.
return;
if (failState->fPositions == NULL || U_FAILURE(*fStatus)) {
goto ExitBuildSTdeleteall;
}
- fDStates->addElement(failState, *fStatus);
+ fDStates->addElementX(failState, *fStatus);
if (U_FAILURE(*fStatus)) {
goto ExitBuildSTdeleteall;
}
goto ExitBuildSTdeleteall;
}
setAdd(initialState->fPositions, fTree->fFirstPosSet);
- fDStates->addElement(initialState, *fStatus);
+ fDStates->addElementX(initialState, *fStatus);
if (U_FAILURE(*fStatus)) {
goto ExitBuildSTdeleteall;
}
goto ExitBuildSTdeleteall;
}
newState->fPositions = U;
- fDStates->addElement(newState, *fStatus);
+ fDStates->addElementX(newState, *fStatus);
if (U_FAILURE(*fStatus)) {
return;
}
U_ASSERT(fSafeTable == nullptr);
fSafeTable = new UVector(uprv_deleteUObject, uhash_compareUnicodeString, numCharClasses + 2, status);
for (int32_t row=0; row<numCharClasses + 2; ++row) {
- fSafeTable->addElement(new UnicodeString(numCharClasses, 0, numCharClasses+4), status);
+ fSafeTable->addElementX(new UnicodeString(numCharClasses, 0, numCharClasses+4), status);
}
// From the start state, each input char class transitions to the state for that input.
status = U_MEMORY_ALLOCATION_ERROR;
return NULL;
}
- cacheDescriptorList->addElement(idToCache.getAlias(), status);
+ cacheDescriptorList->addElementX(idToCache.getAlias(), status);
if (U_FAILURE(status)) {
return NULL;
}
status = U_MEMORY_ALLOCATION_ERROR;
break;
}
- result.addElement(idClone, status);
+ result.addElementX(idClone, status);
if (U_FAILURE(status)) {
delete idClone;
break;
}
const UnicodeString* dn = (const UnicodeString*)entry->key.pointer;
StringPair* sp = StringPair::create(*id, *dn, status);
- result.addElement(sp, status);
+ result.addElementX(sp, status);
if (U_FAILURE(status)) {
result.removeAllElements();
break;
length = other._ids.size();
for(i = 0; i < length; ++i) {
- _ids.addElement(((UnicodeString *)other._ids.elementAt(i))->clone(), status);
+ _ids.addElementX(((UnicodeString *)other._ids.elementAt(i))->clone(), status);
}
if(U_SUCCESS(status)) {
}
}
- listeners->addElement((void*)l, status); // cast away const
+ listeners->addElementX((void*)l, status); // cast away const
}
#ifdef NOTIFIER_DEBUG
else {
* Use the 'assign' function to assign each element.
*/
void UVector::assign(const UVector& other, UElementAssigner *assign, UErrorCode &ec) {
- if (ensureCapacity(other.count, ec)) {
+ if (ensureCapacityX(other.count, ec)) {
setSize(other.count, ec);
if (U_SUCCESS(ec)) {
for (int32_t i=0; i<other.count; ++i) {
return TRUE;
}
-void UVector::addElement(void* obj, UErrorCode &status) {
- if (ensureCapacity(count + 1, status)) {
+void UVector::addElementX(void* obj, UErrorCode &status) {
+ if (ensureCapacityX(count + 1, status)) {
elements[count++].pointer = obj;
}
}
void UVector::addElement(int32_t elem, UErrorCode &status) {
- if (ensureCapacity(count + 1, status)) {
+ if (ensureCapacityX(count + 1, status)) {
elements[count].pointer = NULL; // Pointers may be bigger than ints.
elements[count].integer = elem;
count++;
void UVector::insertElementAt(void* obj, int32_t index, UErrorCode &status) {
// must have 0 <= index <= count
- if (0 <= index && index <= count && ensureCapacity(count + 1, status)) {
+ if (0 <= index && index <= count && ensureCapacityX(count + 1, status)) {
for (int32_t i=count; i>index; --i) {
elements[i] = elements[i-1];
}
void UVector::insertElementAt(int32_t elem, int32_t index, UErrorCode &status) {
// must have 0 <= index <= count
- if (0 <= index && index <= count && ensureCapacity(count + 1, status)) {
+ if (0 <= index && index <= count && ensureCapacityX(count + 1, status)) {
for (int32_t i=count; i>index; --i) {
elements[i] = elements[i-1];
}
return -1;
}
-UBool UVector::ensureCapacity(int32_t minimumCapacity, UErrorCode &status) {
+UBool UVector::ensureCapacityX(int32_t minimumCapacity, UErrorCode &status) {
if (minimumCapacity < 0) {
status = U_ILLEGAL_ARGUMENT_ERROR;
return FALSE;
return;
}
if (newSize > count) {
- if (!ensureCapacity(newSize, status)) {
+ if (!ensureCapacityX(newSize, status)) {
return;
}
UElement empty;
min = probe + 1;
}
}
- if (ensureCapacity(count + 1, ec)) {
+ if (ensureCapacityX(count + 1, ec)) {
for (int32_t i=count; i>min; --i) {
elements[i] = elements[i-1];
}
// java.util.Vector API
//------------------------------------------------------------
- void addElement(void* obj, UErrorCode &status);
+ /*
+ * Old version of addElement, with non-standard error handling.
+ * Will be removed once all uses have been switched to the new addElement().
+ */
+ void addElementX(void* obj, UErrorCode &status);
void addElement(int32_t elem, UErrorCode &status);
inline UBool isEmpty(void) const;
- UBool ensureCapacity(int32_t minimumCapacity, UErrorCode &status);
+ /*
+ * Old version of ensureCapacity, with non-standard error handling.
+ * Will be removed once all uses have been switched to the new ensureCapacity().
+ */
+ UBool ensureCapacityX(int32_t minimumCapacity, UErrorCode &status);
/**
* Change the size of this vector as follows: If newSize is
}
inline void* UStack::push(void* obj, UErrorCode &status) {
- addElement(obj, status);
+ addElementX(obj, status);
return obj;
}
errorCode = U_MEMORY_ALLOCATION_ERROR;
return NULL;
}
- bucketList->addElement(bucket, errorCode);
+ bucketList->addElementX(bucket, errorCode);
if (U_FAILURE(errorCode)) { return NULL; }
UnicodeString temp;
errorCode = U_MEMORY_ALLOCATION_ERROR;
return NULL;
}
- bucketList->addElement(bucket, errorCode);
+ bucketList->addElementX(bucket, errorCode);
}
}
// Add a bucket with the current label.
errorCode = U_MEMORY_ALLOCATION_ERROR;
return NULL;
}
- bucketList->addElement(bucket, errorCode);
+ bucketList->addElementX(bucket, errorCode);
// Remember ASCII and Pinyin buckets for Pinyin redirects.
UChar c;
if (current.length() == 1 && 0x41 <= (c = current.charAt(0)) && c <= 0x5A) { // A-Z
return NULL;
}
bucket->displayBucket_ = singleBucket;
- bucketList->addElement(bucket, errorCode);
+ bucketList->addElementX(bucket, errorCode);
hasInvisibleBuckets = TRUE;
break;
}
errorCode = U_MEMORY_ALLOCATION_ERROR;
return NULL;
}
- bucketList->addElement(bucket, errorCode); // final
+ bucketList->addElementX(bucket, errorCode); // final
if (hasPinyin) {
// Redirect Pinyin buckets.
for (int32_t j = 0; j < bucketList->size(); ++j) {
bucket = getBucket(*bucketList, j);
if (bucket->displayBucket_ == NULL) {
- publicBucketList->addElement(bucket, errorCode);
+ publicBucketList->addElementX(bucket, errorCode);
}
}
if (U_FAILURE(errorCode)) { return NULL; }
return;
}
}
- bucket->records_->addElement(r, errorCode);
+ bucket->records_->addElementX(r, errorCode);
}
}
status = U_MEMORY_ALLOCATION_ERROR;
return NULL;
}
- dest->addElement(s, status);
+ dest->addElementX(s, status);
}
return dest.orphan();
}
status = U_MEMORY_ALLOCATION_ERROR;
return *this;
}
- inputList_->addElement(r, status);
+ inputList_->addElementX(r, status);
clearBuckets();
//std::string ss;
//std::string ss2;
goto error;
}
for (i = 0; i < ruleCount; i++) {
- orgRules->addElement(orgtrs[i]->clone(), status);
+ orgRules->addElementX(orgtrs[i]->clone(), status);
if (U_FAILURE(status)) {
goto error;
}
tar->getFirstStart(tzt.getFrom()->getRawOffset(), tzt.getFrom()->getDSTSavings(), firstStart);
if (firstStart > start) {
// Just add the rule as is
- filteredRules->addElement(tar->clone(), status);
+ filteredRules->addElementX(tar->clone(), status);
if (U_FAILURE(status)) {
goto error;
}
TimeArrayTimeZoneRule *newTar = new TimeArrayTimeZoneRule(name,
tar->getRawOffset(), tar->getDSTSavings(), newTimes, asize, timeType);
uprv_free(newTimes);
- filteredRules->addElement(newTar, status);
+ filteredRules->addElementX(newTar, status);
if (U_FAILURE(status)) {
goto error;
}
ar->getFirstStart(tzt.getFrom()->getRawOffset(), tzt.getFrom()->getDSTSavings(), firstStart);
if (firstStart == tzt.getTime()) {
// Just add the rule as is
- filteredRules->addElement(ar->clone(), status);
+ filteredRules->addElementX(ar->clone(), status);
if (U_FAILURE(status)) {
goto error;
}
ar->getName(name);
AnnualTimeZoneRule *newAr = new AnnualTimeZoneRule(name, ar->getRawOffset(), ar->getDSTSavings(),
*(ar->getRule()), year, ar->getEndYear());
- filteredRules->addElement(newAr, status);
+ filteredRules->addElementX(newAr, status);
if (U_FAILURE(status)) {
goto error;
}
errorCode = U_MEMORY_ALLOCATION_ERROR;
return -1;
}
- conditionalCE32s.addElement(cond, errorCode);
+ conditionalCE32s.addElementX(cond, errorCode);
return index;
}
if (U_FAILURE(errorCode)) { return; }
}
LocalPointer<UnicodeString> aliasRelativePathCopy(new UnicodeString(aliasRelativePath), errorCode);
- resourcesToVisitNext->addElement(aliasRelativePathCopy.getAlias(), errorCode);
+ resourcesToVisitNext->addElementX(aliasRelativePathCopy.getAlias(), errorCode);
if (U_FAILURE(errorCode)) { return; }
// Only release ownership after resourcesToVisitNext takes it (no error happened):
aliasRelativePathCopy.orphan();
// Register same-calendar alias
if (arrays.get(aliasRelativePath) == NULL && maps.get(aliasRelativePath) == NULL) {
LocalPointer<UnicodeString> aliasRelativePathCopy(new UnicodeString(aliasRelativePath), errorCode);
- aliasPathPairs.addElement(aliasRelativePathCopy.getAlias(), errorCode);
+ aliasPathPairs.addElementX(aliasRelativePathCopy.getAlias(), errorCode);
if (U_FAILURE(errorCode)) { return; }
// Only release ownership after aliasPathPairs takes it (no error happened):
aliasRelativePathCopy.orphan();
LocalPointer<UnicodeString> keyUStringCopy(new UnicodeString(keyUString), errorCode);
- aliasPathPairs.addElement(keyUStringCopy.getAlias(), errorCode);
+ aliasPathPairs.addElementX(keyUStringCopy.getAlias(), errorCode);
if (U_FAILURE(errorCode)) { return; }
// Only release ownership after aliasPathPairs takes it (no error happened):
keyUStringCopy.orphan();
if (aliasType == SAME_CALENDAR) {
// Store the alias path and the current path on aliasPathPairs
LocalPointer<UnicodeString> aliasRelativePathCopy(new UnicodeString(aliasRelativePath), errorCode);
- aliasPathPairs.addElement(aliasRelativePathCopy.getAlias(), errorCode);
+ aliasPathPairs.addElementX(aliasRelativePathCopy.getAlias(), errorCode);
if (U_FAILURE(errorCode)) { return; }
// Only release ownership after aliasPathPairs takes it (no error happened):
aliasRelativePathCopy.orphan();
LocalPointer<UnicodeString> pathCopy(new UnicodeString(path), errorCode);
- aliasPathPairs.addElement(pathCopy.getAlias(), errorCode);
+ aliasPathPairs.addElementX(pathCopy.getAlias(), errorCode);
if (U_FAILURE(errorCode)) { return; }
// Only release ownership after aliasPathPairs takes it (no error happened):
pathCopy.orphan();
if (U_FAILURE(status)) {
return;
}
- fSkeletons->addElement(newElem.getAlias(), status);
+ fSkeletons->addElementX(newElem.getAlias(), status);
if (U_FAILURE(status)) {
fSkeletons.adoptInstead(nullptr);
return;
if (U_FAILURE(status)) {
return;
}
- fPatterns->addElement(newElem.getAlias(), status);
+ fPatterns->addElementX(newElem.getAlias(), status);
if (U_FAILURE(status)) {
fPatterns.adoptInstead(nullptr);
return;
fFormatNames->setDeleter(uprv_deleteUObject);
for (int32_t partIndex = 0; (partIndex = nextTopLevelArgStart(partIndex)) >= 0;) {
- fFormatNames->addElement(new UnicodeString(getArgName(partIndex + 1)), status);
+ fFormatNames->addElementX(new UnicodeString(getArgName(partIndex + 1)), status);
}
StringEnumeration* nameEnumerator = new FormatNameEnumeration(fFormatNames, status);
// The string was not found; add it to the UVector.
// ANDY: This requires a const_cast. Why?
- output.addElement(const_cast<UChar *>(pattern), status);
+ output.addElementX(const_cast<UChar *>(pattern), status);
continue_outer:
continue;
const char *nsName = ures_getKey(nsCurrent.getAlias());
LocalPointer<UnicodeString> newElem(new UnicodeString(nsName, -1, US_INV), status);
if (U_SUCCESS(status)) {
- numsysNames->addElement(newElem.getAlias(), status);
+ numsysNames->addElementX(newElem.getAlias(), status);
if (U_SUCCESS(status)) {
newElem.orphan(); // on success, the numsysNames vector owns newElem.
}
status = U_MEMORY_ALLOCATION_ERROR;
return;
}
- fKeywordNames.addElement(newElem, status);
+ fKeywordNames.addElementX(newElem, status);
if (U_FAILURE(status)) {
delete newElem;
return;
status = U_MEMORY_ALLOCATION_ERROR;
return;
}
- fKeywordNames.addElement(newElem, status);
+ fKeywordNames.addElementX(newElem, status);
if (U_FAILURE(status)) {
delete newElem;
return;
if (!parsingIDs) {
if (curData != NULL) {
if (direction == UTRANS_FORWARD)
- dataVector.addElement(curData, status);
+ dataVector.addElementX(curData, status);
else
dataVector.insertElementAt(curData, 0, status);
curData = NULL;
return;
}
if (direction == UTRANS_FORWARD)
- idBlockVector.addElement(tempstr, status);
+ idBlockVector.addElementX(tempstr, status);
else
idBlockVector.insertElementAt(tempstr, 0, status);
idBlockResult.remove();
return;
}
if (direction == UTRANS_FORWARD)
- idBlockVector.addElement(tempstr, status);
+ idBlockVector.addElementX(tempstr, status);
else
idBlockVector.insertElementAt(tempstr, 0, status);
}
else if (!parsingIDs && curData != NULL) {
if (direction == UTRANS_FORWARD)
- dataVector.addElement(curData, status);
+ dataVector.addElementX(curData, status);
else
dataVector.insertElementAt(curData, 0, status);
}
status = U_VARIABLE_RANGE_EXHAUSTED;
return 0;
}
- variablesVector.addElement(adopted, status);
+ variablesVector.addElementX(adopted, status);
return variableNext++;
}
// Set a placeholder in the primary variables vector that will be
// filled in later by setSegmentObject(). We know that we will get
// called first because setSegmentObject() will call us.
- variablesVector.addElement((void*) NULL, status);
+ variablesVector.addElementX((void*) NULL, status);
segmentStandins.setCharAt(seg-1, c);
}
return c;
status = U_MEMORY_ALLOCATION_ERROR;
break;
}
- ruleVector->addElement(tempTranslitRule, status);
+ ruleVector->addElementX(tempTranslitRule, status);
if (U_FAILURE(status)) {
break;
}
delete adoptedRule;
return;
}
- ruleVector->addElement(adoptedRule, status);
+ ruleVector->addElementX(adoptedRule, status);
int32_t len;
if ((len = adoptedRule->getContextLength()) > maxContextLength) {
for (j=0; j<n; ++j) {
if (indexValue[j] >= 0) {
if (indexValue[j] == x) {
- v.addElement(ruleVector->elementAt(j), status);
+ v.addElementX(ruleVector->elementAt(j), status);
}
} else {
// If the indexValue is < 0, then the first key character is
// rarely, so we seldom treat this code path.
TransliterationRule* r = (TransliterationRule*) ruleVector->elementAt(j);
if (r->matchesIndexValue((uint8_t)x)) {
- v.addElement(r, status);
+ v.addElementX(r, status);
}
}
}
status = U_INVALID_STATE_ERROR;
return;
}
- fFinalRules->addElement((void*)rule, status);
+ fFinalRules->addElementX((void*)rule, status);
} else {
// Non-final rule
if (fHistoricRules == NULL) {
return;
}
}
- fHistoricRules->addElement((void*)rule, status);
+ fHistoricRules->addElementX((void*)rule, status);
}
// Mark dirty, so transitions are recalculated at next complete() call
fUpToDate = FALSE;
trst->time = nextTransitionTime;
trst->from = curRule;
trst->to = nextRule;
- fHistoricTransitions->addElement(trst, status);
+ fHistoricTransitions->addElementX(trst, status);
if (U_FAILURE(status)) {
goto cleanup;
}
final1->from = rule1;
final1->to = rule0;
}
- fHistoricTransitions->addElement(final0, status);
+ fHistoricTransitions->addElementX(final0, status);
if (U_FAILURE(status)) {
goto cleanup;
}
- fHistoricTransitions->addElement(final1, status);
+ fHistoricTransitions->addElementX(final1, status);
if (U_FAILURE(status)) {
goto cleanup;
}
}
int32_t i;
for (i = 0; i < size; i++) {
- rules->addElement(((TimeZoneRule*)source->elementAt(i))->clone(), ec);
+ rules->addElementX(((TimeZoneRule*)source->elementAt(i))->clone(), ec);
if (U_FAILURE(ec)) {
break;
}
// Put it into the compiled pattern as a set.
theSet->freeze();
int32_t setNumber = fRXPat->fSets->size();
- fRXPat->fSets->addElement(theSet, *fStatus);
+ fRXPat->fSets->addElementX(theSet, *fStatus);
appendOp(URX_SETREF, setNumber);
}
}
buf[rangeMarkerLocation] = 0;
while ( buf[rangeMarkerLocation-1] <= endRange ) {
LocalPointer<UnicodeString> newRegion(new UnicodeString(buf), status);
- allRegions->addElement(newRegion.orphan(),status);
+ allRegions->addElementX(newRegion.orphan(),status);
buf[rangeMarkerLocation-1]++;
}
} else {
LocalPointer<UnicodeString> newRegion(new UnicodeString(regionName), status);
- allRegions->addElement(newRegion.orphan(),status);
+ allRegions->addElementX(newRegion.orphan(),status);
}
}
buf[rangeMarkerLocation] = 0;
while ( buf[rangeMarkerLocation-1] <= endRange ) {
LocalPointer<UnicodeString> newRegion(new UnicodeString(buf), status);
- allRegions->addElement(newRegion.orphan(),status);
+ allRegions->addElementX(newRegion.orphan(),status);
buf[rangeMarkerLocation-1]++;
}
} else {
LocalPointer<UnicodeString> newRegion(new UnicodeString(regionName), status);
- allRegions->addElement(newRegion.orphan(),status);
+ allRegions->addElementX(newRegion.orphan(),status);
}
}
while ( ures_hasNext(regionUnknown.getAlias()) ) {
LocalPointer<UnicodeString> regionName (new UnicodeString(ures_getNextUnicodeString(regionUnknown.getAlias(),NULL,&status),status));
- allRegions->addElement(regionName.orphan(),status);
+ allRegions->addElementX(regionName.orphan(),status);
}
while ( ures_hasNext(worldContainment.getAlias()) ) {
UnicodeString *continentName = new UnicodeString(ures_getNextUnicodeString(worldContainment.getAlias(),NULL,&status));
- continents->addElement(continentName,status);
+ continents->addElementX(continentName,status);
}
for ( int32_t i = 0 ; i < allRegions->size() ; i++ ) {
break;
}
UnicodeString *groupingName = new UnicodeString(ures_getKey(groupingBundle), -1, US_INV);
- groupings->addElement(groupingName,status);
+ groupings->addElementX(groupingName,status);
Region *grouping = (Region *) uhash_get(newRegionIDMap.getAlias(),groupingName);
if (grouping != NULL) {
for (int32_t i = 0; i < ures_getSize(groupingBundle); i++) {
if (grouping->containedRegions == NULL) {
grouping->containedRegions = new UVector(uprv_deleteUObject, uhash_compareUnicodeString, status);
}
- grouping->containedRegions->addElement(new UnicodeString(child), status);
+ grouping->containedRegions->addElementX(new UnicodeString(child), status);
}
}
}
Region *target = (Region *)uhash_get(newRegionIDMap.getAlias(),(void *)¤tRegion);
if (target) {
LocalPointer<UnicodeString> preferredValue(new UnicodeString(target->idStr), status);
- aliasFromRegion->preferredValues->addElement((void *)preferredValue.orphan(),status); // may add null if err
+ aliasFromRegion->preferredValues->addElementX((void *)preferredValue.orphan(),status); // may add null if err
}
currentRegion.remove();
}
return; // error out
}
childStr->fastCopyFrom(childRegion->idStr);
- parentRegion->containedRegions->addElement((void *)childStr.orphan(),status);
+ parentRegion->containedRegions->addElementX((void *)childStr.orphan(),status);
// Set the parent region to be the containing region of the child.
// Regions of type GROUPING can't be set as the parent, since another region
if( U_FAILURE(status) ) {
return; // error out
}
- availableRegions[ar->fType]->addElement((void *)arString.orphan(),status);
+ availableRegions[ar->fType]->addElementX((void *)arString.orphan(),status);
}
ucln_i18n_registerCleanup(UCLN_I18N_REGION, region_cleanup);
const char *regionId = cr->next(NULL,status);
const Region *r = Region::getInstance(regionId,status);
if ( r->getType() == type) {
- result->addElement((void *)&r->idStr,status);
+ result->addElementX((void *)&r->idStr,status);
} else {
StringEnumeration *children = r->getContainedRegions(type, status);
for ( int32_t j = 0 ; j < children->count(status) ; j++ ) {
const char *id2 = children->next(NULL,status);
const Region *r2 = Region::getInstance(id2,status);
- result->addElement((void *)&r2->idStr,status);
+ result->addElementX((void *)&r2->idStr,status);
}
delete children;
}
for ( int32_t i = 0 ; i < fNameList->size() ; i++ ) {
UnicodeString* this_region_name = (UnicodeString *)fNameList->elementAt(i);
UnicodeString* new_region_name = new UnicodeString(*this_region_name);
- fRegionNames->addElement((void *)new_region_name,status);
+ fRegionNames->addElementX((void *)new_region_name,status);
}
}
else {
fDeferredStatus = U_MEMORY_ALLOCATION_ERROR;
break;
}
- fSets->addElement(newSet, fDeferredStatus);
+ fSets->addElementX(newSet, fDeferredStatus);
fSets8[i] = other.fSets8[i];
}
}
UnicodeString* pluralCount;
while ((pluralCount = const_cast<UnicodeString*>(keywords->snext(err))) != NULL) {
- pluralCounts.addElement(pluralCount, err);
+ pluralCounts.addElementX(pluralCount, err);
}
readFromCurrentLocale(UTMUTFMT_FULL_STYLE, gUnitsTag, pluralCounts, err);
checkConsistency(UTMUTFMT_FULL_STYLE, gUnitsTag, err);
return nullptr;
}
if (temp != NULL && typeid(*temp) != typeid(NullTransliterator))
- transliterators.addElement(temp, status);
+ transliterators.addElementX(temp, status);
else
delete temp;
}
}
return t;
}
- transliterators.addElement(temprbt, status);
+ transliterators.addElementX(temprbt, status);
}
}
aliasesOrRules.extract(0, blockSeparatorPos, idBlock);
aliasesOrRules.remove(0, blockSeparatorPos + 1);
if (!idBlock.isEmpty())
- transliterators.addElement(Transliterator::createInstance(idBlock, UTRANS_FORWARD, pe, ec), ec);
+ transliterators.addElementX(Transliterator::createInstance(idBlock, UTRANS_FORWARD, pe, ec), ec);
if (!transes->isEmpty())
- transliterators.addElement(transes->orphanElementAt(0), ec);
+ transliterators.addElementX(transes->orphanElementAt(0), ec);
blockSeparatorPos = aliasesOrRules.indexOf((UChar)(0xffff));
}
if (!aliasesOrRules.isEmpty())
- transliterators.addElement(Transliterator::createInstance(aliasesOrRules, UTRANS_FORWARD, pe, ec), ec);
+ transliterators.addElementX(Transliterator::createInstance(aliasesOrRules, UTRANS_FORWARD, pe, ec), ec);
while (!transes->isEmpty())
- transliterators.addElement(transes->orphanElementAt(0), ec);
+ transliterators.addElementX(transes->orphanElementAt(0), ec);
if (U_SUCCESS(ec)) {
t = new CompoundTransliterator(ID, transliterators,
variantList.setComparer(uhash_compareCaselessUnicodeString);
UnicodeString *emptyString = new UnicodeString();
if (emptyString != NULL) {
- variantList.addElement(emptyString, status);
+ variantList.addElementX(emptyString, status);
}
availableIDs.setDeleter(uprv_deleteUObject);
availableIDs.setComparer(uhash_compareCaselessUnicodeString);
}
if (!parser.dataVector.isEmpty()) {
TransliterationRuleData* data = (TransliterationRuleData*)parser.dataVector.orphanElementAt(0);
- entry->u.dataVector->addElement(data, status);
+ entry->u.dataVector->addElementX(data, status);
entry->stringArg += (UChar)0xffff; // use U+FFFF to mark position of RBTs in ID block
}
}
if (newID != NULL) {
// NUL-terminate the ID string
newID->getTerminatedBuffer();
- availableIDs.addElement(newID, status);
+ availableIDs.addElementX(newID, status);
}
}
} else {
}
UnicodeString *variantEntry = new UnicodeString(variant);
if (variantEntry != NULL) {
- variantList.addElement(variantEntry, status);
+ variantList.addElementX(variantEntry, status);
if (U_SUCCESS(status)) {
variantListIndex = variantList.size() - 1;
}
if (tl == 0)
status = U_MEMORY_ALLOCATION_ERROR;
else
- rbts->addElement(tl, status);
+ rbts->addElementX(tl, status);
}
if (U_FAILURE(status)) {
delete rbts;
break;
}
if (dir == FORWARD) {
- list.addElement(single, ec);
+ list.addElementX(single, ec);
} else {
list.insertElementAt(single, 0, ec);
}
ec = U_INVALID_ID;
goto RETURN;
}
- tlist.addElement(t, ec);
+ tlist.addElementX(t, ec);
if (U_FAILURE(ec)) {
delete t;
goto RETURN;
// Should never happen
ec = U_INTERNAL_TRANSLITERATOR_ERROR;
}
- tlist.addElement(t, ec);
+ tlist.addElementX(t, ec);
if (U_FAILURE(ec)) {
delete t;
}
while (tlist.size() > 0) {
t = (Transliterator*) tlist.orphanElementAt(0);
- list.addElement(t, ec);
+ list.addElementX(t, ec);
if (U_FAILURE(ec)) {
delete t;
list.removeAllElements();
if (itemType != GMTOffsetField::TEXT) {
if (GMTOffsetField::isValid(itemType, itemLength)) {
GMTOffsetField* fld = GMTOffsetField::createTimeField(itemType, static_cast<uint8_t>(itemLength), status);
- result->addElement(fld, status);
+ result->addElementX(fld, status);
if (U_FAILURE(status)) {
break;
}
if (itemType == GMTOffsetField::TEXT) {
if (text.length() > 0) {
GMTOffsetField* textfld = GMTOffsetField::createText(text, status);
- result->addElement(textfld, status);
+ result->addElementX(textfld, status);
if (U_FAILURE(status)) {
break;
}
} else {
if (GMTOffsetField::isValid(itemType, itemLength)) {
GMTOffsetField* fld = GMTOffsetField::createTimeField(itemType, static_cast<uint8_t>(itemLength), status);
- result->addElement(fld, status);
+ result->addElementX(fld, status);
if (U_FAILURE(status)) {
break;
}
if (itemType != GMTOffsetField::TEXT) {
if (GMTOffsetField::isValid(itemType, itemLength)) {
GMTOffsetField* fld = GMTOffsetField::createTimeField(itemType, static_cast<uint8_t>(itemLength), status);
- result->addElement(fld, status);
+ result->addElementX(fld, status);
if (U_FAILURE(status)) {
break;
}
if (itemType == GMTOffsetField::TEXT) {
if (text.length() > 0) {
GMTOffsetField* tfld = GMTOffsetField::createText(text, status);
- result->addElement(tfld, status);
+ result->addElementX(tfld, status);
}
} else {
if (GMTOffsetField::isValid(itemType, itemLength)) {
GMTOffsetField* fld = GMTOffsetField::createTimeField(itemType, static_cast<uint8_t>(itemLength), status);
- result->addElement(fld, status);
+ result->addElementX(fld, status);
} else {
status = U_ILLEGAL_ARGUMENT_ERROR;
}
gmatch->gnameInfo = nameinfo;
gmatch->matchLength = matchLength;
gmatch->timeType = UTZFMT_TIME_TYPE_UNKNOWN;
- fResults->addElement(gmatch, status);
+ fResults->addElementX(gmatch, status);
if (U_FAILURE(status)) {
uprv_free(gmatch);
} else {
status = U_MEMORY_ALLOCATION_ERROR;
return;
}
- matches(status)->addElement(matchInfo, status);
+ matches(status)->addElementX(matchInfo, status);
if (U_FAILURE(status)) {
delete matchInfo;
}
status = U_MEMORY_ALLOCATION_ERROR;
return;
}
- matches(status)->addElement(matchInfo, status);
+ matches(status)->addElementX(matchInfo, status);
if (U_FAILURE(status)) {
delete matchInfo;
}
}
return;
}
- values->addElement(fValues, status);
+ values->addElementX(fValues, status);
fValues = values;
fHasValuesVector = TRUE;
}
// Add the new value.
- ((UVector *)fValues)->addElement(value, status);
+ ((UVector *)fValues)->addElementX(value, status);
}
}
U_ASSERT(fLazyContents != NULL);
UChar *s = const_cast<UChar *>(key);
- fLazyContents->addElement(s, status);
+ fLazyContents->addElementX(s, status);
if (U_FAILURE(status)) {
if (fValueDeleter) {
fValueDeleter((void*) key);
return;
}
- fLazyContents->addElement(value, status);
+ fLazyContents->addElementX(value, status);
}
void
OlsonToMetaMappingEntry *map = (OlsonToMetaMappingEntry *)mappings->elementAt(i);
const UChar *mzID = map->mzid;
if (!mzIDs->contains((void *)mzID)) {
- mzIDs->addElement((void *)mzID, status);
+ mzIDs->addElementX((void *)mzID, status);
}
}
if (U_SUCCESS(status)) {
return NULL;
}
uhash_put(fHash, src, hashedString, &status);
- fVec->addElement(hashedString, status);
+ fVec->addElementX(hashedString, status);
}
return hashedString;
}
if (U_SUCCESS(status)) {
for (int32_t i = 0; i < size; i++) {
UnicodeString *line = (UnicodeString*)source.vtzlines->elementAt(i);
- vtzlines->addElement(line->clone(), status);
+ vtzlines->addElementX(line->clone(), status);
if (U_FAILURE(status)) {
break;
}
if (vtzlines != nullptr && U_SUCCESS(status)) {
for (int32_t i = 0; i < size; i++) {
UnicodeString *line = (UnicodeString*)right.vtzlines->elementAt(i);
- vtzlines->addElement(line->clone(), status);
+ vtzlines->addElementX(line->clone(), status);
if (U_FAILURE(status)) {
break;
}
if (U_FAILURE(status)) {
goto cleanupVtzlines;
}
- vtzlines->addElement(element.getAlias(), status);
+ vtzlines->addElementX(element.getAlias(), status);
if (U_FAILURE(status)) {
goto cleanupVtzlines;
}
if (U_FAILURE(status)) {
goto cleanupVtzlines;
}
- vtzlines->addElement(element.getAlias(), status);
+ vtzlines->addElementX(element.getAlias(), status);
if (U_FAILURE(status)) {
goto cleanupVtzlines;
}
if (U_FAILURE(status)) {
goto cleanupVtzlines;
}
- vtzlines->addElement(element.getAlias(), status);
+ vtzlines->addElementX(element.getAlias(), status);
if (U_FAILURE(status)) {
goto cleanupVtzlines;
}
if (U_FAILURE(status)) {
goto cleanupVtzlines;
}
- vtzlines->addElement(element.getAlias(), status);
+ vtzlines->addElementX(element.getAlias(), status);
if (U_FAILURE(status)) {
goto cleanupVtzlines;
}
if (dstr == nullptr) {
status = U_MEMORY_ALLOCATION_ERROR;
} else {
- dates->addElement(dstr, status);
+ dates->addElementX(dstr, status);
}
if (U_FAILURE(status)) {
goto cleanupParse;
if (U_FAILURE(status)) {
goto cleanupParse;
}
- dates->addElement(element.getAlias(), status);
+ dates->addElementX(element.getAlias(), status);
if (U_FAILURE(status)) {
goto cleanupParse;
}
}
}
}
- rules->addElement(rule, status);
+ rules->addElementX(rule, status);
if (U_FAILURE(status)) {
goto cleanupParse;
}
goto cleanupParse;
}
rules->removeElementAt(finalRuleIdx);
- rules->addElement(newRule, status);
+ rules->addElementX(newRule, status);
if (U_FAILURE(status)) {
delete newRule;
goto cleanupParse;
icutzprop.append(u'[');
icutzprop.append(icutzver);
icutzprop.append(u']');
- customProps.addElement(&icutzprop, status);
+ customProps.addElementX(&icutzprop, status);
}
writeZone(writer, *tz, &customProps, status);
}
icutzprop->append(ICU_TZINFO_PARTIAL, -1);
appendMillis(start, *icutzprop);
icutzprop->append((UChar)0x005D/*']'*/);
- customProps.addElement(icutzprop, status);
+ customProps.addElementX(icutzprop, status);
if (U_FAILURE(status)) {
delete icutzprop;
goto cleanupWritePartial;
icutzprop->append(ICU_TZINFO_SIMPLE, -1);
appendMillis(time, *icutzprop);
icutzprop->append((UChar)0x005D/*']'*/);
- customProps.addElement(icutzprop, status);
+ customProps.addElementX(icutzprop, status);
if (U_FAILURE(status)) {
delete icutzprop;
goto cleanupWriteSimple;
UErrorCode ec = U_ZERO_ERROR;
if (singleZone) {
if (!gSingleZoneCountries->contains((void*)region)) {
- gSingleZoneCountries->addElement((void*)region, ec);
+ gSingleZoneCountries->addElementX((void*)region, ec);
}
} else {
if (!gMultiZonesCountries->contains((void*)region)) {
- gMultiZonesCountries->addElement((void*)region, ec);
+ gMultiZonesCountries->addElementX((void*)region, ec);
}
}
}
}
}
- mzMappings->addElement(entry, status);
+ mzMappings->addElementX(entry, status);
if (U_FAILURE(status)) {
break;
}
uMzID[len] = 0;
UnicodeString *usMzID = new UnicodeString(uMzID);
if (uhash_get(gMetaZoneIDTable, usMzID) == NULL) {
- gMetaZoneIDs->addElement((void *)uMzID, status);
+ gMetaZoneIDs->addElementX((void *)uMzID, status);
uhash_put(gMetaZoneIDTable, (void *)usMzID, (void *)uMzID, &status);
} else {
uprv_free(uMzID);
, _factoryID(factoryID + ": ")
{
for (int i = 0; i < count; ++i) {
- _ids.addElement(new UnicodeString(ids[i]), _status);
+ _ids.addElementX(new UnicodeString(ids[i]), _status);
}
}
}
// Put this new rule into the vector of all Rules.
- fBreakRules.addElement(thisRule.orphan(), status);
+ fBreakRules.addElementX(thisRule.orphan(), status);
}
if (*ccName == UnicodeString("dictionary")) {
fDictionarySet = *set;
} else {
- fCharClassList->addElement(cclass, status);
+ fCharClassList->addElementX(cclass, status);
}
}
// fprintf(stderr, "have an other set.\n");
UnicodeString pattern;
CharClass *cclass = addCharClass(UnicodeString("__Others"), otherSet.toPattern(pattern), status);
- fCharClassList->addElement(cclass, status);
+ fCharClassList->addElementX(cclass, status);
}
}
break;
}
test->startTest();
- startedTests.addElement(test.orphan(), status);
+ startedTests.addElementX(test.orphan(), status);
if (U_FAILURE(status)) {
errln("%s:%d: error %s while starting test %s.", __FILE__, __LINE__, u_errorName(status), tests[i]);
break;
fSets = new UVector(status);
// Important: Keep class names the same as the class contents.
- fSets->addElement(fCRLFSet, status); classNames.push_back("CRLF");
- fSets->addElement(fControlSet, status); classNames.push_back("Control");
- fSets->addElement(fExtendSet, status); classNames.push_back("Extended");
- fSets->addElement(fRegionalIndicatorSet, status); classNames.push_back("RegionalIndicator");
+ fSets->addElementX(fCRLFSet, status); classNames.push_back("CRLF");
+ fSets->addElementX(fControlSet, status); classNames.push_back("Control");
+ fSets->addElementX(fExtendSet, status); classNames.push_back("Extended");
+ fSets->addElementX(fRegionalIndicatorSet, status); classNames.push_back("RegionalIndicator");
if (!fPrependSet->isEmpty()) {
- fSets->addElement(fPrependSet, status); classNames.push_back("Prepend");
+ fSets->addElementX(fPrependSet, status); classNames.push_back("Prepend");
}
- fSets->addElement(fSpacingSet, status); classNames.push_back("Spacing");
- fSets->addElement(fHangulSet, status); classNames.push_back("Hangul");
- fSets->addElement(fZWJSet, status); classNames.push_back("ZWJ");
- fSets->addElement(fExtendedPictSet, status); classNames.push_back("ExtendedPict");
- fSets->addElement(fViramaSet, status); classNames.push_back("Virama");
- fSets->addElement(fLinkingConsonantSet, status); classNames.push_back("LinkingConsonant");
- fSets->addElement(fExtCccZwjSet, status); classNames.push_back("ExtCcccZwj");
- fSets->addElement(fAnySet, status); classNames.push_back("Any");
+ fSets->addElementX(fSpacingSet, status); classNames.push_back("Spacing");
+ fSets->addElementX(fHangulSet, status); classNames.push_back("Hangul");
+ fSets->addElementX(fZWJSet, status); classNames.push_back("ZWJ");
+ fSets->addElementX(fExtendedPictSet, status); classNames.push_back("ExtendedPict");
+ fSets->addElementX(fViramaSet, status); classNames.push_back("Virama");
+ fSets->addElementX(fLinkingConsonantSet, status); classNames.push_back("LinkingConsonant");
+ fSets->addElementX(fExtCccZwjSet, status); classNames.push_back("ExtCcccZwj");
+ fSets->addElementX(fAnySet, status); classNames.push_back("Any");
if (U_FAILURE(status)) {
deferredStatus = status;
fOtherSet->removeAll(*fDictionarySet);
// Add classes and their names
- fSets->addElement(fCRSet, status); classNames.push_back("CR");
- fSets->addElement(fLFSet, status); classNames.push_back("LF");
- fSets->addElement(fNewlineSet, status); classNames.push_back("Newline");
- fSets->addElement(fRegionalIndicatorSet, status); classNames.push_back("RegionalIndicator");
- fSets->addElement(fHebrew_LetterSet, status); classNames.push_back("Hebrew");
- fSets->addElement(fALetterSet, status); classNames.push_back("ALetter");
- fSets->addElement(fSingle_QuoteSet, status); classNames.push_back("Single Quote");
- fSets->addElement(fDouble_QuoteSet, status); classNames.push_back("Double Quote");
+ fSets->addElementX(fCRSet, status); classNames.push_back("CR");
+ fSets->addElementX(fLFSet, status); classNames.push_back("LF");
+ fSets->addElementX(fNewlineSet, status); classNames.push_back("Newline");
+ fSets->addElementX(fRegionalIndicatorSet, status); classNames.push_back("RegionalIndicator");
+ fSets->addElementX(fHebrew_LetterSet, status); classNames.push_back("Hebrew");
+ fSets->addElementX(fALetterSet, status); classNames.push_back("ALetter");
+ fSets->addElementX(fSingle_QuoteSet, status); classNames.push_back("Single Quote");
+ fSets->addElementX(fDouble_QuoteSet, status); classNames.push_back("Double Quote");
// Omit Katakana from fSets, which omits Katakana characters
// from the test data. They are all in the dictionary set,
// which this (old, to be retired) monkey test cannot handle.
//fSets->addElement(fKatakanaSet, status);
- fSets->addElement(fMidLetterSet, status); classNames.push_back("MidLetter");
- fSets->addElement(fMidNumLetSet, status); classNames.push_back("MidNumLet");
- fSets->addElement(fMidNumSet, status); classNames.push_back("MidNum");
- fSets->addElement(fNumericSet, status); classNames.push_back("Numeric");
- fSets->addElement(fFormatSet, status); classNames.push_back("Format");
- fSets->addElement(fExtendSet, status); classNames.push_back("Extend");
- fSets->addElement(fOtherSet, status); classNames.push_back("Other");
- fSets->addElement(fExtendNumLetSet, status); classNames.push_back("ExtendNumLet");
- fSets->addElement(fWSegSpaceSet, status); classNames.push_back("WSegSpace");
+ fSets->addElementX(fMidLetterSet, status); classNames.push_back("MidLetter");
+ fSets->addElementX(fMidNumLetSet, status); classNames.push_back("MidNumLet");
+ fSets->addElementX(fMidNumSet, status); classNames.push_back("MidNum");
+ fSets->addElementX(fNumericSet, status); classNames.push_back("Numeric");
+ fSets->addElementX(fFormatSet, status); classNames.push_back("Format");
+ fSets->addElementX(fExtendSet, status); classNames.push_back("Extend");
+ fSets->addElementX(fOtherSet, status); classNames.push_back("Other");
+ fSets->addElementX(fExtendNumLetSet, status); classNames.push_back("ExtendNumLet");
+ fSets->addElementX(fWSegSpaceSet, status); classNames.push_back("WSegSpace");
- fSets->addElement(fZWJSet, status); classNames.push_back("ZWJ");
- fSets->addElement(fExtendedPictSet, status); classNames.push_back("ExtendedPict");
+ fSets->addElementX(fZWJSet, status); classNames.push_back("ZWJ");
+ fSets->addElementX(fExtendedPictSet, status); classNames.push_back("ExtendedPict");
if (U_FAILURE(status)) {
deferredStatus = status;
fOtherSet->removeAll(*fCloseSet);
fOtherSet->removeAll(*fExtendSet);
- fSets->addElement(fSepSet, status); classNames.push_back("Sep");
- fSets->addElement(fFormatSet, status); classNames.push_back("Format");
- fSets->addElement(fSpSet, status); classNames.push_back("Sp");
- fSets->addElement(fLowerSet, status); classNames.push_back("Lower");
- fSets->addElement(fUpperSet, status); classNames.push_back("Upper");
- fSets->addElement(fOLetterSet, status); classNames.push_back("OLetter");
- fSets->addElement(fNumericSet, status); classNames.push_back("Numeric");
- fSets->addElement(fATermSet, status); classNames.push_back("ATerm");
- fSets->addElement(fSContinueSet, status); classNames.push_back("SContinue");
- fSets->addElement(fSTermSet, status); classNames.push_back("STerm");
- fSets->addElement(fCloseSet, status); classNames.push_back("Close");
- fSets->addElement(fOtherSet, status); classNames.push_back("Other");
- fSets->addElement(fExtendSet, status); classNames.push_back("Extend");
+ fSets->addElementX(fSepSet, status); classNames.push_back("Sep");
+ fSets->addElementX(fFormatSet, status); classNames.push_back("Format");
+ fSets->addElementX(fSpSet, status); classNames.push_back("Sp");
+ fSets->addElementX(fLowerSet, status); classNames.push_back("Lower");
+ fSets->addElementX(fUpperSet, status); classNames.push_back("Upper");
+ fSets->addElementX(fOLetterSet, status); classNames.push_back("OLetter");
+ fSets->addElementX(fNumericSet, status); classNames.push_back("Numeric");
+ fSets->addElementX(fATermSet, status); classNames.push_back("ATerm");
+ fSets->addElementX(fSContinueSet, status); classNames.push_back("SContinue");
+ fSets->addElementX(fSTermSet, status); classNames.push_back("STerm");
+ fSets->addElementX(fCloseSet, status); classNames.push_back("Close");
+ fSets->addElementX(fOtherSet, status); classNames.push_back("Other");
+ fSets->addElementX(fExtendSet, status); classNames.push_back("Extend");
if (U_FAILURE(status)) {
deferredStatus = status;
fHH->add(u'\u2010'); // Hyphen, '‐'
// Sets and names.
- fSets->addElement(fBK, status); classNames.push_back("fBK");
- fSets->addElement(fCR, status); classNames.push_back("fCR");
- fSets->addElement(fLF, status); classNames.push_back("fLF");
- fSets->addElement(fCM, status); classNames.push_back("fCM");
- fSets->addElement(fNL, status); classNames.push_back("fNL");
- fSets->addElement(fWJ, status); classNames.push_back("fWJ");
- fSets->addElement(fZW, status); classNames.push_back("fZW");
- fSets->addElement(fGL, status); classNames.push_back("fGL");
- fSets->addElement(fCB, status); classNames.push_back("fCB");
- fSets->addElement(fSP, status); classNames.push_back("fSP");
- fSets->addElement(fB2, status); classNames.push_back("fB2");
- fSets->addElement(fBA, status); classNames.push_back("fBA");
- fSets->addElement(fBB, status); classNames.push_back("fBB");
- fSets->addElement(fHY, status); classNames.push_back("fHY");
- fSets->addElement(fH2, status); classNames.push_back("fH2");
- fSets->addElement(fH3, status); classNames.push_back("fH3");
- fSets->addElement(fCL, status); classNames.push_back("fCL");
- fSets->addElement(fCP, status); classNames.push_back("fCP");
- fSets->addElement(fEX, status); classNames.push_back("fEX");
- fSets->addElement(fIN, status); classNames.push_back("fIN");
- fSets->addElement(fJL, status); classNames.push_back("fJL");
- fSets->addElement(fJT, status); classNames.push_back("fJT");
- fSets->addElement(fJV, status); classNames.push_back("fJV");
- fSets->addElement(fNS, status); classNames.push_back("fNS");
- fSets->addElement(fOP, status); classNames.push_back("fOP");
- fSets->addElement(fQU, status); classNames.push_back("fQU");
- fSets->addElement(fIS, status); classNames.push_back("fIS");
- fSets->addElement(fNU, status); classNames.push_back("fNU");
- fSets->addElement(fPO, status); classNames.push_back("fPO");
- fSets->addElement(fPR, status); classNames.push_back("fPR");
- fSets->addElement(fSY, status); classNames.push_back("fSY");
- fSets->addElement(fAI, status); classNames.push_back("fAI");
- fSets->addElement(fAL, status); classNames.push_back("fAL");
- fSets->addElement(fHL, status); classNames.push_back("fHL");
- fSets->addElement(fID, status); classNames.push_back("fID");
- fSets->addElement(fWJ, status); classNames.push_back("fWJ");
- fSets->addElement(fRI, status); classNames.push_back("fRI");
- fSets->addElement(fSG, status); classNames.push_back("fSG");
- fSets->addElement(fEB, status); classNames.push_back("fEB");
- fSets->addElement(fEM, status); classNames.push_back("fEM");
- fSets->addElement(fZWJ, status); classNames.push_back("fZWJ");
+ fSets->addElementX(fBK, status); classNames.push_back("fBK");
+ fSets->addElementX(fCR, status); classNames.push_back("fCR");
+ fSets->addElementX(fLF, status); classNames.push_back("fLF");
+ fSets->addElementX(fCM, status); classNames.push_back("fCM");
+ fSets->addElementX(fNL, status); classNames.push_back("fNL");
+ fSets->addElementX(fWJ, status); classNames.push_back("fWJ");
+ fSets->addElementX(fZW, status); classNames.push_back("fZW");
+ fSets->addElementX(fGL, status); classNames.push_back("fGL");
+ fSets->addElementX(fCB, status); classNames.push_back("fCB");
+ fSets->addElementX(fSP, status); classNames.push_back("fSP");
+ fSets->addElementX(fB2, status); classNames.push_back("fB2");
+ fSets->addElementX(fBA, status); classNames.push_back("fBA");
+ fSets->addElementX(fBB, status); classNames.push_back("fBB");
+ fSets->addElementX(fHY, status); classNames.push_back("fHY");
+ fSets->addElementX(fH2, status); classNames.push_back("fH2");
+ fSets->addElementX(fH3, status); classNames.push_back("fH3");
+ fSets->addElementX(fCL, status); classNames.push_back("fCL");
+ fSets->addElementX(fCP, status); classNames.push_back("fCP");
+ fSets->addElementX(fEX, status); classNames.push_back("fEX");
+ fSets->addElementX(fIN, status); classNames.push_back("fIN");
+ fSets->addElementX(fJL, status); classNames.push_back("fJL");
+ fSets->addElementX(fJT, status); classNames.push_back("fJT");
+ fSets->addElementX(fJV, status); classNames.push_back("fJV");
+ fSets->addElementX(fNS, status); classNames.push_back("fNS");
+ fSets->addElementX(fOP, status); classNames.push_back("fOP");
+ fSets->addElementX(fQU, status); classNames.push_back("fQU");
+ fSets->addElementX(fIS, status); classNames.push_back("fIS");
+ fSets->addElementX(fNU, status); classNames.push_back("fNU");
+ fSets->addElementX(fPO, status); classNames.push_back("fPO");
+ fSets->addElementX(fPR, status); classNames.push_back("fPR");
+ fSets->addElementX(fSY, status); classNames.push_back("fSY");
+ fSets->addElementX(fAI, status); classNames.push_back("fAI");
+ fSets->addElementX(fAL, status); classNames.push_back("fAL");
+ fSets->addElementX(fHL, status); classNames.push_back("fHL");
+ fSets->addElementX(fID, status); classNames.push_back("fID");
+ fSets->addElementX(fWJ, status); classNames.push_back("fWJ");
+ fSets->addElementX(fRI, status); classNames.push_back("fRI");
+ fSets->addElementX(fSG, status); classNames.push_back("fSG");
+ fSets->addElementX(fEB, status); classNames.push_back("fEB");
+ fSets->addElementX(fEM, status); classNames.push_back("fEM");
+ fSets->addElementX(fZWJ, status); classNames.push_back("fZWJ");
// TODO: fOP30 & fCP30 overlap with plain fOP. Probably OK, but fOP/CP chars will be over-represented.
- fSets->addElement(fOP30, status); classNames.push_back("fOP30");
- fSets->addElement(fCP30, status); classNames.push_back("fCP30");
+ fSets->addElementX(fOP30, status); classNames.push_back("fOP30");
+ fSets->addElementX(fCP30, status); classNames.push_back("fCP30");
const char *rules =
"((\\p{Line_Break=PR}|\\p{Line_Break=PO})(\\p{Line_Break=CM}|\\u200d)*)?"
// Nested Element Start
if (mXMLElemStart.lookingAt(fPos, status)) {
UXMLElement *t = createElement(mXMLElemStart, status);
- el->fChildren.addElement(t, status);
+ el->fChildren.addElementX(t, status);
t->fParent = el;
fElementStack.push(el, status);
el = t;
// This chunk of text contains something other than just
// white space. Make a child node for it.
replaceCharRefs(s, status);
- el->fChildren.addElement(s.clone(), status);
+ el->fChildren.addElementX(s.clone(), status);
}
mXMLSP.reset(src); // The matchers need to stay set to the main input string.
continue;
// Empty Element. Stored as a child of the current element, but not stacked.
if (mXMLElemEmpty.lookingAt(fPos, status)) {
UXMLElement *t = createElement(mXMLElemEmpty, status);
- el->fChildren.addElement(t, status);
+ el->fChildren.addElementX(t, status);
continue;
}
replaceCharRefs(attValue, status);
// Save the attribute name and value in our document structure.
- el->fAttNames.addElement((void *)intern(attName, status), status);
- el->fAttValues.addElement(attValue.clone(), status);
+ el->fAttNames.addElementX((void *)intern(attName, status), status);
+ el->fAttValues.addElementX(attValue.clone(), status);
pos = mAttrValue.end(2, status);
}
fPos = mEl.end(0, status);