|
Graphviz 16.1.1~dev.20261101.1716
|
merge and pack disjoint graphs More...
#include "config.h"#include "openFile.h"#include <algorithm>#include <cassert>#include <cgraph/cgraph.h>#include <cgraph/ingraphs.h>#include <common/render.h>#include <common/utils.h>#include <cstdio>#include <getopt.h>#include <gvc/gvc.h>#include <iostream>#include <limits>#include <map>#include <neatogen/neatoprocs.h>#include <optional>#include <pack/pack.h>#include <set>#include <stddef.h>#include <string>#include <util/alloc.h>#include <util/exit.h>#include <util/gv_ctype.h>#include <utility>#include <vector>Go to the source code of this file.
Data Structures | |
| struct | attr_t |
Macros | |
| #define | NEWNODE(n) ((node_t *)ND_alg(n)) |
| #define | MARK(e) (ED_alg(e) = e) |
| #define | MARKED(e) (ED_alg(e)) |
| #define | SETCLUST(g, h) (GD_alg(g) = h) |
| #define | GETCLUST(g) ((Agraph_t *)GD_alg(g)) |
Typedefs | |
| using | attr_map_t = std::map< std::string, AttributeValue > |
| attribute name → value collection of those we have seen | |
| using | used_t = std::multiset< std::string > |
| names that have already been used during generation | |
Functions | |
| static int | handle_error (char *message) |
| static void | usage (int v) |
| static int | setNameValue (char *arg) |
| static int | setUInt (unsigned int *v, char *arg) |
| static Agsym_t * | agraphattr (Agraph_t *g, char *name, const char *value) |
| static Agsym_t * | agnodeattr (Agraph_t *g, char *name, const char *value) |
| static Agsym_t * | agedgeattr (Agraph_t *g, char *name, const char *value) |
| static void | init (int argc, char *argv[], pack_info *pinfo) |
| static void | init_node_edge (Agraph_t *g) |
| initialize node and edge attributes | |
| static void | init_graph (Agraph_t *g, bool fill, GVC_t *gvc) |
| static void | cloneDfltAttrs (Agraph_t *old, Agraph_t *new_graph, int attr_kind) |
| static void | cloneAttrs (void *old, void *new_graph) |
| static void | cloneEdge (Agedge_t *old, Agedge_t *new_edge) |
| static void | cloneNode (Agnode_t *old, Agnode_t *new_node) |
| static void | cloneCluster (Agraph_t *old, Agraph_t *new_cluster) |
| static void | fillDict (attr_map_t &newdict, Agraph_t *g, int attr_kind) |
| static void | fillGraph (Agraph_t *g, const attr_map_t &d, Agsym_t *(*setf)(Agraph_t *, char *, const char *), size_t cnt) |
| static void | initAttrs (Agraph_t *root, std::vector< Agraph_t * > &gs) |
| static void | cloneGraphAttr (Agraph_t *g, Agraph_t *ng) |
| static std::string | xName (used_t &names, char *oldname) |
| static void | cloneSubg (Agraph_t *g, Agraph_t *ng, Agsym_t *G_bb, used_t &gnames) |
| static void | cloneClusterTree (Agraph_t *g, Agraph_t *ng) |
| static Agraph_t * | cloneGraph (std::vector< Agraph_t * > &gs, GVC_t *gvc, Agdesc_t kind) |
| static std::vector< Agraph_t * > | readGraphs (GVC_t *gvc, std::optional< Agdesc_t > &kind) |
| static boxf | compBB (std::vector< Agraph_t * > &gs) |
| int | main (int argc, char *argv[]) |
Variables | |
| gvplugin_library_t | gvplugin_neato_layout_LTX_library |
| lt_symlist_t | lt_preloaded_symbols [] |
| static int | verbose = 0 |
| static char ** | myFiles = 0 |
| static FILE * | outfp |
| static std::vector< attr_t > | G_args |
| static bool | doPack |
| static char * | gname = const_cast<char *>("root") |
| static bool | errored |
| have we seen an error from libcgraph? | |
| static const char | useString [] |
Definition at line 469 of file gvpack.cpp.
| #define MARK | ( | e | ) | (ED_alg(e) = e) |
Definition at line 466 of file gvpack.cpp.
| #define MARKED | ( | e | ) | (ED_alg(e)) |
Definition at line 467 of file gvpack.cpp.
Definition at line 106 of file gvpack.cpp.
| #define SETCLUST | ( | g, | |
| h | |||
| ) | (GD_alg(g) = h) |
Definition at line 468 of file gvpack.cpp.
| using attr_map_t = std::map<std::string, AttributeValue> |
Definition at line 384 of file gvpack.cpp.
| using used_t = std::multiset<std::string> |
Definition at line 449 of file gvpack.cpp.
Definition at line 166 of file gvpack.cpp.
References agattr_text(), and AGEDGE.
Referenced by initAttrs().
Definition at line 162 of file gvpack.cpp.
References agattr_text(), and AGNODE.
Definition at line 158 of file gvpack.cpp.
References agattr_text(), and AGRAPH.
|
static |
Definition at line 320 of file gvpack.cpp.
References aghtmlstr(), agnxtattr(), agroot(), agset(), agstrdup_html(), agstrfree(), AGTYPE, and agxget().
Referenced by cloneEdge(), cloneGraphAttr(), and cloneNode().
Definition at line 369 of file gvpack.cpp.
References GD_bb, and GD_label.
Referenced by cloneClusterTree().
Definition at line 528 of file gvpack.cpp.
References cloneCluster(), cloneClusterTree(), GD_clust, GD_n_cluster, GETCLUST, and gv_calloc().
Referenced by cloneClusterTree(), and cloneGraph().
Definition at line 310 of file gvpack.cpp.
References agattr_html(), agattr_text(), aghtmlstr(), and agnxtattr().
Referenced by cloneGraphAttr().
Definition at line 345 of file gvpack.cpp.
References cloneAttrs(), ED_edge_type, ED_head_label, ED_label, ED_spl, ED_tail_label, and ED_xlabel.
Referenced by cloneSubg().
Definition at line 548 of file gvpack.cpp.
References agattr_text(), agbindrec(), AgDefaultDisc, agfindgraphattr, agfindnode, agfstnode(), agnameof(), agnode(), agnxtnode(), agopen(), AGRAPH, agsubg(), agxset(), cloneClusterTree(), cloneNode(), cloneSubg(), doPack, G_args, GD_clust, GD_has_labels, GD_n_cluster, GETCLUST, gname, gv_calloc(), gvc, GVSPLINES, init_graph(), initAttrs(), ND_alg, State, verbose, and xName().
Referenced by main(), and mTestgvpr().
Definition at line 442 of file gvpack.cpp.
References AGEDGE, AGNODE, cloneAttrs(), and cloneDfltAttrs().
Referenced by cloneSubg().
Definition at line 355 of file gvpack.cpp.
References cloneAttrs(), ND_coord, ND_height, ND_ht, ND_lw, ND_pos, ND_rw, ND_shape, ND_shape_info, ND_width, ND_xlabel, and POINTS.
Referenced by cloneGraph().
Definition at line 474 of file gvpack.cpp.
References agbindrec(), agedge(), agfstnode(), agfstout(), agfstsubg(), aghead, agnameof(), agnxtnode(), agnxtout(), agnxtsubg(), agsubg(), agsubnode(), agtail, agxset(), cloneEdge(), cloneGraphAttr(), cloneSubg(), doPack, is_a_cluster(), MARK, MARKED, NEWNODE, SETCLUST, and xName().
Referenced by cloneGraph(), and cloneSubg().
Definition at line 669 of file gvpack.cpp.
References GD_bb, boxf::LL, boxf::UR, pointf_s::x, and pointf_s::y.
Referenced by main().
|
static |
Definition at line 390 of file gvpack.cpp.
References agnxtattr().
Referenced by initAttrs().
|
static |
Definition at line 409 of file gvpack.cpp.
References cnt().
Referenced by initAttrs().
|
static |
print an error message and note that we saw it
This function replicates ../../lib/cgraph/agerror.c:default_usererrf but also sets our flag to observe it has been called.
Definition at line 83 of file gvpack.cpp.
References errored, gv_iscntrl(), and gv_isspace().
Referenced by main().
|
static |
Definition at line 170 of file gvpack.cpp.
References agnodeattr, CL_OFFSET, pack_info::doSplines, pack_info::fixed, gname, l_clust, l_undef, pack_info::margin, pack_info::mode, myFiles, NODENAME_ESC, openFile(), outfp, parsePackModeInfo(), setNameValue(), setUInt(), pack_info::sz, usage, Verbose, and verbose.
Referenced by main().
Definition at line 266 of file gvpack.cpp.
References AGEDGE, agfindgraphattr, agfstnode(), agfstout(), aginit(), agnameof(), AGNODE, agnxtnode(), agnxtout(), AGRAPH, Concentrate, ED_edge_type, ED_spl, errored, GD_gvc, GD_ndim, graph_init(), graphviz_exit(), gvc, IGNORED, init_node_edge(), init_nop(), late_int(), and Ndim.
Referenced by cloneGraph(), and readGraphs().
|
static |
Definition at line 245 of file gvpack.cpp.
References agfindnodeattr, agfstnode(), agfstout(), agnnodes(), agnxtnode(), agnxtout(), common_init_edge(), N_pos, neato_init_node(), and user_pos().
Referenced by init_graph().
Definition at line 426 of file gvpack.cpp.
References AGEDGE, agedgeattr(), AGNODE, agnodeattr, AGRAPH, agraphattr, fillDict(), and fillGraph().
Referenced by cloneGraph().
| int main | ( | int | argc, |
| char * | argv[] | ||
| ) |
Definition at line 685 of file gvpack.cpp.
References lt_symlist_t::address, agseterrf(), agwrite(), attach_attrs(), cloneGraph(), compBB(), doPack, dotneato_postprocess(), GD_bb, graphviz_exit(), gvc, gvContextPlugins(), gvplugin_neato_layout_LTX_library, handle_error(), init(), l_undef, lt_preloaded_symbols, pack_info::mode, outfp, packGraphs(), and readGraphs().
|
static |
Definition at line 635 of file gvpack.cpp.
References agisstrict(), agnameof(), agnnodes(), Agraph_s::desc, Agdesc_s::directed, doPack, graphviz_exit(), gvc, init_graph(), myFiles, newIngraph(), nextGraph(), Nop, POINTS_PER_INCH, PSinputscale, and verbose.
Referenced by main().
|
static |
Definition at line 130 of file gvpack.cpp.
References G_args.
Referenced by init().
|
static |
Definition at line 145 of file gvpack.cpp.
Referenced by init().
|
static |
Definition at line 122 of file gvpack.cpp.
References graphviz_exit(), and useString.
|
static |
Definition at line 457 of file gvpack.cpp.
Referenced by cloneGraph(), and cloneSubg().
|
static |
Definition at line 75 of file gvpack.cpp.
Referenced by cloneGraph(), cloneSubg(), main(), and readGraphs().
|
static |
Definition at line 77 of file gvpack.cpp.
Referenced by handle_error(), and init_graph().
|
static |
Definition at line 74 of file gvpack.cpp.
Referenced by cloneGraph(), and setNameValue().
|
static |
Definition at line 76 of file gvpack.cpp.
Referenced by cloneGraph(), and init().
|
extern |
Definition at line 29 of file gvplugin_neato_layout.c.
Referenced by main().
| lt_symlist_t lt_preloaded_symbols[] |
Definition at line 54 of file gvpack.cpp.
Referenced by main().
|
static |
Definition at line 72 of file gvpack.cpp.
Referenced by init(), and readGraphs().
|
static |
Definition at line 73 of file gvpack.cpp.
|
static |
Definition at line 108 of file gvpack.cpp.
Referenced by usage().
|
static |
Definition at line 71 of file gvpack.cpp.
Referenced by cloneGraph(), init(), and readGraphs().