Debian Codegraph @

src/h/ST_dt_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.CFunction;
49 import smetana.core.HardcodedStruct;
50 import smetana.core.UnsupportedStructAndPtr;
51 import smetana.core.__ptr__;
52 import smetana.core.amiga.StarStruct;
53
54 public class ST_dt_s extends UnsupportedStructAndPtr implements HardcodedStruct {
55
56 public CFunction searchf;/* search function */
57
58 public ST_dtdisc_s disc; /* method to manipulate objs */
59 public ST_dtdata_s data; /* sharable data */
60 public CFunction memoryf;/* function to alloc/free memory */
61 public ST_dtmethod_s meth; /* dictionary method */
62
63 public int type; /* type information */
64 public int nview; /* number of parent view dictionaries */
65 public ST_dt_s view; /* next on viewpath */
66 public ST_dt_s walk; /* dictionary being walked */
67 public __ptr__ user; /* for user's usage */
68
69 public ST_dt_s() {
70 this(null);
71 }
72
73 public ST_dt_s(StarStruct parent) {
74 }
75
76 @Override
77 public __ptr__ setPtr(String fieldName, __ptr__ newData) {
78 if (fieldName.equals("searchf")) {
79 this.searchf = (CFunction) newData;
80 return searchf;
81 }
82 if (fieldName.equals("meth")) {
83 this.meth = (ST_dtmethod_s) newData;
84 return meth;
85 }
86 if (fieldName.equals("disc")) {
87 this.disc = (ST_dtdisc_s) newData;
88 return disc;
89 }
90 if (fieldName.equals("memoryf")) {
91 this.memoryf = (CFunction) newData;
92 return memoryf;
93 }
94 if (fieldName.equals("view")) {
95 this.view = (ST_dt_s) newData;
96 return view;
97 }
98 if (fieldName.equals("walk")) {
99 this.walk = (ST_dt_s) newData;
100 return walk;
101 }
102 if (fieldName.equals("user")) {
103 this.user = newData;
104 return user;
105 }
106 if (fieldName.equals("data")) {
107 this.data = (ST_dtdata_s) newData;
108 return data;
109 }
110 return super.setPtr(fieldName, newData);
111 }
112
113 @Override
114 public void setInt(String fieldName, int data) {
115 if (fieldName.equals("type")) {
116 this.type = data;
117 return;
118 }
119 if (fieldName.equals("nview")) {
120 this.nview = data;
121 return;
122 }
123 super.setInt(fieldName, data);
124 }
125
126 @Override
127 public boolean isSameThan(StarStruct other) {
128 ST_dt_s other2 = (ST_dt_s) other;
129 return this == other2;
130 }
131
132 // public static List<String> DEFINITION = Arrays.asList(
133 // "struct _dt_s",
134 // "{",
135 // "Dtsearch_f searchf",
136 // "Dtdisc_t* disc",
137 // "Dtdata_t* data",
138 // "Dtmemory_f memoryf",
139 // "Dtmethod_t* meth",
140 // "int type",
141 // "int nview",
142 // "Dt_t* view",
143 // "Dt_t* walk",
144 // "void* user",
145 // "}");
146 }
147
148 // struct _dt_s
149 // { Dtsearch_f searchf;/* search function */
150 // Dtdisc_t* disc; /* method to manipulate objs */
151 // Dtdata_t* data; /* sharable data */
152 // Dtmemory_f memoryf;/* function to alloc/free memory */
153 // Dtmethod_t* meth; /* dictionary method */
154 // int type; /* type information */
155 // int nview; /* number of parent view dictionaries */
156 // Dt_t* view; /* next on viewpath */
157 // Dt_t* walk; /* dictionary being walked */
158 // void* user; /* for user's usage */
159 // };