Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(528)

Side by Side Diff: source/i18n/csrsbcs.h

Issue 1621843002: ICU 56 update step 1 (Closed) Base URL: https://chromium.googlesource.com/chromium/deps/icu.git@561
Patch Set: Created 4 years, 11 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « source/i18n/csr2022.cpp ('k') | source/i18n/csrsbcs.cpp » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 /* 1 /*
2 ********************************************************************** 2 **********************************************************************
3 * Copyright (C) 2005-2013, International Business Machines 3 * Copyright (C) 2005-2015, International Business Machines
4 * Corporation and others. All Rights Reserved. 4 * Corporation and others. All Rights Reserved.
5 ********************************************************************** 5 **********************************************************************
6 */ 6 */
7 7
8 #ifndef __CSRSBCS_H 8 #ifndef __CSRSBCS_H
9 #define __CSRSBCS_H 9 #define __CSRSBCS_H
10 10
11 #include "unicode/uobject.h" 11 #include "unicode/uobject.h"
12 12
13 #if !UCONFIG_NO_CONVERSION 13 #if !UCONFIG_NO_CONVERSION
(...skipping 12 matching lines...) Expand all
26 int32_t hitCount; 26 int32_t hitCount;
27 27
28 protected: 28 protected:
29 int32_t byteIndex; 29 int32_t byteIndex;
30 const uint8_t *charMap; 30 const uint8_t *charMap;
31 31
32 void addByte(int32_t b); 32 void addByte(int32_t b);
33 33
34 public: 34 public:
35 NGramParser(const int32_t *theNgramList, const uint8_t *theCharMap); 35 NGramParser(const int32_t *theNgramList, const uint8_t *theCharMap);
36 virtual ~NGramParser();
36 37
37 private: 38 private:
38 /* 39 /*
39 * Binary search for value in table, which must have exactly 64 entries. 40 * Binary search for value in table, which must have exactly 64 entries.
40 */ 41 */
41 int32_t search(const int32_t *table, int32_t value); 42 int32_t search(const int32_t *table, int32_t value);
42 43
43 void lookup(int32_t thisNgram); 44 void lookup(int32_t thisNgram);
44 45
45 virtual int32_t nextByte(InputText *det); 46 virtual int32_t nextByte(InputText *det);
46 virtual void parseCharacters(InputText *det); 47 virtual void parseCharacters(InputText *det);
47 48
48 public: 49 public:
49 int32_t parse(InputText *det); 50 int32_t parse(InputText *det);
50 51
51 }; 52 };
52 53
53 #if !UCONFIG_NO_NON_HTML5_CONVERSION 54 #if !UCONFIG_ONLY_HTML_CONVERSION
54 class NGramParser_IBM420 : public NGramParser 55 class NGramParser_IBM420 : public NGramParser
55 { 56 {
56 private:
57 int32_t alef;
58 int32_t isLamAlef(int32_t b);
59 int32_t nextByte(InputText *det);
60 void parseCharacters(InputText *det);
61
62 public: 57 public:
63 NGramParser_IBM420(const int32_t *theNgramList, const uint8_t *theCharMap); 58 NGramParser_IBM420(const int32_t *theNgramList, const uint8_t *theCharMap);
59 ~NGramParser_IBM420();
60
61 private:
62 int32_t alef;
63 int32_t isLamAlef(int32_t b);
64 int32_t nextByte(InputText *det);
65 void parseCharacters(InputText *det);
64 }; 66 };
65 #endif 67 #endif
66 68
67 69
68 class CharsetRecog_sbcs : public CharsetRecognizer 70 class CharsetRecog_sbcs : public CharsetRecognizer
69 { 71 {
70 public: 72 public:
71 CharsetRecog_sbcs(); 73 CharsetRecog_sbcs();
72 virtual ~CharsetRecog_sbcs(); 74 virtual ~CharsetRecog_sbcs();
73 virtual const char *getName() const = 0; 75 virtual const char *getName() const = 0;
(...skipping 150 matching lines...) Expand 10 before | Expand all | Expand 10 after
224 public: 226 public:
225 virtual ~CharsetRecog_KOI8_R(); 227 virtual ~CharsetRecog_KOI8_R();
226 228
227 const char *getName() const; 229 const char *getName() const;
228 230
229 const char *getLanguage() const; 231 const char *getLanguage() const;
230 232
231 virtual UBool match(InputText *det, CharsetMatch *results) const; 233 virtual UBool match(InputText *det, CharsetMatch *results) const;
232 }; 234 };
233 235
234 #if !UCONFIG_NO_NON_HTML5_CONVERSION 236 #if !UCONFIG_ONLY_HTML_CONVERSION
235 class CharsetRecog_IBM424_he : public CharsetRecog_sbcs 237 class CharsetRecog_IBM424_he : public CharsetRecog_sbcs
236 { 238 {
237 public: 239 public:
238 virtual ~CharsetRecog_IBM424_he(); 240 virtual ~CharsetRecog_IBM424_he();
239 241
240 const char *getLanguage() const; 242 const char *getLanguage() const;
241 }; 243 };
242 244
243 class CharsetRecog_IBM424_he_rtl : public CharsetRecog_IBM424_he { 245 class CharsetRecog_IBM424_he_rtl : public CharsetRecog_IBM424_he {
244 public: 246 public:
(...skipping 37 matching lines...) Expand 10 before | Expand all | Expand 10 after
282 const char *getName() const; 284 const char *getName() const;
283 285
284 virtual UBool match(InputText *det, CharsetMatch *results) const; 286 virtual UBool match(InputText *det, CharsetMatch *results) const;
285 }; 287 };
286 #endif 288 #endif
287 289
288 U_NAMESPACE_END 290 U_NAMESPACE_END
289 291
290 #endif /* !UCONFIG_NO_CONVERSION */ 292 #endif /* !UCONFIG_NO_CONVERSION */
291 #endif /* __CSRSBCS_H */ 293 #endif /* __CSRSBCS_H */
OLDNEW
« no previous file with comments | « source/i18n/csr2022.cpp ('k') | source/i18n/csrsbcs.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698