Logo Search packages:      
Sourcecode: icu version File versions

Collator *U_EXPORT2 Collator::createInstance ( UErrorCode err ) [static, inherited]

Creates the Collator object for the current default locale. The default locale is determined by Locale::getDefault. The UErrorCode& err parameter is used to return status information to the user. To check whether the construction succeeded or not, you should check the value of U_SUCCESS(err). If you wish more detailed information, you can check for informational error results which still indicate success. U_USING_FALLBACK_ERROR indicates that a fall back locale was used. For example, 'de_CH' was requested, but nothing was found there, so 'de' was used. U_USING_DEFAULT_ERROR indicates that the default locale data was used; neither the requested locale nor any of its fall back locales could be found. The caller owns the returned object and is responsible for deleting it.

errthe error code status.
the collation object of the default locale.(for example, en_US)
See also:
Locale::getDefault ICU 2.0

Definition at line 306 of file coll.cpp.

References Locale::getDefault().

Referenced by AlphabeticIndex::AlphabeticIndex(), CollationFunction::call(), CollationIteratorTest::TestAssignment(), CollationAPITest::TestAttribute(), CollationAPITest::TestBounds(), CollationAPITest::TestCollationKey(), CollationAPITest::TestCompare(), CollationIteratorTest::TestConstructors(), CollationAPITest::TestDecomposition(), CollationAPITest::TestDisplayName(), CollationAPITest::TestDuplicate(), CollationAPITest::TestElemIter(), CollationAPITest::TestGetLocale(), CollationAPITest::TestHashCode(), CollationAPITest::TestOperators(), CollationIteratorTest::TestPrevious(), CollationAPITest::TestProperty(), CollationAPITest::TestRuleBasedColl(), CollationAPITest::TestRules(), CollationAPITest::TestSafeClone(), CollationAPITest::TestSortKey(), CollationIteratorTest::TestStrengthOrder(), CollationAPITest::TestUClassID(), and CollationAPITest::TestVariableTopSetting().

    return createInstance(Locale::getDefault(), success);

Here is the call graph for this function:

Here is the caller graph for this function:

Generated by  Doxygen 1.6.0   Back to index