Browse
 
Tools
Rss Categories

LVParseTree::TerminalIterator

Reference Number: AA-00981 Views: 867 0 Rating/ Voters

An LVParseTree::TerminalIterator object is an adaptation of the standard LVParseTree::Iterator. It only visits the nodes in a tree that are terminals. You get a TerminalIterator by calling:

  • LVParseTree::Node::TerminalsBegin()
  • LVParseTree::Node::TerminalsEnd()

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

Function Return Type Description
Iterator(void) XXXXXX Constructs a blank TerminalIterator; its not pointing over anything.
Iterator(const TerminalIterator& other) XXXXXX Copy constructor.
operator=(const TerminalIterator& other) LVParseTree::TerminalIterator& Assignment operator.
~TerminalIterator(void) XXXXXX Destructor.
operator ++ (void) LVParseTree::TerminalIterator& pre-increments the iterator (++itr).
operator ++ (int) LVParseTree::TerminalIterator post-increments the iterator (itr++).
operator -> (void) const LVParseTree::Node* provides pointer-like access to the node the iterator is currently over
( e.g const char* text = itr->Text( ) )
operator * (void) const LVParseTree::Node& provides access to the node the iterator is currently over
(e.g LVParseTree::Node n  = *itr )
operator==(const TerminalIterator& other) bool Tests equality with another TerminalIterator. Two TerminalIterators are equal if they are pointing to the same node in the same tree.
(e.g if itr1 == itr2 do something)
operator!=(const TerminalIterator& other) bool returns true if and only if the equality operator returns false.