LVParseTree::TagsBegin and LVParseTree::TagsEnd

TagsBegin and TagsEnd provide iterators for visiting the tags in the tree's body.

Functions

LVParseTree::TagIterator TagsBegin ()

LVParseTree::TagIterator TagsEnd ()

Example

The following code prints out every tag in a parse tree.

LVParseTree::TagIterator Itr = Tree.TagsBegin();
LVParseTree::TagIterator End = Tree.TagsEnd();

for (; Itr != End; Itr++)
{
     cout << Itr->Text() << ";" << endl;
}

If the grammar was the top level navigation example grammar, and the engine recognized "go back", the the above code would print out:

$ = "APPLICATION_BACK";

Remark

The TagIterator does not visit the tags in a tree's header.  Use LVParseTree::HeaderTag to access the contents of those tags.

See Also


Complete Help Topic List | Speech Engine Product Information