Exemplo n.º 1
0
 /// <summary>
 /// Filters out the given node and all of its descendants.
 /// </summary>
 /// <param name="id">[in] The id of the node.</param>
 /// <exception cref="Columbus.Lim.Asg.LimException">Throws LimException if the id is too large (larger than the size of the Filter).</exception>
 public void setFiltered(uint id)
 {
     if (Common.getIsValid(id))
     {
         Visitors.VisitorFilter       visitorFilter     = new Visitors.VisitorFilter(fact, true);
         Algorithms.AlgorithmPreorder algorithmPreorder = new Algorithms.AlgorithmPreorder();
         algorithmPreorder.setVisitSpecialNodes(false, false);
         algorithmPreorder.run(fact, visitorFilter, fact.getRef(id));
     }
 }
Exemplo n.º 2
0
 /// <summary>
 /// Sets the state of the node, all of its descendants and all of its ancestors to not filtered.
 /// </summary>
 /// <param name="id">[in] The id of the node.</param>
 /// <exception cref="Columbus.Lim.Asg.LimException">Throws LimException if the id is too large (larger than the size of the Filter).</exception>
 public void setNotFiltered(uint id)
 {
     if (fact.getExist(id))
     {
         Factory.TurnFilterOffSafely  turnFilterOffSafely = new Factory.TurnFilterOffSafely(fact);
         Visitors.VisitorFilter       visitorFilter       = new Visitors.VisitorFilter(fact, false);
         Algorithms.AlgorithmPreorder algorithmPreorder   = new Algorithms.AlgorithmPreorder();
         algorithmPreorder.setVisitSpecialNodes(false, false);
         algorithmPreorder.run(fact, visitorFilter, fact.getRef(id));
         do
         {
             container[(int)id] = FilterState.NotFiltered;
             id = fact.getRef(id).Parent;
         } while (id != 0);
         turnFilterOffSafely.restore();
     }
 }