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

Side by Side Diff: source/common/unicode/bytestriebuilder.h

Issue 845603002: Update ICU to 54.1 step 1 (Closed) Base URL: https://chromium.googlesource.com/chromium/deps/icu.git@master
Patch Set: remove unusued directories Created 5 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/common/unicode/brkiter.h ('k') | source/common/unicode/caniter.h » ('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) 2010-2013, International Business Machines 3 * Copyright (C) 2010-2014, International Business Machines
4 * Corporation and others. All Rights Reserved. 4 * Corporation and others. All Rights Reserved.
5 ******************************************************************************* 5 *******************************************************************************
6 * file name: bytestriebuilder.h 6 * file name: bytestriebuilder.h
7 * encoding: US-ASCII 7 * encoding: US-ASCII
8 * tab size: 8 (not used) 8 * tab size: 8 (not used)
9 * indentation:4 9 * indentation:4
10 * 10 *
11 * created on: 2010sep25 11 * created on: 2010sep25
12 * created by: Markus W. Scherer 12 * created by: Markus W. Scherer
13 */ 13 */
(...skipping 120 matching lines...) Expand 10 before | Expand all | Expand 10 after
134 virtual int32_t countElementUnits(int32_t start, int32_t limit, int32_t byte Index) const; 134 virtual int32_t countElementUnits(int32_t start, int32_t limit, int32_t byte Index) const;
135 virtual int32_t skipElementsBySomeUnits(int32_t i, int32_t byteIndex, int32_ t count) const; 135 virtual int32_t skipElementsBySomeUnits(int32_t i, int32_t byteIndex, int32_ t count) const;
136 virtual int32_t indexOfElementWithNextUnit(int32_t i, int32_t byteIndex, UCh ar byte) const; 136 virtual int32_t indexOfElementWithNextUnit(int32_t i, int32_t byteIndex, UCh ar byte) const;
137 137
138 virtual UBool matchNodesCanHaveValues() const { return FALSE; } 138 virtual UBool matchNodesCanHaveValues() const { return FALSE; }
139 139
140 virtual int32_t getMaxBranchLinearSubNodeLength() const { return BytesTrie:: kMaxBranchLinearSubNodeLength; } 140 virtual int32_t getMaxBranchLinearSubNodeLength() const { return BytesTrie:: kMaxBranchLinearSubNodeLength; }
141 virtual int32_t getMinLinearMatch() const { return BytesTrie::kMinLinearMatc h; } 141 virtual int32_t getMinLinearMatch() const { return BytesTrie::kMinLinearMatc h; }
142 virtual int32_t getMaxLinearMatchLength() const { return BytesTrie::kMaxLine arMatchLength; } 142 virtual int32_t getMaxLinearMatchLength() const { return BytesTrie::kMaxLine arMatchLength; }
143 143
144 #ifndef U_HIDE_INTERNAL_API
145 /** 144 /**
146 * @internal 145 * @internal
147 */ 146 */
148 class BTLinearMatchNode : public LinearMatchNode { 147 class BTLinearMatchNode : public LinearMatchNode {
149 public: 148 public:
150 BTLinearMatchNode(const char *units, int32_t len, Node *nextNode); 149 BTLinearMatchNode(const char *units, int32_t len, Node *nextNode);
151 virtual UBool operator==(const Node &other) const; 150 virtual UBool operator==(const Node &other) const;
152 virtual void write(StringTrieBuilder &builder); 151 virtual void write(StringTrieBuilder &builder);
153 private: 152 private:
154 const char *s; 153 const char *s;
155 }; 154 };
156 #endif /* U_HIDE_INTERNAL_API */
157 155
158 virtual Node *createLinearMatchNode(int32_t i, int32_t byteIndex, int32_t le ngth, 156 virtual Node *createLinearMatchNode(int32_t i, int32_t byteIndex, int32_t le ngth,
159 Node *nextNode) const; 157 Node *nextNode) const;
160 158
161 UBool ensureCapacity(int32_t length); 159 UBool ensureCapacity(int32_t length);
162 virtual int32_t write(int32_t byte); 160 virtual int32_t write(int32_t byte);
163 int32_t write(const char *b, int32_t length); 161 int32_t write(const char *b, int32_t length);
164 virtual int32_t writeElementUnits(int32_t i, int32_t byteIndex, int32_t leng th); 162 virtual int32_t writeElementUnits(int32_t i, int32_t byteIndex, int32_t leng th);
165 virtual int32_t writeValueAndFinal(int32_t i, UBool isFinal); 163 virtual int32_t writeValueAndFinal(int32_t i, UBool isFinal);
166 virtual int32_t writeValueAndType(UBool hasValue, int32_t value, int32_t nod e); 164 virtual int32_t writeValueAndType(UBool hasValue, int32_t value, int32_t nod e);
167 virtual int32_t writeDeltaTo(int32_t jumpTarget); 165 virtual int32_t writeDeltaTo(int32_t jumpTarget);
168 166
169 CharString *strings; // Pointer not object so we need not #include internal charstr.h. 167 CharString *strings; // Pointer not object so we need not #include internal charstr.h.
170 BytesTrieElement *elements; 168 BytesTrieElement *elements;
171 int32_t elementsCapacity; 169 int32_t elementsCapacity;
172 int32_t elementsLength; 170 int32_t elementsLength;
173 171
174 // Byte serialization of the trie. 172 // Byte serialization of the trie.
175 // Grows from the back: bytesLength measures from the end of the buffer! 173 // Grows from the back: bytesLength measures from the end of the buffer!
176 char *bytes; 174 char *bytes;
177 int32_t bytesCapacity; 175 int32_t bytesCapacity;
178 int32_t bytesLength; 176 int32_t bytesLength;
179 }; 177 };
180 178
181 U_NAMESPACE_END 179 U_NAMESPACE_END
182 180
183 #endif // __BYTESTRIEBUILDER_H__ 181 #endif // __BYTESTRIEBUILDER_H__
OLDNEW
« no previous file with comments | « source/common/unicode/brkiter.h ('k') | source/common/unicode/caniter.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698