Home | History | Annotate | Download | only in i18n
      1 /*
      2 *******************************************************************************
      3 *
      4 *   Copyright (C) 1998-2014, International Business Machines
      5 *   Corporation and others.  All Rights Reserved.
      6 *
      7 *******************************************************************************
      8 *
      9 * Private implementation header for C collation
     10 *   file name:  ucol_imp.h
     11 *   encoding:   US-ASCII
     12 *   tab size:   8 (not used)
     13 *   indentation:4
     14 *
     15 *   created on: 2000dec11
     16 *   created by: Vladimir Weinstein
     17 *
     18 * Modification history
     19 * Date        Name      Comments
     20 * 02/16/2001  synwee    Added UCOL_GETPREVCE for the use in ucoleitr
     21 * 02/27/2001  synwee    Added getMaxExpansion data structure in UCollator
     22 * 03/02/2001  synwee    Added UCOL_IMPLICIT_CE
     23 * 03/12/2001  synwee    Added pointer start to collIterate.
     24 */
     25 
     26 #ifndef UCOL_IMP_H
     27 #define UCOL_IMP_H
     28 
     29 #include "unicode/utypes.h"
     30 
     31 #if !UCONFIG_NO_COLLATION
     32 
     33 #include "unicode/ucol.h"
     34 
     35 /** Check whether two collators are equal. Collators are considered equal if they
     36  *  will sort strings the same. This means that both the current attributes and the
     37  *  rules must be equivalent.
     38  *  @param source first collator
     39  *  @param target second collator
     40  *  @return TRUE or FALSE
     41  *  @internal ICU 3.0
     42  */
     43 U_INTERNAL UBool U_EXPORT2
     44 ucol_equals(const UCollator *source, const UCollator *target);
     45 
     46 /**
     47  * Convenience string denoting the Collation data tree
     48  */
     49 #define U_ICUDATA_COLL U_ICUDATA_NAME U_TREE_SEPARATOR_STRING "coll"
     50 
     51 #ifdef __cplusplus
     52 
     53 U_NAMESPACE_BEGIN
     54 
     55 struct CollationTailoring;
     56 
     57 class Locale;
     58 class UnicodeString;
     59 
     60 /** Implemented in ucol_res.cpp. */
     61 class CollationLoader {
     62 public:
     63     static void appendRootRules(UnicodeString &s);
     64     static UnicodeString *loadRules(const char *localeID, const char *collationType,
     65                                     UErrorCode &errorCode);
     66     static const CollationTailoring *loadTailoring(const Locale &locale, Locale &validLocale,
     67                                                    UErrorCode &errorCode);
     68 
     69 private:
     70     CollationLoader();  // not implemented, all methods are static
     71     static void loadRootRules(UErrorCode &errorCode);
     72 };
     73 
     74 U_NAMESPACE_END
     75 
     76 #endif  /* __cplusplus */
     77 
     78 #endif /* #if !UCONFIG_NO_COLLATION */
     79 
     80 #endif
     81