public HeaderNode(int row, int col) { this.row = row; this.col = col; this.Parent = null; this.Children = new List <HeaderNode>(); }
public HeaderNode() { this.row = -1; this.col = -1; this.Parent = null; this.Children = new List <HeaderNode>(); }
private void printStructure(HeaderNode node, string space) { Console.WriteLine("{0} {1} {2}", space, node.Row, node.Col); foreach (HeaderNode child in node.Children) { this.printStructure(child, space + " "); } }
private void linkToRoot(MSheet mSheet) { foreach (Tuple <int, int> key in mSheet.Nodes.Keys) { HeaderNode node = mSheet.Nodes[key]; if (!node.HasParent()) { mSheet.RootNode.AddChild(node); mSheet.Nodes[key].Parent = mSheet.RootNode; } } // this.printStructure(mSheet.RootNode, ""); }
public void AddChild(HeaderNode child) { this.Children.Add(child); }
public void InitNodes() { this.RootNode = new HeaderNode(); this.Nodes = new Dictionary <Tuple <int, int>, HeaderNode>(); }