Debian Codegraph @

src/h/ST_SplitQ_t.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.UnsupportedArrayOfStruct;
49 import smetana.core.UnsupportedStructAndPtr;
50 import smetana.core.__struct__;
51 import smetana.core.amiga.StarStruct;
52
53 public class ST_SplitQ_t extends UnsupportedStructAndPtr {
54
55 private final StarStruct parent;
56
57 // typedef struct split_q_s {
58 // struct Branch BranchBuf[64 + 1];
59 // Sorry guys :-)
60 public final ST_Branch_t BranchBuf[] = new ST_Branch_t[] { new ST_Branch_t(), new ST_Branch_t(), new ST_Branch_t(),
61 new ST_Branch_t(), new ST_Branch_t(), new ST_Branch_t(), new ST_Branch_t(), new ST_Branch_t(),
62 new ST_Branch_t(), new ST_Branch_t(), new ST_Branch_t(), new ST_Branch_t(), new ST_Branch_t(),
63 new ST_Branch_t(), new ST_Branch_t(), new ST_Branch_t(), new ST_Branch_t(), new ST_Branch_t(),
64 new ST_Branch_t(), new ST_Branch_t(), new ST_Branch_t(), new ST_Branch_t(), new ST_Branch_t(),
65 new ST_Branch_t(), new ST_Branch_t(), new ST_Branch_t(), new ST_Branch_t(), new ST_Branch_t(),
66 new ST_Branch_t(), new ST_Branch_t(), new ST_Branch_t(), new ST_Branch_t(), new ST_Branch_t(),
67 new ST_Branch_t(), new ST_Branch_t(), new ST_Branch_t(), new ST_Branch_t(), new ST_Branch_t(),
68 new ST_Branch_t(), new ST_Branch_t(), new ST_Branch_t(), new ST_Branch_t(), new ST_Branch_t(),
69 new ST_Branch_t(), new ST_Branch_t(), new ST_Branch_t(), new ST_Branch_t(), new ST_Branch_t(),
70 new ST_Branch_t(), new ST_Branch_t(), new ST_Branch_t(), new ST_Branch_t(), new ST_Branch_t(),
71 new ST_Branch_t(), new ST_Branch_t(), new ST_Branch_t(), new ST_Branch_t(), new ST_Branch_t(),
72 new ST_Branch_t(), new ST_Branch_t(), new ST_Branch_t(), new ST_Branch_t(), new ST_Branch_t(),
73 new ST_Branch_t(), new ST_Branch_t() };
74
75 public final ST_Rect_t CoverSplit = new ST_Rect_t(this);
76 public int CoverSplitArea;
77
78 public final ST_PartitionVars Partitions[] = new ST_PartitionVars[] { new ST_PartitionVars() };
79
80 // struct PartitionVars Partitions[1];
81 // } SplitQ_t;
82
83 public ST_SplitQ_t() {
84 this(null);
85 }
86
87 @Override
88 public ST_Rect_t castTo(Class dest) {
89 if (dest == ST_Rect_t.class) {
90 return CoverSplit;
91 }
92 throw new UnsupportedOperationException();
93 }
94
95 public ST_SplitQ_t(StarStruct parent) {
96 this.parent = parent;
97 }
98
99 class ArrayOfSixtyFive extends UnsupportedArrayOfStruct {
100
101 final private int pos;
102
103 public ArrayOfSixtyFive(int pos) {
104 this.pos = pos;
105 }
106
107 public ArrayOfSixtyFive plus(int delta) {
108 return new ArrayOfSixtyFive(pos + delta);
109 }
110
111 @Override
112 public __struct__ getStruct() {
113 return BranchBuf[pos];
114 }
115
116 @Override
117 public void setStruct(__struct__ value) {
118 BranchBuf[pos].copyDataFrom(value);
119 }
120
121 }
122
123 class ArrayOfOne extends UnsupportedArrayOfStruct {
124
125 final private int pos;
126
127 public ArrayOfOne(int pos) {
128 this.pos = pos;
129 }
130
131 public ArrayOfOne plus(int delta) {
132 return new ArrayOfOne(pos + delta);
133 }
134
135 @Override
136 public __struct__ getStruct() {
137 return Partitions[pos];
138 }
139
140 @Override
141 public void setStruct(__struct__ value) {
142 Partitions[pos].copyDataFrom(value);
143 }
144
145 }
146
147 @Override
148 public void setInt(String fieldName, int data) {
149 if (fieldName.equals("CoverSplitArea")) {
150 this.CoverSplitArea = data;
151 return;
152 }
153 super.setInt(fieldName, data);
154 }
155
156 @Override
157 public void setStruct(String fieldName, __struct__ newData) {
158 if (fieldName.equals("CoverSplit")) {
159 this.CoverSplit.copyDataFrom(newData);
160 return;
161 }
162 super.setStruct(fieldName, newData);
163 }
164
165 // typedef struct split_q_s {
166 // struct Branch BranchBuf[64 + 1];
167 // struct Rect CoverSplit;
168 // unsigned int CoverSplitArea;
169 // struct PartitionVars Partitions[1];
170 // } SplitQ_t;
171 }