ICU 64.2
64.2
|
C API: Helper definitions for dictionary trie APIs. More...
#include "unicode/utypes.h"
Go to the source code of this file.
Macros | |
#define | USTRINGTRIE_MATCHES(result) ((result)!=USTRINGTRIE_NO_MATCH) |
Same as (result!=USTRINGTRIE_NO_MATCH). More... | |
#define | USTRINGTRIE_HAS_VALUE(result) ((result)>=USTRINGTRIE_FINAL_VALUE) |
Equivalent to (result==USTRINGTRIE_INTERMEDIATE_VALUE || result==USTRINGTRIE_FINAL_VALUE) but this macro evaluates result exactly once. More... | |
#define | USTRINGTRIE_HAS_NEXT(result) ((result)&1) |
Equivalent to (result==USTRINGTRIE_NO_VALUE || result==USTRINGTRIE_INTERMEDIATE_VALUE) but this macro evaluates result exactly once. More... | |
Enumerations | |
enum | UStringTrieResult { USTRINGTRIE_NO_MATCH, USTRINGTRIE_NO_VALUE, USTRINGTRIE_FINAL_VALUE, USTRINGTRIE_INTERMEDIATE_VALUE } |
Return values for BytesTrie::next(), UCharsTrie::next() and similar methods. More... | |
C API: Helper definitions for dictionary trie APIs.
Definition in file ustringtrie.h.
#define USTRINGTRIE_HAS_NEXT | ( | result | ) | ((result)&1) |
Equivalent to (result==USTRINGTRIE_NO_VALUE || result==USTRINGTRIE_INTERMEDIATE_VALUE) but this macro evaluates result exactly once.
result | A result from BytesTrie::first(), UCharsTrie::next() etc. |
Definition at line 95 of file ustringtrie.h.
#define USTRINGTRIE_HAS_VALUE | ( | result | ) | ((result)>=USTRINGTRIE_FINAL_VALUE) |
Equivalent to (result==USTRINGTRIE_INTERMEDIATE_VALUE || result==USTRINGTRIE_FINAL_VALUE) but this macro evaluates result exactly once.
result | A result from BytesTrie::first(), UCharsTrie::next() etc. |
Definition at line 86 of file ustringtrie.h.
#define USTRINGTRIE_MATCHES | ( | result | ) | ((result)!=USTRINGTRIE_NO_MATCH) |
Same as (result!=USTRINGTRIE_NO_MATCH).
result | A result from BytesTrie::first(), UCharsTrie::next() etc. |
Definition at line 75 of file ustringtrie.h.
enum UStringTrieResult |
Return values for BytesTrie::next(), UCharsTrie::next() and similar methods.
Enumerator | |
---|---|
USTRINGTRIE_NO_MATCH | The input unit(s) did not continue a matching string. Once current()/next() return USTRINGTRIE_NO_MATCH, all further calls to current()/next() will also return USTRINGTRIE_NO_MATCH, until the trie is reset to its original state or to a saved state.
|
USTRINGTRIE_NO_VALUE | The input unit(s) continued a matching string but there is no value for the string so far. (It is a prefix of a longer string.)
|
USTRINGTRIE_FINAL_VALUE | The input unit(s) continued a matching string and there is a value for the string so far. This value will be returned by getValue(). No further input byte/unit can continue a matching string.
|
USTRINGTRIE_INTERMEDIATE_VALUE | The input unit(s) continued a matching string and there is a value for the string so far. This value will be returned by getValue(). Another input byte/unit can continue a matching string.
|
Definition at line 35 of file ustringtrie.h.