OLD | NEW |
1 /* | 1 /* |
2 ******************************************************************************* | 2 ******************************************************************************* |
3 * Copyright (C) 2007-2013, International Business Machines Corporation and | 3 * Copyright (C) 2007-2015, International Business Machines Corporation and |
4 * others. All Rights Reserved. * | 4 * others. All Rights Reserved. * |
5 ******************************************************************************* | 5 ******************************************************************************* |
6 * | 6 * |
7 * File DTPTNGEN.H | 7 * File DTPTNGEN.H |
8 * | 8 * |
9 ******************************************************************************* | 9 ******************************************************************************* |
10 */ | 10 */ |
11 | 11 |
12 #include "uvector.h" | 12 #include "uvector.h" |
13 | 13 |
(...skipping 124 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
138 }; | 138 }; |
139 | 139 |
140 class FormatParser : public UMemory { | 140 class FormatParser : public UMemory { |
141 public: | 141 public: |
142 UnicodeString items[MAX_DT_TOKEN]; | 142 UnicodeString items[MAX_DT_TOKEN]; |
143 int32_t itemNumber; | 143 int32_t itemNumber; |
144 | 144 |
145 FormatParser(); | 145 FormatParser(); |
146 virtual ~FormatParser(); | 146 virtual ~FormatParser(); |
147 void set(const UnicodeString& patternString); | 147 void set(const UnicodeString& patternString); |
148 UBool isQuoteLiteral(const UnicodeString& s) const; | |
149 void getQuoteLiteral(UnicodeString& quote, int32_t *itemIndex); | 148 void getQuoteLiteral(UnicodeString& quote, int32_t *itemIndex); |
150 int32_t getCanonicalIndex(const UnicodeString& s) { return getCanonicalIndex
(s, TRUE); } | |
151 int32_t getCanonicalIndex(const UnicodeString& s, UBool strict); | |
152 UBool isPatternSeparator(UnicodeString& field); | 149 UBool isPatternSeparator(UnicodeString& field); |
153 void setFilter(UErrorCode &status); | 150 static UBool isQuoteLiteral(const UnicodeString& s); |
| 151 static int32_t getCanonicalIndex(const UnicodeString& s) { return getCanonic
alIndex(s, TRUE); } |
| 152 static int32_t getCanonicalIndex(const UnicodeString& s, UBool strict); |
154 | 153 |
155 private: | 154 private: |
156 typedef enum TokenStatus { | 155 typedef enum TokenStatus { |
157 START, | 156 START, |
158 ADD_TOKEN, | 157 ADD_TOKEN, |
159 SYNTAX_ERROR, | 158 SYNTAX_ERROR, |
160 DONE | 159 DONE |
161 } ToeknStatus; | 160 } ToeknStatus; |
162 | 161 |
163 TokenStatus status; | 162 TokenStatus status; |
(...skipping 90 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
254 void add(const UnicodeString &pattern, UErrorCode& status); | 253 void add(const UnicodeString &pattern, UErrorCode& status); |
255 private: | 254 private: |
256 int32_t pos; | 255 int32_t pos; |
257 UBool isCanonicalItem(const UnicodeString& item); | 256 UBool isCanonicalItem(const UnicodeString& item); |
258 UVector *fPatterns; | 257 UVector *fPatterns; |
259 }; | 258 }; |
260 | 259 |
261 U_NAMESPACE_END | 260 U_NAMESPACE_END |
262 | 261 |
263 #endif | 262 #endif |
OLD | NEW |