|
5 | 5 |
|
6 | 6 | class Array2DTracer : public Tracer { |
7 | 7 | public: |
8 | | - Array2DTracer(string title = "") : Tracer("Array2DTracer", title) { |
| 8 | + Array2DTracer(const string &title = "", const string &className = "Array2DTracer") : Tracer(title, className) { |
9 | 9 | } |
10 | 10 |
|
11 | | - Array2DTracer set(json array2d) { |
12 | | - addTrace(key, "set", {array2d}); |
13 | | - return *this; |
| 11 | + void set(const json &array2d) { |
| 12 | + command("set", {array2d}); |
14 | 13 | } |
15 | 14 |
|
16 | | - Array2DTracer set() { |
17 | | - addTrace(key, "set", {}); |
18 | | - return *this; |
| 15 | + void patch(int x, int y, const json &v) { |
| 16 | + command("patch", {x, y, v}); |
19 | 17 | } |
20 | 18 |
|
21 | | - Array2DTracer reset() { |
22 | | - addTrace(key, "reset", {}); |
23 | | - return *this; |
| 19 | + void patch(int x, int y) { |
| 20 | + command("patch", {x, y}); |
24 | 21 | } |
25 | 22 |
|
26 | | - Array2DTracer delay() { |
27 | | - addTrace(key, "delay", {}); |
28 | | - return *this; |
| 23 | + void depatch(int x, int y) { |
| 24 | + command("depatch", {x, y}); |
29 | 25 | } |
30 | 26 |
|
31 | | - Array2DTracer patch(json x, json y, json v) { |
32 | | - addTrace(key, "patch", {x, y, v}); |
33 | | - return *this; |
| 27 | + void select(int sx, int sy, int ex, int ey) { |
| 28 | + command("select", {sx, sy, ex, ey}); |
34 | 29 | } |
35 | 30 |
|
36 | | - Array2DTracer depatch(json x, json y) { |
37 | | - addTrace(key, "depatch", {x, y}); |
38 | | - return *this; |
| 31 | + void select(int x, int y) { |
| 32 | + command("select", {x, y}); |
39 | 33 | } |
40 | 34 |
|
41 | | - Array2DTracer select(json x, json y) { |
42 | | - addTrace(key, "select", {x, y}); |
43 | | - return *this; |
| 35 | + void selectRow(int x, int sy, int ey) { |
| 36 | + command("selectRow", {x, sy, ey}); |
44 | 37 | } |
45 | 38 |
|
46 | | - Array2DTracer select(json sx, json sy, json ex, json ey) { |
47 | | - addTrace(key, "select", {sx, sy, ex, ey}); |
48 | | - return *this; |
| 39 | + void selectCol(int y, int sx, int ex) { |
| 40 | + command("selectCol", {y, sx, ex}); |
49 | 41 | } |
50 | 42 |
|
51 | | - Array2DTracer selectRow(json x, json sy, json ey) { |
52 | | - addTrace(key, "selectRow", {x, sy, ey}); |
53 | | - return *this; |
| 43 | + void deselect(int sx, int sy, int ex, int ey) { |
| 44 | + command("deselect", {sx, sy, ex, ey}); |
54 | 45 | } |
55 | 46 |
|
56 | | - Array2DTracer selectCol(json y, json sx, json ex) { |
57 | | - addTrace(key, "selectCol", {y, sx, ex}); |
58 | | - return *this; |
| 47 | + void deselect(int x, int y) { |
| 48 | + command("deselect", {x, y}); |
59 | 49 | } |
60 | 50 |
|
61 | | - Array2DTracer deselect(json x, json y) { |
62 | | - addTrace(key, "deselect", {x, y}); |
63 | | - return *this; |
| 51 | + void deselectRow(int x, int sy, int ey) { |
| 52 | + command("deselectRow", {x, sy, ey}); |
64 | 53 | } |
65 | 54 |
|
66 | | - Array2DTracer deselect(json sx, json sy, json ex, json ey) { |
67 | | - addTrace(key, "deselect", {sx, sy, ex, ey}); |
68 | | - return *this; |
69 | | - } |
70 | | - |
71 | | - Array2DTracer deselectRow(json x, json sy, json ey) { |
72 | | - addTrace(key, "deselectRow", {x, sy, ey}); |
73 | | - return *this; |
74 | | - } |
75 | | - |
76 | | - Array2DTracer deselectCol(json y, json sx, json ex) { |
77 | | - addTrace(key, "deselectCol", {y, sx, ex}); |
78 | | - return *this; |
| 55 | + void deselectCol(int y, int sx, int ex) { |
| 56 | + command("deselectCol", {y, sx, ex}); |
79 | 57 | } |
80 | 58 | }; |
81 | 59 |
|
|
0 commit comments