Lines Matching full:stack

520  * If a child node contains its own child nodes, it will be added to the stack
525 * @param stack - stack holding parent nodes.
530 struct BejPointerStackCallback* stack) in bejProcessChildNodes() argument
538 // If we find a child with its own child nodes, add it to the stack and in bejProcessChildNodes()
547 RETURN_IF_IERROR(stack->stackPush(childPtr, stack->stackContext)); in bejProcessChildNodes()
571 struct BejPointerStackCallback* stack) in bejUpdateNodeMetadata() argument
585 // Push the root to the stack. Because we are not done with the parent node in bejUpdateNodeMetadata()
588 RETURN_IF_IERROR(stack->stackPush(root, stack->stackContext)); in bejUpdateNodeMetadata()
590 while (!stack->stackEmpty(stack->stackContext)) in bejUpdateNodeMetadata()
592 // Get the parent at the top of the stack. Stack is only popped if the in bejUpdateNodeMetadata()
593 // parent stack entry has no pending children; That is in bejUpdateNodeMetadata()
596 stack->stackPeek(stack->stackContext); in bejUpdateNodeMetadata()
600 // will be added to the stack and this function will return. in bejUpdateNodeMetadata()
601 RETURN_IF_IERROR(bejProcessChildNodes(dictionaries, parent, stack)); in bejUpdateNodeMetadata()
603 // If a new node hasn't been added to the stack, we know that this in bejUpdateNodeMetadata()
605 // stack. in bejUpdateNodeMetadata()
606 if (parent != stack->stackPeek(stack->stackContext)) in bejUpdateNodeMetadata()
612 // Then "parent" is the top element of the stack. in bejUpdateNodeMetadata()
615 // Remove the "parent" from the stack. in bejUpdateNodeMetadata()
616 parent = stack->stackPop(stack->stackContext); in bejUpdateNodeMetadata()
624 // node's parent. Since we already popped this node from the stack, top in bejUpdateNodeMetadata()
625 // of the stack element is this nodes's parent. "parentsParent" can be in bejUpdateNodeMetadata()
628 stack->stackPeek(stack->stackContext); in bejUpdateNodeMetadata()