| 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 smetana.core.OFFSET; |
| 49 |
import smetana.core.UnsupportedStructAndPtr; |
| 50 |
import smetana.core.__ptr__; |
| 51 |
import smetana.core.__struct__; |
| 52 |
import smetana.core.amiga.StarStruct; |
| 53 |
|
| 54 |
public class ST_dtlink_s extends UnsupportedStructAndPtr implements WithParent { |
| 55 |
|
| 56 |
public ST_dtlink_s right; |
| 57 |
public ST_dtlink_s _left; |
| 58 |
private final StarStruct parent; |
| 59 |
|
| 60 |
@Override |
| 61 |
public void copyDataFrom(__struct__ other) { |
| 62 |
ST_dtlink_s this2 = (ST_dtlink_s) other; |
| 63 |
this.right = this2.right; |
| 64 |
this._left = this2._left; |
| 65 |
} |
| 66 |
|
| 67 |
public ST_dtlink_s() { |
| 68 |
this(null); |
| 69 |
} |
| 70 |
|
| 71 |
public ST_dtlink_s(StarStruct parent) { |
| 72 |
this.parent = parent; |
| 73 |
} |
| 74 |
|
| 75 |
public StarStruct getParent() { |
| 76 |
return parent; |
| 77 |
} |
| 78 |
|
| 79 |
|
| 80 |
|
| 81 |
|
| 82 |
|
| 83 |
|
| 84 |
|
| 85 |
|
| 86 |
|
| 87 |
|
| 88 |
|
| 89 |
|
| 90 |
|
| 91 |
@Override |
| 92 |
public __ptr__ castTo(Class dest) { |
| 93 |
if (dest == ST_dtlink_s.class) { |
| 94 |
return this; |
| 95 |
} |
| 96 |
|
| 97 |
|
| 98 |
|
| 99 |
if (dest == ST_dthold_s.class && getParent() instanceof ST_dthold_s) { |
| 100 |
|
| 101 |
|
| 102 |
return (ST_dthold_s) getParent(); |
| 103 |
|
| 104 |
} |
| 105 |
System.err.println("dest=" + dest); |
| 106 |
return super.castTo(dest); |
| 107 |
} |
| 108 |
|
| 109 |
public ST_dthold_s castTo_ST_dthold_s() { |
| 110 |
if (getParent() instanceof ST_dthold_s) { |
| 111 |
return (ST_dthold_s) getParent(); |
| 112 |
} |
| 113 |
throw new UnsupportedOperationException(); |
| 114 |
} |
| 115 |
|
| 116 |
class LinkTo_dthold_s extends UnsupportedStructAndPtr { |
| 117 |
|
| 118 |
} |
| 119 |
|
| 120 |
class LinkTo_Obj extends UnsupportedStructAndPtr { |
| 121 |
|
| 122 |
} |
| 123 |
|
| 124 |
@Override |
| 125 |
public Object addVirtualBytes(int virtualBytes) { |
| 126 |
if (virtualBytes == 0) { |
| 127 |
return this; |
| 128 |
} |
| 129 |
if (virtualBytes < 0) { |
| 130 |
final OFFSET offset = OFFSET.fromInt(-virtualBytes); |
| 131 |
if (offset.toString().equals("h.ST_Agsubnode_s::id_link")) { |
| 132 |
return ((ST_Agsubnode_s) parent).from_id_link(ST_dtlink_s.this); |
| 133 |
} |
| 134 |
if (offset.toString().equals("h.ST_Agsubnode_s::seq_link")) { |
| 135 |
return ((ST_Agsubnode_s) parent).from_seq_link(ST_dtlink_s.this); |
| 136 |
} |
| 137 |
if (offset.toString().equals("h.ST_Agsym_s::link")) { |
| 138 |
return ((ST_Agsym_s) parent).from_link(ST_dtlink_s.this); |
| 139 |
} |
| 140 |
if (offset.toString().equals("h.ST_Agedge_s::seq_link")) { |
| 141 |
return ((ST_Agedge_s) parent).from_seq_link(ST_dtlink_s.this); |
| 142 |
} |
| 143 |
if (offset.toString().equals("h.ST_Agedge_s::id_link")) { |
| 144 |
return ((ST_Agedge_s) parent).from_id_link(ST_dtlink_s.this); |
| 145 |
} |
| 146 |
if (offset.toString().equals("h.ST_Agraph_s::link")) { |
| 147 |
return ((ST_Agraph_s) parent).from_link(ST_dtlink_s.this); |
| 148 |
} |
| 149 |
System.err.println("virtualBytes=" + virtualBytes); |
| 150 |
System.err.println("offset=" + offset); |
| 151 |
return super.addVirtualBytes(virtualBytes); |
| 152 |
} |
| 153 |
final OFFSET offset = OFFSET.fromInt(virtualBytes); |
| 154 |
if (offset.toString().equals("h.ST_refstr_t::s") && parent instanceof ST_refstr_t) { |
| 155 |
return ((ST_refstr_t) parent).to_s(ST_dtlink_s.this); |
| 156 |
|
| 157 |
} |
| 158 |
System.err.println("virtualBytes=" + virtualBytes); |
| 159 |
System.err.println("offset=" + offset); |
| 160 |
return super.addVirtualBytes(virtualBytes); |
| 161 |
} |
| 162 |
|
| 163 |
|
| 164 |
|
| 165 |
|
| 166 |
|
| 167 |
|
| 168 |
|
| 169 |
|
| 170 |
|
| 171 |
|
| 172 |
|
| 173 |
|
| 174 |
|
| 175 |
|
| 176 |
|
| 177 |
|
| 178 |
|
| 179 |
|
| 180 |
|
| 181 |
|
| 182 |
|
| 183 |
|
| 184 |
|
| 185 |
|
| 186 |
|
| 187 |
|
| 188 |
|
| 189 |
|
| 190 |
|
| 191 |
|
| 192 |
|
| 193 |
|
| 194 |
|
| 195 |
|
| 196 |
|
| 197 |
|
| 198 |
|
| 199 |
} |
| 200 |
|
| 201 |
|
| 202 |
|
| 203 |
|
| 204 |
|
| 205 |
|
| 206 |
|
| 207 |
|