コード例 #1
0
 public HeaderNode(int row, int col)
 {
     this.row      = row;
     this.col      = col;
     this.Parent   = null;
     this.Children = new List <HeaderNode>();
 }
コード例 #2
0
 public HeaderNode()
 {
     this.row      = -1;
     this.col      = -1;
     this.Parent   = null;
     this.Children = new List <HeaderNode>();
 }
コード例 #3
0
 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 + " ");
     }
 }
コード例 #4
0
 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, "");
 }
コード例 #5
0
 public void AddChild(HeaderNode child)
 {
     this.Children.Add(child);
 }
コード例 #6
0
 public void InitNodes()
 {
     this.RootNode = new HeaderNode();
     this.Nodes    = new Dictionary <Tuple <int, int>, HeaderNode>();
 }