Ejemplo n.º 1
0
 /// <summary>
 /// Resets the matcher so that its search starts over
 /// </summary>
 public void Reset()
 {
     findIterator = null;
     findCurrent  = null;
     namesToNodes.Clear();
     variableStrings.Reset();
 }
Ejemplo n.º 2
0
 /// <summary>
 /// Resets the matcher so that its search starts over
 /// </summary>
 public void Reset()
 {
     findIterator = null;
     findCurrent = null;
     namesToNodes.Clear();
     variableStrings.Reset();
 }
Ejemplo n.º 3
0
 /// <summary>
 /// Find the next match of the pattern on the tree
 /// </summary>
 /// <returns>whether there is a match somewhere in the tree</returns>
 public bool Find()
 {
     if (findIterator == null)
     {
         findIterator = root.Iterator();
     }
     if (findCurrent != null && Matches())
     {
         return(true);
     }
     while (findIterator.MoveNext())
     {
         findCurrent = findIterator.Current;
         ResetChildIter(findCurrent);
         if (Matches())
         {
             return(true);
         }
     }
     return(false);
 }
Ejemplo n.º 4
0
 /// <summary>
 /// Find the next match of the pattern on the tree
 /// </summary>
 /// <returns>whether there is a match somewhere in the tree</returns>
 public bool Find()
 {
     if (findIterator == null)
     {
         findIterator = root.Iterator();
     }
     if (findCurrent != null && Matches())
     {
         return true;
     }
     while (findIterator.MoveNext())
     {
         findCurrent = findIterator.Current;
         ResetChildIter(findCurrent);
         if (Matches())
         {
             return true;
         }
     }
     return false;
 }