| 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 gen.lib.cgraph; |
| 47 |
import static gen.lib.cgraph.graph__c.agopen1; |
| 48 |
import static gen.lib.cgraph.id__c.agmapnametoid; |
| 49 |
import static gen.lib.cgraph.id__c.agregister; |
| 50 |
import static gen.lib.cgraph.mem__c.agalloc; |
| 51 |
import static gen.lib.cgraph.utils__c.agdtdisc; |
| 52 |
import static smetana.core.JUtils.sizeof; |
| 53 |
import static smetana.core.JUtilsDebug.ENTERING; |
| 54 |
import static smetana.core.JUtilsDebug.LEAVING; |
| 55 |
import static smetana.core.Macro.AGID; |
| 56 |
import static smetana.core.Macro.AGRAPH; |
| 57 |
import static smetana.core.Macro.N; |
| 58 |
import static smetana.core.Macro.UNSUPPORTED; |
| 59 |
import h.ST_Agdesc_s; |
| 60 |
import h.ST_Agraph_s; |
| 61 |
import h.ST_dt_s; |
| 62 |
import smetana.core.CString; |
| 63 |
import smetana.core.Z; |
| 64 |
import smetana.core.__ptr__; |
| 65 |
|
| 66 |
public class subg__c { |
| 67 |
|
| 68 |
|
| 69 |
|
| 70 |
|
| 71 |
|
| 72 |
|
| 73 |
|
| 74 |
|
| 75 |
|
| 76 |
|
| 77 |
|
| 78 |
|
| 79 |
|
| 80 |
|
| 81 |
|
| 82 |
|
| 83 |
|
| 84 |
|
| 85 |
|
| 86 |
|
| 87 |
|
| 88 |
|
| 89 |
|
| 90 |
|
| 91 |
|
| 92 |
|
| 93 |
|
| 94 |
|
| 95 |
|
| 96 |
|
| 97 |
|
| 98 |
|
| 99 |
|
| 100 |
|
| 101 |
|
| 102 |
|
| 103 |
|
| 104 |
|
| 105 |
|
| 106 |
|
| 107 |
|
| 108 |
|
| 109 |
|
| 110 |
|
| 111 |
|
| 112 |
|
| 113 |
|
| 114 |
|
| 115 |
|
| 116 |
|
| 117 |
|
| 118 |
|
| 119 |
|
| 120 |
|
| 121 |
|
| 122 |
|
| 123 |
|
| 124 |
|
| 125 |
|
| 126 |
|
| 127 |
|
| 128 |
|
| 129 |
|
| 130 |
|
| 131 |
|
| 132 |
|
| 133 |
|
| 134 |
|
| 135 |
|
| 136 |
|
| 137 |
|
| 138 |
|
| 139 |
|
| 140 |
|
| 141 |
|
| 142 |
|
| 143 |
|
| 144 |
|
| 145 |
|
| 146 |
|
| 147 |
|
| 148 |
|
| 149 |
|
| 150 |
|
| 151 |
|
| 152 |
|
| 153 |
|
| 154 |
|
| 155 |
|
| 156 |
|
| 157 |
|
| 158 |
|
| 159 |
|
| 160 |
|
| 161 |
|
| 162 |
|
| 163 |
|
| 164 |
|
| 165 |
|
| 166 |
|
| 167 |
|
| 168 |
|
| 169 |
|
| 170 |
|
| 171 |
|
| 172 |
|
| 173 |
|
| 174 |
|
| 175 |
|
| 176 |
|
| 177 |
|
| 178 |
|
| 179 |
|
| 180 |
|
| 181 |
|
| 182 |
|
| 183 |
|
| 184 |
|
| 185 |
|
| 186 |
|
| 187 |
|
| 188 |
|
| 189 |
|
| 190 |
|
| 191 |
|
| 192 |
|
| 193 |
|
| 194 |
|
| 195 |
|
| 196 |
|
| 197 |
|
| 198 |
|
| 199 |
|
| 200 |
|
| 201 |
|
| 202 |
|
| 203 |
public static ST_Agraph_s agfindsubg_by_id(ST_Agraph_s g, int id) { |
| 204 |
ENTERING("11ezyrsjsotjz9b3cyvb4ie8p","agfindsubg_by_id"); |
| 205 |
try { |
| 206 |
final ST_Agraph_s template = new ST_Agraph_s(); |
| 207 |
agdtdisc(g, (ST_dt_s) g.g_dict, Z.z().Ag_subgraph_id_disc); |
| 208 |
AGID(template, id); |
| 209 |
return (ST_Agraph_s) g.g_dict.searchf.exe(g.g_dict, template, 0000004); |
| 210 |
} finally { |
| 211 |
LEAVING("11ezyrsjsotjz9b3cyvb4ie8p","agfindsubg_by_id"); |
| 212 |
} |
| 213 |
} |
| 214 |
|
| 215 |
|
| 216 |
|
| 217 |
|
| 218 |
|
| 219 |
|
| 220 |
public static ST_Agraph_s localsubg(ST_Agraph_s g, int id) { |
| 221 |
ENTERING("44saycxbfbr9lou0itlyewkb4","localsubg"); |
| 222 |
try { |
| 223 |
ST_Agraph_s subg; |
| 224 |
subg = agfindsubg_by_id(g, id); |
| 225 |
if (subg!=null) |
| 226 |
return subg; |
| 227 |
subg = (ST_Agraph_s) agalloc(g, sizeof(ST_Agraph_s.class)); |
| 228 |
subg.setPtr("clos", g.clos); |
| 229 |
subg.setStruct("desc", g.desc); |
| 230 |
((ST_Agdesc_s)subg.desc).maingraph = 0; |
| 231 |
subg.setPtr("parent", g); |
| 232 |
subg.setPtr("root", g.root); |
| 233 |
AGID(subg, id); |
| 234 |
return agopen1(subg); |
| 235 |
} finally { |
| 236 |
LEAVING("44saycxbfbr9lou0itlyewkb4","localsubg"); |
| 237 |
} |
| 238 |
} |
| 239 |
|
| 240 |
|
| 241 |
|
| 242 |
|
| 243 |
|
| 244 |
|
| 245 |
public static Object agidsubg(Object... arg) { |
| 246 |
UNSUPPORTED("9vhen1flll6k35g72uuroky0z"); |
| 247 |
UNSUPPORTED("erg9i1970wdri39osu8hx2a6e"); |
| 248 |
UNSUPPORTED("c3tourf5k7groqyh71yjd5xec"); |
| 249 |
UNSUPPORTED("elpselocwvpfk3o27nejqo6dl"); |
| 250 |
UNSUPPORTED("cf9t4fxh9z5rmv58441ne0ysa"); |
| 251 |
UNSUPPORTED("ecrqdk8b7debftn6d8bbmh0s4"); |
| 252 |
UNSUPPORTED("17jmp11l2jzc1v9qpaqkzkauj"); |
| 253 |
UNSUPPORTED("c24nfmv9i7o5eoqaymbibp7m7"); |
| 254 |
|
| 255 |
throw new UnsupportedOperationException(); |
| 256 |
} |
| 257 |
|
| 258 |
|
| 259 |
|
| 260 |
|
| 261 |
|
| 262 |
|
| 263 |
public static ST_Agraph_s agsubg(ST_Agraph_s g, CString name, boolean cflag) { |
| 264 |
ENTERING("a24jd4r2sdyb4lb2hyababrda","agsubg"); |
| 265 |
try { |
| 266 |
int id[] = new int[]{0}; |
| 267 |
ST_Agraph_s subg; |
| 268 |
if (name!=null && agmapnametoid(g, AGRAPH, name, id, false)!=0) { |
| 269 |
|
| 270 |
if ((subg = agfindsubg_by_id(g, id[0]))!=null) |
| 271 |
return subg; |
| 272 |
} |
| 273 |
if (cflag && agmapnametoid(g, AGRAPH, name, id, (N(false)))!=0) { |
| 274 |
subg = localsubg(g, id[0]); |
| 275 |
agregister(g, AGRAPH, subg); |
| 276 |
return subg; |
| 277 |
} |
| 278 |
return null; |
| 279 |
} finally { |
| 280 |
LEAVING("a24jd4r2sdyb4lb2hyababrda","agsubg"); |
| 281 |
} |
| 282 |
} |
| 283 |
|
| 284 |
|
| 285 |
|
| 286 |
|
| 287 |
|
| 288 |
|
| 289 |
public static ST_Agraph_s agfstsubg(ST_Agraph_s g) { |
| 290 |
ENTERING("51eksrs0lhkgohunejlpwyc4k","agfstsubg"); |
| 291 |
try { |
| 292 |
__ptr__ tmp = (__ptr__)g.g_dict.searchf.exe(g.g_dict,null,0000200); |
| 293 |
if (tmp!=null) tmp = tmp.castTo(ST_Agraph_s.class); |
| 294 |
return (ST_Agraph_s) tmp; |
| 295 |
} finally { |
| 296 |
LEAVING("51eksrs0lhkgohunejlpwyc4k","agfstsubg"); |
| 297 |
} |
| 298 |
} |
| 299 |
|
| 300 |
|
| 301 |
|
| 302 |
|
| 303 |
|
| 304 |
|
| 305 |
public static ST_Agraph_s agnxtsubg(ST_Agraph_s subg) { |
| 306 |
ENTERING("85c1qisrein0tzm2regoe61t","agnxtsubg"); |
| 307 |
try { |
| 308 |
ST_Agraph_s g; |
| 309 |
g = agparent(subg); |
| 310 |
if (g==null) return null; |
| 311 |
__ptr__ tmp = (__ptr__) g.g_dict.searchf.exe(g.g_dict, subg, 0000010); |
| 312 |
if (tmp==null) return null; |
| 313 |
return (ST_Agraph_s) tmp.getPtr(); |
| 314 |
} finally { |
| 315 |
LEAVING("85c1qisrein0tzm2regoe61t","agnxtsubg"); |
| 316 |
} |
| 317 |
} |
| 318 |
|
| 319 |
|
| 320 |
|
| 321 |
|
| 322 |
|
| 323 |
|
| 324 |
public static ST_Agraph_s agparent(ST_Agraph_s g) { |
| 325 |
ENTERING("7kbp6j03hd7u6nnlivi0vt3ja","agparent"); |
| 326 |
try { |
| 327 |
return (ST_Agraph_s) g.parent; |
| 328 |
} finally { |
| 329 |
LEAVING("7kbp6j03hd7u6nnlivi0vt3ja","agparent"); |
| 330 |
} |
| 331 |
} |
| 332 |
|
| 333 |
|
| 334 |
|
| 335 |
|
| 336 |
|
| 337 |
|
| 338 |
public static Object agdelsubg(Object... arg) { |
| 339 |
UNSUPPORTED("bjcimcpi0qag1hc37no67mct5"); |
| 340 |
UNSUPPORTED("erg9i1970wdri39osu8hx2a6e"); |
| 341 |
UNSUPPORTED("dugmh24ptzgxuj3204p7n39m4"); |
| 342 |
UNSUPPORTED("c24nfmv9i7o5eoqaymbibp7m7"); |
| 343 |
|
| 344 |
throw new UnsupportedOperationException(); |
| 345 |
} |
| 346 |
|
| 347 |
|
| 348 |
} |