LVParseTree_TerminalIterator C API

An LVParseTree_TerminalIterator object is an adaptation of the standard LVParseTree_Iterator.  It only visits the nodes in a tree that are terminals.  You can get a TerminalIterator from a Node by calling:

LVParseTree_Node_CreateTerminalIteratorBegin(H_PARSE_TREE_NODE Node)

LVParseTree_Node_CreateTerminalIteratorEnd(H_PARSE_TREE_NODE Node)

With these iterators, you can visit all of the terminal nodes in the subtree rooted by Node.

Use <LVSpeechPort.h> or <LV_SRE_ParseTree.h>

Return Type

Function

Description

H_PARSE_TREE_TERMINAL_ITR

LVParseTree_TerminalIterator_Create(void)

Creates a blank iterator; its not pointing over anything.

H_PARSE_TREE_TERMINAL_ITR

LVParseTree_TerminalIterator_CreateFromCopy
                                                              (H_PARSE_TREE_TERMINAL_ITR Other)

Creates a new iterator from another.  Both iterators will need to be released when no longer needed.

void

LVParseTree_TerminalIterator_Copy(H_PARSE_TREE_TERMINAL_ITR Itr,
                                                                  H_PARSE_TREE_TERMINAL_ITR  Other)

Copies the data from one handle into another.

void

LVParseTree_TerminalIterator_Release(H_PARSE_TERMINAL_ITR Itr)

Releases the memory allocated to the iterator handle.

 

 

 

void

LVParseTree_TerminalIterator_Advance(H_PARSE_TREE_TERMINAL_ITR Itr)

Advances the iterator one position.

H_PARSE_TREE_NODE

LVParseTree_TerminalIterator_GetNode(H_PARSE_TREE_TERMINAL_ITR Itr)

Provides access to a node in the parse tree.

int

LVParseTree_TerminalIterator_AreEqual(H_PARSE_TREE_TERMINAL_ITR Itr1,
                                                                         H_PARSE_TREE_TERMINAL_ITR Itr2)

Tests equality with another iterator. Two iterators are equal if they are pointing to the same node in a parse tree.

 

 

 

 


Complete Help Topic List | Speech Engine Product Information