intl/icu/source/i18n/csrucode.h

Thu, 22 Jan 2015 13:21:57 +0100

author
Michael Schloh von Bennewitz <michael@schloh.com>
date
Thu, 22 Jan 2015 13:21:57 +0100
branch
TOR_BUG_9701
changeset 15
b8a032363ba2
permissions
-rw-r--r--

Incorporate requested changes from Mozilla in review:
https://bugzilla.mozilla.org/show_bug.cgi?id=1123480#c6

michael@0 1 /*
michael@0 2 **********************************************************************
michael@0 3 * Copyright (C) 2005-2012, International Business Machines
michael@0 4 * Corporation and others. All Rights Reserved.
michael@0 5 **********************************************************************
michael@0 6 */
michael@0 7
michael@0 8 #ifndef __CSRUCODE_H
michael@0 9 #define __CSRUCODE_H
michael@0 10
michael@0 11 #include "unicode/utypes.h"
michael@0 12
michael@0 13 #if !UCONFIG_NO_CONVERSION
michael@0 14
michael@0 15 #include "csrecog.h"
michael@0 16
michael@0 17 U_NAMESPACE_BEGIN
michael@0 18
michael@0 19 /**
michael@0 20 * This class matches UTF-16 and UTF-32, both big- and little-endian. The
michael@0 21 * BOM will be used if it is present.
michael@0 22 *
michael@0 23 * @internal
michael@0 24 */
michael@0 25 class CharsetRecog_Unicode : public CharsetRecognizer
michael@0 26 {
michael@0 27
michael@0 28 public:
michael@0 29
michael@0 30 virtual ~CharsetRecog_Unicode();
michael@0 31 /* (non-Javadoc)
michael@0 32 * @see com.ibm.icu.text.CharsetRecognizer#getName()
michael@0 33 */
michael@0 34 const char* getName() const = 0;
michael@0 35
michael@0 36 /* (non-Javadoc)
michael@0 37 * @see com.ibm.icu.text.CharsetRecognizer#match(com.ibm.icu.text.CharsetDetector)
michael@0 38 */
michael@0 39 UBool match(InputText* textIn, CharsetMatch *results) const = 0;
michael@0 40 };
michael@0 41
michael@0 42
michael@0 43 class CharsetRecog_UTF_16_BE : public CharsetRecog_Unicode
michael@0 44 {
michael@0 45 public:
michael@0 46
michael@0 47 virtual ~CharsetRecog_UTF_16_BE();
michael@0 48
michael@0 49 const char *getName() const;
michael@0 50
michael@0 51 UBool match(InputText* textIn, CharsetMatch *results) const;
michael@0 52 };
michael@0 53
michael@0 54 class CharsetRecog_UTF_16_LE : public CharsetRecog_Unicode
michael@0 55 {
michael@0 56 public:
michael@0 57
michael@0 58 virtual ~CharsetRecog_UTF_16_LE();
michael@0 59
michael@0 60 const char *getName() const;
michael@0 61
michael@0 62 UBool match(InputText* textIn, CharsetMatch *results) const;
michael@0 63 };
michael@0 64
michael@0 65 class CharsetRecog_UTF_32 : public CharsetRecog_Unicode
michael@0 66 {
michael@0 67 protected:
michael@0 68 virtual int32_t getChar(const uint8_t *input, int32_t index) const = 0;
michael@0 69 public:
michael@0 70
michael@0 71 virtual ~CharsetRecog_UTF_32();
michael@0 72
michael@0 73 const char* getName() const = 0;
michael@0 74
michael@0 75 UBool match(InputText* textIn, CharsetMatch *results) const;
michael@0 76 };
michael@0 77
michael@0 78
michael@0 79 class CharsetRecog_UTF_32_BE : public CharsetRecog_UTF_32
michael@0 80 {
michael@0 81 protected:
michael@0 82 int32_t getChar(const uint8_t *input, int32_t index) const;
michael@0 83
michael@0 84 public:
michael@0 85
michael@0 86 virtual ~CharsetRecog_UTF_32_BE();
michael@0 87
michael@0 88 const char *getName() const;
michael@0 89 };
michael@0 90
michael@0 91
michael@0 92 class CharsetRecog_UTF_32_LE : public CharsetRecog_UTF_32
michael@0 93 {
michael@0 94 protected:
michael@0 95 int32_t getChar(const uint8_t *input, int32_t index) const;
michael@0 96
michael@0 97 public:
michael@0 98 virtual ~CharsetRecog_UTF_32_LE();
michael@0 99
michael@0 100 const char* getName() const;
michael@0 101 };
michael@0 102
michael@0 103 U_NAMESPACE_END
michael@0 104
michael@0 105 #endif
michael@0 106 #endif /* __CSRUCODE_H */

mercurial