gen.lib.cgraph.utils__c Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of plantuml-gplv2 Show documentation
Show all versions of plantuml-gplv2 Show documentation
PlantUML is a component that allows to quickly write diagrams from text.
// 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 GNU General Public License V2.
*
* THE ACCOMPANYING PROGRAM IS PROVIDED UNDER THE TERMS OF THIS ECLIPSE PUBLIC
* LICENSE ("AGREEMENT"). [GNU General Public License V2]
*
* ANY USE, REPRODUCTION OR DISTRIBUTION OF THE PROGRAM CONSTITUTES
* RECIPIENT'S ACCEPTANCE OF THIS AGREEMENT.
*
* You may obtain a copy of the License at
*
* https://www.gnu.org/licenses/old-licenses/gpl-2.0.html
*
* 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 GPL v2 license.
*
* The generated images can then be used without any reference to the GPL v2 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.cdt.dtdisc__c.dtdisc;
import static gen.lib.cdt.dtopen__c.dtopen;
import static smetana.core.Macro.UNSUPPORTED;
import static smetana.core.Macro.dtdelete;
import static smetana.core.debug.SmetanaDebug.ENTERING;
import static smetana.core.debug.SmetanaDebug.LEAVING;
import gen.annotation.Original;
import gen.annotation.Reviewed;
import gen.annotation.Unused;
import h.ST_Agraph_s;
import h.ST_dt_s;
import h.ST_dtdisc_s;
import h.ST_dtmethod_s;
import smetana.core.CFunction;
import smetana.core.CFunctionAbstract;
import smetana.core.Globals;
import smetana.core.__ptr__;
import smetana.core.size_t;
public class utils__c {
public static CFunction agdictobjmem = new CFunctionAbstract("agdictobjmem") {
public Object exe(Globals zz, Object... args) {
return agdictobjmem((ST_dt_s)args[0], args[1], (size_t)args[2], (ST_dtdisc_s)args[3]);
}};
@Reviewed(when = "11/11/2020")
@Original(version="2.38.0", path="lib/cgraph/utils.c", name="agdictobjmem", key="7dkudp41c9byhicatk2sxtxqk", definition="void *agdictobjmem(Dict_t * dict, void * p, size_t size, Dtdisc_t * disc)")
public static Object agdictobjmem(ST_dt_s dict, Object p, size_t size, ST_dtdisc_s disc) {
ENTERING("7dkudp41c9byhicatk2sxtxqk","agdictobjmem");
try {
return size.malloc();
// ST_Agraph_s g;
// g = Z.z().Ag_dictop_G;
// if (g!=null) {
// if (p!=null)
// agfree(g, p);
// else
// return agalloc(g, size);
// } else {
// if (p!=null)
// Memory.free(p);
// else
// return size.malloc();
// }
// return null;
} finally {
LEAVING("7dkudp41c9byhicatk2sxtxqk","agdictobjmem");
}
}
public static CFunction agdictobjfree = new CFunctionAbstract("agdictobjfree") {
public Object exe(Globals zz, Object... args) {
return agdictobjfree(args);
}};
@Unused
@Original(version="2.38.0", path="lib/cgraph/utils.c", name="agdictobjfree", key="5xdfwxth4q1dm3180qzuf51sn", definition="void agdictobjfree(Dict_t * dict, void * p, Dtdisc_t * disc)")
public static Object agdictobjfree(Object... arg_) {
UNSUPPORTED("bsemnw6m2qx5a4hk13xep80nh"); // void agdictobjfree(Dict_t * dict, void * p, Dtdisc_t * disc)
UNSUPPORTED("erg9i1970wdri39osu8hx2a6e"); // {
UNSUPPORTED("1dbyk58q3r4fyfxxo7ovemkpu"); // Agraph_t *g;
UNSUPPORTED("nzl57bfl5onx7q9ge19n2k9i"); // (void) dict;
UNSUPPORTED("8l8wg6vltx6d7vc9dzqb6n3wi"); // (void) disc;
UNSUPPORTED("ah8bddgh4pyntvi4o9xx91fkm"); // g = Ag_dictop_G;
UNSUPPORTED("5skdegxoz3mwfvm59pbtvqtiq"); // if (g)
UNSUPPORTED("akbizhd9c9w4syt1qpirn7xjy"); // agfree(g, p);
UNSUPPORTED("div10atae09n36x269sl208r1"); // else
UNSUPPORTED("cy5x5dma0v4hiepir7lrfuo17"); // free(p);
UNSUPPORTED("c24nfmv9i7o5eoqaymbibp7m7"); // }
throw new UnsupportedOperationException();
}
@Original(version="2.38.0", path="lib/cgraph/utils.c", name="agdtopen", key="48ox0bg1qmasrer8np51uwsyk", definition="Dict_t *agdtopen(Agraph_t * g, Dtdisc_t * disc, Dtmethod_t * method)")
public static ST_dt_s agdtopen(Globals zz, ST_Agraph_s g, ST_dtdisc_s disc, ST_dtmethod_s method) {
ENTERING("48ox0bg1qmasrer8np51uwsyk","agdtopen");
try {
CFunction memf;
ST_dt_s d;
memf = disc.memoryf;
disc.memoryf = utils__c.agdictobjmem;
zz.Ag_dictop_G = g;
d = dtopen(zz, disc, method);
disc.memoryf = (CFunction) memf;
zz.Ag_dictop_G = null;
return d;
} finally {
LEAVING("48ox0bg1qmasrer8np51uwsyk","agdtopen");
}
}
@Unused
@Original(version="2.38.0", path="lib/cgraph/utils.c", name="agdtdelete", key="6pbz2fsmebq8iy7if4way3ct2", definition="long agdtdelete(Agraph_t * g, Dict_t * dict, void *obj)")
public static __ptr__ agdtdelete(Globals zz, ST_Agraph_s g, ST_dt_s dict, __ptr__ obj) {
ENTERING("6pbz2fsmebq8iy7if4way3ct2","agdtdelete");
try {
zz.Ag_dictop_G = g;
return (__ptr__) dtdelete(zz, dict, obj);
} finally {
LEAVING("6pbz2fsmebq8iy7if4way3ct2","agdtdelete");
}
}
@Original(version="2.38.0", path="lib/cgraph/utils.c", name="agdtdisc", key="cym72wvu6zffc0vzoa93zha8", definition="void agdtdisc(Agraph_t * g, Dict_t * dict, Dtdisc_t * disc)")
public static void agdtdisc(Globals zz, ST_Agraph_s g, ST_dt_s dict, ST_dtdisc_s disc) {
ENTERING("cym72wvu6zffc0vzoa93zha8","agdtdisc");
try {
if (disc!=null && (dtdisc(zz, dict, null, 0) != disc)) {
dtdisc(zz, dict, disc, 0);
}
/* else unchanged, disc is same as old disc */
} finally {
LEAVING("cym72wvu6zffc0vzoa93zha8","agdtdisc");
}
}
}