unorm2.h

Go to the documentation of this file.
00001 /*
00002 *******************************************************************************
00003 *
00004 *   Copyright (C) 2009-2010, International Business Machines
00005 *   Corporation and others.  All Rights Reserved.
00006 *
00007 *******************************************************************************
00008 *   file name:  unorm2.h
00009 *   encoding:   US-ASCII
00010 *   tab size:   8 (not used)
00011 *   indentation:4
00012 *
00013 *   created on: 2009dec15
00014 *   created by: Markus W. Scherer
00015 */
00016 
00017 #ifndef __UNORM2_H__
00018 #define __UNORM2_H__
00019 
00031 #include "unicode/utypes.h"
00032 #include "unicode/localpointer.h"
00033 #include "unicode/uset.h"
00034 
00042 typedef enum {
00051     UNORM2_COMPOSE,
00060     UNORM2_DECOMPOSE,
00073     UNORM2_FCD,
00083     UNORM2_COMPOSE_CONTIGUOUS
00084 } UNormalization2Mode;
00085 
00091 typedef enum UNormalizationCheckResult {
00096   UNORM_NO,
00101   UNORM_YES,
00109   UNORM_MAYBE
00110 } UNormalizationCheckResult;
00111 
00116 struct UNormalizer2;
00117 typedef struct UNormalizer2 UNormalizer2;  
00119 #if !UCONFIG_NO_NORMALIZATION
00120 
00142 U_DRAFT const UNormalizer2 * U_EXPORT2
00143 unorm2_getInstance(const char *packageName,
00144                    const char *name,
00145                    UNormalization2Mode mode,
00146                    UErrorCode *pErrorCode);
00147 
00163 U_DRAFT UNormalizer2 * U_EXPORT2
00164 unorm2_openFiltered(const UNormalizer2 *norm2, const USet *filterSet, UErrorCode *pErrorCode);
00165 
00172 U_DRAFT void U_EXPORT2
00173 unorm2_close(UNormalizer2 *norm2);
00174 
00175 #if U_SHOW_CPLUSPLUS_API
00176 
00177 U_NAMESPACE_BEGIN
00178 
00188 U_DEFINE_LOCAL_OPEN_POINTER(LocalUNormalizer2Pointer, UNormalizer2, unorm2_close);
00189 
00190 U_NAMESPACE_END
00191 
00192 #endif
00193 
00210 U_DRAFT int32_t U_EXPORT2
00211 unorm2_normalize(const UNormalizer2 *norm2,
00212                  const UChar *src, int32_t length,
00213                  UChar *dest, int32_t capacity,
00214                  UErrorCode *pErrorCode);
00233 U_DRAFT int32_t U_EXPORT2
00234 unorm2_normalizeSecondAndAppend(const UNormalizer2 *norm2,
00235                                 UChar *first, int32_t firstLength, int32_t firstCapacity,
00236                                 const UChar *second, int32_t secondLength,
00237                                 UErrorCode *pErrorCode);
00256 U_DRAFT int32_t U_EXPORT2
00257 unorm2_append(const UNormalizer2 *norm2,
00258               UChar *first, int32_t firstLength, int32_t firstCapacity,
00259               const UChar *second, int32_t secondLength,
00260               UErrorCode *pErrorCode);
00261 
00278 U_DRAFT UBool U_EXPORT2
00279 unorm2_isNormalized(const UNormalizer2 *norm2,
00280                     const UChar *s, int32_t length,
00281                     UErrorCode *pErrorCode);
00282 
00300 U_DRAFT UNormalizationCheckResult U_EXPORT2
00301 unorm2_quickCheck(const UNormalizer2 *norm2,
00302                   const UChar *s, int32_t length,
00303                   UErrorCode *pErrorCode);
00304 
00329 U_DRAFT int32_t U_EXPORT2
00330 unorm2_spanQuickCheckYes(const UNormalizer2 *norm2,
00331                          const UChar *s, int32_t length,
00332                          UErrorCode *pErrorCode);
00333 
00343 U_DRAFT UBool U_EXPORT2
00344 unorm2_hasBoundaryBefore(const UNormalizer2 *norm2, UChar32 c);
00345 
00355 U_DRAFT UBool U_EXPORT2
00356 unorm2_hasBoundaryAfter(const UNormalizer2 *norm2, UChar32 c);
00357 
00366 U_DRAFT UBool U_EXPORT2
00367 unorm2_isInert(const UNormalizer2 *norm2, UChar32 c);
00368 
00369 #endif  /* !UCONFIG_NO_NORMALIZATION */
00370 #endif  /* __UNORM2_H__ */

Generated on Tue Apr 27 15:10:34 2010 for ICU 4.4.1 by  doxygen 1.4.7