Go to the documentation of this file.
17 #ifndef __UCHARSTRIEBUILDER_H__
18 #define __UCHARSTRIEBUILDER_H__
32 class UCharsTrieElement;
138 virtual char16_t
getElementUnit(int32_t i, int32_t unitIndex)
const;
143 virtual int32_t
countElementUnits(int32_t start, int32_t limit, int32_t unitIndex)
const;
150 virtual int32_t
getMinLinearMatch()
const {
return UCharsTrie::kMinLinearMatch; }
153 class UCTLinearMatchNode :
public LinearMatchNode {
155 UCTLinearMatchNode(
const char16_t *units, int32_t len, Node *nextNode);
157 virtual void write(StringTrieBuilder &builder);
163 Node *nextNode)
const;
165 UBool ensureCapacity(int32_t length);
166 virtual int32_t
write(int32_t unit);
167 int32_t
write(
const char16_t *s, int32_t length);
173 UnicodeString strings;
174 UCharsTrieElement *elements;
175 int32_t elementsCapacity;
176 int32_t elementsLength;
181 int32_t ucharsCapacity;
182 int32_t ucharsLength;
187 #endif // __UCHARSTRIEBUILDER_H__
Light-weight, non-const reader class for a UCharsTrie.
virtual int32_t writeDeltaTo(int32_t jumpTarget)=0
Basic definitions for ICU, for both C and C++ APIs.
virtual Node * createLinearMatchNode(int32_t i, int32_t unitIndex, int32_t length, Node *nextNode) const =0
int8_t UBool
The ICU boolean type.
virtual int32_t indexOfElementWithNextUnit(int32_t i, int32_t unitIndex, char16_t unit) const =0
virtual int32_t getLimitOfLinearMatch(int32_t first, int32_t last, int32_t unitIndex) const =0
C++ API: Builder API for trie builders.
U_EXPORT UBool operator==(const StringPiece &x, const StringPiece &y)
Global operator == for StringPiece.
UStringTrieBuildOption
Build options for BytesTrieBuilder and CharsTrieBuilder.
Base class for string trie builder classes.
virtual char16_t getElementUnit(int32_t i, int32_t unitIndex) const =0
virtual int32_t writeValueAndType(UBool hasValue, int32_t value, int32_t node)=0
virtual int32_t countElementUnits(int32_t start, int32_t limit, int32_t unitIndex) const =0
virtual int32_t getElementStringLength(int32_t i) const =0
virtual int32_t writeValueAndFinal(int32_t i, UBool isFinal)=0
UnicodeString is a string class that stores Unicode characters directly and provides similar function...
virtual int32_t skipElementsBySomeUnits(int32_t i, int32_t unitIndex, int32_t count) const =0
virtual UBool matchNodesCanHaveValues() const =0
UErrorCode
Error code to replace exception handling, so that the code is compatible with all C++ compilers,...
virtual int32_t write(int32_t unit)=0
#define TRUE
The TRUE value of a UBool.
virtual int32_t getMaxBranchLinearSubNodeLength() const =0
Builder class for UCharsTrie.
virtual int32_t getElementValue(int32_t i) const =0
virtual int32_t getMaxLinearMatchLength() const =0
C++ API: Trie for mapping Unicode strings (or 16-bit-unit sequences) to integer values.
virtual int32_t writeElementUnits(int32_t i, int32_t unitIndex, int32_t length)=0
void build(UStringTrieBuildOption buildOption, int32_t elementsLength, UErrorCode &errorCode)
#define U_NAMESPACE_BEGIN
UCharsTrieBuilder & clear()
Removes all (string, value) pairs.
virtual int32_t getMinLinearMatch() const =0