Mercurial > hg > Database > jungle-sharp
comparison src/main/csharp/jp.ac.u-ryukyu.ie.cr/jungle-main/store/transformer/AppendChildAt.cs @ 10:abe0c247f5a5
Add Network module. but, unComplete NetworkDefaultJungleTreeEditor.cs
author | Kazuma Takeda <kazuma-arashi@hotmail.co.jp> |
---|---|
date | Sun, 23 Oct 2016 07:40:50 +0900 |
parents | |
children |
comparison
equal
deleted
inserted
replaced
9:e6ad9016601c | 10:abe0c247f5a5 |
---|---|
1 using UnityEngine; | |
2 using System.Collections; | |
3 | |
4 public class AppendChildAt : NodeEditor { | |
5 private int pos; | |
6 | |
7 public AppendChildAt(int _pos){ | |
8 pos = _pos; | |
9 } | |
10 | |
11 public Either<Error, LoggingNode> _edit(LoggingNode _e) | |
12 { | |
13 Either<Error,LoggingNode> either = _e.getChildren().addNewChildAt(pos); | |
14 if(either.isA()){ | |
15 // error | |
16 return either; | |
17 } | |
18 return DefaultEither<Error, LoggingNode>.newB(either.b()); | |
19 } | |
20 | |
21 public Either<Error, LoggingNode> edit(TreeNode _e) { | |
22 LoggingNode logNode = wrap(_e); | |
23 return _edit(logNode); | |
24 } | |
25 | |
26 public LoggingNode wrap(TreeNode node) { | |
27 return new LoggingNode(node); | |
28 } | |
29 | |
30 public LoggingNode wrap(TreeNode node, OperationLog op) { | |
31 return new LoggingNode(node, op); | |
32 } | |
33 } |