Graphviz 12.0.1~dev.20240715.2254
|
merge and pack disjoint graphs More...
#include "config.h"
#include <getopt.h>
#include <algorithm>
#include <assert.h>
#include <gvc/gvc.h>
#include <cgraph/alloc.h>
#include <cgraph/exit.h>
#include <cgraph/ingraphs.h>
#include <cgraph/startswith.h>
#include <common/render.h>
#include <common/utils.h>
#include <neatogen/neatoprocs.h>
#include <iostream>
#include <limits>
#include <map>
#include <pack/pack.h>
#include <set>
#include <stddef.h>
#include <string>
#include <utility>
#include <vector>
#include "openFile.h"
Go to the source code of this file.
Data Structures | |
struct | attr_t |
struct | pair_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 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 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) |
static std::vector< Agraph_t * > | readGraphs (GVC_t *gvc) |
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 Agdesc_t | kind |
static std::vector< attr_t > | G_args |
static bool | doPack |
static char * | gname = const_cast<char*>("root") |
static const char | useString [] |
Definition at line 470 of file gvpack.cpp.
#define MARK | ( | e | ) | (ED_alg(e) = e) |
Definition at line 467 of file gvpack.cpp.
#define MARKED | ( | e | ) | (ED_alg(e)) |
Definition at line 468 of file gvpack.cpp.
Definition at line 93 of file gvpack.cpp.
#define SETCLUST | ( | g, | |
h | |||
) | (GD_alg(g) = h) |
Definition at line 469 of file gvpack.cpp.
using attr_map_t = std::map<std::string, AttributeValue> |
Definition at line 381 of file gvpack.cpp.
using used_t = std::multiset<std::string> |
Definition at line 449 of file gvpack.cpp.
Definition at line 158 of file gvpack.cpp.
References agattr(), and AGEDGE.
Definition at line 154 of file gvpack.cpp.
References agattr(), and AGNODE.
Definition at line 150 of file gvpack.cpp.
References agattr(), and AGRAPH.
|
static |
Definition at line 317 of file gvpack.cpp.
References aghtmlstr(), agnxtattr(), agroot(), agset(), agstrdup_html(), agstrfree(), AGTYPE, agxget(), kind, and Agsym_s::name.
Referenced by cloneEdge(), cloneGraphAttr(), and cloneNode().
Definition at line 366 of file gvpack.cpp.
References GD_bb, and GD_label.
Referenced by cloneClusterTree().
Definition at line 532 of file gvpack.cpp.
References cloneCluster(), cloneClusterTree(), GD_clust, GD_n_cluster, GETCLUST, and gv_calloc().
Referenced by cloneClusterTree(), and cloneGraph().
Definition at line 304 of file gvpack.cpp.
References agattr(), aghtmlstr(), agnxtattr(), agstrdup_html(), agstrfree(), Agsym_s::defval, kind, and Agsym_s::name.
Referenced by cloneGraphAttr().
Definition at line 342 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 553 of file gvpack.cpp.
References agattr(), 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(), kind, ND_alg, State, verbose, and xName().
Referenced by main(), and mTestgvpr().
Definition at line 441 of file gvpack.cpp.
References AGEDGE, AGNODE, cloneAttrs(), and cloneDfltAttrs().
Referenced by cloneSubg().
Definition at line 352 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 477 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 676 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 388 of file gvpack.cpp.
References agnxtattr(), and kind.
Referenced by initAttrs().
|
static |
Definition at line 407 of file gvpack.cpp.
References cnt().
Referenced by initAttrs().
|
static |
Definition at line 162 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 263 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 240 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 425 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 718 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().
Definition at line 639 of file gvpack.cpp.
References agisstrict(), agnameof(), agnnodes(), Agraph_s::desc, Agdesc_s::directed, doPack, graphviz_exit(), gvc, init_graph(), kind, myFiles, newIngraph(), nextGraph(), Nop, POINTS_PER_INCH, PSinputscale, and verbose.
Referenced by main().
|
static |
Definition at line 119 of file gvpack.cpp.
References G_args.
Referenced by init().
|
static |
Definition at line 136 of file gvpack.cpp.
Referenced by init().
|
static |
Definition at line 109 of file gvpack.cpp.
References graphviz_exit(), and useString.
|
static |
Definition at line 458 of file gvpack.cpp.
Referenced by cloneGraph(), and cloneSubg().
|
static |
Definition at line 90 of file gvpack.cpp.
Referenced by cloneGraph(), cloneSubg(), main(), and readGraphs().
|
static |
Definition at line 89 of file gvpack.cpp.
Referenced by cloneGraph(), and setNameValue().
|
static |
Definition at line 91 of file gvpack.cpp.
Referenced by cloneGraph(), and init().
|
extern |
Definition at line 29 of file gvplugin_neato_layout.c.
Referenced by main().
|
static |
Definition at line 88 of file gvpack.cpp.
Referenced by agattr(), agclean(), agcopydict(), agdictof(), aginit(), agnewsym(), agnxtattr(), attrstmt(), attrstmt(), bindattrs(), bindattrs(), cloneAttrs(), cloneDfltAttrs(), cloneGraph(), cloneO(), collapse_rankset(), compile(), copy(), dotnew(), fillDict(), getattr(), getDfltAttr(), getval(), global_def(), gvPluginList(), kindToStr(), LoadPlugins(), make_label(), mkAttr(), mkLabel(), nxtAttr(), parseCase(), readGraphs(), setattr(), setCell(), setDfltAttr(), svg_print_id_class(), toKind(), write_hdr(), and writeHdr().
lt_symlist_t lt_preloaded_symbols[] |
Definition at line 54 of file gvpack.cpp.
Referenced by main().
|
static |
Definition at line 86 of file gvpack.cpp.
Referenced by init(), and readGraphs().
|
static |
Definition at line 87 of file gvpack.cpp.
|
static |
Definition at line 95 of file gvpack.cpp.
Referenced by usage().
|
static |
Definition at line 85 of file gvpack.cpp.
Referenced by cloneGraph(), init(), and readGraphs().