#include <bytestrie.h>
Inheritance diagram for icu::BytesTrie::Iterator:
Public Member Functions | |
Iterator (const void *trieBytes, int32_t maxStringLength, UErrorCode &errorCode) | |
Iterates from the root of a byte-serialized BytesTrie. | |
Iterator (const BytesTrie &trie, int32_t maxStringLength, UErrorCode &errorCode) | |
Iterates from the current state of the specified BytesTrie. | |
~Iterator () | |
Destructor. | |
Iterator & | reset () |
Resets this iterator to its initial state. | |
UBool | hasNext () const |
UBool | next (UErrorCode &errorCode) |
Finds the next (byte sequence, value) pair if there is one. | |
const StringPiece & | getString () const |
int32_t | getValue () const |
Definition at line 242 of file bytestrie.h.
icu::BytesTrie::Iterator::Iterator | ( | const void * | trieBytes, | |
int32_t | maxStringLength, | |||
UErrorCode & | errorCode | |||
) |
Iterates from the root of a byte-serialized BytesTrie.
trieBytes | The trie bytes. | |
maxStringLength | If 0, the iterator returns full strings/byte sequences. Otherwise, the iterator returns strings with this maximum length. | |
errorCode | Standard ICU error code. Its input value must pass the U_SUCCESS() test, or else the function returns immediately. Check for U_FAILURE() on output or use with function chaining. (See User Guide for details.) |
icu::BytesTrie::Iterator::Iterator | ( | const BytesTrie & | trie, | |
int32_t | maxStringLength, | |||
UErrorCode & | errorCode | |||
) |
Iterates from the current state of the specified BytesTrie.
trie | The trie whose state will be copied for iteration. | |
maxStringLength | If 0, the iterator returns full strings/byte sequences. Otherwise, the iterator returns strings with this maximum length. | |
errorCode | Standard ICU error code. Its input value must pass the U_SUCCESS() test, or else the function returns immediately. Check for U_FAILURE() on output or use with function chaining. (See User Guide for details.) |
icu::BytesTrie::Iterator::~Iterator | ( | ) |
const StringPiece& icu::BytesTrie::Iterator::getString | ( | ) | const [inline] |
Definition at line 309 of file bytestrie.h.
int32_t icu::BytesTrie::Iterator::getValue | ( | ) | const [inline] |
Definition at line 314 of file bytestrie.h.
UBool icu::BytesTrie::Iterator::hasNext | ( | ) | const |
UBool icu::BytesTrie::Iterator::next | ( | UErrorCode & | errorCode | ) |
Finds the next (byte sequence, value) pair if there is one.
If the byte sequence is truncated to the maximum length and does not have a real value, then the value is set to -1. In this case, this "not a real value" is indistinguishable from a real value of -1.
errorCode | Standard ICU error code. Its input value must pass the U_SUCCESS() test, or else the function returns immediately. Check for U_FAILURE() on output or use with function chaining. (See User Guide for details.) |
Iterator& icu::BytesTrie::Iterator::reset | ( | ) |