Mercurial > hg > Database > jungle-sharp
view src/main/csharp/jp.ac.u-ryukyu.ie.cr/jungle/store/transformer/DeleteChildAt.cs @ 0:dec15de2c6ff
first commit
author | Kazuma |
---|---|
date | Tue, 21 Jun 2016 17:11:12 +0900 |
parents | |
children |
line wrap: on
line source
using UnityEngine; using System.Collections; public class DeleteChildAt : NodeEditor { private int pos; public DeleteChildAt(int _pos) { pos = _pos; } public Either<Error, LoggingNode> _edit(LoggingNode logNode) { Either<Error,LoggingNode> either = logNode.getChildren().deleteChildAt(pos); if(either.isA()){ // error return either; } return DefaultEither<Error, LoggingNode>.newB(either.b()); } public Either<Error, LoggingNode> edit(TreeNode _e) { LoggingNode logNode = wrap(_e); return _edit(logNode); } public LoggingNode wrap(TreeNode node) { return new LoggingNode(node); } public LoggingNode wrap(TreeNode node, OperationLog op) { return new LoggingNode(node, op); } }