| 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.HardcodedStruct; |
| 49 |
import smetana.core.OFFSET; |
| 50 |
import smetana.core.UnsupportedStructAndPtr; |
| 51 |
import smetana.core.__ptr__; |
| 52 |
import smetana.core.amiga.StarStruct; |
| 53 |
|
| 54 |
public class ST_Agsubnode_s extends UnsupportedStructAndPtr implements HardcodedStruct { |
| 55 |
|
| 56 |
public final ST_dtlink_s seq_link = new ST_dtlink_s(this); |
| 57 |
public final ST_dtlink_s id_link = new ST_dtlink_s(this); |
| 58 |
public ST_Agnode_s node; |
| 59 |
public ST_dtlink_s in_id; |
| 60 |
public ST_dtlink_s out_id; |
| 61 |
public ST_dtlink_s in_seq; |
| 62 |
public ST_dtlink_s out_seq; |
| 63 |
|
| 64 |
public ST_Agsubnode_s() { |
| 65 |
this(null); |
| 66 |
} |
| 67 |
|
| 68 |
public ST_Agsubnode_s(StarStruct parent) { |
| 69 |
} |
| 70 |
|
| 71 |
public ST_Agsubnode_s from_id_link(ST_dtlink_s from) { |
| 72 |
if (from == id_link) { |
| 73 |
return this; |
| 74 |
} |
| 75 |
throw new IllegalArgumentException(); |
| 76 |
} |
| 77 |
|
| 78 |
public ST_Agsubnode_s from_seq_link(ST_dtlink_s from) { |
| 79 |
if (from == seq_link) { |
| 80 |
return this; |
| 81 |
} |
| 82 |
throw new IllegalArgumentException(); |
| 83 |
} |
| 84 |
|
| 85 |
@Override |
| 86 |
public boolean isSameThan(StarStruct other) { |
| 87 |
return this == (ST_Agsubnode_s) other; |
| 88 |
} |
| 89 |
|
| 90 |
@Override |
| 91 |
public Object addVirtualBytes(int virtualBytes) { |
| 92 |
if (virtualBytes == 0) { |
| 93 |
return this; |
| 94 |
} |
| 95 |
final OFFSET offset = OFFSET.fromInt(virtualBytes); |
| 96 |
if (offset.toString().equals("h.ST_Agsubnode_s::id_link")) { |
| 97 |
return id_link; |
| 98 |
} |
| 99 |
if (offset.toString().equals("h.ST_Agsubnode_s::seq_link")) { |
| 100 |
return seq_link; |
| 101 |
} |
| 102 |
System.err.println("virtualBytes=" + virtualBytes); |
| 103 |
System.err.println("offset=" + offset); |
| 104 |
return super.addVirtualBytes(virtualBytes); |
| 105 |
} |
| 106 |
|
| 107 |
@Override |
| 108 |
public __ptr__ castTo(Class dest) { |
| 109 |
if (dest == ST_Agsubnode_s.class) { |
| 110 |
return ST_Agsubnode_s.this; |
| 111 |
} |
| 112 |
System.err.println("dest=" + dest); |
| 113 |
return super.castTo(dest); |
| 114 |
} |
| 115 |
|
| 116 |
@Override |
| 117 |
public __ptr__ setPtr(String fieldName, __ptr__ newData) { |
| 118 |
if (fieldName.equals("node")) { |
| 119 |
this.node = (ST_Agnode_s) newData; |
| 120 |
return node; |
| 121 |
} |
| 122 |
if (fieldName.equals("in_id")) { |
| 123 |
this.in_id = (h.ST_dtlink_s) newData; |
| 124 |
return in_id; |
| 125 |
} |
| 126 |
if (fieldName.equals("out_seq")) { |
| 127 |
this.out_seq = (h.ST_dtlink_s) newData; |
| 128 |
return out_seq; |
| 129 |
} |
| 130 |
if (fieldName.equals("out_id")) { |
| 131 |
this.out_id = (h.ST_dtlink_s) newData; |
| 132 |
return out_id; |
| 133 |
} |
| 134 |
if (fieldName.equals("seq_link")) { |
| 135 |
this.seq_link.copyDataFrom(newData); |
| 136 |
return seq_link; |
| 137 |
} |
| 138 |
if (fieldName.equals("in_seq")) { |
| 139 |
this.in_seq = (h.ST_dtlink_s) newData; |
| 140 |
return in_seq; |
| 141 |
} |
| 142 |
return super.setPtr(fieldName, newData); |
| 143 |
} |
| 144 |
|
| 145 |
|
| 146 |
|
| 147 |
|
| 148 |
|
| 149 |
|
| 150 |
|
| 151 |
|
| 152 |
|
| 153 |
|
| 154 |
|
| 155 |
|
| 156 |
} |
| 157 |
|
| 158 |
|
| 159 |
|
| 160 |
|
| 161 |
|
| 162 |
|
| 163 |
|
| 164 |
|