Debian Codegraph @

src/h/ST_port.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.CString;
49 import smetana.core.HardcodedStruct;
50 import smetana.core.UnsupportedStructAndPtr;
51 import smetana.core.__ptr__;
52 import smetana.core.__struct__;
53 import smetana.core.amiga.Area;
54 import smetana.core.amiga.StarStruct;
55
56 public class ST_port extends UnsupportedStructAndPtr implements HardcodedStruct {
57
58 public final ST_pointf p = new ST_pointf(this);
59 public double theta;
60 public ST_boxf bp;
61 public int defined;
62 public int constrained;
63 public int clip;
64 public int dyna;
65 public int order;
66 public int side;
67 public CString name;
68
69 public ST_port(StarStruct parent) {
70 }
71
72 public ST_port() {
73 }
74
75 @Override
76 public void ___(__struct__ other) {
77 ST_port other2 = (ST_port) other;
78 this.p.___(other2.p);
79 this.theta = other2.theta;
80 this.bp = other2.bp;
81 this.defined = other2.defined;
82 this.constrained = other2.constrained;
83 this.clip = other2.clip;
84 this.dyna = other2.dyna;
85 this.order = other2.order;
86 this.side = other2.side;
87 this.name = other2.name;
88 }
89
90 @Override
91 public void copyDataFrom(__struct__ other) {
92 ST_port other2 = (ST_port) other;
93 this.p.___(other2.p);
94 this.theta = other2.theta;
95 this.bp = other2.bp;
96 this.defined = other2.defined;
97 this.constrained = other2.constrained;
98 this.clip = other2.clip;
99 this.dyna = other2.dyna;
100 this.order = other2.order;
101 this.side = other2.side;
102 this.name = other2.name;
103 }
104
105 @Override
106 public void memcopyFrom(Area other) {
107 ST_port other2 = (ST_port) other;
108 this.p.___(other2.p);
109 this.theta = other2.theta;
110 this.bp = other2.bp;
111 this.defined = other2.defined;
112 this.constrained = other2.constrained;
113 this.clip = other2.clip;
114 this.dyna = other2.dyna;
115 this.order = other2.order;
116 this.side = other2.side;
117 this.name = other2.name;
118 }
119
120 @Override
121 public ST_port copy() {
122 final ST_port result = new ST_port();
123 result.p.___(this.p);
124 result.theta = this.theta;
125 result.bp = this.bp;
126 result.defined = this.defined;
127 result.constrained = this.constrained;
128 result.clip = this.clip;
129 result.dyna = this.dyna;
130 result.order = this.order;
131 result.side = this.side;
132 result.name = this.name;
133 return result;
134 }
135
136 @Override
137 public void setStruct(String fieldName, __struct__ newData) {
138 if (fieldName.equals("p")) {
139 p.copyDataFrom(newData);
140 return;
141 }
142 super.setStruct(fieldName, newData);
143 }
144
145 @Override
146 public void setInt(String fieldName, int data) {
147 if (fieldName.equals("constrained")) {
148 constrained = data;
149 return;
150 }
151 super.setInt(fieldName, data);
152 }
153
154
155 @Override
156 public void setDouble(String fieldName, double data) {
157 if (fieldName.equals("theta")) {
158 this.theta = data;
159 return;
160 }
161 super.setDouble(fieldName, data);
162 }
163
164 // "typedef struct port",
165 // "{",
166 // "pointf p",
167 // "double theta",
168 // "boxf *bp",
169 // "boolean defined",
170 // "boolean constrained",
171 // "boolean clip",
172 // "boolean dyna",
173 // "unsigned char order",
174 // "unsigned char side",
175 // "char *name",
176 // "}",
177 // "port");
178 }
179
180 // typedef struct port { /* internal edge endpoint specification */
181 // pointf p; /* aiming point relative to node center */
182 // double theta; /* slope in radians */
183 // boxf *bp; /* if not null, points to bbox of
184 // * rectangular area that is port target
185 // */
186 // boolean defined; /* if true, edge has port info at this end */
187 // boolean constrained; /* if true, constraints such as theta are set */
188 // boolean clip; /* if true, clip end to node/port shape */
189 // boolean dyna; /* if true, assign compass point dynamically */
190 // unsigned char order; /* for mincross */
191 // unsigned char side; /* if port is on perimeter of node, this
192 // * contains the bitwise OR of the sides (TOP,
193 // * BOTTOM, etc.) it is on.
194 // */
195 // char *name; /* port name, if it was explicitly given, otherwise NULL */
196 // } port;