Example #1
0
        public void setChildWithTokens(int index, LinkedListTree child)
        {
            LinkedListTree oldChild = (LinkedListTree)GetChild(index);

            setChild(index, child);
            tokenListUpdater.ReplacedChild(this, index, child, oldChild);
        }
Example #2
0
 /**
  * called when one of this node's children updates it's stop-token,
  * so that this node can potentially take action; maybe by setting
  * the same stop-token IF the child was the very-last in this node's
  * list of children.
  */
 private void notifyChildStopTokenChange(LinkedListTree child, LinkedListToken newStop)
 {
     // TODO: maybe move to delegates
     if (isLast(child) && (isSameStopToken(child) || isNoStopToken(child)))
     {
         setStopToken(newStop);
     }
 }
Example #3
0
 /**
  * called when one of this node's children updates it's start-token,
  * so that this node can potentially take action; maybe by setting
  * the same start-token IF the child was the very-first in this node's
  * list of children.
  */
 private void notifyChildStartTokenChange(LinkedListTree child, LinkedListToken newStart)
 {
     // TODO: maybe move to delegates
     if (isFirst(child) && isSameStartToken(child))
     {
         setStartToken(newStart);
     }
 }
Example #4
0
        public BaseTree deleteChild(int index)
        {
            LinkedListTree result = (LinkedListTree)base.DeleteChild(index);

            tokenListUpdater.DeletedChild(this, index, result);
            result.Parent = null;
            return(result);
        }
Example #5
0
 public void addChildWithTokens(int index, LinkedListTree child)
 {
     if (Children == null)
     {
         CreateChildrenList();
     }
     Children.Add(child);
     if (child != null)
     {
         child.Parent = this;
     }
     tokenListUpdater.AddedChild(this, index, child);
 }
Example #6
0
 public void setChildWithTokens(int index, LinkedListTree child)
 {
     LinkedListTree oldChild = (LinkedListTree)GetChild(index);
     setChild(index, child);
     tokenListUpdater.ReplacedChild(this, index, child, oldChild);
 }
Example #7
0
 public int getIndexOfChild(LinkedListTree child)
 {
     return Children.IndexOf(child);
 }
Example #8
0
 public void addChildWithTokens(int index, LinkedListTree child)
 {
     if (Children == null)
     {
         CreateChildrenList();
     }
     Children.Add(child);
     if (child != null)
     {
         child.Parent = this;
     }
     tokenListUpdater.AddedChild(this, index, child);
 }
Example #9
0
 /**
  * Adds the given child node to the end of the list of children
  * maintanined by the given parent node, and inserts the tokens
  * belonging to child into the tokenlist of parent just after the
  * stop-token of the previous last child.
  */
 public void addChildWithTokens(LinkedListTree child)
 {
     addChild(child);
     tokenListUpdater.AddedChild(this, child);
 }
Example #10
0
 /**
  * Adds the given child node to the end of the list of children
  * maintanined by the given parent node, and inserts the tokens
  * belonging to child into the tokenlist of parent just after the
  * stop-token of the previous last child.
  */
 public void addChildWithTokens(LinkedListTree child)
 {
     addChild(child);
     tokenListUpdater.AddedChild(this, child);
 }
Example #11
0
 /**
  * called when one of this node's children updates it's stop-token,
  * so that this node can potentially take action; maybe by setting
  * the same stop-token IF the child was the very-last in this node's
  * list of children.
  */
 private void notifyChildStopTokenChange(LinkedListTree child, LinkedListToken newStop)
 {
     // TODO: maybe move to delegates
     if (isLast(child) && (isSameStopToken(child) || isNoStopToken(child)))
     {
         setStopToken(newStop);
     }
 }
Example #12
0
 private bool isSameStopToken(LinkedListTree child)
 {
     return child.getStopToken() == getStopToken();
 }
Example #13
0
 private bool isNoStopToken(LinkedListTree child)
 {
     return(child.getStopToken() == null);
 }
Example #14
0
 private bool isLast(LinkedListTree child)
 {
     return child == getLastChild();
 }
Example #15
0
 private bool isSameStopToken(LinkedListTree child)
 {
     return(child.getStopToken() == getStopToken());
 }
Example #16
0
 private bool isNoStopToken(LinkedListTree child)
 {
     return child.getStopToken() == null;
 }
Example #17
0
 private bool isLast(LinkedListTree child)
 {
     return(child == getLastChild());
 }
Example #18
0
 /**
  * called when one of this node's children updates it's start-token,
  * so that this node can potentially take action; maybe by setting
  * the same start-token IF the child was the very-first in this node's
  * list of children.
  */
 private void notifyChildStartTokenChange(LinkedListTree child, LinkedListToken newStart)
 {
     // TODO: maybe move to delegates
     if (isFirst(child) && isSameStartToken(child))
     {
         setStartToken(newStart);
     }
 }
Example #19
0
 public LinkedListTree(LinkedListTree node)
     : base(node)
 {
     this.token = node.token;
 }
Example #20
0
 public LinkedListTree(LinkedListTree node)
     : base(node)
 {
     this.token = node.token;
 }
Example #21
0
 public int getIndexOfChild(LinkedListTree child)
 {
     return(Children.IndexOf(child));
 }