Home | History | Annotate | Download | only in unicode

Lines Matching defs:Collator

40 * 11/02/99     helena      Collator performance enhancements.  Eliminates the
82 * The <code>Collator</code> class performs locale-sensitive string
92 * <code>Collator</code> is an abstract base class. Subclasses implement
100 * <code>Collator</code> object for a given locale. You will only need to
101 * look at the subclasses of <code>Collator</code> if you need to
106 * <code>Collator</code> for the default locale.
112 * Collator* myCollator = Collator::createInstance(success);
121 * You can set a <code>Collator</code>'s <em>strength</em> property to
133 * //Get the Collator for US English and set its strength to PRIMARY
135 * Collator* usCollator = Collator::createInstance(Locale::US, success);
136 * usCollator->setStrength(Collator::PRIMARY);
162 * <strong>Note:</strong> <code>Collator</code>s with different Locale,
177 class U_I18N_API Collator : public UObject {
180 // Collator public enums -----------------------------------------------
185 * Use this to set the strength of a Collator object.<br>
190 * differences. Use this to set the strength of a Collator object.<br>
195 * comparison differences. Use this to set the strength of a Collator
204 * generated from Collator objects.
223 * @see Collator#compare
233 // Collator public destructor -----------------------------------------
239 virtual ~Collator();
241 // Collator public methods --------------------------------------------
252 * if (!Collator::operator==(other)) { return FALSE; } // not the same class
257 * @param other Collator object to be compared
261 virtual UBool operator==(const Collator& other) const;
265 * Calls ! operator==(const Collator&) const which works for all subclasses.
266 * @param other Collator object to be compared
270 virtual UBool operator!=(const Collator& other) const;
277 virtual Collator* clone(void) const = 0;
280 * Creates the Collator object for the current default locale.
298 static Collator* U_EXPORT2 createInstance(UErrorCode& err);
315 * @param loc The locale ID for which to open a collator.
323 static Collator* U_EXPORT2 createInstance(const Locale& loc, UErrorCode& err);
327 * Create a Collator with a specific version.
331 * This is designed to be used to open the same collator for a given
339 * @param loc The locale ID for which to open a collator.
340 * @param version The requested collator version.
343 * @return A pointer to a Collator, or 0 if an error occurred
344 * or a collator with the requested version is not available.
349 static Collator *createInstance(const Locale &loc, UVersionInfo version, UErrorCode &err);
425 * . Collator *myCollation =
426 * . Collator::createInstance(Locale::US, status);
428 * . myCollation->setStrength(Collator::PRIMARY);
429 * . // result would be Collator::EQUAL ("abc" == "ABC")
431 * . Collator::EComparisonResult result =
433 * . myCollation->setStrength(Collator::TERTIARY);
434 * . // result would be Collator::LESS ("abc" &lt;&lt;&lt; "ABC")
474 * Compares two strings using the Collator.
489 * Compares two UTF-8 strings using the Collator.
551 * Gets the locale of the Collator
557 * @return locale where the collation data lives. If the collator
570 * @see Collator#compare
582 * @see Collator#compare
594 * @see Collator#compare
606 * @see Collator#setStrength
617 * Collator*myCollation = Collator::createInstance(Locale::US, status);
619 * myCollation->setStrength(Collator::PRIMARY);
622 * Collator::ComparisonResult result = myCollation->compare("abc", "ABC");
625 * @see Collator#getStrength
632 * Retrieves the reordering codes for this collator.
640 * @see Collator#getEquivalentReorderCodes
641 * @see Collator#setReorderCodes
651 * Sets the ordering of scripts for this collator.
655 * length is also set to 0. An empty array will clear any reordering codes on the collator.
658 * @see Collator#getReorderCodes
659 * @see Collator#getEquivalentReorderCodes
680 * @see Collator#getReorderCodes
681 * @see Collator#setReorderCodes
813 * Register a new Collator. The collator will be adopted.
814 * @param toAdopt the Collator instance to be adopted
815 * @param locale the locale with which the collator will be associated
817 * @return a registry key that can be used to unregister this collator
820 static URegistryKey U_EXPORT2 registerInstance(Collator* toAdopt, const Locale& locale, UErrorCode& status);
826 * @return a registry key that can be used to unregister this collator
832 * Unregister a previously-registered Collator or CollatorFactory
838 * @return TRUE if the collator for the key was successfully unregistered
845 * Gets the version information for a Collator.
918 * Gets the variable top value of a Collator.
927 * tailored in this collator.
943 virtual Collator* safeClone(void) const;
1027 // Collator protected constructors -------------------------------------
1031 * Constructor is different from the old default Collator constructor.
1036 Collator();
1050 Collator(UCollationStrength collationStrength,
1056 * @param other Collator object to be copied from
1059 Collator(const Collator& other);
1061 // Collator protected methods -----------------------------------------
1084 /** Get the short definition string for a collator. This internal API harvests the collator's
1086 * a collator with the same properties using the ucol_openFromShortString API.
1097 * from the collator.
1116 Collator& operator=(const Collator& other);
1122 static Collator* makeInstance(const Locale& desiredLocale,
1125 // Collator private data members ---------------------------------------
1145 * If standard locale display names are sufficient, Collator instances can
1172 * Return a collator for the provided locale. If the locale
1174 * @param loc the locale identifying the collator to be created.
1175 * @return a new collator if the locale is supported, otherwise NULL.
1178 virtual Collator* createCollator(const Locale& loc) = 0;
1181 * Return the name of the collator for the objectLocale, localized for the displayLocale.
1184 * @param objectLocale the locale identifying the collator
1185 * @param displayLocale the locale for which the display name of the collator should be localized
1207 // Collator inline methods -----------------------------------------------