|
Graphviz 14.1.2~dev.20260118.1035
|
merge and pack disjoint graphs More...
#include "config.h"#include <getopt.h>#include <algorithm>#include <cassert>#include <gvc/gvc.h>#include <cgraph/ingraphs.h>#include <common/render.h>#include <common/utils.h>#include <neatogen/neatoprocs.h>#include <iostream>#include <limits>#include <map>#include <optional>#include <pack/pack.h>#include <set>#include <stddef.h>#include <string>#include <utility>#include <util/alloc.h>#include <util/exit.h>#include <vector>#include "openFile.h"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 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) |
| 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 const char | useString [] |
Definition at line 452 of file gvpack.cpp.
| #define MARK | ( | e | ) | (ED_alg(e) = e) |
Definition at line 449 of file gvpack.cpp.
| #define MARKED | ( | e | ) | (ED_alg(e)) |
Definition at line 450 of file gvpack.cpp.
Definition at line 80 of file gvpack.cpp.
| #define SETCLUST | ( | g, | |
| h | |||
| ) | (GD_alg(g) = h) |
Definition at line 451 of file gvpack.cpp.
| using attr_map_t = std::map<std::string, AttributeValue> |
Definition at line 363 of file gvpack.cpp.
| using used_t = std::multiset<std::string> |
Definition at line 431 of file gvpack.cpp.
Definition at line 145 of file gvpack.cpp.
References agattr_text(), and AGEDGE.
Referenced by initAttrs().
Definition at line 141 of file gvpack.cpp.
References agattr_text(), and AGNODE.
Definition at line 137 of file gvpack.cpp.
References agattr_text(), and AGRAPH.
|
static |
Definition at line 300 of file gvpack.cpp.
References aghtmlstr(), agnxtattr(), agroot(), agset(), agstrdup_html(), agstrfree(), AGTYPE, and agxget().
Referenced by cloneEdge(), cloneGraphAttr(), and cloneNode().
Definition at line 348 of file gvpack.cpp.
References GD_bb, and GD_label.
Referenced by cloneClusterTree().
Definition at line 513 of file gvpack.cpp.
References cloneCluster(), cloneClusterTree(), GD_clust, GD_n_cluster, GETCLUST, and gv_calloc().
Referenced by cloneClusterTree(), and cloneGraph().
Definition at line 291 of file gvpack.cpp.
References agattr_html(), agattr_text(), aghtmlstr(), and agnxtattr().
Referenced by cloneGraphAttr().
Definition at line 324 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 535 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 423 of file gvpack.cpp.
References AGEDGE, AGNODE, cloneAttrs(), and cloneDfltAttrs().
Referenced by cloneSubg().
Definition at line 334 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 459 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 658 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 370 of file gvpack.cpp.
References agnxtattr().
Referenced by initAttrs().
|
static |
Definition at line 389 of file gvpack.cpp.
References cnt().
Referenced by initAttrs().
|
static |
Definition at line 149 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 250 of file gvpack.cpp.
References AGEDGE, agfindgraphattr, agfstnode(), agfstout(), aginit(), agnameof(), AGNODE, agnxtnode(), agnxtout(), AGRAPH, Concentrate, ED_edge_type, ED_spl, 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 227 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 407 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 700 of file gvpack.cpp.
References lt_symlist_t::address, agwrite(), attach_attrs(), cloneGraph(), compBB(), doPack, dotneato_postprocess(), GD_bb, graphviz_exit(), gvc, gvContextPlugins(), gvplugin_neato_layout_LTX_library, init(), l_undef, lt_preloaded_symbols, pack_info::mode, outfp, packGraphs(), and readGraphs().
|
static |
Definition at line 622 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 106 of file gvpack.cpp.
References G_args.
Referenced by init().
|
static |
Definition at line 123 of file gvpack.cpp.
Referenced by init().
|
static |
Definition at line 96 of file gvpack.cpp.
References graphviz_exit(), and useString.
|
static |
Definition at line 440 of file gvpack.cpp.
Referenced by cloneGraph(), and cloneSubg().
|
static |
Definition at line 77 of file gvpack.cpp.
Referenced by cloneGraph(), cloneSubg(), main(), and readGraphs().
|
static |
Definition at line 76 of file gvpack.cpp.
Referenced by cloneGraph(), and setNameValue().
|
static |
Definition at line 78 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 74 of file gvpack.cpp.
Referenced by init(), and readGraphs().
|
static |
Definition at line 75 of file gvpack.cpp.
|
static |
Definition at line 82 of file gvpack.cpp.
Referenced by usage().
|
static |
Definition at line 73 of file gvpack.cpp.
Referenced by cloneGraph(), init(), and readGraphs().