TianoCore EDK2 master
Loading...
Searching...
No Matches
AmlTreeIterator.c File Reference

Go to the source code of this file.

Data Structures

struct  AmlTreeInternalIterator
 

Typedefs

typedef struct AmlTreeInternalIterator AML_TREE_ITERATOR_INTERNAL
 

Functions

STATIC EFI_STATUS EFIAPI AmlIteratorGetNode (IN AML_TREE_ITERATOR *Iterator, OUT AML_NODE_HEADER **OutNode)
 
STATIC EFI_STATUS EFIAPI AmlIteratorGetNextLinear (IN AML_TREE_ITERATOR *Iterator, OUT AML_NODE_HEADER **NextNode)
 
STATIC EFI_STATUS EFIAPI AmlIteratorGetPreviousLinear (IN AML_TREE_ITERATOR *Iterator, OUT AML_NODE_HEADER **PrevNode)
 
STATIC EFI_STATUS EFIAPI AmlIteratorGetNextBranch (IN AML_TREE_ITERATOR *Iterator, OUT AML_NODE_HEADER **NextNode)
 
STATIC EFI_STATUS EFIAPI AmlIteratorGetPreviousBranch (IN AML_TREE_ITERATOR *Iterator, OUT AML_NODE_HEADER **PrevNode)
 
EFI_STATUS EFIAPI AmlInitializeIterator (IN AML_NODE_HEADER *Node, IN EAML_ITERATOR_MODE IteratorMode, OUT AML_TREE_ITERATOR **IteratorPtr)
 
EFI_STATUS EFIAPI AmlDeleteIterator (IN AML_TREE_ITERATOR *Iterator)
 

Detailed Description

AML Tree Iterator.

Copyright (c) 2019 - 2020, Arm Limited. All rights reserved.

SPDX-License-Identifier: BSD-2-Clause-Patent

Definition in file AmlTreeIterator.c.

Typedef Documentation

◆ AML_TREE_ITERATOR_INTERNAL

Iterator to traverse the tree.

This is an internal structure.

Function Documentation

◆ AmlInitializeIterator()

EFI_STATUS EFIAPI AmlInitializeIterator ( IN AML_NODE_HEADER Node,
IN EAML_ITERATOR_MODE  IteratorMode,
OUT AML_TREE_ITERATOR **  IteratorPtr 
)

Initialize an iterator.

Note: The caller must call AmlDeleteIterator () to free the memory allocated for the iterator.

Parameters
[in]NodePointer to the node.
[in]IteratorModeSelected mode to traverse the tree.
[out]IteratorPtrPointer holding the created iterator.
Return values
EFI_SUCCESSThe function completed successfully.
EFI_INVALID_PARAMETERInvalid parameter.
EFI_OUT_OF_RESOURCESCould not allocate memory.

Definition at line 282 of file AmlTreeIterator.c.

◆ AmlIteratorGetNextBranch()

STATIC EFI_STATUS EFIAPI AmlIteratorGetNextBranch ( IN AML_TREE_ITERATOR Iterator,
OUT AML_NODE_HEADER **  NextNode 
)

Move the current node of the iterator to the next node, according to the iteration mode selected.

If NextNode is not NULL, return the next node.

Parameters
[in]IteratorPointer to an iterator.
[out]NextNodeIf not NULL, updated to the next node.
Return values
EFI_SUCCESSThe function completed successfully.
EFI_INVALID_PARAMETERInvalid parameter.

Definition at line 179 of file AmlTreeIterator.c.

◆ AmlIteratorGetNextLinear()

STATIC EFI_STATUS EFIAPI AmlIteratorGetNextLinear ( IN AML_TREE_ITERATOR Iterator,
OUT AML_NODE_HEADER **  NextNode 
)

Move the current node of the iterator to the next node, according to the iteration mode selected.

If NextNode is not NULL, return the next node.

Parameters
[in]IteratorPointer to an iterator.
[out]NextNodeIf not NULL, updated to the next node.
Return values
EFI_SUCCESSThe function completed successfully.
EFI_INVALID_PARAMETERInvalid parameter.

Definition at line 90 of file AmlTreeIterator.c.

◆ AmlIteratorGetNode()

STATIC EFI_STATUS EFIAPI AmlIteratorGetNode ( IN AML_TREE_ITERATOR Iterator,
OUT AML_NODE_HEADER **  OutNode 
)

Get the current node of an iterator.

Parameters
[in]IteratorPointer to an iterator.
[out]OutNodePointer holding the current node.
Return values
EFI_SUCCESSThe function completed successfully.
EFI_INVALID_PARAMETERInvalid parameter.

Definition at line 49 of file AmlTreeIterator.c.

◆ AmlIteratorGetPreviousBranch()

STATIC EFI_STATUS EFIAPI AmlIteratorGetPreviousBranch ( IN AML_TREE_ITERATOR Iterator,
OUT AML_NODE_HEADER **  PrevNode 
)

Move the current node of the iterator to the previous node, according to the iteration mode selected.

If PrevNode is not NULL, return the previous node.

Parameters
[in]IteratorPointer to an iterator.
[out]PrevNodeIf not NULL, updated to the previous node.
Return values
EFI_SUCCESSThe function completed successfully.
EFI_INVALID_PARAMETERInvalid parameter.

Definition at line 230 of file AmlTreeIterator.c.

◆ AmlIteratorGetPreviousLinear()

STATIC EFI_STATUS EFIAPI AmlIteratorGetPreviousLinear ( IN AML_TREE_ITERATOR Iterator,
OUT AML_NODE_HEADER **  PrevNode 
)

Move the current node of the iterator to the previous node, according to the iteration mode selected.

If PrevNode is not NULL, return the previous node.

Parameters
[in]IteratorPointer to an iterator.
[out]PrevNodeIf not NULL, updated to the previous node.
Return values
EFI_SUCCESSThe function completed successfully.
EFI_INVALID_PARAMETERInvalid parameter.

Definition at line 135 of file AmlTreeIterator.c.