Debian Codegraph @

src/h/ST_Agtag_s.java

raw symbols SCIP
1 /* ========================================================================
2 * PlantUML : a free UML diagram generator
3 * ========================================================================
4 *
5 * Project Info: http://plantuml.com
6 *
7 * If you like this project or if you find it useful, you can support us at:
8 *
9 * http://plantuml.com/patreon (only 1$ per month!)
10 * http://plantuml.com/paypal
11 *
12 * This file is part of Smetana.
13 * Smetana is a partial translation of Graphviz/Dot sources from C to Java.
14 *
15 * (C) Copyright 2009-2020, Arnaud Roques
16 *
17 * This translation is distributed under the same Licence as the original C program:
18 *
19 *************************************************************************
20 * Copyright (c) 2011 AT&T Intellectual Property
21 * All rights reserved. This program and the accompanying materials
22 * are made available under the terms of the Eclipse Public License v1.0
23 * which accompanies this distribution, and is available at
24 * http://www.eclipse.org/legal/epl-v10.html
25 *
26 * Contributors: See CVS logs. Details at http://www.graphviz.org/
27 *************************************************************************
28 *
29 * THE ACCOMPANYING PROGRAM IS PROVIDED UNDER THE TERMS OF THIS ECLIPSE PUBLIC
30 * LICENSE ("AGREEMENT"). [Eclipse Public License - v 1.0]
31 *
32 * ANY USE, REPRODUCTION OR DISTRIBUTION OF THE PROGRAM CONSTITUTES
33 * RECIPIENT'S ACCEPTANCE OF THIS AGREEMENT.
34 *
35 * You may obtain a copy of the License at
36 *
37 * http://www.eclipse.org/legal/epl-v10.html
38 *
39 * Unless required by applicable law or agreed to in writing, software
40 * distributed under the License is distributed on an "AS IS" BASIS,
41 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
42 * See the License for the specific language governing permissions and
43 * limitations under the License.
44 *
45 */
46 package h;
47
48 import smetana.core.HardcodedStruct;
49 import smetana.core.UnsupportedStarStruct;
50 import smetana.core.UnsupportedStructAndPtr;
51 import smetana.core.__struct__;
52 import smetana.core.amiga.Area;
53 import smetana.core.amiga.AreaInt;
54 import smetana.core.amiga.InternalData;
55 import smetana.core.amiga.StarStruct;
56
57 public class ST_Agtag_s extends UnsupportedStructAndPtr implements HardcodedStruct {
58 public int objtype;
59 public int mtflock;
60 public int attrwf;
61 public int seq;
62 public int id;
63
64 public ST_Agtag_s(StarStruct parent) {
65 }
66
67 public ST_Agtag_s() {
68 this(null);
69 }
70
71 @Override
72 public Class getRealClass() {
73 return ST_Agtag_s.class;
74 }
75
76 @Override
77 public __struct__ copy() {
78 final ST_Agtag_s result = new ST_Agtag_s();
79 result.objtype = objtype;
80 result.mtflock = mtflock;
81 result.attrwf = attrwf;
82 result.seq = seq;
83 result.id = id;
84 return result;
85 }
86
87 @Override
88 public void copyDataFrom(__struct__ other) {
89 // if (other instanceof ST_Agtag_s) {
90 final ST_Agtag_s other2 = (ST_Agtag_s) other;
91 objtype = other2.objtype;
92 mtflock = other2.mtflock;
93 attrwf = other2.attrwf;
94 seq = other2.seq;
95 id = other2.id;
96 // } else {
97 // objtype = other.getInt("objtype");
98 // mtflock = other.getInt("mtflock");
99 // attrwf = other.getInt("attrwf");
100 // seq = other.getInt("seq");
101 // id = other.getInt("id");
102 // }
103 }
104
105 @Override
106 public void memcopyFrom(Area source) {
107 final ST_Agtag_s other2 = (ST_Agtag_s) source;
108 objtype = other2.objtype;
109 mtflock = other2.mtflock;
110 attrwf = other2.attrwf;
111 seq = other2.seq;
112 id = other2.id;
113 }
114
115 @Override
116 public void ___(__struct__ other) {
117 copyDataFrom(other);
118 }
119
120 @Override
121 public Area getArea(String name) {
122 final AreaInt result = new AreaInt();
123 if (name.equals("objtype")) {
124 result.setInternal(objtype);
125 return result;
126 }
127 if (name.equals("mtflock")) {
128 result.setInternal(mtflock);
129 return result;
130 }
131 if (name.equals("attrwf")) {
132 result.setInternal(attrwf);
133 return result;
134 }
135 if (name.equals("seq")) {
136 result.setInternal(seq);
137 return result;
138 }
139 if (name.equals("id")) {
140 result.setInternal(id);
141 return result;
142 }
143 return super.getArea(name);
144 }
145
146 public class MyInternalData extends UnsupportedStarStruct implements InternalData {
147
148 @Override
149 public Area getArea(String name) {
150 final AreaInt result = new AreaInt();
151 if (name.equals("objtype")) {
152 result.setInternal(objtype);
153 return result;
154 }
155 if (name.equals("mtflock")) {
156 result.setInternal(mtflock);
157 return result;
158 }
159 if (name.equals("attrwf")) {
160 result.setInternal(attrwf);
161 return result;
162 }
163 if (name.equals("seq")) {
164 result.setInternal(seq);
165 return result;
166 }
167 if (name.equals("id")) {
168 result.setInternal(id);
169 return result;
170 }
171 return super.getArea(name);
172 }
173
174 }
175
176 @Override
177 public StarStruct getInternalData() {
178 return new MyInternalData();
179 }
180
181 // public static List<String> DEFINITION = Arrays.asList(
182 // "struct Agtag_s",
183 // "{",
184 // "unsigned objtype:2",
185 // "unsigned mtflock:1",
186 // "unsigned attrwf:1",
187 // "unsigned seq:(sizeof(unsigned) * 8 - 4)",
188 // "unsigned long id",
189 // "}");
190 }
191
192 // struct Agtag_s {
193 // unsigned objtype:2; /* see literal tags below */
194 // unsigned mtflock:1; /* move-to-front lock, see above */
195 // unsigned attrwf:1; /* attrs written (parity, write.c) */
196 // unsigned seq:(sizeof(unsigned) * 8 - 4); /* sequence no. */
197 // unsigned long id; /* client ID */
198 // };