Lines Matching full:parent

225  * @brief A helper function to add a parent to the stack.
227 static int bejPushParentToStack(struct RedfishPropertyParent* parent, in bejPushParentToStack() argument
230 // Before pushing the parent node, initialize its nextChild as the first in bejPushParentToStack()
232 parent->metaData.nextChild = parent->firstChild; in bejPushParentToStack()
233 return stack->stackPush(parent, stack->stackContext); in bejPushParentToStack()
237 * @brief Process all the child nodes of a parent.
239 static int bejProcessChildNodes(struct RedfishPropertyParent* parent, in bejProcessChildNodes() argument
243 // Get the next child of the parent. in bejProcessChildNodes()
244 void* childPtr = parent->metaData.nextChild; in bejProcessChildNodes()
253 // parent. in bejProcessChildNodes()
257 // Update the next child of the current parent we need to in bejProcessChildNodes()
259 bejParentGoToNextChild(parent, childPtr); in bejProcessChildNodes()
262 childPtr = bejParentGoToNextChild(parent, childPtr); in bejProcessChildNodes()
276 // We need to encode a parent node before its child nodes. So encoding the in bejEncodeTree()
280 // nodes. We need to keep a parent in this stack until all the child nodes in bejEncodeTree()
281 // of this parent has been encoded. Only then we remove the parent node from in bejEncodeTree()
287 struct RedfishPropertyParent* parent = in bejEncodeTree() local
290 // Encode all the child nodes of the current parent node. If one of in bejEncodeTree()
293 // rest of the children of the current parent will be encoded later in bejEncodeTree()
296 RETURN_IF_IERROR(bejProcessChildNodes(parent, stack, output)); in bejEncodeTree()
299 // bejProcessChildNodes(), we know that this parent's child nodes have in bejEncodeTree()
302 if (parent != stack->stackPeek(stack->stackContext)) in bejEncodeTree()
334 // First we need to encode a parent node before its child nodes. But before in bejEncode()
335 // encoding the parent node, the encoder has to figure out the total size in bejEncode()
336 // need to encode the parent's child nodes. Therefore first the encoder need in bejEncode()
338 // before producing the encoded bytes for the parent node. in bejEncode()
343 // Next the encoder will again visit each node starting from the parent in bejEncode()