Mercurial > hg > Database > jungle-sharp
diff Main/jungle-main/DefaultJungle.cs @ 28:9588ad364fdd
Last commit before change.
author | Kazuma Takeda |
---|---|
date | Wed, 18 Jan 2017 19:53:29 +0900 |
parents | 1f99e150f336 |
children | f2ea780b3e80 |
line wrap: on
line diff
--- a/Main/jungle-main/DefaultJungle.cs Fri Dec 16 00:25:03 2016 +0900 +++ b/Main/jungle-main/DefaultJungle.cs Wed Jan 18 19:53:29 2017 +0900 @@ -10,48 +10,33 @@ private string uuid; private TreeEditor editor; - public void Start(){ - DefaultJungle j = new DefaultJungle(null, "hoge", new DefaultTreeEditor(new DefaultTraverser())); - JungleTree t = j.createNewTree ("fuga"); - - JungleTreeEditor e1 = t.getTreeEditor (); - - DefaultNodePath root = new DefaultNodePath (); - Either<Error, JungleTreeEditor> either = e1.addNewChildAt (root, 0); - e1 = either.b(); - either = e1.addNewChildAt (root.add (0), 0); - e1 = either.b (); - e1.commit (); - } - public DefaultJungle(Journal journal, string uuid, TreeEditor editor){ this.journal = new NullJournal(); - this.trees = new TreeMap <string, JungleTree>(); - this.uuid = uuid; - this.editor = editor; + this.trees = new TreeMap <string, JungleTree>(); + this.uuid = uuid; + this.editor = editor; } public JungleTree getTreeByName(string name) { - JungleTree jungle_tree = trees.get(name); if (jungle_tree != null) { return jungle_tree; } else { - Debug.Log ("そのTreeは無いようですね。"); + Debug.Log ("The Tree Name does not exist."); return null; } } public JungleTree createNewTree(string name) { - ChangeList list = new InnerChangeList(uuid,name); - DefaultTreeNode root = new DefaultTreeNode (); + ChangeList list = new InnerChangeList(uuid, name); + DefaultTreeNode root = new DefaultTreeNode (); InterfaceTraverser traverser = new InterfaceTraverser (root, true); - TreeContext tc = new DefaultTreeContext (root, null, list, uuid, name, 0, traverser); - JungleTree newTree = new DefaultJungleTree (tc, uuid, journal.getWriter (), editor); + TreeContext tc = new DefaultTreeContext (root, null, list, uuid, name, 0, traverser); + JungleTree newTree = new DefaultJungleTree (tc, uuid, journal.getWriter (), editor); if (newTree != null) { trees = trees.put (name, newTree); } else { - Debug.Log ("こんばんは、nullです。"); + Debug.Log ("The Tree Name already exist."); } return newTree; } @@ -61,7 +46,6 @@ string uuid; string name; - IEnumerator IEnumerable.GetEnumerator() { return this.GetEnumerator();