Base class for string trie builder classes.
More...
#include <stringtriebuilder.h>
|
| | StringTrieBuilder () |
| |
| virtual | ~StringTrieBuilder () |
| |
| void | createCompactBuilder (int32_t sizeGuess, UErrorCode &errorCode) |
| |
| void | deleteCompactBuilder () |
| |
| void | build (UStringTrieBuildOption buildOption, int32_t elementsLength, UErrorCode &errorCode) |
| |
| int32_t | writeNode (int32_t start, int32_t limit, int32_t unitIndex) |
| |
| int32_t | writeBranchSubNode (int32_t start, int32_t limit, int32_t unitIndex, int32_t length) |
| |
| Node * | makeNode (int32_t start, int32_t limit, int32_t unitIndex, UErrorCode &errorCode) |
| |
| Node * | makeBranchSubNode (int32_t start, int32_t limit, int32_t unitIndex, int32_t length, UErrorCode &errorCode) |
| |
| virtual int32_t | getElementStringLength (int32_t i) const =0 |
| |
| virtual UChar | getElementUnit (int32_t i, int32_t unitIndex) const =0 |
| |
| virtual int32_t | getElementValue (int32_t i) const =0 |
| |
| virtual int32_t | getLimitOfLinearMatch (int32_t first, int32_t last, int32_t unitIndex) const =0 |
| |
| virtual int32_t | countElementUnits (int32_t start, int32_t limit, int32_t unitIndex) const =0 |
| |
| virtual int32_t | skipElementsBySomeUnits (int32_t i, int32_t unitIndex, int32_t count) const =0 |
| |
| virtual int32_t | indexOfElementWithNextUnit (int32_t i, int32_t unitIndex, UChar unit) const =0 |
| |
| virtual UBool | matchNodesCanHaveValues () const =0 |
| |
| virtual int32_t | getMaxBranchLinearSubNodeLength () const =0 |
| |
| virtual int32_t | getMinLinearMatch () const =0 |
| |
| virtual int32_t | getMaxLinearMatchLength () const =0 |
| |
| Node * | registerNode (Node *newNode, UErrorCode &errorCode) |
| | Makes sure that there is only one unique node registered that is equivalent to newNode.
|
| |
| Node * | registerFinalValue (int32_t value, UErrorCode &errorCode) |
| | Makes sure that there is only one unique FinalValueNode registered with this value.
|
| |
| virtual Node * | createLinearMatchNode (int32_t i, int32_t unitIndex, int32_t length, Node *nextNode) const =0 |
| |
| virtual int32_t | write (int32_t unit)=0 |
| |
| virtual int32_t | writeElementUnits (int32_t i, int32_t unitIndex, int32_t length)=0 |
| |
| virtual int32_t | writeValueAndFinal (int32_t i, UBool isFinal)=0 |
| |
| virtual int32_t | writeValueAndType (UBool hasValue, int32_t value, int32_t node)=0 |
| |
| virtual int32_t | writeDeltaTo (int32_t jumpTarget)=0 |
| |
Base class for string trie builder classes.
This class is not intended for public subclassing.
- Stable:
- ICU 4.8
Definition at line 61 of file stringtriebuilder.h.
◆ StringTrieBuilder()
| StringTrieBuilder::StringTrieBuilder |
( |
| ) |
|
|
protected |
- Internal:
- Do not use. This API is for internal use only.
◆ ~StringTrieBuilder()
| virtual StringTrieBuilder::~StringTrieBuilder |
( |
| ) |
|
|
protectedvirtual |
- Internal:
- Do not use. This API is for internal use only.
◆ build()
- Internal:
- Do not use. This API is for internal use only.
◆ countElementUnits()
| virtual int32_t StringTrieBuilder::countElementUnits |
( |
int32_t |
start, |
|
|
int32_t |
limit, |
|
|
int32_t |
unitIndex |
|
) |
| const |
|
protectedpure virtual |
- Internal:
- Do not use. This API is for internal use only.
◆ createCompactBuilder()
| void StringTrieBuilder::createCompactBuilder |
( |
int32_t |
sizeGuess, |
|
|
UErrorCode & |
errorCode |
|
) |
| |
|
protected |
- Internal:
- Do not use. This API is for internal use only.
◆ createLinearMatchNode()
| virtual Node * StringTrieBuilder::createLinearMatchNode |
( |
int32_t |
i, |
|
|
int32_t |
unitIndex, |
|
|
int32_t |
length, |
|
|
Node * |
nextNode |
|
) |
| const |
|
protectedpure virtual |
- Internal:
- Do not use. This API is for internal use only.
◆ deleteCompactBuilder()
| void StringTrieBuilder::deleteCompactBuilder |
( |
| ) |
|
|
protected |
- Internal:
- Do not use. This API is for internal use only.
◆ equalNodes()
- Internal:
- Do not use. This API is for internal use only.
◆ getElementStringLength()
| virtual int32_t StringTrieBuilder::getElementStringLength |
( |
int32_t |
i | ) |
const |
|
protectedpure virtual |
- Internal:
- Do not use. This API is for internal use only.
◆ getElementUnit()
| virtual UChar StringTrieBuilder::getElementUnit |
( |
int32_t |
i, |
|
|
int32_t |
unitIndex |
|
) |
| const |
|
protectedpure virtual |
- Internal:
- Do not use. This API is for internal use only.
◆ getElementValue()
| virtual int32_t StringTrieBuilder::getElementValue |
( |
int32_t |
i | ) |
const |
|
protectedpure virtual |
- Internal:
- Do not use. This API is for internal use only.
◆ getLimitOfLinearMatch()
| virtual int32_t StringTrieBuilder::getLimitOfLinearMatch |
( |
int32_t |
first, |
|
|
int32_t |
last, |
|
|
int32_t |
unitIndex |
|
) |
| const |
|
protectedpure virtual |
- Internal:
- Do not use. This API is for internal use only.
◆ getMaxBranchLinearSubNodeLength()
| virtual int32_t StringTrieBuilder::getMaxBranchLinearSubNodeLength |
( |
| ) |
const |
|
protectedpure virtual |
- Internal:
- Do not use. This API is for internal use only.
◆ getMaxLinearMatchLength()
| virtual int32_t StringTrieBuilder::getMaxLinearMatchLength |
( |
| ) |
const |
|
protectedpure virtual |
- Internal:
- Do not use. This API is for internal use only.
◆ getMinLinearMatch()
| virtual int32_t StringTrieBuilder::getMinLinearMatch |
( |
| ) |
const |
|
protectedpure virtual |
- Internal:
- Do not use. This API is for internal use only.
◆ hashNode()
- Internal:
- Do not use. This API is for internal use only.
◆ indexOfElementWithNextUnit()
| virtual int32_t StringTrieBuilder::indexOfElementWithNextUnit |
( |
int32_t |
i, |
|
|
int32_t |
unitIndex, |
|
|
UChar |
unit |
|
) |
| const |
|
protectedpure virtual |
- Internal:
- Do not use. This API is for internal use only.
◆ makeBranchSubNode()
| Node * StringTrieBuilder::makeBranchSubNode |
( |
int32_t |
start, |
|
|
int32_t |
limit, |
|
|
int32_t |
unitIndex, |
|
|
int32_t |
length, |
|
|
UErrorCode & |
errorCode |
|
) |
| |
|
protected |
- Internal:
- Do not use. This API is for internal use only.
◆ makeNode()
| Node * StringTrieBuilder::makeNode |
( |
int32_t |
start, |
|
|
int32_t |
limit, |
|
|
int32_t |
unitIndex, |
|
|
UErrorCode & |
errorCode |
|
) |
| |
|
protected |
- Internal:
- Do not use. This API is for internal use only.
◆ matchNodesCanHaveValues()
| virtual UBool StringTrieBuilder::matchNodesCanHaveValues |
( |
| ) |
const |
|
protectedpure virtual |
- Internal:
- Do not use. This API is for internal use only.
◆ registerFinalValue()
| Node * StringTrieBuilder::registerFinalValue |
( |
int32_t |
value, |
|
|
UErrorCode & |
errorCode |
|
) |
| |
|
protected |
Makes sure that there is only one unique FinalValueNode registered with this value.
Avoids creating a node if the value is a duplicate.
- Parameters
-
| value | A final value. |
| errorCode | ICU in/out UErrorCode. Set to U_MEMORY_ALLOCATION_ERROR if it was success but newNode==NULL. |
- Returns
- A FinalValueNode with the given value.
- Internal:
- Do not use. This API is for internal use only.
◆ registerNode()
Makes sure that there is only one unique node registered that is equivalent to newNode.
- Parameters
-
| newNode | Input node. The builder takes ownership. |
| errorCode | ICU in/out UErrorCode. Set to U_MEMORY_ALLOCATION_ERROR if it was success but newNode==NULL. |
- Returns
- newNode if it is the first of its kind, or an equivalent node if newNode is a duplicate.
- Internal:
- Do not use. This API is for internal use only.
◆ skipElementsBySomeUnits()
| virtual int32_t StringTrieBuilder::skipElementsBySomeUnits |
( |
int32_t |
i, |
|
|
int32_t |
unitIndex, |
|
|
int32_t |
count |
|
) |
| const |
|
protectedpure virtual |
- Internal:
- Do not use. This API is for internal use only.
◆ write()
| virtual int32_t StringTrieBuilder::write |
( |
int32_t |
unit | ) |
|
|
protectedpure virtual |
- Internal:
- Do not use. This API is for internal use only.
◆ writeBranchSubNode()
| int32_t StringTrieBuilder::writeBranchSubNode |
( |
int32_t |
start, |
|
|
int32_t |
limit, |
|
|
int32_t |
unitIndex, |
|
|
int32_t |
length |
|
) |
| |
|
protected |
- Internal:
- Do not use. This API is for internal use only.
◆ writeDeltaTo()
| virtual int32_t StringTrieBuilder::writeDeltaTo |
( |
int32_t |
jumpTarget | ) |
|
|
protectedpure virtual |
- Internal:
- Do not use. This API is for internal use only.
◆ writeElementUnits()
| virtual int32_t StringTrieBuilder::writeElementUnits |
( |
int32_t |
i, |
|
|
int32_t |
unitIndex, |
|
|
int32_t |
length |
|
) |
| |
|
protectedpure virtual |
- Internal:
- Do not use. This API is for internal use only.
◆ writeNode()
| int32_t StringTrieBuilder::writeNode |
( |
int32_t |
start, |
|
|
int32_t |
limit, |
|
|
int32_t |
unitIndex |
|
) |
| |
|
protected |
- Internal:
- Do not use. This API is for internal use only.
◆ writeValueAndFinal()
| virtual int32_t StringTrieBuilder::writeValueAndFinal |
( |
int32_t |
i, |
|
|
UBool |
isFinal |
|
) |
| |
|
protectedpure virtual |
- Internal:
- Do not use. This API is for internal use only.
◆ writeValueAndType()
| virtual int32_t StringTrieBuilder::writeValueAndType |
( |
UBool |
hasValue, |
|
|
int32_t |
value, |
|
|
int32_t |
node |
|
) |
| |
|
protectedpure virtual |
- Internal:
- Do not use. This API is for internal use only.
◆ kMaxBranchLinearSubNodeLength
| const int32_t StringTrieBuilder::kMaxBranchLinearSubNodeLength =5 |
|
staticprotected |
◆ kMaxSplitBranchLevels
| const int32_t StringTrieBuilder::kMaxSplitBranchLevels =14 |
|
staticprotected |
◆ nodes
| UHashtable* StringTrieBuilder::nodes |
|
protected |
The documentation for this class was generated from the following file: