Lines Matching refs:strength
106 RuleBasedCollator::RuleBasedCollator(const UnicodeString &rules, ECollationStrength strength,
115 internalBuildTailoring(rules, strength, UCOL_DEFAULT, NULL, NULL, errorCode);
132 ECollationStrength strength,
142 internalBuildTailoring(rules, strength, decompositionMode, NULL, NULL, errorCode);
160 int32_t strength,
184 if(strength != UCOL_DEFAULT) {
185 setAttribute(UCOL_STRENGTH, (UColAttributeValue)strength, errorCode);
294 CollationBuilder::addReset(int32_t strength, const UnicodeString &str,
317 if(strength == UCOL_IDENTICAL) { return; } // simple reset-at-position
319 // &[before strength]position
320 U_ASSERT(UCOL_PRIMARY <= strength && strength <= UCOL_TERTIARY);
321 int32_t index = findOrInsertNodeForCEs(strength, parserErrorReason, errorCode);
327 while(strengthFromNode(node) > strength) {
333 if(strengthFromNode(node) == strength && isTailoredNode(node)) {
334 // Reset to just before this same-strength tailored node.
336 } else if(strength == UCOL_PRIMARY) {
369 if(strength >= UCOL_TERTIARY) {
373 // an explicit common-weight node of the reset-before strength.
375 if(strengthFromNode(node) == strength) {
376 // Found a same-strength node with an explicit weight.
380 if(strength == UCOL_SECONDARY) {
391 weight16 = getWeight16Before(index, node, strength);
398 if(previousStrength < strength) {
406 } else if(previousStrength == strength && !isTailoredNode(node)) {
419 node = nodeFromWeight16(weight16) | nodeFromStrength(strength);
423 // Found a stronger node with implied strength-common weight.
424 uint32_t weight16 = getWeight16Before(index, node, strength);
425 index = findOrInsertWeakNode(index, weight16, strength, errorCode);
427 // Strength of the temporary CE = strength of its reset position.
428 // Code above raises an error if the before-strength is stronger.
429 strength = ceStrength(ces[cesLength - 1]);
435 ces[cesLength - 1] = tempCEFromIndexAndStrength(index, strength);
486 int32_t strength = UCOL_PRIMARY;
514 strength = UCOL_TERTIARY;
523 strength = strengthFromNode(node);
524 if(strength < UCOL_SECONDARY) { break; }
525 if(strength == UCOL_SECONDARY) {
538 strength = UCOL_SECONDARY;
543 strength = UCOL_SECONDARY;
584 int32_t index = findOrInsertNodeForRootCE(ce, strength, errorCode);
600 ce = tempCEFromIndexAndStrength(index, strength);
602 U_ASSERT(strength == UCOL_PRIMARY);
614 // Get the first node that was tailored before this one at a weaker strength.
623 ce = tempCEFromIndexAndStrength(index, strength);
628 // at a strength no greater than the position's strength.
633 if(strengthFromNode(nextNode) < strength) { break; }
641 ce = tempCEFromIndexAndStrength(index, strength);
648 CollationBuilder::addRelation(int32_t strength, const UnicodeString &prefix,
697 if(strength != UCOL_IDENTICAL) {
699 int32_t index = findOrInsertNodeForCEs(strength, parserErrorReason, errorCode);
702 if(strength == UCOL_PRIMARY && !isTempCE(ce) && (uint32_t)(ce >> 32) == 0) {
708 if(strength == UCOL_QUATERNARY && ce == 0) {
716 index = insertTailoredNodeAfter(index, strength, errorCode);
721 // Strength of the temporary CE:
724 if(strength < tempStrength) { tempStrength = strength; }
763 CollationBuilder::findOrInsertNodeForCEs(int32_t strength, const char *&parserErrorReason,
766 U_ASSERT(UCOL_PRIMARY <= strength && strength <= UCOL_QUATERNARY);
779 if(ceStrength(ce) <= strength) { break; }
794 return findOrInsertNodeForRootCE(ce, strength, errorCode);
798 CollationBuilder::findOrInsertNodeForRootCE(int64_t ce, int32_t strength, UErrorCode &errorCode) {
803 // down to the requested level/strength.
807 if(strength >= UCOL_SECONDARY) {
810 if(strength >= UCOL_TERTIARY) {
913 // or before the next root node with the same strength and a larger weight.
928 // Insert before a node with a larger same-strength weight.
940 CollationBuilder::insertTailoredNodeAfter(int32_t index, int32_t strength, UErrorCode &errorCode) {
943 if(strength >= UCOL_SECONDARY) {
945 if(strength >= UCOL_TERTIARY) {
950 // Insert the new node before the next one with a strength at least as strong.
955 if(strengthFromNode(node) <= strength) { break; }
956 // Skip the next node which has a weaker (larger) strength than the new one.
959 node = IS_TAILORED | nodeFromStrength(strength);
987 CollationBuilder::findCommonNode(int32_t index, int32_t strength) const {
988 U_ASSERT(UCOL_SECONDARY <= strength && strength <= UCOL_TERTIARY);
990 if(strengthFromNode(node) >= strength) {
994 if(strength == UCOL_SECONDARY ? !nodeHasBefore2(node) : !nodeHasBefore3(node)) {
995 // The current node implies the strength-common weight.
1000 U_ASSERT(!isTailoredNode(node) && strengthFromNode(node) == strength &&
1006 U_ASSERT(strengthFromNode(node) >= strength);
1007 } while(isTailoredNode(node) || strengthFromNode(node) > strength ||
1065 int32_t strength = ceStrength(ce);
1066 if(strength == UCOL_PRIMARY) {
1069 } else if(strength == UCOL_TERTIARY) {
1415 int32_t strength = strengthFromNode(node);
1416 if(strength == UCOL_QUATERNARY) {
1428 if(strength == UCOL_TERTIARY) {
1471 if(strength == UCOL_SECONDARY) {
1563 CollationBuilder::countTailoredNodes(const int64_t *nodesArray, int32_t i, int32_t strength) {
1568 if(strengthFromNode(node) < strength) { break; }
1569 if(strengthFromNode(node) == strength) {
1640 UColAttributeValue normalizationMode, UCollationStrength strength,
1653 coll->internalBuildTailoring(r, strength, normalizationMode, parseError, NULL, *pErrorCode);