Home | History | Annotate | Download | only in i18n

Lines Matching full:elems

211     UCollationPCE(UCollationElements *elems);
222 UCollationPCE::UCollationPCE(UCollationElements *elems)
224 init(elems->iteratordata_.coll);
246 inline uint64_t processCE(UCollationElements *elems, uint32_t ce)
253 switch(elems->pce->strength) {
274 if ((elems->pce->toShift && elems->pce->variableTop > ce && primary != 0)
275 || (elems->pce->isShifted && primary == 0)) {
281 if (elems->pce->strength >= UCOL_QUATERNARY) {
286 elems->pce->isShifted = TRUE;
288 if (elems->pce->strength >= UCOL_QUATERNARY) {
292 elems->pce->isShifted = FALSE;
299 uprv_init_pce(const UCollationElements *elems)
301 if (elems->pce != NULL) {
302 elems->pce->init(elems->iteratordata_.coll);
340 ucol_closeElements(UCollationElements *elems)
342 if (elems != NULL) {
343 collIterate *ci = &elems->iteratordata_;
353 if (elems->isWritable && elems->iteratordata_.string != NULL)
355 uprv_free((UChar *)elems->iteratordata_.string);
358 if (elems->pce != NULL) {
359 delete elems->pce;
362 delete elems;
367 ucol_reset(UCollationElements *elems)
369 collIterate *ci = &(elems->iteratordata_);
370 elems->reset_ = TRUE;
389 ucol_forceHanImplicit(UCollationElements *elems, UErrorCode *status)
395 if (elems == NULL) {
400 elems->iteratordata_.flags |= UCOL_FORCE_HAN_IMPLICIT;
404 ucol_next(UCollationElements *elems,
412 elems->reset_ = FALSE;
414 result = (int32_t)ucol_getNextCE(elems->iteratordata_.coll,
415 &elems->iteratordata_,
425 ucol_nextProcessed(UCollationElements *elems,
430 const UCollator *coll = elems->iteratordata_.coll;
438 if (elems->pce == NULL) {
439 elems->pce = new UCollationPCE(elems);
441 elems->pce->pceBuffer.reset();
444 elems->reset_ = FALSE;
447 low = ucol_getOffset(elems);
448 uint32_t ce = (uint32_t) ucol_getNextCE(coll, &elems->iteratordata_, status);
449 high = ucol_getOffset(elems);
456 result = processCE(elems, ce);
471 ucol_previous(UCollationElements *elems,
481 if (elems->reset_ && (elems->iteratordata_.pos == elems->iteratordata_.string)) {
482 if (elems->iteratordata_.endp == NULL) {
483 elems->iteratordata_.endp = elems->iteratordata_.string +
484 u_strlen(elems->iteratordata_.string);
485 elems->iteratordata_.flags |= UCOL_ITER_HASLEN;
487 elems->iteratordata_.pos = elems->iteratordata_.endp;
488 elems->iteratordata_.fcdPosition = elems->iteratordata_.endp;
491 elems->reset_ = FALSE;
493 result = (int32_t)ucol_getPrevCE(elems->iteratordata_.coll,
494 &(elems->iteratordata_),
506 ucol_previousProcessed(UCollationElements *elems,
511 const UCollator *coll = elems->iteratordata_.coll;
523 if (elems->reset_ &&
524 (elems->iteratordata_.pos == elems->iteratordata_.string)) {
525 if (elems->iteratordata_.endp == NULL) {
526 elems->iteratordata_.endp = elems->iteratordata_.string +
527 u_strlen(elems->iteratordata_.string);
528 elems->iteratordata_.flags |= UCOL_ITER_HASLEN;
531 elems->iteratordata_.pos = elems->iteratordata_.endp;
532 elems->iteratordata_.fcdPosition = elems->iteratordata_.endp;
535 if (elems->pce == NULL) {
536 elems->pce = new UCollationPCE(elems);
538 //elems->pce->pceBuffer.reset();
541 elems->reset_ = FALSE;
543 while (elems->pce->pceBuffer.empty()) {
550 high = ucol_getOffset(elems);
551 ce = ucol_getPrevCE(coll, &elems->iteratordata_, status);
552 low = ucol_getOffset(elems);
569 result = processCE(elems, rcei->ce);
572 elems->pce->pceBuffer.put(result, rcei->low, rcei->high);
578 if (elems->pce->pceBuffer.empty()) {
591 const PCEI *pcei = elems->pce->pceBuffer.get();
605 ucol_getMaxExpansion(const UCollationElements *elems,
611 UCOL_GETMAXEXPANSION(elems->iteratordata_.coll, (uint32_t)order, result);
613 const UCollator *coll = elems->iteratordata_.coll;
665 ucol_setText( UCollationElements *elems,
674 if (elems->isWritable && elems->iteratordata_.string != NULL)
676 uprv_free((UChar *)elems->iteratordata_.string);
683 elems->isWritable = FALSE;
686 ucol_freeOffsetBuffer(&(elems->iteratordata_));
688 if (elems->iteratordata_.extendCEs != NULL) {
689 uprv_free(elems->iteratordata_.extendCEs);
691 uprv_init_collIterate(elems->iteratordata_.coll, text, textLength,
692 &elems->iteratordata_, status);
694 elems->reset_ = TRUE;
698 ucol_getOffset(const UCollationElements *elems)
700 const collIterate *ci = &(elems->iteratordata_);
727 ucol_setOffset(UCollationElements *elems,
737 collIterate *ci = &(elems->iteratordata_);
748 elems->reset_ = FALSE;