| 1 |
|
| 2 |
|
| 3 |
|
| 4 |
|
| 5 |
|
| 6 |
|
| 7 |
|
| 8 |
|
| 9 |
|
| 10 |
|
| 11 |
|
| 12 |
|
| 13 |
|
| 14 |
|
| 15 |
|
| 16 |
|
| 17 |
|
| 18 |
|
| 19 |
|
| 20 |
|
| 21 |
|
| 22 |
|
| 23 |
|
| 24 |
|
| 25 |
|
| 26 |
|
| 27 |
|
| 28 |
|
| 29 |
|
| 30 |
|
| 31 |
|
| 32 |
|
| 33 |
|
| 34 |
|
| 35 |
|
| 36 |
|
| 37 |
|
| 38 |
|
| 39 |
|
| 40 |
|
| 41 |
|
| 42 |
|
| 43 |
|
| 44 |
|
| 45 |
|
| 46 |
package h; |
| 47 |
|
| 48 |
import java.util.ArrayList; |
| 49 |
import java.util.List; |
| 50 |
|
| 51 |
import smetana.core.UnsupportedArrayOfStruct2; |
| 52 |
import smetana.core.UnsupportedStructAndPtr; |
| 53 |
import smetana.core.__array_of_ptr__; |
| 54 |
import smetana.core.__ptr__; |
| 55 |
import smetana.core.__struct__; |
| 56 |
import smetana.core.size_t; |
| 57 |
import smetana.core.amiga.StarStruct; |
| 58 |
|
| 59 |
public class ST_xlabel_t extends UnsupportedStructAndPtr { |
| 60 |
|
| 61 |
private final StarStruct parent; |
| 62 |
|
| 63 |
public ST_xlabel_t() { |
| 64 |
this(null); |
| 65 |
} |
| 66 |
|
| 67 |
public ST_xlabel_t(StarStruct parent) { |
| 68 |
this.parent = parent; |
| 69 |
} |
| 70 |
|
| 71 |
|
| 72 |
|
| 73 |
final public ST_pointf sz = new ST_pointf(this); |
| 74 |
final public ST_pointf pos = new ST_pointf(this); |
| 75 |
|
| 76 |
|
| 77 |
public ST_textlabel_t lbl; |
| 78 |
public int set; |
| 79 |
|
| 80 |
|
| 81 |
|
| 82 |
|
| 83 |
|
| 84 |
public static class Array extends UnsupportedArrayOfStruct2 implements __ptr__, __array_of_ptr__{ |
| 85 |
|
| 86 |
private final List<ST_xlabel_t> data; |
| 87 |
private final int pos_; |
| 88 |
|
| 89 |
@Override |
| 90 |
public void setInt(String fieldName, int data) { |
| 91 |
get(0).setInt(fieldName, data); |
| 92 |
} |
| 93 |
|
| 94 |
@Override |
| 95 |
public void setStruct(__struct__ value) { |
| 96 |
get(0).___(value); |
| 97 |
} |
| 98 |
|
| 99 |
@Override |
| 100 |
public Array asPtr() { |
| 101 |
return this; |
| 102 |
} |
| 103 |
|
| 104 |
@Override |
| 105 |
public void setDouble(String fieldName, double value) { |
| 106 |
get(0).setDouble(fieldName, value); |
| 107 |
} |
| 108 |
|
| 109 |
@Override |
| 110 |
public ST_xlabel_t getStruct() { |
| 111 |
return get(0).getStruct(); |
| 112 |
} |
| 113 |
|
| 114 |
@Override |
| 115 |
public __ptr__ getPtr() { |
| 116 |
return get(0); |
| 117 |
} |
| 118 |
|
| 119 |
public Array(int size) { |
| 120 |
this.data = new ArrayList<ST_xlabel_t>(); |
| 121 |
this.pos_ = 0; |
| 122 |
for (int i = 0; i < size; i++) { |
| 123 |
data.add(new ST_xlabel_t()); |
| 124 |
} |
| 125 |
} |
| 126 |
|
| 127 |
public Array reallocJ(int newsize) { |
| 128 |
while (data.size() < newsize) { |
| 129 |
data.add(new ST_xlabel_t()); |
| 130 |
} |
| 131 |
return this; |
| 132 |
} |
| 133 |
|
| 134 |
public Array plus(int delta) { |
| 135 |
return plusJ(delta); |
| 136 |
} |
| 137 |
|
| 138 |
private Array(List<ST_xlabel_t> data, int pos) { |
| 139 |
this.data = data; |
| 140 |
this.pos_ = pos; |
| 141 |
} |
| 142 |
|
| 143 |
public ST_xlabel_t get(int i) { |
| 144 |
return this.data.get(pos_ + i); |
| 145 |
} |
| 146 |
|
| 147 |
public Array plusJ(int i) { |
| 148 |
return new Array(data, pos_ + i); |
| 149 |
} |
| 150 |
|
| 151 |
public int minus(Array other) { |
| 152 |
if (this.data != other.data) { |
| 153 |
throw new IllegalArgumentException(); |
| 154 |
} |
| 155 |
return this.pos_ - other.pos_; |
| 156 |
} |
| 157 |
|
| 158 |
public Array move(int delta) { |
| 159 |
throw new UnsupportedOperationException(getClass().toString()); |
| 160 |
} |
| 161 |
|
| 162 |
|
| 163 |
public void realloc(size_t nb) { |
| 164 |
throw new UnsupportedOperationException(getClass().toString()); |
| 165 |
} |
| 166 |
|
| 167 |
public int comparePointerInternal(__array_of_ptr__ other) { |
| 168 |
throw new UnsupportedOperationException(getClass().toString()); |
| 169 |
} |
| 170 |
|
| 171 |
|
| 172 |
} |
| 173 |
|
| 174 |
|
| 175 |
@Override |
| 176 |
public void setInt(String fieldName, int data) { |
| 177 |
if (fieldName.equals("set")) { |
| 178 |
this.set = data; |
| 179 |
return; |
| 180 |
} |
| 181 |
super.setInt(fieldName, data); |
| 182 |
} |
| 183 |
|
| 184 |
@Override |
| 185 |
public __ptr__ setPtr(String fieldName, __ptr__ newData) { |
| 186 |
if (fieldName.equals("lbl")) { |
| 187 |
this.lbl = (ST_textlabel_t) newData; |
| 188 |
return this.lbl; |
| 189 |
} |
| 190 |
return super.setPtr(fieldName, newData); |
| 191 |
} |
| 192 |
|
| 193 |
@Override |
| 194 |
public ST_xlabel_t getStruct() { |
| 195 |
return this; |
| 196 |
} |
| 197 |
|
| 198 |
@Override |
| 199 |
public void setStruct(String fieldName, __struct__ newData) { |
| 200 |
if (fieldName.equals("sz")) { |
| 201 |
this.sz.copyDataFrom(newData); |
| 202 |
return; |
| 203 |
} |
| 204 |
if (fieldName.equals("pos")) { |
| 205 |
this.pos.copyDataFrom(newData); |
| 206 |
return; |
| 207 |
} |
| 208 |
super.setStruct(fieldName, newData); |
| 209 |
} |
| 210 |
|
| 211 |
|
| 212 |
|
| 213 |
|
| 214 |
|
| 215 |
|
| 216 |
|
| 217 |
|
| 218 |
|
| 219 |
|
| 220 |
|
| 221 |
|
| 222 |
|
| 223 |
|
| 224 |
|
| 225 |
|
| 226 |
|
| 227 |
|
| 228 |
|
| 229 |
|
| 230 |
|
| 231 |
|
| 232 |
} |
| 233 |
|
| 234 |
|
| 235 |
|
| 236 |
|
| 237 |
|
| 238 |
|
| 239 |
|