Home | History | Annotate | Download | only in common

Lines Matching defs:node

72         Node *root=makeNode(0, elementsLength, 0, errorCode);
93 return writeValueAndFinal(value, TRUE); // final-value node
101 // Linear-match node: All strings have the same character at unitIndex.
116 // Branch node.
164 // after their own positions, so if we wrote the minUnit sub-node first,
166 // Instead we write the minUnit sub-node last, for a shorter delta.
174 // The maxUnit sub-node is written as the very last one because we do
179 // Write the rest of this node's unit-value pairs.
187 // Write the delta to the start position of the sub-node.
205 StringTrieBuilder::Node *
220 Node *node;
225 // Linear-match node: All strings have the same character at unitIndex.
227 Node *nextNode=makeNode(start, limit, lastUnitIndex, errorCode);
234 node=createLinearMatchNode(start, lastUnitIndex, maxLinearMatchLength, nextNode);
235 nextNode=registerNode(node, errorCode);
237 node=createLinearMatchNode(start, unitIndex, length, nextNode);
239 // Branch node.
242 Node *subNode=makeBranchSubNode(start, limit, unitIndex, length, errorCode);
243 node=new BranchHeadNode(length, subNode);
245 if(hasValue && node!=NULL) {
247 ((ValueNode *)node)->setValue(value);
249 node=new IntermediateValueNode(value, registerNode(node, errorCode));
252 return registerNode(node, errorCode);
257 StringTrieBuilder::Node *
264 Node *lessThan[kMaxSplitBranchLevels];
306 Node *node=registerNode(listNode, errorCode);
310 node=registerNode(
311 new SplitBranchNode(middleUnits[ltLength], lessThan[ltLength], node), errorCode);
313 return node;
316 StringTrieBuilder::Node *
317 StringTrieBuilder::registerNode(Node *newNode, UErrorCode &errorCode) {
329 return (Node *)old->key.pointer;
332 // registered node, then uhash_find() failed to find that and we will leak newNode.
345 StringTrieBuilder::Node *
353 return (Node *)old->key.pointer;
355 Node *newNode=new FinalValueNode(value);
361 // registered node, then uhash_find() failed to find that and we will leak newNode.
375 StringTrieBuilder::hashNode(const void *node) {
376 return ((const Node *)node)->hashCode();
381 return *(const Node *)left==*(const Node *)right;
385 StringTrieBuilder::Node::operator==(const Node &other) const {
390 StringTrieBuilder::Node::markRightEdgesFirst(int32_t edgeNumber) {
398 StringTrieBuilder::FinalValueNode::operator==(const Node &other) const {
402 if(!Node::operator==(other)) {
415 StringTrieBuilder::ValueNode::operator==(const Node &other) const {
419 if(!Node::operator==(other)) {
427 StringTrieBuilder::IntermediateValueNode::operator==(const Node &other) const {
453 StringTrieBuilder::LinearMatchNode::operator==(const Node &other) const {
473 StringTrieBuilder::ListBranchNode::operator==(const Node &other) const {
477 if(!Node::operator==(other)) {
496 Node *edge=equal[--i];
511 // after their own positions, so if we wrote the minUnit sub-node first,
513 // Instead we write the minUnit sub-node last, for a shorter delta.
515 Node *rightEdge=equal[unitNumber];
523 // The maxUnit sub-node is written as the very last one because we do
532 // Write the rest of this node's unit-value pairs.
541 // Write the delta to the start position of the sub-node.
552 StringTrieBuilder::SplitBranchNode::operator==(const Node &other) const {
556 if(!Node::operator==(other)) {
579 // Write this node.
586 StringTrieBuilder::BranchHeadNode::operator==(const Node &other) const {