public AbstractTreeLatticeNode(String nodeName, AbstractTreeLatticeNode nodeParent, AbstractTreeNodeType type, int ruleInd) { Name = nodeName; parent = nodeParent; ruleIndex = ruleInd; isMatched = false; Type = type; _valueType = null;//set it to null till values are added }
public AbstractTreeLatticeNode(string nodeName, AbstractTreeLatticeNode nodeParent, AbstractTreeNodeType type) : this(nodeName, nodeParent, type, -1) { }
public AbstractTreeLatticeNode addChild(string s, AbstractTreeNodeType t, int rIndex) { bool check = false; foreach (AbstractTreeLatticeNode c in _children) if (c.Name.Equals(s) && c.Type == t) { check = true; break; } if (!check) { AbstractTreeLatticeNode a = new AbstractTreeLatticeNode(s, this, t, rIndex); _children.Add(a); return a; } else return null; }