Lines Matching defs:context
45 * Build-time context and CE32 for a code point.
46 * If a code point has contextual mappings, then the default (no-context) mapping
48 * of ConditionalCE32, sorted by context strings.
55 : context(),
59 : context(ct),
63 inline UBool hasContext() const { return context.length() > 1; }
64 inline int32_t prefixLength() const { return context.charAt(0); }
72 UnicodeString context;
74 * CE32 for the code point and its context.
283 // Build the context-sensitive mappings into their runtime form and cache the result.
536 CollationDataBuilder::addConditionalCE32(const UnicodeString &context, uint32_t ce32,
539 U_ASSERT(!context.isEmpty());
545 LocalPointer<ConditionalCE32> cond(new ConditionalCE32(context, ce32), errorCode);
693 // Replace the simple oldCE32 with a builder context CE32
706 UnicodeString context((UChar)prefix.length());
707 context.append(prefix).append(suffix);
710 // invariant: context > cond->context
714 int32_t index = addConditionalCE32(context, ce32, errorCode);
720 int8_t cmp = context.compare(nextCond->context);
723 int32_t index = addConditionalCE32(context, ce32, errorCode);
729 // Same context as before, overwrite its ce32.
923 UnicodeString context((UChar)0);
926 index = copyContractionsFromBaseCE32(context, c, ce32, &head, errorCode);
929 head.next = index = addConditionalCE32(context, ce32, errorCode);
935 context = prefixes.getString();
936 context.reverse();
937 context.insert(0, (UChar)context.length());
940 index = copyContractionsFromBaseCE32(context, c, ce32, cond, errorCode);
943 cond->next = index = addConditionalCE32(context, ce32, errorCode);
959 UnicodeString context((UChar)0);
960 copyContractionsFromBaseCE32(context, c, ce32, &head, errorCode);
981 CollationDataBuilder::copyContractionsFromBaseCE32(UnicodeString &context, UChar32 c, uint32_t ce32,
990 U_ASSERT(context.length() > 1);
996 cond->next = index = addConditionalCE32(context, ce32, errorCode);
1001 int32_t suffixStart = context.length();
1004 context.append(suffixes.getString());
1006 cond->next = index = addConditionalCE32(context, ce32, errorCode);
1011 context.truncate(suffixStart);
1106 cond->context, copyCE32(cond->ce32), errorCode);
1112 cond->context, copyCE32(cond->ce32), errorCode);
1114 dest.unsafeBackwardSet.addAll(cond->context.tempSubString(suffixStart));
1139 enumRangeForCopy(const void *context, UChar32 start, UChar32 end, uint32_t value) {
1142 ((CopyHelper *)context)->copyRangeCE32(start, end, value);
1190 ce32 = copyFromBaseCE32(c, ce32, false /* without context */, errorCode);
1298 enumRangeLeadValue(const void *context, UChar32 /*start*/, UChar32 /*end*/, uint32_t value) {
1299 int32_t *pValue = (int32_t *)context;
1460 // Impossible: No context data for c in contextChars.
1473 // The list head must have no context.
1475 // The list head must be followed by one or more nodes that all do have context.
1488 UnicodeString prefix(cond->context, 0, prefixLength + 1);
1506 (cond = getConditionalCE32(cond->next))->context.startsWith(prefix));
1509 if(lastCond->context.length() == suffixStart) {
1520 if(firstCond->context.length() == suffixStart) {
1539 (length==0 || prefix.endsWith(cond->context, 1, length))) {
1551 UnicodeString suffix(cond->context, suffixStart);
1614 UnicodeString context;
1615 context.append((UChar)(defaultCE32 >> 16)).append((UChar)defaultCE32);
1617 context.append(trieBuilder.buildUnicodeString(USTRINGTRIE_BUILD_SMALL, trieString, errorCode));
1619 int32_t index = contexts.indexOf(context);
1622 contexts.append(context);