annotate src/main/csharp/jp.ac.u-ryukyu.ie.cr/jungle-network/operations/NetworkTreeOperation.cs @ 17:01a08cf4b2d9

Liq Files
author Kazuma
date Mon, 07 Nov 2016 01:05:24 +0900
parents b71d9ea6bd8e
children
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
12
b71d9ea6bd8e Add Network Operation Class. this codes can not test yet.
Kazuma
parents:
diff changeset
1 using UnityEngine;
b71d9ea6bd8e Add Network Operation Class. this codes can not test yet.
Kazuma
parents:
diff changeset
2 using System.Collections;
b71d9ea6bd8e Add Network Operation Class. this codes can not test yet.
Kazuma
parents:
diff changeset
3
b71d9ea6bd8e Add Network Operation Class. this codes can not test yet.
Kazuma
parents:
diff changeset
4 public class NetworkTreeOperation : TreeOperation {
b71d9ea6bd8e Add Network Operation Class. this codes can not test yet.
Kazuma
parents:
diff changeset
5
b71d9ea6bd8e Add Network Operation Class. this codes can not test yet.
Kazuma
parents:
diff changeset
6 public NetworkNodePath Path;
b71d9ea6bd8e Add Network Operation Class. this codes can not test yet.
Kazuma
parents:
diff changeset
7 public NetworkNodeOperation Operation;
b71d9ea6bd8e Add Network Operation Class. this codes can not test yet.
Kazuma
parents:
diff changeset
8
b71d9ea6bd8e Add Network Operation Class. this codes can not test yet.
Kazuma
parents:
diff changeset
9 public NetworkTreeOperation (TreeOperation tOp) {
b71d9ea6bd8e Add Network Operation Class. this codes can not test yet.
Kazuma
parents:
diff changeset
10 this.Path = new NetworkNodePath(tOp.getNodePath());
b71d9ea6bd8e Add Network Operation Class. this codes can not test yet.
Kazuma
parents:
diff changeset
11 this.Operation = new NetworkNodeOperation(tOp.getNodeOperation());
b71d9ea6bd8e Add Network Operation Class. this codes can not test yet.
Kazuma
parents:
diff changeset
12 }
b71d9ea6bd8e Add Network Operation Class. this codes can not test yet.
Kazuma
parents:
diff changeset
13
b71d9ea6bd8e Add Network Operation Class. this codes can not test yet.
Kazuma
parents:
diff changeset
14 public NetworkTreeOperation(NodePath path, NodeOperation op) {
b71d9ea6bd8e Add Network Operation Class. this codes can not test yet.
Kazuma
parents:
diff changeset
15 this.Path = new NetworkNodePath(path);
b71d9ea6bd8e Add Network Operation Class. this codes can not test yet.
Kazuma
parents:
diff changeset
16 this.Operation = new NetworkNodeOperation(op);
b71d9ea6bd8e Add Network Operation Class. this codes can not test yet.
Kazuma
parents:
diff changeset
17 }
b71d9ea6bd8e Add Network Operation Class. this codes can not test yet.
Kazuma
parents:
diff changeset
18
b71d9ea6bd8e Add Network Operation Class. this codes can not test yet.
Kazuma
parents:
diff changeset
19 public NetworkTreeOperation(NetworkNodePath path, NodeOperation op) {
b71d9ea6bd8e Add Network Operation Class. this codes can not test yet.
Kazuma
parents:
diff changeset
20 this.Path = path;
b71d9ea6bd8e Add Network Operation Class. this codes can not test yet.
Kazuma
parents:
diff changeset
21 this.Operation = new NetworkNodeOperation(op);
b71d9ea6bd8e Add Network Operation Class. this codes can not test yet.
Kazuma
parents:
diff changeset
22 }
b71d9ea6bd8e Add Network Operation Class. this codes can not test yet.
Kazuma
parents:
diff changeset
23
b71d9ea6bd8e Add Network Operation Class. this codes can not test yet.
Kazuma
parents:
diff changeset
24 public NetworkTreeOperation(NodePath path, NetworkNodeOperation op) {
b71d9ea6bd8e Add Network Operation Class. this codes can not test yet.
Kazuma
parents:
diff changeset
25 this.Path = new NetworkNodePath(path);
b71d9ea6bd8e Add Network Operation Class. this codes can not test yet.
Kazuma
parents:
diff changeset
26 this.Operation = op;
b71d9ea6bd8e Add Network Operation Class. this codes can not test yet.
Kazuma
parents:
diff changeset
27 }
b71d9ea6bd8e Add Network Operation Class. this codes can not test yet.
Kazuma
parents:
diff changeset
28
b71d9ea6bd8e Add Network Operation Class. this codes can not test yet.
Kazuma
parents:
diff changeset
29 public NetworkTreeOperation(NetworkNodePath path, NetworkNodeOperation op) {
b71d9ea6bd8e Add Network Operation Class. this codes can not test yet.
Kazuma
parents:
diff changeset
30 this.Path = path;
b71d9ea6bd8e Add Network Operation Class. this codes can not test yet.
Kazuma
parents:
diff changeset
31 this.Operation = op;
b71d9ea6bd8e Add Network Operation Class. this codes can not test yet.
Kazuma
parents:
diff changeset
32 }
b71d9ea6bd8e Add Network Operation Class. this codes can not test yet.
Kazuma
parents:
diff changeset
33
b71d9ea6bd8e Add Network Operation Class. this codes can not test yet.
Kazuma
parents:
diff changeset
34 public NodePath getNodePath () {
b71d9ea6bd8e Add Network Operation Class. this codes can not test yet.
Kazuma
parents:
diff changeset
35 return this.Path;
b71d9ea6bd8e Add Network Operation Class. this codes can not test yet.
Kazuma
parents:
diff changeset
36 }
b71d9ea6bd8e Add Network Operation Class. this codes can not test yet.
Kazuma
parents:
diff changeset
37
b71d9ea6bd8e Add Network Operation Class. this codes can not test yet.
Kazuma
parents:
diff changeset
38 public NodeOperation getNodeOperation() {
b71d9ea6bd8e Add Network Operation Class. this codes can not test yet.
Kazuma
parents:
diff changeset
39 Command c = this.Operation.getCommand();
b71d9ea6bd8e Add Network Operation Class. this codes can not test yet.
Kazuma
parents:
diff changeset
40 switch(c){
b71d9ea6bd8e Add Network Operation Class. this codes can not test yet.
Kazuma
parents:
diff changeset
41 case Command.PUT_ATTRIBUTE:
b71d9ea6bd8e Add Network Operation Class. this codes can not test yet.
Kazuma
parents:
diff changeset
42 return new PutAttributeOperation(Operation.getKey(), Operation.getValue());
b71d9ea6bd8e Add Network Operation Class. this codes can not test yet.
Kazuma
parents:
diff changeset
43 case Command.APPEND_CHILD:
b71d9ea6bd8e Add Network Operation Class. this codes can not test yet.
Kazuma
parents:
diff changeset
44 return new AppendChildAtOperation(Operation.getPosition());
b71d9ea6bd8e Add Network Operation Class. this codes can not test yet.
Kazuma
parents:
diff changeset
45 case Command.DELETE_CHILD:
b71d9ea6bd8e Add Network Operation Class. this codes can not test yet.
Kazuma
parents:
diff changeset
46 return new DeleteChildAtOperation(Operation.getPosition());
b71d9ea6bd8e Add Network Operation Class. this codes can not test yet.
Kazuma
parents:
diff changeset
47 case Command.DELETE_ATTRIBUTE:
b71d9ea6bd8e Add Network Operation Class. this codes can not test yet.
Kazuma
parents:
diff changeset
48 return new DeleteAttributeOperation(Operation.getKey());
b71d9ea6bd8e Add Network Operation Class. this codes can not test yet.
Kazuma
parents:
diff changeset
49 default:
b71d9ea6bd8e Add Network Operation Class. this codes can not test yet.
Kazuma
parents:
diff changeset
50 break;
b71d9ea6bd8e Add Network Operation Class. this codes can not test yet.
Kazuma
parents:
diff changeset
51 }
b71d9ea6bd8e Add Network Operation Class. this codes can not test yet.
Kazuma
parents:
diff changeset
52 return null;
b71d9ea6bd8e Add Network Operation Class. this codes can not test yet.
Kazuma
parents:
diff changeset
53 }
b71d9ea6bd8e Add Network Operation Class. this codes can not test yet.
Kazuma
parents:
diff changeset
54 }