Lines Matching refs:errorCode
60 UErrorCode &errorCode) const {
61 if(U_SUCCESS(errorCode)) {
65 errorCode=U_ILLEGAL_ARGUMENT_ERROR;
73 UErrorCode &errorCode) const {
74 if(U_SUCCESS(errorCode)) {
78 errorCode=U_ILLEGAL_ARGUMENT_ERROR;
86 UErrorCode &errorCode) const {
87 if(U_SUCCESS(errorCode)) {
91 errorCode=U_ILLEGAL_ARGUMENT_ERROR;
131 UErrorCode &errorCode) const {
132 if(U_FAILURE(errorCode)) {
138 errorCode=U_ILLEGAL_ARGUMENT_ERROR;
144 if(buffer.init(src.length(), errorCode)) {
145 normalize(sArray, sArray+src.length(), buffer, errorCode);
151 ReorderingBuffer &buffer, UErrorCode &errorCode) const = 0;
157 UErrorCode &errorCode) const {
158 return normalizeSecondAndAppend(first, second, TRUE, errorCode);
163 UErrorCode &errorCode) const {
164 return normalizeSecondAndAppend(first, second, FALSE, errorCode);
170 UErrorCode &errorCode) const {
171 uprv_checkCanGetBuffer(first, errorCode);
172 if(U_FAILURE(errorCode)) {
177 errorCode=U_ILLEGAL_ARGUMENT_ERROR;
184 if(buffer.init(firstLength+second.length(), errorCode)) {
186 safeMiddle, buffer, errorCode);
189 if(U_FAILURE(errorCode)) {
198 ReorderingBuffer &buffer, UErrorCode &errorCode) const = 0;
241 isNormalized(const UnicodeString &s, UErrorCode &errorCode) const {
242 if(U_FAILURE(errorCode)) {
247 errorCode=U_ILLEGAL_ARGUMENT_ERROR;
251 return sLimit==spanQuickCheckYes(sArray, sLimit, errorCode);
254 quickCheck(const UnicodeString &s, UErrorCode &errorCode) const {
255 return Normalizer2WithImpl::isNormalized(s, errorCode) ? UNORM_YES : UNORM_NO;
258 spanQuickCheckYes(const UnicodeString &s, UErrorCode &errorCode) const {
259 if(U_FAILURE(errorCode)) {
264 errorCode=U_ILLEGAL_ARGUMENT_ERROR;
267 return (int32_t)(spanQuickCheckYes(sArray, sArray+s.length(), errorCode)-sArray);
270 spanQuickCheckYes(const UChar *src, const UChar *limit, UErrorCode &errorCode) const = 0;
289 ReorderingBuffer &buffer, UErrorCode &errorCode) const {
290 impl.decompose(src, limit, &buffer, errorCode);
296 ReorderingBuffer &buffer, UErrorCode &errorCode) const {
297 impl.decomposeAndAppend(src, limit, doNormalize, safeMiddle, buffer, errorCode);
300 spanQuickCheckYes(const UChar *src, const UChar *limit, UErrorCode &errorCode) const {
301 return impl.decompose(src, limit, NULL, errorCode);
323 ReorderingBuffer &buffer, UErrorCode &errorCode) const {
324 impl.compose(src, limit, onlyContiguous, TRUE, buffer, errorCode);
330 ReorderingBuffer &buffer, UErrorCode &errorCode) const {
331 impl.composeAndAppend(src, limit, doNormalize, onlyContiguous, safeMiddle, buffer, errorCode);
335 isNormalized(const UnicodeString &s, UErrorCode &errorCode) const {
336 if(U_FAILURE(errorCode)) {
341 errorCode=U_ILLEGAL_ARGUMENT_ERROR;
346 if(!buffer.init(5, errorCode)) { // small destCapacity for substring normalization
349 return impl.compose(sArray, sArray+s.length(), onlyContiguous, FALSE, buffer, errorCode);
352 quickCheck(const UnicodeString &s, UErrorCode &errorCode) const {
353 if(U_FAILURE(errorCode)) {
358 errorCode=U_ILLEGAL_ARGUMENT_ERROR;
396 ReorderingBuffer &buffer, UErrorCode &errorCode) const {
397 impl.makeFCD(src, limit, &buffer, errorCode);
403 ReorderingBuffer &buffer, UErrorCode &errorCode) const {
404 impl.makeFCDAndAppend(src, limit, doNormalize, safeMiddle, buffer, errorCode);
407 spanQuickCheckYes(const UChar *src, const UChar *limit, UErrorCode &errorCode) const {
408 return impl.makeFCD(src, limit, NULL, errorCode);
423 UErrorCode &errorCode);
436 UErrorCode &errorCode) {
437 if(U_FAILURE(errorCode)) {
442 errorCode=U_MEMORY_ALLOCATION_ERROR;
445 allModes->impl.load(packageName, name, errorCode);
446 return U_SUCCESS(errorCode) ? allModes.orphan() : NULL;
457 Norm2AllModes *getInstance(UErrorCode &errorCode) {
458 return TriStateSingletonWrapper<Norm2AllModes>::getInstance(createInstance, name, errorCode);
461 static void *createInstance(const void *context, UErrorCode &errorCode) {
463 return Norm2AllModes::createInstance(NULL, (const char *)context, errorCode);
476 Normalizer2 *getInstance(UErrorCode &errorCode) {
477 return SimpleSingletonWrapper<Normalizer2>::getInstance(createInstance, NULL, errorCode);
480 static void *createInstance(const void *, UErrorCode &errorCode) {
483 errorCode=U_MEMORY_ALLOCATION_ERROR;
512 const Normalizer2 *Normalizer2Factory::getNFCInstance(UErrorCode &errorCode) {
513 Norm2AllModes *allModes=Norm2AllModesSingleton(nfcSingleton, "nfc").getInstance(errorCode);
517 const Normalizer2 *Normalizer2Factory::getNFDInstance(UErrorCode &errorCode) {
518 Norm2AllModes *allModes=Norm2AllModesSingleton(nfcSingleton, "nfc").getInstance(errorCode);
522 const Normalizer2 *Normalizer2Factory::getFCDInstance(UErrorCode &errorCode) {
523 Norm2AllModes *allModes=Norm2AllModesSingleton(nfcSingleton, "nfc").getInstance(errorCode);
527 const Normalizer2 *Normalizer2Factory::getFCCInstance(UErrorCode &errorCode) {
528 Norm2AllModes *allModes=Norm2AllModesSingleton(nfcSingleton, "nfc").getInstance(errorCode);
532 const Normalizer2 *Normalizer2Factory::getNFKCInstance(UErrorCode &errorCode) {
534 Norm2AllModesSingleton(nfkcSingleton, "nfkc").getInstance(errorCode);
538 const Normalizer2 *Normalizer2Factory::getNFKDInstance(UErrorCode &errorCode) {
540 Norm2AllModesSingleton(nfkcSingleton, "nfkc").getInstance(errorCode);
544 const Normalizer2 *Normalizer2Factory::getNFKC_CFInstance(UErrorCode &errorCode) {
546 Norm2AllModesSingleton(nfkc_cfSingleton, "nfkc_cf").getInstance(errorCode);
550 const Normalizer2 *Normalizer2Factory::getNoopInstance(UErrorCode &errorCode) {
551 return Norm2Singleton(noopSingleton).getInstance(errorCode);
555 Normalizer2Factory::getInstance(UNormalizationMode mode, UErrorCode &errorCode) {
556 if(U_FAILURE(errorCode)) {
561 return getNFDInstance(errorCode);
563 return getNFKDInstance(errorCode);
565 return getNFCInstance(errorCode);
567 return getNFKCInstance(errorCode);
569 return getFCDInstance(errorCode);
571 return getNoopInstance(errorCode);
576 Normalizer2Factory::getNFCImpl(UErrorCode &errorCode) {
578 Norm2AllModesSingleton(nfcSingleton, "nfc").getInstance(errorCode);
583 Normalizer2Factory::getNFKCImpl(UErrorCode &errorCode) {
585 Norm2AllModesSingleton(nfkcSingleton, "nfkc").getInstance(errorCode);
590 Normalizer2Factory::getNFKC_CFImpl(UErrorCode &errorCode) {
592 Norm2AllModesSingleton(nfkc_cfSingleton, "nfkc_cf").getInstance(errorCode);
602 Normalizer2::getNFCInstance(UErrorCode &errorCode) {
603 return Normalizer2Factory::getNFCInstance(errorCode);
607 Normalizer2::getNFDInstance(UErrorCode &errorCode) {
608 return Normalizer2Factory::getNFDInstance(errorCode);
612 Normalizer2::getNFKCInstance(UErrorCode &errorCode) {
613 return Normalizer2Factory::getNFKCInstance(errorCode);
617 Normalizer2::getNFKDInstance(UErrorCode &errorCode) {
618 return Normalizer2Factory::getNFKDInstance(errorCode);
622 Normalizer2::getNFKCCasefoldInstance(UErrorCode &errorCode) {
623 return Normalizer2Factory::getNFKC_CFInstance(errorCode);
630 UErrorCode &errorCode) {
631 if(U_FAILURE(errorCode)) {
635 errorCode=U_ILLEGAL_ARGUMENT_ERROR;
641 allModes=Norm2AllModesSingleton(nfcSingleton, "nfc").getInstance(errorCode);
643 allModes=Norm2AllModesSingleton(nfkcSingleton, "nfkc").getInstance(errorCode);
645 allModes=Norm2AllModesSingleton(nfkc_cfSingleton, "nfkc_cf").getInstance(errorCode);
648 if(allModes==NULL && U_SUCCESS(errorCode)) {
657 Norm2AllModes::createInstance(packageName, name, errorCode));
658 if(U_SUCCESS(errorCode)) {
661 cache=uhash_open(uhash_hashChars, uhash_compareChars, NULL, &errorCode);
662 if(U_FAILURE(errorCode)) {
673 errorCode=U_MEMORY_ALLOCATION_ERROR;
677 uhash_put(cache, nameCopy, allModes=localAllModes.orphan(), &errorCode);
685 if(allModes!=NULL && U_SUCCESS(errorCode)) {
970 UErrorCode errorCode=U_ZERO_ERROR;
971 const Normalizer2 *nfd=Normalizer2Factory::getNFDInstance(errorCode);
972 if(U_SUCCESS(errorCode)) {
984 UErrorCode errorCode=U_ZERO_ERROR;
985 const Normalizer2 *norm2=Normalizer2Factory::getInstance(mode, errorCode);
986 if(U_SUCCESS(errorCode)) {
995 UErrorCode errorCode=U_ZERO_ERROR;
996 const Normalizer2Impl *impl=Normalizer2Factory::getNFCImpl(errorCode);
997 if(U_SUCCESS(errorCode)) {