# HG changeset patch # User Kazuma Takeda # Date 1487748619 -32400 # Node ID f2ea780b3e80ad3fc7fde63389797c609b238f09 # Parent a797817238621e660f3abf9c5c7193954bb0defe fix diff -r a79781723862 -r f2ea780b3e80 Main/jungle-main/DefaultJungle.cs --- a/Main/jungle-main/DefaultJungle.cs Tue Feb 07 20:50:50 2017 +0900 +++ b/Main/jungle-main/DefaultJungle.cs Wed Feb 22 16:30:19 2017 +0900 @@ -1,7 +1,6 @@ using System.Collections; using System.Collections.Generic; using System; -using UnityEngine; namespace JungleDB { public class DefaultJungle : Jungle { @@ -22,7 +21,6 @@ if (jungle_tree != null) { return jungle_tree; } else { - Debug.Log ("The Tree Name does not exist."); return null; } } @@ -36,7 +34,6 @@ if (newTree != null) { trees = trees.put (name, newTree); } else { - Debug.Log ("The Tree Name already exist."); } return newTree; } diff -r a79781723862 -r f2ea780b3e80 Main/jungle-main/JungleTreeEditor.cs --- a/Main/jungle-main/JungleTreeEditor.cs Tue Feb 07 20:50:50 2017 +0900 +++ b/Main/jungle-main/JungleTreeEditor.cs Wed Feb 22 16:30:19 2017 +0900 @@ -10,7 +10,7 @@ Either putAttribute(object value); // add Method put Attribute (path, T?); // Either putAttribute(NodePath path, string Key, T value); - Either deleteAttribute(NodePath path,string key); + Either deleteAttribute(NodePath path, string key); Either replaceNewRootNode(); Either edit(NodePath path, NodeEditor editor); Either commit(); diff -r a79781723862 -r f2ea780b3e80 Main/jungle-main/core/Attributes.cs --- a/Main/jungle-main/core/Attributes.cs Tue Feb 07 20:50:50 2017 +0900 +++ b/Main/jungle-main/core/Attributes.cs Wed Feb 22 16:30:19 2017 +0900 @@ -1,7 +1,9 @@ -using UnityEngine; -public interface Attributes{ - object get (string key); - T get (string key); - byte[] getBytes(string key); - string getString (string key); + +namespace JungleDB { + public interface Attributes{ + object get (string key); + T get (string key); + byte[] getBytes(string key); + string getString (string key); + } } diff -r a79781723862 -r f2ea780b3e80 Main/jungle-main/core/MultiAttributes.cs --- a/Main/jungle-main/core/MultiAttributes.cs Tue Feb 07 20:50:50 2017 +0900 +++ b/Main/jungle-main/core/MultiAttributes.cs Wed Feb 22 16:30:19 2017 +0900 @@ -1,6 +1,5 @@ using System.Collections; using System.Collections.Generic; -using UnityEngine; namespace JungleDB { public class MultiAttributes { diff -r a79781723862 -r f2ea780b3e80 Main/jungle-main/data/list/DefaultNode.cs --- a/Main/jungle-main/data/list/DefaultNode.cs Tue Feb 07 20:50:50 2017 +0900 +++ b/Main/jungle-main/data/list/DefaultNode.cs Wed Feb 22 16:30:19 2017 +0900 @@ -1,5 +1,4 @@ -using UnityEngine; -using System.Collections; +using System.Collections; using System; public class DefaultNode : Node { diff -r a79781723862 -r f2ea780b3e80 Main/jungle-main/data/list/List.cs --- a/Main/jungle-main/data/list/List.cs Tue Feb 07 20:50:50 2017 +0900 +++ b/Main/jungle-main/data/list/List.cs Wed Feb 22 16:30:19 2017 +0900 @@ -1,5 +1,4 @@ -using UnityEngine; -using System.Collections; +using System.Collections; using System.Collections.Generic; using System; diff -r a79781723862 -r f2ea780b3e80 Main/jungle-main/data/list/TailNode.cs --- a/Main/jungle-main/data/list/TailNode.cs Tue Feb 07 20:50:50 2017 +0900 +++ b/Main/jungle-main/data/list/TailNode.cs Wed Feb 22 16:30:19 2017 +0900 @@ -1,5 +1,4 @@ -using UnityEngine; -using System.Collections; +using System.Collections; using System; public class TailNode : Node { diff -r a79781723862 -r f2ea780b3e80 Main/jungle-main/data/list/headNode.cs --- a/Main/jungle-main/data/list/headNode.cs Tue Feb 07 20:50:50 2017 +0900 +++ b/Main/jungle-main/data/list/headNode.cs Wed Feb 22 16:30:19 2017 +0900 @@ -1,5 +1,4 @@ -using UnityEngine; -using System.Collections; +using System.Collections; using System; public class headNode : Node{ diff -r a79781723862 -r f2ea780b3e80 Main/jungle-main/data/treemap/BlackNode.cs --- a/Main/jungle-main/data/treemap/BlackNode.cs Tue Feb 07 20:50:50 2017 +0900 +++ b/Main/jungle-main/data/treemap/BlackNode.cs Wed Feb 22 16:30:19 2017 +0900 @@ -1,5 +1,4 @@ -using UnityEngine; -using System.Collections.Generic; +using System.Collections.Generic; using System.Collections; using System; diff -r a79781723862 -r f2ea780b3e80 Main/jungle-main/data/treemap/EmptyNode.cs --- a/Main/jungle-main/data/treemap/EmptyNode.cs Tue Feb 07 20:50:50 2017 +0900 +++ b/Main/jungle-main/data/treemap/EmptyNode.cs Wed Feb 22 16:30:19 2017 +0900 @@ -1,68 +1,78 @@ -using UnityEngine; -using System.Collections; -using System.Collections.Generic; -using System; +using System.Collections.Generic; -public class EmptyNode : TreeMapNode{ +public class EmptyNode : TreeMapNode +{ //static V values; // Use this for initialization - public EmptyNode () - : base (default(K),default(V)) + public EmptyNode() + : base(default(K), default(V)) { } - public EmptyNode (K key) - : base (key,default(V)) + public EmptyNode(K key) + : base(key, default(V)) { } - public override TreeMapNode lefts(){ - return new EmptyNode(); + public override TreeMapNode lefts() + { + return new EmptyNode(); } - public override TreeMapNode rights(){ - return new EmptyNode(); + public override TreeMapNode rights() + { + return new EmptyNode(); } - public override bool isNotEmpty(){ + public override bool isNotEmpty() + { return false; } - public override TreeMapNode createNode(K key,V value,TreeMapNode left, TreeMapNode right){ - return new RedNode (key, value, new EmptyNode (), new EmptyNode ()); + public override TreeMapNode createNode(K key, V value, TreeMapNode left, TreeMapNode right) + { + return new RedNode(key, value, new EmptyNode(), new EmptyNode()); } - public TreeMapNode put(K k,V value){ - return new RedNode (k, value, new EmptyNode (), new EmptyNode ()); + public TreeMapNode put(K k, V value) + { + return new RedNode(k, value, new EmptyNode(), new EmptyNode()); } //I don't know only Comparator method. - public override rebuildNode replaceNode(TreeMapNode parent, Comparer ctr) { // not use method - return new rebuildNode(false, this); + public override rebuildNode replaceNode(TreeMapNode parent, Comparer ctr) + { // not use method + return new rebuildNode(false, this); } - public override rebuildNode deleteNode(){ - return new rebuildNode (false, this); + public override rebuildNode deleteNode() + { + return new rebuildNode(false, this); } - - public override TreeMapNode insBalance(){ + + public override TreeMapNode insBalance() + { return insBalance(); } - public override Rotate checkRotate(Rotate side){ + public override Rotate checkRotate(Rotate side) + { return Rotate.N; } - public override bool isRed(){ + public override bool isRed() + { return false; } - public override int checkDepth(int count, int minCount) { // test method - if (count < minCount || minCount == 0) { + public override int checkDepth(int count, int minCount) + { // test method + if (count < minCount || minCount == 0) + { minCount = count; } - //c# is there assert?? - //Assert.assertTrue(count <= 2 * minCount); + //c# is there assert?? + //Assert.assertTrue(count <= 2 * minCount); return minCount; } diff -r a79781723862 -r f2ea780b3e80 Main/jungle-main/data/treemap/RedNode.cs --- a/Main/jungle-main/data/treemap/RedNode.cs Tue Feb 07 20:50:50 2017 +0900 +++ b/Main/jungle-main/data/treemap/RedNode.cs Wed Feb 22 16:30:19 2017 +0900 @@ -1,6 +1,5 @@ -using UnityEngine; +using System; using System.Collections; -using System; using System.Collections.Generic; public class RedNode : TreeMapNode{ diff -r a79781723862 -r f2ea780b3e80 Main/jungle-main/data/treemap/Rotate.cs --- a/Main/jungle-main/data/treemap/Rotate.cs Tue Feb 07 20:50:50 2017 +0900 +++ b/Main/jungle-main/data/treemap/Rotate.cs Wed Feb 22 16:30:19 2017 +0900 @@ -1,5 +1,4 @@ -using UnityEngine; -using System.Collections; +using System.Collections; public enum Rotate{ R,L,RL,LR,N diff -r a79781723862 -r f2ea780b3e80 Main/jungle-main/data/treemap/TreeMap.cs --- a/Main/jungle-main/data/treemap/TreeMap.cs Tue Feb 07 20:50:50 2017 +0900 +++ b/Main/jungle-main/data/treemap/TreeMap.cs Wed Feb 22 16:30:19 2017 +0900 @@ -1,5 +1,4 @@ -using UnityEngine; -using System.Collections; +using System.Collections; using System.Collections.Generic; using System; @@ -73,11 +72,10 @@ public void checkDepth() { root.checkDepth (0, 0); - Debug.Log ("-----------------------------------"); } public class iterators : IEnumerator { - Stack> nodeStack = new Stack>(); + Stack> nodeStack = new Stack>(); TreeMapNode currentNode = new TreeMap().getRoot(); public List appLines { get; set; } private int position; diff -r a79781723862 -r f2ea780b3e80 Main/jungle-main/data/treemap/TreeMapNode.cs --- a/Main/jungle-main/data/treemap/TreeMapNode.cs Tue Feb 07 20:50:50 2017 +0900 +++ b/Main/jungle-main/data/treemap/TreeMapNode.cs Wed Feb 22 16:30:19 2017 +0900 @@ -1,6 +1,5 @@ using System.Collections; using System; -using UnityEngine; using System.Collections.Generic; diff -r a79781723862 -r f2ea780b3e80 Main/jungle-main/data/treemap/rebuildNode.cs --- a/Main/jungle-main/data/treemap/rebuildNode.cs Tue Feb 07 20:50:50 2017 +0900 +++ b/Main/jungle-main/data/treemap/rebuildNode.cs Wed Feb 22 16:30:19 2017 +0900 @@ -1,5 +1,4 @@ -using UnityEngine; -using System.Collections; +using System.Collections; using System; public class rebuildNode { diff -r a79781723862 -r f2ea780b3e80 Main/jungle-main/persistent/ChangeList.cs --- a/Main/jungle-main/persistent/ChangeList.cs Tue Feb 07 20:50:50 2017 +0900 +++ b/Main/jungle-main/persistent/ChangeList.cs Wed Feb 22 16:30:19 2017 +0900 @@ -1,5 +1,4 @@ -using UnityEngine; -using System.Collections.Generic; +using System.Collections.Generic; namespace JungleDB { public interface ChangeList : IEnumerable { diff -r a79781723862 -r f2ea780b3e80 Main/jungle-main/persistent/ChangeListWriter.cs --- a/Main/jungle-main/persistent/ChangeListWriter.cs Tue Feb 07 20:50:50 2017 +0900 +++ b/Main/jungle-main/persistent/ChangeListWriter.cs Wed Feb 22 16:30:19 2017 +0900 @@ -1,5 +1,4 @@ -using UnityEngine; -using System.Collections; +using System.Collections; namespace JungleDB { public interface ChangeListWriter { diff -r a79781723862 -r f2ea780b3e80 Main/jungle-main/persistent/SingletonMessage.cs --- a/Main/jungle-main/persistent/SingletonMessage.cs Tue Feb 07 20:50:50 2017 +0900 +++ b/Main/jungle-main/persistent/SingletonMessage.cs Wed Feb 22 16:30:19 2017 +0900 @@ -1,7 +1,6 @@ -using UnityEngine; -using System.Collections; +using System.Collections; -public class SingletonMessage : MonoBehaviour { +public class SingletonMessage { public static MsgPack.ObjectPacker getInstance () { return new MsgPack.ObjectPacker(); diff -r a79781723862 -r f2ea780b3e80 Main/jungle-main/store/NodeEditorError.cs --- a/Main/jungle-main/store/NodeEditorError.cs Tue Feb 07 20:50:50 2017 +0900 +++ b/Main/jungle-main/store/NodeEditorError.cs Wed Feb 22 16:30:19 2017 +0900 @@ -1,5 +1,4 @@ -using UnityEngine; -using System.Collections; +using System.Collections; public class NodeEditorError{ diff -r a79781723862 -r f2ea780b3e80 Main/jungle-main/store/impl/DefaultNodePath.cs --- a/Main/jungle-main/store/impl/DefaultNodePath.cs Tue Feb 07 20:50:50 2017 +0900 +++ b/Main/jungle-main/store/impl/DefaultNodePath.cs Wed Feb 22 16:30:19 2017 +0900 @@ -1,5 +1,4 @@ -using UnityEngine; -using System.Collections.Generic; +using System.Collections.Generic; using System.Collections; namespace JungleDB { diff -r a79781723862 -r f2ea780b3e80 Main/jungle-main/store/impl/DefaultTreeEditor.cs --- a/Main/jungle-main/store/impl/DefaultTreeEditor.cs Tue Feb 07 20:50:50 2017 +0900 +++ b/Main/jungle-main/store/impl/DefaultTreeEditor.cs Wed Feb 22 16:30:19 2017 +0900 @@ -1,5 +1,4 @@ -using UnityEngine; -using System.Collections; +using System.Collections; using System.Collections.Generic; namespace JungleDB { diff -r a79781723862 -r f2ea780b3e80 Main/jungle-main/store/impl/logger/DefaultTreeOperationLog.cs --- a/Main/jungle-main/store/impl/logger/DefaultTreeOperationLog.cs Tue Feb 07 20:50:50 2017 +0900 +++ b/Main/jungle-main/store/impl/logger/DefaultTreeOperationLog.cs Wed Feb 22 16:30:19 2017 +0900 @@ -1,5 +1,4 @@ -using UnityEngine; -using System.Collections.Generic; +using System.Collections.Generic; using System; using System.Collections; using System.Linq; diff -r a79781723862 -r f2ea780b3e80 Main/jungle-main/store/impl/logger/LoggingChildren.cs --- a/Main/jungle-main/store/impl/logger/LoggingChildren.cs Tue Feb 07 20:50:50 2017 +0900 +++ b/Main/jungle-main/store/impl/logger/LoggingChildren.cs Wed Feb 22 16:30:19 2017 +0900 @@ -1,5 +1,4 @@ using System.Collections; -using UnityEngine; namespace JungleDB { public class LoggingChildren { diff -r a79781723862 -r f2ea780b3e80 Main/jungle-main/store/impl/logger/LoggingNode.cs --- a/Main/jungle-main/store/impl/logger/LoggingNode.cs Tue Feb 07 20:50:50 2017 +0900 +++ b/Main/jungle-main/store/impl/logger/LoggingNode.cs Wed Feb 22 16:30:19 2017 +0900 @@ -1,5 +1,4 @@ -using UnityEngine; -using System.Collections; +using System.Collections; namespace JungleDB { public class LoggingNode { diff -r a79781723862 -r f2ea780b3e80 Main/jungle-main/store/operations/AppendChildAtOperation.cs --- a/Main/jungle-main/store/operations/AppendChildAtOperation.cs Tue Feb 07 20:50:50 2017 +0900 +++ b/Main/jungle-main/store/operations/AppendChildAtOperation.cs Wed Feb 22 16:30:19 2017 +0900 @@ -1,5 +1,4 @@ -using UnityEngine; -using System.Collections; +using System.Collections; using System; namespace JungleDB { diff -r a79781723862 -r f2ea780b3e80 Main/jungle-main/store/operations/DefaultTreeOperation.cs --- a/Main/jungle-main/store/operations/DefaultTreeOperation.cs Tue Feb 07 20:50:50 2017 +0900 +++ b/Main/jungle-main/store/operations/DefaultTreeOperation.cs Wed Feb 22 16:30:19 2017 +0900 @@ -1,5 +1,4 @@ -using UnityEngine; -using System.Collections; +using System.Collections; namespace JungleDB { public class DefaultTreeOperation : TreeOperation { diff -r a79781723862 -r f2ea780b3e80 Main/jungle-main/store/operations/DeleteAttributeOperation.cs --- a/Main/jungle-main/store/operations/DeleteAttributeOperation.cs Tue Feb 07 20:50:50 2017 +0900 +++ b/Main/jungle-main/store/operations/DeleteAttributeOperation.cs Wed Feb 22 16:30:19 2017 +0900 @@ -1,5 +1,4 @@ -using UnityEngine; -using System.Collections; +using System.Collections; using System; namespace JungleDB { diff -r a79781723862 -r f2ea780b3e80 Main/jungle-main/store/operations/DeleteChildAtOperation.cs --- a/Main/jungle-main/store/operations/DeleteChildAtOperation.cs Tue Feb 07 20:50:50 2017 +0900 +++ b/Main/jungle-main/store/operations/DeleteChildAtOperation.cs Wed Feb 22 16:30:19 2017 +0900 @@ -1,5 +1,4 @@ -using UnityEngine; -using System.Collections; +using System.Collections; using System; namespace JungleDB { diff -r a79781723862 -r f2ea780b3e80 Main/jungle-main/store/operations/ReplaceRootNodeOperation.cs --- a/Main/jungle-main/store/operations/ReplaceRootNodeOperation.cs Tue Feb 07 20:50:50 2017 +0900 +++ b/Main/jungle-main/store/operations/ReplaceRootNodeOperation.cs Wed Feb 22 16:30:19 2017 +0900 @@ -1,5 +1,4 @@ -using UnityEngine; -using System.Collections; +using System.Collections; using System; namespace JungleDB { diff -r a79781723862 -r f2ea780b3e80 Main/jungle-main/store/transformer/AppendChildAt.cs --- a/Main/jungle-main/store/transformer/AppendChildAt.cs Tue Feb 07 20:50:50 2017 +0900 +++ b/Main/jungle-main/store/transformer/AppendChildAt.cs Wed Feb 22 16:30:19 2017 +0900 @@ -1,5 +1,4 @@ -using UnityEngine; -using System.Collections; +using System.Collections; namespace JungleDB { public class AppendChildAt : NodeEditor { diff -r a79781723862 -r f2ea780b3e80 Main/jungle-main/store/transformer/DeleteAttribute.cs --- a/Main/jungle-main/store/transformer/DeleteAttribute.cs Tue Feb 07 20:50:50 2017 +0900 +++ b/Main/jungle-main/store/transformer/DeleteAttribute.cs Wed Feb 22 16:30:19 2017 +0900 @@ -1,5 +1,4 @@ -using UnityEngine; -using System.Collections; +using System.Collections; namespace JungleDB { public class DeleteAttribute : NodeEditor { diff -r a79781723862 -r f2ea780b3e80 Main/jungle-main/store/transformer/DeleteChildAt.cs --- a/Main/jungle-main/store/transformer/DeleteChildAt.cs Tue Feb 07 20:50:50 2017 +0900 +++ b/Main/jungle-main/store/transformer/DeleteChildAt.cs Wed Feb 22 16:30:19 2017 +0900 @@ -1,5 +1,4 @@ -using UnityEngine; -using System.Collections; +using System.Collections; namespace JungleDB { public class DeleteChildAt : NodeEditor { diff -r a79781723862 -r f2ea780b3e80 Main/jungle-main/store/transformer/PutAttribute.cs --- a/Main/jungle-main/store/transformer/PutAttribute.cs Tue Feb 07 20:50:50 2017 +0900 +++ b/Main/jungle-main/store/transformer/PutAttribute.cs Wed Feb 22 16:30:19 2017 +0900 @@ -1,5 +1,4 @@ -using UnityEngine; -using System.Collections; +using System.Collections; namespace JungleDB { public class PutAttribute : NodeEditor { diff -r a79781723862 -r f2ea780b3e80 Main/jungle-main/transaction/DefaultJungleTreeEditor.cs --- a/Main/jungle-main/transaction/DefaultJungleTreeEditor.cs Tue Feb 07 20:50:50 2017 +0900 +++ b/Main/jungle-main/transaction/DefaultJungleTreeEditor.cs Wed Feb 22 16:30:19 2017 +0900 @@ -1,5 +1,4 @@ -using UnityEngine; -using System.Collections.Generic; +using System.Collections.Generic; namespace JungleDB { public class DefaultJungleTreeEditor : JungleTreeEditor { diff -r a79781723862 -r f2ea780b3e80 Main/jungle-main/transaction/DefaultTreeContext.cs --- a/Main/jungle-main/transaction/DefaultTreeContext.cs Tue Feb 07 20:50:50 2017 +0900 +++ b/Main/jungle-main/transaction/DefaultTreeContext.cs Wed Feb 22 16:30:19 2017 +0900 @@ -1,5 +1,4 @@ -using UnityEngine; -using System.Collections.Generic; +using System.Collections.Generic; // override need? diff -r a79781723862 -r f2ea780b3e80 Main/jungle-main/transaction/DefaultTreeNode.cs --- a/Main/jungle-main/transaction/DefaultTreeNode.cs Tue Feb 07 20:50:50 2017 +0900 +++ b/Main/jungle-main/transaction/DefaultTreeNode.cs Wed Feb 22 16:30:19 2017 +0900 @@ -1,5 +1,4 @@ -using UnityEngine; - + namespace JungleDB { public class DefaultTreeNode : TreeNode { diff -r a79781723862 -r f2ea780b3e80 Main/jungle-main/transaction/DefaultTreeNodeAttribute.cs --- a/Main/jungle-main/transaction/DefaultTreeNodeAttribute.cs Tue Feb 07 20:50:50 2017 +0900 +++ b/Main/jungle-main/transaction/DefaultTreeNodeAttribute.cs Wed Feb 22 16:30:19 2017 +0900 @@ -1,5 +1,4 @@ -using UnityEngine; -using System.Collections; +using System.Collections; using System.Collections.Generic; using System; using System.Text; diff -r a79781723862 -r f2ea780b3e80 Main/jungle-main/transaction/DefaultTreeNodeChildren.cs --- a/Main/jungle-main/transaction/DefaultTreeNodeChildren.cs Tue Feb 07 20:50:50 2017 +0900 +++ b/Main/jungle-main/transaction/DefaultTreeNodeChildren.cs Wed Feb 22 16:30:19 2017 +0900 @@ -1,5 +1,4 @@ -using UnityEngine; -using System.Collections; +using System.Collections; namespace JungleDB { public class DefaultTreeNodeChildren : TreeNodeChildren { diff -r a79781723862 -r f2ea780b3e80 Main/jungle-main/traverser/DefaultEvaluation.cs --- a/Main/jungle-main/traverser/DefaultEvaluation.cs Tue Feb 07 20:50:50 2017 +0900 +++ b/Main/jungle-main/traverser/DefaultEvaluation.cs Wed Feb 22 16:30:19 2017 +0900 @@ -1,5 +1,4 @@ -using UnityEngine; -using System.Collections; +using System.Collections; namespace JungleDB { public class DefaultEvaluation : Evaluation { diff -r a79781723862 -r f2ea780b3e80 Main/jungle-main/traverser/DefaultEvaluator.cs --- a/Main/jungle-main/traverser/DefaultEvaluator.cs Tue Feb 07 20:50:50 2017 +0900 +++ b/Main/jungle-main/traverser/DefaultEvaluator.cs Wed Feb 22 16:30:19 2017 +0900 @@ -1,5 +1,4 @@ -using UnityEngine; -using System.Collections; +using System.Collections; namespace JungleDB { public class DefaultEvaluator : Evaluator { diff -r a79781723862 -r f2ea780b3e80 Main/jungle-main/traverser/DefaultTraverser.cs --- a/Main/jungle-main/traverser/DefaultTraverser.cs Tue Feb 07 20:50:50 2017 +0900 +++ b/Main/jungle-main/traverser/DefaultTraverser.cs Wed Feb 22 16:30:19 2017 +0900 @@ -1,6 +1,5 @@ using System.Collections.Generic; using System.Collections; -using UnityEngine; using System; namespace JungleDB { diff -r a79781723862 -r f2ea780b3e80 Main/jungle-main/util/DefaultEither.cs --- a/Main/jungle-main/util/DefaultEither.cs Tue Feb 07 20:50:50 2017 +0900 +++ b/Main/jungle-main/util/DefaultEither.cs Wed Feb 22 16:30:19 2017 +0900 @@ -1,58 +1,60 @@  -public class DefaultEither : Either { - private A theA; - private B theB; +namespace JungleDB { + public class DefaultEither : Either { + private A theA; + private B theB; - public DefaultEither(A _theA, B _theB){ - theA = _theA; - theB = _theB; - } + public DefaultEither(A _theA, B _theB){ + theA = _theA; + theB = _theB; + } - public static DefaultEither newA(A _theA) - { - return new DefaultEither(_theA,default(B)); - } + public static DefaultEither newA(A _theA) + { + return new DefaultEither(_theA,default(B)); + } - public static DefaultEither newB(B _theB) - { - return new DefaultEither(default(A),_theB); - } - - public A a() - { - return theA; - } + public static DefaultEither newB(B _theB) + { + return new DefaultEither(default(A),_theB); + } + + public A a() + { + return theA; + } - public bool isA() - { - return theA != null; - } + public bool isA() + { + return theA != null; + } - public B b() - { - return theB; - } + public B b() + { + return theB; + } - public bool isB() - { - return theB != null; - } - - public Either fmap(System.Func f) { - if (isA ()) { - return this; - } - return newB(f(b())); - } - - public Either bind (System.Func> f) { - if (isA ()) { - return this; + public bool isB() + { + return theB != null; } - return f (b ()); + public Either fmap(System.Func f) { + if (isA ()) { + return this; + } + return newB(f(b())); + } + + public Either bind (System.Func> f) { + if (isA ()) { + return this; + } + + return f (b ()); + } } } diff -r a79781723862 -r f2ea780b3e80 Main/jungle-main/util/Either.cs --- a/Main/jungle-main/util/Either.cs Tue Feb 07 20:50:50 2017 +0900 +++ b/Main/jungle-main/util/Either.cs Wed Feb 22 16:30:19 2017 +0900 @@ -1,9 +1,11 @@  -public interface Either { - A a(); - bool isA(); - B b(); - bool isB(); - Either fmap (System.Func f); - Either bind (System.Func> f); +namespace JungleDB { + public interface Either { + A a(); + bool isA(); + B b(); + bool isB(); + Either fmap (System.Func f); + Either bind (System.Func> f); + } } diff -r a79781723862 -r f2ea780b3e80 Main/jungle-main/util/IterableConverter.cs --- a/Main/jungle-main/util/IterableConverter.cs Tue Feb 07 20:50:50 2017 +0900 +++ b/Main/jungle-main/util/IterableConverter.cs Wed Feb 22 16:30:19 2017 +0900 @@ -1,5 +1,4 @@ -using UnityEngine; -using System.Collections.Generic; +using System.Collections.Generic; using System.Collections; using System; diff -r a79781723862 -r f2ea780b3e80 Main/jungle-main/util/Pair.cs --- a/Main/jungle-main/util/Pair.cs Tue Feb 07 20:50:50 2017 +0900 +++ b/Main/jungle-main/util/Pair.cs Wed Feb 22 16:30:19 2017 +0900 @@ -1,5 +1,4 @@ -using UnityEngine; -using System.Collections; +using System.Collections; public class Pair { private L left; diff -r a79781723862 -r f2ea780b3e80 Main/jungle-network/core/NetworkDefaultJungle.cs --- a/Main/jungle-network/core/NetworkDefaultJungle.cs Tue Feb 07 20:50:50 2017 +0900 +++ b/Main/jungle-network/core/NetworkDefaultJungle.cs Wed Feb 22 16:30:19 2017 +0900 @@ -1,5 +1,4 @@ -using UnityEngine; -using System.Collections; +using System.Collections; using System.Collections.Generic; namespace JungleDB { public class NetworkDefaultJungle : Jungle { diff -r a79781723862 -r f2ea780b3e80 Main/jungle-network/operations/NetworkAppendChildAtOperation.cs --- a/Main/jungle-network/operations/NetworkAppendChildAtOperation.cs Tue Feb 07 20:50:50 2017 +0900 +++ b/Main/jungle-network/operations/NetworkAppendChildAtOperation.cs Wed Feb 22 16:30:19 2017 +0900 @@ -1,5 +1,4 @@ -using UnityEngine; -using System.Collections; +using System.Collections; namespace JungleDB { public class NetworkAppendChildAtOperation : NodeOperation { diff -r a79781723862 -r f2ea780b3e80 Main/jungle-network/operations/NetworkDeleteAttributeOperation.cs --- a/Main/jungle-network/operations/NetworkDeleteAttributeOperation.cs Tue Feb 07 20:50:50 2017 +0900 +++ b/Main/jungle-network/operations/NetworkDeleteAttributeOperation.cs Wed Feb 22 16:30:19 2017 +0900 @@ -1,5 +1,4 @@ -using UnityEngine; -using System.Collections; +using System.Collections; namespace JungleDB { public class NetworkDeleteAttributeOperation : NodeOperation { diff -r a79781723862 -r f2ea780b3e80 Main/jungle-network/operations/NetworkDeleteChildAtOperation.cs --- a/Main/jungle-network/operations/NetworkDeleteChildAtOperation.cs Tue Feb 07 20:50:50 2017 +0900 +++ b/Main/jungle-network/operations/NetworkDeleteChildAtOperation.cs Wed Feb 22 16:30:19 2017 +0900 @@ -1,5 +1,4 @@ -using UnityEngine; -using System.Collections; +using System.Collections; namespace JungleDB { public class NetworkDeleteChildAtOperation : NodeOperation { diff -r a79781723862 -r f2ea780b3e80 Main/jungle-network/operations/NetworkNodeOperation.cs --- a/Main/jungle-network/operations/NetworkNodeOperation.cs Tue Feb 07 20:50:50 2017 +0900 +++ b/Main/jungle-network/operations/NetworkNodeOperation.cs Wed Feb 22 16:30:19 2017 +0900 @@ -1,5 +1,4 @@ -using UnityEngine; -using System.Collections; +using System.Collections; namespace JungleDB { public class NetworkNodeOperation : NodeOperation { diff -r a79781723862 -r f2ea780b3e80 Main/jungle-network/operations/NetworkNodePath.cs --- a/Main/jungle-network/operations/NetworkNodePath.cs Tue Feb 07 20:50:50 2017 +0900 +++ b/Main/jungle-network/operations/NetworkNodePath.cs Wed Feb 22 16:30:19 2017 +0900 @@ -1,86 +1,103 @@ -using UnityEngine; -using System.Collections; +using System.Collections; using System.Collections.Generic; -public class NetworkNodePath : NodePath { - LinkedList Path; - - public NetworkNodePath () { - Path = new LinkedList(); - Path.AddFirst(-1); - } - - public NetworkNodePath (NodePath path){ - Path = new LinkedList(); - foreach(int p in path) { - Path.AddLast(p); - } - } - - // msg pack ni pointer wo watasenai point youso wo narabikaeru. - private NetworkNodePath (LinkedList path) { - this.Path = path; - } - - IEnumerator IEnumerable.GetEnumerator() - { - return this.GetEnumerator(); - } - - public IEnumerator GetEnumerator() - { - foreach(var l in Path) { - yield return l; - } - } - - public NodePath add (int pos) { - LinkedList newPath = copyPath(); - newPath.AddLast(pos); - return new NetworkNodePath(newPath); +namespace JungleDB +{ + public class NetworkNodePath : NodePath + { + LinkedList Path; + + public NetworkNodePath() + { + Path = new LinkedList(); + Path.AddFirst(-1); + } + + public NetworkNodePath(NodePath path) + { + Path = new LinkedList(); + foreach (int p in path) + { + Path.AddLast(p); + } + } + + // msg pack ni pointer wo watasenai point youso wo narabikaeru. + private NetworkNodePath(LinkedList path) + { + this.Path = path; + } + + IEnumerator IEnumerable.GetEnumerator() + { + return this.GetEnumerator(); + } + + public IEnumerator GetEnumerator() + { + foreach (var l in Path) + { + yield return l; + } + } + + public NodePath add(int pos) + { + LinkedList newPath = copyPath(); + newPath.AddLast(pos); + return new NetworkNodePath(newPath); + } + + public NodePath addHead(int pos) + { // still java code. + LinkedList newPath = copyPath(); + newPath.AddFirst(pos); + return new NetworkNodePath(newPath); + } + + public Pair pop() + { + LinkedList cPath = copyPath(); + int e = cPath.First.Value; + cPath.RemoveFirst(); + return new Pair(e, new NetworkNodePath(cPath)); + } + + public int size() + { + return this.Path.Count; + } + + + public LinkedList copyPath() + { + LinkedList newPath = new LinkedList(); + foreach (int i in this.Path) + { + newPath.AddLast(i); + } + return newPath; + } + + public override string ToString() + { + return Path.ToString(); + } + + public NodePath tail() + { + this.Path.RemoveLast(); + return new NetworkNodePath(this.Path); + } + + public Pair last() + { + int lastValue = this.Path.Last.Value; + this.Path.RemoveLast(); + return new Pair(lastValue, new NetworkNodePath(this.Path)); + } + + + } - - public NodePath addHead(int pos) { // still java code. - LinkedList newPath = copyPath(); - newPath.AddFirst(pos); - return new NetworkNodePath(newPath); - } - - public Pair pop () { - LinkedList cPath = copyPath(); - int e = cPath.First.Value; - cPath.RemoveFirst(); - return new Pair(e, new NetworkNodePath(cPath)); - } - - public int size () { - return this.Path.Count; - } - - - public LinkedList copyPath(){ - LinkedList newPath = new LinkedList(); - foreach(int i in this.Path) { - newPath.AddLast(i); - } - return newPath; - } - - public override string ToString () { - return Path.ToString(); - } - - public NodePath tail() { - this.Path.RemoveLast(); - return new NetworkNodePath(this.Path); - } - - public Pair last () { - int lastValue = this.Path.Last.Value; - this.Path.RemoveLast(); - return new Pair(lastValue, new NetworkNodePath(this.Path)); - } - - - } diff -r a79781723862 -r f2ea780b3e80 Main/jungle-network/operations/NetworkPutAttributeOperation.cs --- a/Main/jungle-network/operations/NetworkPutAttributeOperation.cs Tue Feb 07 20:50:50 2017 +0900 +++ b/Main/jungle-network/operations/NetworkPutAttributeOperation.cs Wed Feb 22 16:30:19 2017 +0900 @@ -1,5 +1,4 @@ -using UnityEngine; -using System.Collections; +using System.Collections; namespace JungleDB { public class NetworkPutAttributeOperation : NodeOperation { diff -r a79781723862 -r f2ea780b3e80 Main/jungle-network/operations/NetworkTreeOperation.cs --- a/Main/jungle-network/operations/NetworkTreeOperation.cs Tue Feb 07 20:50:50 2017 +0900 +++ b/Main/jungle-network/operations/NetworkTreeOperation.cs Wed Feb 22 16:30:19 2017 +0900 @@ -1,5 +1,4 @@ -using UnityEngine; -using System.Collections; +using System.Collections; namespace JungleDB { public class NetworkTreeOperation : TreeOperation { diff -r a79781723862 -r f2ea780b3e80 Main/jungle-network/operations/NetworkTreeOperationLog.cs --- a/Main/jungle-network/operations/NetworkTreeOperationLog.cs Tue Feb 07 20:50:50 2017 +0900 +++ b/Main/jungle-network/operations/NetworkTreeOperationLog.cs Wed Feb 22 16:30:19 2017 +0900 @@ -1,5 +1,4 @@ -using UnityEngine; -using System.Collections; +using System.Collections; using System.Collections.Generic; using System; diff -r a79781723862 -r f2ea780b3e80 Main/jungle-network/transaction/NetworkDefaultJungleTree.cs --- a/Main/jungle-network/transaction/NetworkDefaultJungleTree.cs Tue Feb 07 20:50:50 2017 +0900 +++ b/Main/jungle-network/transaction/NetworkDefaultJungleTree.cs Wed Feb 22 16:30:19 2017 +0900 @@ -1,5 +1,4 @@ -using UnityEngine; -using System.Collections; +using System.Collections; namespace JungleDB { public class NetworkDefaultJungleTree : JungleTree { diff -r a79781723862 -r f2ea780b3e80 Main/jungle-network/transaction/NetworkDefaultJungleTreeEditor.cs --- a/Main/jungle-network/transaction/NetworkDefaultJungleTreeEditor.cs Tue Feb 07 20:50:50 2017 +0900 +++ b/Main/jungle-network/transaction/NetworkDefaultJungleTreeEditor.cs Wed Feb 22 16:30:19 2017 +0900 @@ -1,5 +1,4 @@ -using UnityEngine; -using System.Collections; +using System.Collections; using System.Collections.Generic; namespace JungleDB { diff -r a79781723862 -r f2ea780b3e80 Main/jungle-network/transaction/NetworkTransactionManager.cs --- a/Main/jungle-network/transaction/NetworkTransactionManager.cs Tue Feb 07 20:50:50 2017 +0900 +++ b/Main/jungle-network/transaction/NetworkTransactionManager.cs Wed Feb 22 16:30:19 2017 +0900 @@ -1,5 +1,4 @@ -using UnityEngine; -using System.Collections; +using System.Collections; using System.Collections.Generic;