]>
git.saurik.com Git - apple/icu.git/blob - icuSources/i18n/csrucode.h
2 **********************************************************************
3 * Copyright (C) 2005-2012, International Business Machines
4 * Corporation and others. All Rights Reserved.
5 **********************************************************************
11 #include "unicode/utypes.h"
13 #if !UCONFIG_NO_CONVERSION
20 * This class matches UTF-16 and UTF-32, both big- and little-endian. The
21 * BOM will be used if it is present.
25 class CharsetRecog_Unicode
: public CharsetRecognizer
30 virtual ~CharsetRecog_Unicode();
32 * @see com.ibm.icu.text.CharsetRecognizer#getName()
34 const char* getName() const = 0;
37 * @see com.ibm.icu.text.CharsetRecognizer#match(com.ibm.icu.text.CharsetDetector)
39 UBool
match(InputText
* textIn
, CharsetMatch
*results
) const = 0;
43 class CharsetRecog_UTF_16_BE
: public CharsetRecog_Unicode
47 virtual ~CharsetRecog_UTF_16_BE();
49 const char *getName() const;
51 UBool
match(InputText
* textIn
, CharsetMatch
*results
) const;
54 class CharsetRecog_UTF_16_LE
: public CharsetRecog_Unicode
58 virtual ~CharsetRecog_UTF_16_LE();
60 const char *getName() const;
62 UBool
match(InputText
* textIn
, CharsetMatch
*results
) const;
65 class CharsetRecog_UTF_32
: public CharsetRecog_Unicode
68 virtual int32_t getChar(const uint8_t *input
, int32_t index
) const = 0;
71 virtual ~CharsetRecog_UTF_32();
73 const char* getName() const = 0;
75 UBool
match(InputText
* textIn
, CharsetMatch
*results
) const;
79 class CharsetRecog_UTF_32_BE
: public CharsetRecog_UTF_32
82 int32_t getChar(const uint8_t *input
, int32_t index
) const;
86 virtual ~CharsetRecog_UTF_32_BE();
88 const char *getName() const;
92 class CharsetRecog_UTF_32_LE
: public CharsetRecog_UTF_32
95 int32_t getChar(const uint8_t *input
, int32_t index
) const;
98 virtual ~CharsetRecog_UTF_32_LE();
100 const char* getName() const;
106 #endif /* __CSRUCODE_H */