gen.lib.cgraph.apply__c Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of plantuml-asl Show documentation
Show all versions of plantuml-asl Show documentation
PlantUML is a component that allows to quickly write diagrams from text.
The newest version!
// THIS FILE HAS BEEN GENERATED BY A PREPROCESSOR.
/* +=======================================================================
* |
* | PlantUML : a free UML diagram generator
* |
* +=======================================================================
*
* (C) Copyright 2009-2024, Arnaud Roques
*
* Project Info: https://plantuml.com
*
* If you like this project or if you find it useful, you can support us at:
*
* https://plantuml.com/patreon (only 1$ per month!)
* https://plantuml.com/liberapay (only 1€ per month!)
* https://plantuml.com/paypal
*
*
* PlantUML is free software; you can redistribute it and/or modify it
* under the terms of the Apache Software License.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*
* PlantUML can occasionally display sponsored or advertising messages. Those
* messages are usually generated on welcome or error images and never on
* functional diagrams.
* See https://plantuml.com/professional if you want to remove them
*
* Images (whatever their format : PNG, SVG, EPS...) generated by running PlantUML
* are owned by the author of their corresponding sources code (that is, their
* textual description in PlantUML language). Those images are not covered by
* this APACHE license.
*
* The generated images can then be used without any reference to the APACHE license.
* It is not even necessary to stipulate that they have been generated with PlantUML,
* although this will be appreciated by the PlantUML team.
*
* There is an exception : if the textual description in PlantUML language is also covered
* by any license, then the generated images are logically covered
* by the very same license.
*
* This is the IGY distribution (Install GraphViz by Yourself).
* You have to install GraphViz and to setup the GRAPHVIZ_DOT environment variable
* (see https://plantuml.com/graphviz-dot )
*
* Icons provided by OpenIconic : https://useiconic.com/open
* Archimate sprites provided by Archi : http://www.archimatetool.com
* Stdlib AWS provided by https://github.com/milo-minderbinder/AWS-PlantUML
* Stdlib Icons provided https://github.com/tupadr3/plantuml-icon-font-sprites
* ASCIIMathML (c) Peter Jipsen http://www.chapman.edu/~jipsen
* ASCIIMathML (c) David Lippman http://www.pierce.ctc.edu/dlippman
* CafeUndZopfli ported by Eugene Klyuchnikov https://github.com/eustas/CafeUndZopfli
* Brotli (c) by the Brotli Authors https://github.com/google/brotli
* Themes (c) by Brett Schwarz https://github.com/bschwarz/puml-themes
* Twemoji (c) by Twitter at https://twemoji.twitter.com/
*
*/
package gen.lib.cgraph;
import static gen.lib.cgraph.subg__c.agfstsubg;
import static gen.lib.cgraph.subg__c.agnxtsubg;
import static smetana.core.Macro.AGINEDGE;
import static smetana.core.Macro.AGNODE;
import static smetana.core.Macro.AGOUTEDGE;
import static smetana.core.Macro.AGRAPH;
import static smetana.core.Macro.UNSUPPORTED;
import static smetana.core.debug.SmetanaDebug.ENTERING;
import static smetana.core.debug.SmetanaDebug.LEAVING;
import gen.annotation.Original;
import gen.annotation.Unused;
import h.ST_Agobj_s;
import h.ST_Agraph_s;
import smetana.core.CFunction;
import smetana.core.CFunctionAbstract;
import smetana.core.Globals;
import smetana.core.__ptr__;
public class apply__c {
public static CFunction subgraph_search = new CFunctionAbstract("subgraph_search") {
public Object exe(Globals zz, Object... args) {
return subgraph_search((ST_Agraph_s)args[0], (ST_Agobj_s)args[1]);
}};
@Unused
@Original(version="2.38.0", path="lib/cgraph/apply.c", name="", key="95y4aknoddh42lieikrb72vxw", definition="static Agobj_t *subgraph_search(Agraph_t * sub, Agobj_t * g)")
public static ST_Agobj_s subgraph_search(ST_Agraph_s sub, ST_Agobj_s g) {
ENTERING("95y4aknoddh42lieikrb72vxw","subgraph_search");
try {
return (ST_Agobj_s) sub.base;
} finally {
LEAVING("95y4aknoddh42lieikrb72vxw","subgraph_search");
}
}
//3 8s9l15wqucf1glmbeb6fmya8e
// static void rec_apply(Agraph_t * g, Agobj_t * obj, agobjfn_t fn, void *arg, agobjsearchfn_t objsearch, int preorder)
@Unused
@Original(version="2.38.0", path="lib/cgraph/apply.c", name="rec_apply", key="8s9l15wqucf1glmbeb6fmya8e", definition="static void rec_apply(Agraph_t * g, Agobj_t * obj, agobjfn_t fn, void *arg, agobjsearchfn_t objsearch, int preorder)")
public static void rec_apply(Globals zz, ST_Agraph_s g, ST_Agobj_s obj, CFunction fn, __ptr__ arg, CFunction objsearch, boolean preorder) {
ENTERING("8s9l15wqucf1glmbeb6fmya8e","rec_apply");
try {
ST_Agraph_s sub;
ST_Agobj_s subobj;
if (preorder)
fn.exe(zz, g, obj, arg);
for (sub = agfstsubg(zz, g); sub!=null; sub = agnxtsubg(zz, sub)) {
if ((subobj = (ST_Agobj_s) objsearch.exe(zz, sub, obj))!=null)
rec_apply(zz, sub, subobj, fn, arg, objsearch, preorder);
}
if (!preorder)
fn.exe(zz, g, obj, arg);
} finally {
LEAVING("8s9l15wqucf1glmbeb6fmya8e","rec_apply");
}
}
//3 9hqql178zpl8iudlf6sgnv7aj
// int agapply(Agraph_t * g, Agobj_t * obj, agobjfn_t fn, void *arg, int preorder)
@Unused
@Original(version="2.38.0", path="lib/cgraph/apply.c", name="agapply", key="9hqql178zpl8iudlf6sgnv7aj", definition="int agapply(Agraph_t * g, Agobj_t * obj, agobjfn_t fn, void *arg, int preorder)")
public static int agapply(Globals zz, ST_Agraph_s g, ST_Agobj_s obj, CFunction fn, __ptr__ arg, boolean preorder) {
ENTERING("9hqql178zpl8iudlf6sgnv7aj","agapply");
try {
ST_Agobj_s subobj;
CFunction objsearch=null;
switch (obj.tag.objtype) {
case AGRAPH:
objsearch = apply__c.subgraph_search;
break;
case AGNODE:
UNSUPPORTED("arkoj4niyfqe213zut6szzeji"); // objsearch = subnode_search;
break;
case AGOUTEDGE:
case AGINEDGE:
UNSUPPORTED("3h8kzrrsobdp839772gupdrbf"); // objsearch = subedge_search;
break;
default:
UNSUPPORTED("2pc67byzirrkhe1cmdoguh6i1"); // agerr(AGERR, "agapply: unknown object type %d\n", AGTYPE(obj));
UNSUPPORTED("8d9xfgejx5vgd6shva5wk5k06"); // return -1;
break;
}
if ((subobj = (ST_Agobj_s) objsearch.exe(zz, g, obj))!=null) {
rec_apply(zz, g, subobj, fn, arg, objsearch, preorder);
return 0;
} else
UNSUPPORTED("8d9xfgejx5vgd6shva5wk5k06"); // return -1;
UNSUPPORTED("c24nfmv9i7o5eoqaymbibp7m7"); // }
throw new UnsupportedOperationException();
} finally {
LEAVING("9hqql178zpl8iudlf6sgnv7aj","agapply");
}
}
}