| 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.imap__c.aginternalmapinsert; |
| 48 |
import static gen.lib.cgraph.imap__c.aginternalmaplookup; |
| 49 |
import static gen.lib.cgraph.imap__c.aginternalmapprint; |
| 50 |
import static gen.lib.cgraph.obj__c.agraphof; |
| 51 |
import static gen.lib.cgraph.refstr__c.agstrbind; |
| 52 |
import static gen.lib.cgraph.refstr__c.agstrdup; |
| 53 |
import static smetana.core.JUtilsDebug.ENTERING; |
| 54 |
import static smetana.core.JUtilsDebug.LEAVING; |
| 55 |
import static smetana.core.Macro.AGEDGE; |
| 56 |
import static smetana.core.Macro.AGID; |
| 57 |
import static smetana.core.Macro.AGTYPE; |
| 58 |
import static smetana.core.Macro.ASINT; |
| 59 |
import static smetana.core.Macro.N; |
| 60 |
import static smetana.core.Macro.UNSUPPORTED; |
| 61 |
import h.ST_Agdisc_s; |
| 62 |
import h.ST_Agobj_s; |
| 63 |
import h.ST_Agraph_s; |
| 64 |
import smetana.core.CString; |
| 65 |
import smetana.core.Memory; |
| 66 |
import smetana.core.Z; |
| 67 |
import smetana.core.__ptr__; |
| 68 |
|
| 69 |
public class id__c { |
| 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 |
|
| 204 |
|
| 205 |
|
| 206 |
public static Object idopen(ST_Agraph_s g, ST_Agdisc_s disc) { |
| 207 |
ENTERING("a0a2zxsu8n019hzm1rwf1jc7f","idopen"); |
| 208 |
try { |
| 209 |
return g; |
| 210 |
} finally { |
| 211 |
LEAVING("a0a2zxsu8n019hzm1rwf1jc7f","idopen"); |
| 212 |
} |
| 213 |
} |
| 214 |
|
| 215 |
|
| 216 |
|
| 217 |
|
| 218 |
|
| 219 |
|
| 220 |
|
| 221 |
public static int idmap(Object state, int objtype, CString str, int id[], boolean createflag) { |
| 222 |
ENTERING("lsl0c1gejls1wv04ga6xy2cf","idmap"); |
| 223 |
try { |
| 224 |
CString s; |
| 225 |
if (str!=null) { |
| 226 |
ST_Agraph_s g; |
| 227 |
g = (ST_Agraph_s) state; |
| 228 |
if (createflag) |
| 229 |
s = agstrdup(g, str); |
| 230 |
else |
| 231 |
s = agstrbind(g, str); |
| 232 |
id[0] = Memory.identityHashCode(s); |
| 233 |
} else { |
| 234 |
id[0] = Z.z().ctr; |
| 235 |
Z.z().ctr += 2; |
| 236 |
} |
| 237 |
return ASINT(N(0)); |
| 238 |
} finally { |
| 239 |
LEAVING("lsl0c1gejls1wv04ga6xy2cf","idmap"); |
| 240 |
} |
| 241 |
} |
| 242 |
|
| 243 |
|
| 244 |
|
| 245 |
|
| 246 |
|
| 247 |
|
| 248 |
public static Object idalloc(Object... arg) { |
| 249 |
UNSUPPORTED("1z2o91qjhxg0zcs8vgzyl9bf1"); |
| 250 |
UNSUPPORTED("erg9i1970wdri39osu8hx2a6e"); |
| 251 |
UNSUPPORTED("2s0qc9g3dasd7eqa3rhtlxrae"); |
| 252 |
UNSUPPORTED("x0ltcg0hfp8jlgbjde43bdwj"); |
| 253 |
UNSUPPORTED("6xs9bwnce34njm5w424uwon6d"); |
| 254 |
UNSUPPORTED("297p5iu8oro94tdg9v29bbgiw"); |
| 255 |
UNSUPPORTED("c24nfmv9i7o5eoqaymbibp7m7"); |
| 256 |
|
| 257 |
throw new UnsupportedOperationException(); |
| 258 |
} |
| 259 |
|
| 260 |
|
| 261 |
|
| 262 |
|
| 263 |
|
| 264 |
|
| 265 |
public static Object idfree(Object... arg) { |
| 266 |
UNSUPPORTED("adq5fviqjzpkxrjt37qxo1ywh"); |
| 267 |
UNSUPPORTED("erg9i1970wdri39osu8hx2a6e"); |
| 268 |
UNSUPPORTED("x0ltcg0hfp8jlgbjde43bdwj"); |
| 269 |
UNSUPPORTED("e3dd233viwus8xrkad68a1qhr"); |
| 270 |
UNSUPPORTED("69x6bjndheh46syz632mlu192"); |
| 271 |
UNSUPPORTED("c24nfmv9i7o5eoqaymbibp7m7"); |
| 272 |
|
| 273 |
throw new UnsupportedOperationException(); |
| 274 |
} |
| 275 |
|
| 276 |
|
| 277 |
|
| 278 |
|
| 279 |
|
| 280 |
|
| 281 |
public static CString idprint(__ptr__ state, int objtype, int id) { |
| 282 |
ENTERING("8143j507ej7uqqjzw5i32xej5","idprint"); |
| 283 |
try { |
| 284 |
if (id % 2 == 0) |
| 285 |
return (CString) Memory.fromIdentityHashCode(id); |
| 286 |
else |
| 287 |
return null; |
| 288 |
} finally { |
| 289 |
LEAVING("8143j507ej7uqqjzw5i32xej5","idprint"); |
| 290 |
} |
| 291 |
} |
| 292 |
|
| 293 |
|
| 294 |
|
| 295 |
|
| 296 |
|
| 297 |
|
| 298 |
public static Object idclose(Object... arg) { |
| 299 |
UNSUPPORTED("18oh21h7t6fg06ozg64u87nyu"); |
| 300 |
UNSUPPORTED("erg9i1970wdri39osu8hx2a6e"); |
| 301 |
UNSUPPORTED("2s0qc9g3dasd7eqa3rhtlxrae"); |
| 302 |
UNSUPPORTED("c24nfmv9i7o5eoqaymbibp7m7"); |
| 303 |
|
| 304 |
throw new UnsupportedOperationException(); |
| 305 |
} |
| 306 |
|
| 307 |
|
| 308 |
|
| 309 |
|
| 310 |
|
| 311 |
|
| 312 |
public static void idregister(Object state, int objtype, Object obj) { |
| 313 |
ENTERING("5bjqo0ihl0x25vaspoiehmwzk","idregister"); |
| 314 |
try { |
| 315 |
|
| 316 |
} finally { |
| 317 |
LEAVING("5bjqo0ihl0x25vaspoiehmwzk","idregister"); |
| 318 |
} |
| 319 |
} |
| 320 |
|
| 321 |
|
| 322 |
|
| 323 |
|
| 324 |
|
| 325 |
|
| 326 |
|
| 327 |
|
| 328 |
|
| 329 |
|
| 330 |
|
| 331 |
|
| 332 |
|
| 333 |
|
| 334 |
|
| 335 |
|
| 336 |
|
| 337 |
|
| 338 |
|
| 339 |
public static int agmapnametoid(ST_Agraph_s g, int objtype, CString str, int result[], boolean createflag) { |
| 340 |
ENTERING("aq30wwcj4ugatsgx0zdtdmeed","agmapnametoid"); |
| 341 |
try { |
| 342 |
int rv; |
| 343 |
if (str!=null && (str.charAt(0) != '%')) { |
| 344 |
rv = (Integer) g.clos.disc.id.map.exe(g.clos.state.id, objtype, str, result, createflag); |
| 345 |
if (rv!=0) |
| 346 |
return rv; |
| 347 |
} |
| 348 |
|
| 349 |
if (str!=null) { |
| 350 |
rv = aginternalmaplookup(g, objtype, str, result); |
| 351 |
if (rv!=0) |
| 352 |
return rv; |
| 353 |
} else |
| 354 |
rv = 0; |
| 355 |
if (createflag) { |
| 356 |
|
| 357 |
rv = (Integer) g.clos.disc.id.map.exe(g.clos.state.id, objtype, null, result, |
| 358 |
createflag); |
| 359 |
if (rv!=0 && str!=null) |
| 360 |
aginternalmapinsert(g, objtype, str, result[0]); |
| 361 |
} |
| 362 |
return rv; |
| 363 |
} finally { |
| 364 |
LEAVING("aq30wwcj4ugatsgx0zdtdmeed","agmapnametoid"); |
| 365 |
} |
| 366 |
} |
| 367 |
|
| 368 |
|
| 369 |
|
| 370 |
|
| 371 |
|
| 372 |
|
| 373 |
public static Object agallocid(Object... arg) { |
| 374 |
UNSUPPORTED("5i7l75ugdm5j5c4xtqqk9atdd"); |
| 375 |
UNSUPPORTED("erg9i1970wdri39osu8hx2a6e"); |
| 376 |
UNSUPPORTED("dlf21dkccrftu3zc0t5amuwu4"); |
| 377 |
UNSUPPORTED("c24nfmv9i7o5eoqaymbibp7m7"); |
| 378 |
|
| 379 |
throw new UnsupportedOperationException(); |
| 380 |
} |
| 381 |
|
| 382 |
|
| 383 |
|
| 384 |
|
| 385 |
|
| 386 |
|
| 387 |
public static Object agfreeid(Object... arg) { |
| 388 |
UNSUPPORTED("4hpxv4j7rcvj3lrbvu2e0hus4"); |
| 389 |
UNSUPPORTED("erg9i1970wdri39osu8hx2a6e"); |
| 390 |
UNSUPPORTED("3s1vo79t7lt6fm1bimxdpbqj"); |
| 391 |
UNSUPPORTED("dm45ri059viqxsb08rmvo60y1"); |
| 392 |
UNSUPPORTED("c24nfmv9i7o5eoqaymbibp7m7"); |
| 393 |
|
| 394 |
throw new UnsupportedOperationException(); |
| 395 |
} |
| 396 |
|
| 397 |
|
| 398 |
|
| 399 |
|
| 400 |
|
| 401 |
|
| 402 |
|
| 403 |
public static CString agnameof(__ptr__ obj) { |
| 404 |
ENTERING("cctsybrl54fy799aynfej4iiy","agnameof"); |
| 405 |
try { |
| 406 |
ST_Agraph_s g; |
| 407 |
CString rv; |
| 408 |
|
| 409 |
g = agraphof(obj); |
| 410 |
if ((rv = aginternalmapprint(g, AGTYPE(obj), AGID(obj)))!=null) |
| 411 |
return rv; |
| 412 |
if (g.clos.disc.id.print!=null) { |
| 413 |
if ((rv = |
| 414 |
(CString) g.clos.disc.id.print.exe(g.clos.state.id, |
| 415 |
AGTYPE(obj), |
| 416 |
AGID(obj)))!=null) |
| 417 |
return rv; |
| 418 |
} |
| 419 |
if (AGTYPE(obj) != AGEDGE) { |
| 420 |
rv = new CString("%"+((ST_Agobj_s)obj.castTo(ST_Agobj_s.class)).tag.id); |
| 421 |
} |
| 422 |
else |
| 423 |
rv = null; |
| 424 |
return rv; |
| 425 |
} finally { |
| 426 |
LEAVING("cctsybrl54fy799aynfej4iiy","agnameof"); |
| 427 |
} |
| 428 |
} |
| 429 |
|
| 430 |
|
| 431 |
|
| 432 |
|
| 433 |
|
| 434 |
|
| 435 |
public static void agregister(ST_Agraph_s g, int objtype, Object obj) { |
| 436 |
ENTERING("emt63ldde99jnwe2vvjal9kt9","agregister"); |
| 437 |
try { |
| 438 |
g.clos.disc.id.idregister.exe(g.clos.state.id, objtype, obj); |
| 439 |
} finally { |
| 440 |
LEAVING("emt63ldde99jnwe2vvjal9kt9","agregister"); |
| 441 |
} |
| 442 |
} |
| 443 |
|
| 444 |
|
| 445 |
} |