PSTreeWalker Class Reference

This class walks through an AE tree in a pre-order traversal fashion. More...

List of all members.

Public Member Functions

PSParseNodeGetNext ()
 Return the next node in a pre-order traversal fashion.
simba_size_t GetNextLevel ()
 Return the level of the next node in the tree.
bool HasMore ()
 Indicates whether there are more nodes or not.
 PSTreeWalker (PSParseNode *in_root)
 Constructor.
PSParseNodeSkipSubTree ()
 This function skips over the current sub-tree and all its children and moves to the next node in pre-order.
 ~PSTreeWalker ()
 Destructor.

Detailed Description

This class walks through an AE tree in a pre-order traversal fashion.


Constructor & Destructor Documentation

PSTreeWalker ( PSParseNode in_root  )  [explicit]

Constructor.

Parameters:
in_root The root node of an AE tree. (NOT OWN)
Exceptions:
SEInvalidArgumentException when in_root is NULL.
~PSTreeWalker (  ) 

Destructor.


Member Function Documentation

PSParseNode* GetNext (  ) 

Return the next node in a pre-order traversal fashion.

The caller is responsible for ensuring there are more nodes to walk through prior to calling this function by calling HasMore().

Exceptions:
InvalidOperationException when HasMore() returns false.
Returns:
The next node in pre-order traversal fashion. (NOT OWN)
simba_size_t GetNextLevel (  ) 

Return the level of the next node in the tree.

The root of the tree is level 0. The child nodes of the root are all level 1. The child nodes of the child nodes of the root are all level 2, etc.

If one wants to get the tree level for the next node, one MUST call this method before calling GetNext(). The reason is that after calling GetNext(), the tree level returned from this method is for the next node.

Exceptions:
InvalidOperationException when HasMore() returns false.
Returns:
The level of the next node.
bool HasMore (  ) 

Indicates whether there are more nodes or not.

Returns:
True if there are more nodes, false otherwise.
PSParseNode* SkipSubTree (  ) 

This function skips over the current sub-tree and all its children and moves to the next node in pre-order.

The caller is responsible for ensuring there are more nodes to walk through prior to calling this function by calling HasMore().

Returns:
The next node in pre-order traversal fashion after the current sub-tree has been skipped over. (NOT OWN)

The documentation for this class was generated from the following file:

Generated on Wed May 17 14:21:18 2017 for SimbaEngine 10.1.3.1011 by simba