comparison Main/jungle-main/store/operations/AppendChildAtOperation.cs @ 20:1f99e150f336

fix folder and add Object Mapper.
author Kazuma Takeda
date Thu, 15 Dec 2016 22:52:48 +0900
parents
children 1466993c104c
comparison
equal deleted inserted replaced
19:0865819106cf 20:1f99e150f336
1 using UnityEngine;
2 using System.Collections;
3 using System;
4
5 namespace JungleDB {
6 public class AppendChildAtOperation : NodeOperation {
7 private int pos;
8
9 public AppendChildAtOperation(int _pos)
10 {
11 pos = _pos;
12 }
13
14 public Command getCommand()
15 {
16 return Command.APPEND_CHILD;
17 }
18
19 public Either<Error,TreeNode> invoke(TreeNode _target)
20 {
21 return _target.getChildren().addNewChildAt(pos);
22 }
23
24 public int getPosition()
25 {
26 return pos;
27 }
28
29 public string getKey()
30 {
31 return null;
32 }
33
34 public byte[] getValue()
35 {
36 return new byte[1]{0};
37 }
38
39 }
40 }