Lines Matching full:stack
225 * @brief A helper function to add a parent to the stack.
228 struct BejPointerStackCallback* stack) in bejPushParentToStack() argument
233 return stack->stackPush(parent, stack->stackContext); in bejPushParentToStack()
240 struct BejPointerStackCallback* stack, in bejProcessChildNodes() argument
250 // If this child node has its own children, add it to the stack and in bejProcessChildNodes()
256 RETURN_IF_IERROR(bejPushParentToStack(childPtr, stack)); in bejProcessChildNodes()
273 struct BejPointerStackCallback* stack, in bejEncodeTree() argument
279 // Once the root is encoded, push it to the stack used to traverse the child in bejEncodeTree()
280 // nodes. We need to keep a parent in this stack until all the child nodes in bejEncodeTree()
282 // the stack. in bejEncodeTree()
283 RETURN_IF_IERROR(bejPushParentToStack(root, stack)); in bejEncodeTree()
285 while (!stack->stackEmpty(stack->stackContext)) in bejEncodeTree()
288 stack->stackPeek(stack->stackContext); in bejEncodeTree()
292 // encoded and added to the stack and this function will return. The in bejEncodeTree()
295 // stack). in bejEncodeTree()
296 RETURN_IF_IERROR(bejProcessChildNodes(parent, stack, output)); in bejEncodeTree()
298 // If a new node hasn't been added to the stack by in bejEncodeTree()
302 if (parent != stack->stackPeek(stack->stackContext)) in bejEncodeTree()
306 stack->stackPop(stack->stackContext); in bejEncodeTree()
316 struct BejPointerStackCallback* stack) in bejEncode() argument
325 NULL_CHECK(stack, "stack"); in bejEncode()
348 dictionaries, majorSchemaStartingOffset, root, stack)); in bejEncode()
363 return bejEncodeTree(root, stack, output); in bejEncode()