22 #ifndef __BYTESTRIEBUILDER_H__ 23 #define __BYTESTRIEBUILDER_H__ 32 class BytesTrieElement;
130 virtual char16_t
getElementUnit(int32_t i, int32_t byteIndex)
const;
135 virtual int32_t
countElementUnits(int32_t start, int32_t limit, int32_t byteIndex)
const;
150 BTLinearMatchNode(
const char *units, int32_t len,
Node *nextNode);
158 Node *nextNode)
const;
160 UBool ensureCapacity(int32_t length);
161 virtual int32_t
write(int32_t byte);
162 int32_t
write(
const char *b, int32_t length);
169 BytesTrieElement *elements;
170 int32_t elementsCapacity;
171 int32_t elementsLength;
176 int32_t bytesCapacity;
182 #endif // __BYTESTRIEBUILDER_H__ C++ API: Builder API for trie builders.
virtual int32_t getMinLinearMatch() const =0
virtual Node * createLinearMatchNode(int32_t i, int32_t unitIndex, int32_t length, Node *nextNode) const =0
Base class for string trie builder classes.
virtual int32_t getMaxLinearMatchLength() const =0
C++ API: Trie for mapping byte sequences to integer values.
Builder class for BytesTrie.
U_EXPORT UBool operator==(const StringPiece &x, const StringPiece &y)
Global operator == for StringPiece.
virtual int32_t skipElementsBySomeUnits(int32_t i, int32_t unitIndex, int32_t count) const =0
virtual int32_t writeValueAndType(UBool hasValue, int32_t value, int32_t node)=0
virtual int32_t getMaxBranchLinearSubNodeLength() const =0
virtual int32_t writeElementUnits(int32_t i, int32_t unitIndex, int32_t length)=0
virtual int32_t getElementStringLength(int32_t i) const =0
virtual char16_t getElementUnit(int32_t i, int32_t unitIndex) const =0
Light-weight, non-const reader class for a BytesTrie.
C++ API: StringPiece: Read-only byte string wrapper class.
#define U_NAMESPACE_BEGIN
This is used to begin a declaration of a public ICU C++ API.
virtual int32_t getElementValue(int32_t i) const =0
virtual int32_t writeDeltaTo(int32_t jumpTarget)=0
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
UStringTrieBuildOption
Build options for BytesTrieBuilder and CharsTrieBuilder.
#define U_NAMESPACE_END
This is used to end a declaration of a public ICU C++ API.
void build(UStringTrieBuildOption buildOption, int32_t elementsLength, UErrorCode &errorCode)
virtual int32_t writeValueAndFinal(int32_t i, UBool isFinal)=0
virtual int32_t countElementUnits(int32_t start, int32_t limit, int32_t unitIndex) const =0
UErrorCode
Error code to replace exception handling, so that the code is compatible with all C++ compilers...
Basic definitions for ICU, for both C and C++ APIs.
#define FALSE
The FALSE value of a UBool.
#define U_COMMON_API
Set to export library symbols from inside the common library, and to import them from outside...
A string-like object that points to a sized piece of memory.
virtual UBool matchNodesCanHaveValues() const =0
virtual int32_t write(int32_t unit)=0
int8_t UBool
The ICU boolean type.