Пример #1
0
 public void ReplaceBy(Node node)
 {
     if(parent_node != null)
     {
     parent_node.ReplaceChild(this, node);
     }
 }
Пример #2
0
 internal override void RemoveChild(Node child)
 {
     if ( _sexp_.Contains(child) )
     {
     _sexp_.Remove(child);
     return;
     }
 }
Пример #3
0
        protected Node CloneNode(Node node)
        {
            if(node != null)
            {
            return (Node) node.Clone();
            }

            return null;
        }
Пример #4
0
        internal override void ReplaceChild(Node oldChild, Node newChild)
        {
            for ( int i = 0; i < _sexp_.Count; i++ )
            {
            Node n = (Node)_sexp_[i];
            if(n == oldChild)
            {
                if(newChild != null)
                {
                    _sexp_[i] = newChild;
                    oldChild.Parent(null);
                    return;
                }

                _sexp_.RemoveAt(i);
                oldChild.Parent(null);
                return;
            }
            }
        }
Пример #5
0
 internal override void ReplaceChild(Node oldChild, Node newChild)
 {
     if ( _t_word_ == oldChild )
     {
     SetTWord ((TTWord) newChild);
     return;
     }
 }
Пример #6
0
        public virtual Object GetIn(Node node)
        {
            if(inhash == null)
            {
            return null;
            }

            return inhash[node];
        }
Пример #7
0
 internal abstract void RemoveChild(Node child);
Пример #8
0
 internal override void RemoveChild(Node child)
 {
 }
Пример #9
0
 internal override void RemoveChild(Node child)
 {
     if ( _t_placeholder_ == child )
     {
     _t_placeholder_ = null;
     return;
     }
 }
Пример #10
0
 internal override void RemoveChild(Node child)
 {
     if ( _t_parenopen_ == child )
     {
     _t_parenopen_ = null;
     return;
     }
     if ( _sexp_.Contains(child) )
     {
     _sexp_.Remove(child);
     return;
     }
 }
Пример #11
0
 public virtual void DefaultOut(Node node)
 {
 }
Пример #12
0
 public virtual void DefaultIn(Node node)
 {
 }
Пример #13
0
        public virtual void SetOut(Node node, Object outobj)
        {
            if(this.outhash == null)
            {
            this.outhash = new Hashtable(1);
            }

            if(outobj != null)
            {
            this.outhash[node] = outobj;
            }
            else
            {
            this.outhash.Remove(node);
            }
        }
Пример #14
0
        public virtual void SetIn(Node node, Object inobj)
        {
            if(this.inhash == null)
            {
            this.inhash = new Hashtable(1);
            }

            if(inobj != null)
            {
            this.inhash[node] = inobj;
            }
            else
            {
            this.inhash.Remove(node);
            }
        }
Пример #15
0
        public virtual Object GetOut(Node node)
        {
            if(outhash == null)
            {
            return null;
            }

            return outhash[node];
        }
Пример #16
0
        internal override void RemoveChild(Node child)
        {
            if(_base_ == child)
            {
            _base_ = null;
            return;
            }

            if(_eof_ == child)
            {
            _eof_ = null;
            return;
            }
        }
Пример #17
0
        internal override void ReplaceChild(Node oldChild, Node newChild)
        {
            if(_base_ == oldChild)
            {
            SetPDocument((PDocument) newChild);
            return;
            }

            if(_eof_ == oldChild)
            {
            SetEOF((EOF) newChild);
            return;
            }
        }
Пример #18
0
 internal override void ReplaceChild(Node oldChild, Node newChild)
 {
     if ( _t_placeholder_ == oldChild )
     {
     SetTPlaceholder ((TTPlaceholder) newChild);
     return;
     }
 }
Пример #19
0
 internal override void ReplaceChild(Node oldChild, Node newChild)
 {
 }
Пример #20
0
 internal override void ReplaceChild(Node oldChild, Node newChild)
 {
     if ( _t_rational_ == oldChild )
     {
     SetTRational ((TTRational) newChild);
     return;
     }
 }
Пример #21
0
 internal void Parent(Node parent_node)
 {
     this.parent_node = parent_node;
 }
Пример #22
0
 internal override void ReplaceChild(Node oldChild, Node newChild)
 {
     if ( _t_string_ == oldChild )
     {
     SetTString ((TTString) newChild);
     return;
     }
 }
Пример #23
0
 internal abstract void ReplaceChild(Node oldChild, Node newChild);
Пример #24
0
 internal override void RemoveChild(Node child)
 {
     if ( _t_word_ == child )
     {
     _t_word_ = null;
     return;
     }
 }
Пример #25
0
        protected string ToString(Node node)
        {
            if(node != null)
            {
            return node.ToString();
            }

            return "";
        }
Пример #26
0
 public virtual void DefaultCase(Node node)
 {
 }