public Circuit() { tree = new GraphTree(); // rootはCPUで固定 var temp = new Node(ChipFactory.GetInstance(ChipName.CPU)); // nextをnullでうめる temp.next.Clear(); for (int i = 0; i < LimitConnect.Get(ChipName.CPU); i++) { temp.next.Add(null); } tree.root = temp; tree.now = temp; }
///<summary> 名前からインスタンスを作成して、追加 </summary> public bool SetNext(Node parent, ChipName name, int index = 0) { Chip chip = ChipFactory.GetInstance(name); return(SetNext(parent, chip, index)); }