]>
git.saurik.com Git - apple/icu.git/blob - icuSources/i18n/csrucode.h
1 // © 2016 and later: Unicode, Inc. and others.
2 // License & terms of use: http://www.unicode.org/copyright.html
4 **********************************************************************
5 * Copyright (C) 2005-2012, International Business Machines
6 * Corporation and others. All Rights Reserved.
7 **********************************************************************
13 #include "unicode/utypes.h"
15 #if !UCONFIG_NO_CONVERSION
22 * This class matches UTF-16 and UTF-32, both big- and little-endian. The
23 * BOM will be used if it is present.
27 class CharsetRecog_Unicode
: public CharsetRecognizer
32 virtual ~CharsetRecog_Unicode();
34 * @see com.ibm.icu.text.CharsetRecognizer#getName()
36 const char* getName() const = 0;
39 * @see com.ibm.icu.text.CharsetRecognizer#match(com.ibm.icu.text.CharsetDetector)
41 UBool
match(InputText
* textIn
, CharsetMatch
*results
) const = 0;
45 class CharsetRecog_UTF_16_BE
: public CharsetRecog_Unicode
49 virtual ~CharsetRecog_UTF_16_BE();
51 const char *getName() const;
53 UBool
match(InputText
* textIn
, CharsetMatch
*results
) const;
56 class CharsetRecog_UTF_16_LE
: public CharsetRecog_Unicode
60 virtual ~CharsetRecog_UTF_16_LE();
62 const char *getName() const;
64 UBool
match(InputText
* textIn
, CharsetMatch
*results
) const;
67 class CharsetRecog_UTF_32
: public CharsetRecog_Unicode
70 virtual int32_t getChar(const uint8_t *input
, int32_t index
) const = 0;
73 virtual ~CharsetRecog_UTF_32();
75 const char* getName() const = 0;
77 UBool
match(InputText
* textIn
, CharsetMatch
*results
) const;
81 class CharsetRecog_UTF_32_BE
: public CharsetRecog_UTF_32
84 int32_t getChar(const uint8_t *input
, int32_t index
) const;
88 virtual ~CharsetRecog_UTF_32_BE();
90 const char *getName() const;
94 class CharsetRecog_UTF_32_LE
: public CharsetRecog_UTF_32
97 int32_t getChar(const uint8_t *input
, int32_t index
) const;
100 virtual ~CharsetRecog_UTF_32_LE();
102 const char* getName() const;
108 #endif /* __CSRUCODE_H */