Home | History | Annotate | Download | only in i18n

Lines Matching full:ce32

45  * Build-time context and CE32 for a code point.
56 ce32(0), defaultCE32(Collation::NO_CE32), builtCE32(Collation::NO_CE32),
60 ce32(ce), defaultCE32(Collation::NO_CE32), builtCE32(Collation::NO_CE32),
67 * "\0" for the first entry for any code point, with its default CE32.
74 * CE32 for the code point and its context.
77 uint32_t ce32;
79 * Default CE32 for all contexts with this same prefix.
85 * CE32 for the built contexts.
119 * Some CE32 tags (for example, the DIGIT_TAG) do not occur in the builder data,
145 virtual uint32_t getCE32FromBuilderData(uint32_t ce32, UErrorCode &errorCode);
187 uint32_t ce32 = utrie2_get32(builder.trie, c);
189 if(ce32 == Collation::FALLBACK_CE32) {
191 ce32 = builder.base->getCE32(c);
195 appendCEsFromCE32(d, c, ce32, /*forward=*/ TRUE, errorCode);
257 DataBuilderCollationIterator::getCE32FromBuilderData(uint32_t ce32, UErrorCode &errorCode) {
258 U_ASSERT(Collation::hasCE32Tag(ce32, Collation::BUILDER_DATA_TAG));
259 if((ce32 & CollationDataBuilder::IS_BUILDER_JAMO_CE32) != 0) {
260 UChar32 jamo = Collation::indexFromCE32(ce32);
263 ConditionalCE32 *cond = builder.getConditionalCE32ForCE32(ce32);
288 // Reserve the first CE32 for U+0000.
397 CollationDataBuilder::getCE32FromOffsetCE32(UBool fromBase, UChar32 c, uint32_t ce32) const {
398 int32_t i = Collation::indexFromCE32(ce32);
416 uint32_t ce32 = utrie2_get32(trie, c);
417 if(Collation::isLongPrimaryCE32(ce32)) {
418 return Collation::primaryFromLongPrimaryCE32(ce32);
429 uint32_t ce32 = utrie2_get32(trie, c);
430 if(ce32 == Collation::FALLBACK_CE32) {
432 ce32 = base->getCE32(c);
434 while(Collation::isSpecialCE32(ce32)) {
435 switch(Collation::tagFromCE32(ce32)) {
449 ce32);
451 return Collation::ceFromLongSecondaryCE32(ce32);
453 if(Collation::lengthFromCE32(ce32) == 1) {
454 int32_t i = Collation::indexFromCE32(ce32);
455 ce32 = fromBase ? base->ce32s[i] : ce32s.elementAti(i);
462 if(Collation::lengthFromCE32(ce32) == 1) {
463 int32_t i = Collation::indexFromCE32(ce32);
471 // Fetch the non-numeric-collation CE32 and continue.
472 ce32 = ce32s.elementAti(Collation::indexFromCE32(ce32));
476 // Fetch the normal ce32 for U+0000 and continue.
477 ce32 = fromBase ? base->ce32s[0] : ce32s.elementAti(0);
480 ce32 = getCE32FromOffsetCE32(fromBase, c, ce32);
486 return Collation::ceFromSimpleCE32(ce32);
500 CollationDataBuilder::addCE32(uint32_t ce32, UErrorCode &errorCode) {
503 if(ce32 == (uint32_t)ce32s.elementAti(i)) { return i; }
505 ce32s.addElement((int32_t)ce32, errorCode);
510 CollationDataBuilder::addConditionalCE32(const UnicodeString &context, uint32_t ce32,
519 ConditionalCE32 *cond = new ConditionalCE32(context, ce32);
532 uint32_t ce32 = encodeCEs(ces, cesLength, errorCode);
533 addCE32(prefix, s, ce32, errorCode);
538 uint32_t ce32, UErrorCode &errorCode) {
567 utrie2_set32(trie, c, ce32, &errorCode);
571 cond->ce32 = ce32;
576 // Replace the simple oldCE32 with a builder context CE32
597 int32_t index = addConditionalCE32(context, ce32, errorCode);
606 int32_t index = addConditionalCE32(context, ce32, errorCode);
612 // Same context as before, overwrite its ce32.
613 nextCond->ce32 = ce32;
643 // Try to encode one CE as one CE32.
644 uint32_t ce32 = encodeOneCEAsCE32(ce);
645 if(ce32 != Collation::NO_CE32) { return ce32; }
674 // Try to encode two CEs as one CE32.
696 uint32_t ce32 = encodeOneCEAsCE32(ces[i]);
697 if(ce32 == Collation::NO_CE32) { break; }
698 newCE32s[i] = (int32_t)ce32;
771 CollationDataBuilder::copyFromBaseCE32(UChar32 c, uint32_t ce32, UBool withContext,
774 if(!Collation::isSpecialCE32(ce32)) { return ce32; }
775 switch(Collation::tagFromCE32(ce32)) {
782 const uint32_t *baseCE32s = base->ce32s + Collation::indexFromCE32(ce32);
783 int32_t length = Collation::lengthFromCE32(ce32);
784 ce32 = encodeExpansion32(
789 const int64_t *baseCEs = base->ces + Collation::indexFromCE32(ce32);
790 int32_t length = Collation::lengthFromCE32(ce32);
791 ce32 = encodeExpansion(baseCEs, length, errorCode);
797 const UChar *p = base->contexts + Collation::indexFromCE32(ce32);
798 ce32 = CollationData::readCE32(p); // Default if no prefix match.
800 return copyFromBaseCE32(c, ce32, FALSE, errorCode);
805 if(Collation::isContractionCE32(ce32)) {
806 index = copyContractionsFromBaseCE32(context, c, ce32, &head, errorCode);
808 ce32 = copyFromBaseCE32(c, ce32, TRUE, errorCode);
809 head.next = index = addConditionalCE32(context, ce32, errorCode);
818 ce32 = (uint32_t)prefixes.getValue();
819 if(Collation::isContractionCE32(ce32)) {
820 index = copyContractionsFromBaseCE32(context, c, ce32, cond, errorCode);
822 ce32 = copyFromBaseCE32(c, ce32, TRUE, errorCode);
823 cond->next = index = addConditionalCE32(context, ce32, errorCode);
828 ce32 = makeBuilderContextCE32(head.next);
834 const UChar *p = base->contexts + Collation::indexFromCE32(ce32);
835 ce32 = CollationData::readCE32(p); // Default if no suffix match.
836 return copyFromBaseCE32(c, ce32, FALSE, errorCode);
840 copyContractionsFromBaseCE32(context, c, ce32, &head, errorCode);
841 ce32 = makeBuilderContextCE32(head.next);
849 ce32 = getCE32FromOffsetCE32(TRUE, c, ce32);
852 ce32 = encodeOneCE(Collation::unassignedCEFromCodePoint(c), errorCode);
855 U_ASSERT(FALSE); // require ce32 == base->getFinalCE32(ce32)
858 return ce32;
862 CollationDataBuilder::copyContractionsFromBaseCE32(UnicodeString &context, UChar32 c, uint32_t ce32,
865 const UChar *p = base->contexts + Collation::indexFromCE32(ce32);
867 if((ce32 & Collation::CONTRACT_SINGLE_CP_NO_MATCH) != 0) {
874 ce32 = CollationData::readCE32(p); // Default if no suffix match.
875 U_ASSERT(!Collation::isContractionCE32(ce32));
876 ce32 = copyFromBaseCE32(c, ce32, TRUE, errorCode);
877 cond->next = index = addConditionalCE32(context, ce32, errorCode);
886 ce32 = copyFromBaseCE32(c, (uint32_t)suffixes.getValue(), TRUE, errorCode);
887 cond->next = index = addConditionalCE32(context, ce32, errorCode);
905 UBool copyRangeCE32(UChar32 start, UChar32 end, uint32_t ce32) {
906 ce32 = copyCE32(ce32);
907 utrie2_setRange32(dest.trie, start, end, ce32, TRUE, &errorCode);
908 if(CollationDataBuilder::isBuilderContextCE32(ce32)) {
914 uint32_t copyCE32(uint32_t ce32) {
915 if(!Collation::isSpecialCE32(ce32)) {
916 int64_t ce = modifier.modifyCE32(ce32);
918 ce32 = dest.encodeOneCE(ce, errorCode);
921 int32_t tag = Collation::tagFromCE32(ce32);
924 srcCE32s += Collation::indexFromCE32(ce32);
925 int32_t length = Collation::lengthFromCE32(ce32);
930 ce32 = srcCE32s[i];
932 if(Collation::isSpecialCE32(ce32) ||
933 (ce = modifier.modifyCE32(ce32)) == Collation::NO_CE) {
935 modifiedCEs[i] = Collation::ceFromCE32(ce32);
948 ce32 = dest.encodeCEs(modifiedCEs, length, errorCode);
950 ce32 = dest.encodeExpansion32(
955 srcCEs += Collation::indexFromCE32(ce32);
956 int32_t length = Collation::lengthFromCE32(ce32);
978 ce32 = dest.encodeCEs(modifiedCEs, length, errorCode);
980 ce32 = dest.encodeExpansion(srcCEs, length, errorCode);
984 ConditionalCE32 *cond = src.getConditionalCE32ForCE32(ce32);
987 cond->context, copyCE32(cond->ce32), errorCode);
988 ce32 = CollationDataBuilder::makeBuilderContextCE32(destIndex);
993 cond->context, copyCE32(cond->ce32), errorCode);
1007 return ce32;
1051 uint32_t ce32 = utrie2_get32(trie, c);
1052 if(ce32 == Collation::FALLBACK_CE32) {
1053 ce32 = base->getFinalCE32(base->getCE32(c));
1054 ce32 = copyFromBaseCE32(c, ce32, TRUE, errorCode);
1055 utrie2_set32(trie, c, ce32, &errorCode);
1067 uint32_t ce32 = utrie2_get32(trie, c);
1068 if(ce32 == Collation::FALLBACK_CE32) {
1069 ce32 = base->getFinalCE32(base->getCE32(c));
1070 if(Collation::ce32HasContext(ce32)) {
1071 ce32 = copyFromBaseCE32(c, ce32, FALSE /* without context */, errorCode);
1072 utrie2_set32(trie, c, ce32, &errorCode);
1074 } else if(isBuilderContextCE32(ce32)) {
1075 ce32 = getConditionalCE32ForCE32(ce32)->ce32;
1079 utrie2_set32(trie, c, ce32, &errorCode);
1094 uint32_t ce32 = utrie2_get32(trie, jamo);
1095 anyJamoAssigned |= Collation::isAssignedCE32(ce32);
1098 if(ce32 == Collation::FALLBACK_CE32) {
1100 ce32 = base->getCE32(jamo);
1102 if(Collation::isSpecialCE32(ce32)) {
1103 switch(Collation::tagFromCE32(ce32)) {
1107 // Copy the ce32 as-is.
1115 ce32 = Collation::FALLBACK_CE32;
1122 ce32 = Collation::FALLBACK_CE32;
1126 ce32 = getCE32FromOffsetCE32(fromBase, jamo, ce32);
1139 jamoCE32s[j] = ce32;
1161 uint32_t ce32 = utrie2_get32(trie, c);
1162 if(ce32 != Collation::FALLBACK_CE32 && ce32 != Collation::UNASSIGNED_CE32) {
1163 int32_t index = addCE32(ce32, errorCode);
1169 ce32 = Collation::makeCE32FromTagIndexAndLength(
1171 utrie2_set32(trie, c, ce32, &errorCode);
1243 // Small optimization: Use a bit in the Hangul ce32
1260 uint32_t ce32 = hangulCE32;
1262 ce32
1265 utrie2_setRange32(trie, c, limit - 1, ce32, TRUE, &errorCode);
1272 uint32_t ce32 = base->getCE32(c);
1273 U_ASSERT(Collation::hasCE32Tag(ce32, Collation::HANGUL_TAG));
1275 utrie2_setRange32(trie, c, limit - 1, ce32, TRUE, &errorCode);
1283 // For U+0000, move its normal ce32 into CE32s[0] and set U0000_TAG.
1324 uint32_t ce32 = utrie2_get32(trie, iter.getCodepoint());
1325 U_ASSERT(isBuilderContextCE32(ce32));
1326 getConditionalCE32ForCE32(ce32)->builtCE32 = Collation::NO_CE32;
1340 uint32_t ce32 = utrie2_get32(trie, c);
1341 if(!isBuilderContextCE32(ce32)) {
1346 ConditionalCE32 *cond = getConditionalCE32ForCE32(ce32);
1347 ce32 = buildContext(cond, errorCode);
1348 utrie2_set32(trie, c, ce32, &errorCode);
1373 uint32_t ce32;
1378 ce32 = lastCond->ce32;
1389 emptySuffixCE32 = firstCond->ce32;
1427 contractionBuilder.add(suffix, (int32_t)cond->ce32, errorCode);
1437 ce32 = Collation::makeCE32FromTagAndIndex(Collation::CONTRACTION_TAG, index) | flags;
1440 firstCond->defaultCE32 = ce32;
1444 return ce32;
1449 prefixBuilder.add(prefix, (int32_t)ce32, errorCode);