Home | History | Annotate | Download | only in i18n

Lines Matching refs:strength

108 RuleBasedCollator::RuleBasedCollator(const UnicodeString &rules, ECollationStrength strength,
116 internalBuildTailoring(rules, strength, UCOL_DEFAULT, NULL, NULL, errorCode);
132 ECollationStrength strength,
141 internalBuildTailoring(rules, strength, decompositionMode, NULL, NULL, errorCode);
158 int32_t strength,
182 if(strength != UCOL_DEFAULT) {
183 setAttribute(UCOL_STRENGTH, (UColAttributeValue)strength, errorCode);
285 CollationBuilder::addReset(int32_t strength, const UnicodeString &str,
308 if(strength == UCOL_IDENTICAL) { return; } // simple reset-at-position
310 // &[before strength]position
311 U_ASSERT(UCOL_PRIMARY <= strength && strength <= UCOL_TERTIARY);
312 int32_t index = findOrInsertNodeForCEs(strength, parserErrorReason, errorCode);
318 while(strengthFromNode(node) > strength) {
324 if(strengthFromNode(node) == strength && isTailoredNode(node)) {
325 // Reset to just before this same-strength tailored node.
327 } else if(strength == UCOL_PRIMARY) {
360 if(strength >= UCOL_TERTIARY) {
364 if(strengthFromNode(node) == strength) {
365 // Found a same-strength node with an explicit weight.
369 if(strength == UCOL_SECONDARY) {
379 // Reset to just before this same-strength common-weight node.
388 if(strength == UCOL_SECONDARY) {
434 node = nodeFromWeight16(weight16) | nodeFromStrength(strength);
439 // Found a stronger node with implied strength-common weight.
441 if(strength == UCOL_SECONDARY) {
454 node = nodeFromWeight16(BEFORE_WEIGHT16) | nodeFromStrength(strength);
457 nodeFromStrength(strength);
460 // Strength of the temporary CE = strength of its reset position.
461 // Code above raises an error if the before-strength is stronger.
462 strength = ceStrength(ces[cesLength - 1]);
468 ces[cesLength - 1] = tempCEFromIndexAndStrength(index, strength);
476 int32_t strength = UCOL_PRIMARY;
504 strength = UCOL_TERTIARY;
513 strength = strengthFromNode(node);
514 if(strength < UCOL_SECONDARY) { break; }
515 if(strength == UCOL_SECONDARY) {
528 strength = UCOL_SECONDARY;
533 strength = UCOL_SECONDARY;
577 int32_t index = findOrInsertNodeForRootCE(ce, strength, errorCode);
593 ce = tempCEFromIndexAndStrength(index, strength);
595 U_ASSERT(strength == UCOL_PRIMARY);
607 // Get the first node that was tailored before this one at a weaker strength.
616 ce = tempCEFromIndexAndStrength(index, strength);
621 // at a strength no greater than the position's strength.
626 if(strengthFromNode(nextNode) < strength) { break; }
634 ce = tempCEFromIndexAndStrength(index, strength);
641 CollationBuilder::addRelation(int32_t strength, const UnicodeString &prefix,
690 if(strength != UCOL_IDENTICAL) {
692 int32_t index = findOrInsertNodeForCEs(strength, parserErrorReason, errorCode);
695 if(strength == UCOL_PRIMARY && !isTempCE(ce) && (uint32_t)(ce >> 32) == 0) {
701 if(strength == UCOL_QUATERNARY && ce == 0) {
709 index = insertTailoredNodeAfter(index, strength, errorCode);
714 // Strength of the temporary CE:
717 if(strength < tempStrength) { tempStrength = strength; }
756 CollationBuilder::findOrInsertNodeForCEs(int32_t strength, const char *&parserErrorReason,
759 U_ASSERT(UCOL_PRIMARY <= strength && strength <= UCOL_QUATERNARY);
772 if(ceStrength(ce) <= strength) { break; }
787 return findOrInsertNodeForRootCE(ce, strength, errorCode);
791 CollationBuilder::findOrInsertNodeForRootCE(int64_t ce, int32_t strength, UErrorCode &errorCode) {
796 // down to the requested level/strength.
800 if(strength >= UCOL_SECONDARY) {
803 if(strength >= UCOL_TERTIARY) {
878 // or before the next root node with the same strength and a larger weight.
894 // Insert before a node with a larger same-strength weight.
906 CollationBuilder::insertTailoredNodeAfter(int32_t index, int32_t strength, UErrorCode &errorCode) {
909 if(strength >= UCOL_SECONDARY) {
911 if(strength >= UCOL_TERTIARY) {
916 // Insert the new node before the next one with a strength at least as strong.
921 if(strengthFromNode(node) <= strength) { break; }
922 // Skip the next node which has a weaker (larger) strength than the new one.
925 node = IS_TAILORED | nodeFromStrength(strength);
953 CollationBuilder::findCommonNode(int32_t index, int32_t strength) const {
954 U_ASSERT(UCOL_SECONDARY <= strength && strength <= UCOL_TERTIARY);
956 if(strengthFromNode(node) >= strength) {
960 if(strength == UCOL_SECONDARY ? !nodeHasBefore2(node) : !nodeHasBefore3(node)) {
961 // The current node implies the strength-common weight.
966 U_ASSERT(!isTailoredNode(node) && strengthFromNode(node) == strength &&
972 U_ASSERT(strengthFromNode(node) >= strength);
973 } while(isTailoredNode(node) || strengthFromNode(node) > strength);
1030 int32_t strength = ceStrength(ce);
1031 if(strength == UCOL_PRIMARY) {
1034 } else if(strength == UCOL_TERTIARY) {
1377 int32_t strength = strengthFromNode(node);
1378 if(strength == UCOL_QUATERNARY) {
1390 if(strength == UCOL_TERTIARY) {
1433 if(strength == UCOL_SECONDARY) {
1520 CollationBuilder::countTailoredNodes(const int64_t *nodesArray, int32_t i, int32_t strength) {
1525 if(strengthFromNode(node) < strength) { break; }
1526 if(strengthFromNode(node) == strength) {
1598 UColAttributeValue normalizationMode, UCollationStrength strength,
1611 coll->internalBuildTailoring(r, strength, normalizationMode, parseError, NULL, *pErrorCode);