Graphviz  2.41.20171026.1811
Data Structures | Macros | Functions
gv.cpp File Reference
#include <string.h>
#include <stdlib.h>
#include "gvc.h"
Include dependency graph for gv.cpp:

Go to the source code of this file.

Data Structures

struct  BA
 

Macros

#define agfindattr(x, s)   agattrsym(x,s)
 
#define agraphattr(g, n, s)   agattr(g,AGRAPH,n,s)
 
#define agnodeattr(g, n, s)   agattr(g,AGNODE,n,s)
 
#define agedgeattr(g, n, s)   agattr(g,AGEDGE,n,s)
 

Functions

void gv_string_writer_init (GVC_t *gvc)
 
void gv_channel_writer_init (GVC_t *gvc)
 
void gv_writer_reset (GVC_t *gvc)
 
Agraph_tgraph (char *name)
 
Agraph_tdigraph (char *name)
 
Agraph_tstrictgraph (char *name)
 
Agraph_tstrictdigraph (char *name)
 
Agraph_treadstring (char *string)
 
Agraph_tread (FILE *f)
 
Agraph_tread (const char *filename)
 
Agraph_tgraph (Agraph_t *g, char *name)
 
Agnode_tnode (Agraph_t *g, char *name)
 
Agedge_tedge (Agraph_t *g, Agnode_t *t, Agnode_t *h)
 
Agedge_tedge (Agnode_t *t, Agnode_t *h)
 
Agedge_tedge (char *tname, Agnode_t *h)
 
Agedge_tedge (Agnode_t *t, char *hname)
 
Agedge_tedge (Agraph_t *g, char *tname, char *hname)
 
char * getv (Agraph_t *g, Agsym_t *a)
 
char * getv (Agraph_t *g, char *attr)
 
char * setv (Agraph_t *g, Agsym_t *a, char *val)
 
char * setv (Agraph_t *g, char *attr, char *val)
 
char * getv (Agnode_t *n, Agsym_t *a)
 
char * getv (Agnode_t *n, char *attr)
 
char * setv (Agnode_t *n, Agsym_t *a, char *val)
 
char * setv (Agnode_t *n, char *attr, char *val)
 
char * getv (Agedge_t *e, Agsym_t *a)
 
char * getv (Agedge_t *e, char *attr)
 
char * setv (Agedge_t *e, Agsym_t *a, char *val)
 
char * setv (Agedge_t *e, char *attr, char *val)
 
Agraph_tfindsubg (Agraph_t *g, char *name)
 
Agnode_tfindnode (Agraph_t *g, char *name)
 
Agedge_tfindedge (Agnode_t *t, Agnode_t *h)
 
Agsym_tfindattr (Agraph_t *g, char *name)
 
Agsym_tfindattr (Agnode_t *n, char *name)
 
Agsym_tfindattr (Agedge_t *e, char *name)
 
Agnode_theadof (Agedge_t *e)
 
Agnode_ttailof (Agedge_t *e)
 
Agraph_tgraphof (Agraph_t *g)
 
Agraph_tgraphof (Agedge_t *e)
 
Agraph_tgraphof (Agnode_t *n)
 
Agraph_trootof (Agraph_t *g)
 
Agnode_tprotonode (Agraph_t *g)
 
Agedge_tprotoedge (Agraph_t *g)
 
char * nameof (Agraph_t *g)
 
char * nameof (Agnode_t *n)
 
char * nameof (Agsym_t *a)
 
bool ok (Agraph_t *g)
 
bool ok (Agnode_t *n)
 
bool ok (Agedge_t *e)
 
bool ok (Agsym_t *a)
 
Agraph_tfirstsubg (Agraph_t *g)
 
Agraph_tnextsubg (Agraph_t *g, Agraph_t *sg)
 
Agraph_tfirstsupg (Agraph_t *g)
 
Agraph_tnextsupg (Agraph_t *g, Agraph_t *sg)
 
Agedge_tfirstout (Agraph_t *g)
 
Agedge_tnextout (Agraph_t *g, Agedge_t *e)
 
Agedge_tfirstedge (Agraph_t *g)
 
Agedge_tnextedge (Agraph_t *g, Agedge_t *e)
 
Agedge_tfirstout (Agnode_t *n)
 
Agedge_tnextout (Agnode_t *n, Agedge_t *e)
 
Agnode_tfirsthead (Agnode_t *n)
 
Agnode_tnexthead (Agnode_t *n, Agnode_t *h)
 
Agedge_tfirstedge (Agnode_t *n)
 
Agedge_tnextedge (Agnode_t *n, Agedge_t *e)
 
Agedge_tfirstin (Agraph_t *g)
 
Agedge_tnextin (Agraph_t *g, Agedge_t *e)
 
Agedge_tfirstin (Agnode_t *n)
 
Agedge_tnextin (Agnode_t *n, Agedge_t *e)
 
Agnode_tfirsttail (Agnode_t *n)
 
Agnode_tnexttail (Agnode_t *n, Agnode_t *t)
 
Agnode_tfirstnode (Agraph_t *g)
 
Agnode_tnextnode (Agraph_t *g, Agnode_t *n)
 
Agnode_tfirstnode (Agedge_t *e)
 
Agnode_tnextnode (Agedge_t *e, Agnode_t *n)
 
Agsym_tfirstattr (Agraph_t *g)
 
Agsym_tnextattr (Agraph_t *g, Agsym_t *a)
 
Agsym_tfirstattr (Agnode_t *n)
 
Agsym_tnextattr (Agnode_t *n, Agsym_t *a)
 
Agsym_tfirstattr (Agedge_t *e)
 
Agsym_tnextattr (Agedge_t *e, Agsym_t *a)
 
bool rm (Agraph_t *g)
 
bool rm (Agnode_t *n)
 
bool rm (Agedge_t *e)
 
bool layout (Agraph_t *g, const char *engine)
 
bool render (Agraph_t *g)
 
bool render (Agraph_t *g, const char *format)
 
bool render (Agraph_t *g, const char *format, FILE *f)
 
bool renderchannel (Agraph_t *g, const char *format, const char *channelname)
 
bool render (Agraph_t *g, const char *format, const char *filename)
 
char * renderresult (Agraph_t *g, const char *format)
 
void renderresult (Agraph_t *g, const char *format, char *outdata)
 
char * renderdata (Agraph_t *g, const char *format)
 
bool write (Agraph_t *g, FILE *f)
 
bool write (Agraph_t *g, const char *filename)
 
bool tred (Agraph_t *g)
 

Macro Definition Documentation

#define agedgeattr (   g,
  n,
  s 
)    agattr(g,AGEDGE,n,s)

Definition at line 27 of file gv.cpp.

Referenced by main().

#define agfindattr (   x,
  s 
)    agattrsym(x,s)

Definition at line 24 of file gv.cpp.

Referenced by findattr(), getv(), and setv().

#define agnodeattr (   g,
  n,
  s 
)    agattr(g,AGNODE,n,s)

Definition at line 26 of file gv.cpp.

Referenced by setv().

#define agraphattr (   g,
  n,
  s 
)    agattr(g,AGRAPH,n,s)

Definition at line 25 of file gv.cpp.

Referenced by setv().

Function Documentation

Agraph_t* digraph ( char *  name)

Definition at line 45 of file gv.cpp.

References Agdirected, and agopen().

Agedge_t* edge ( Agraph_t g,
Agnode_t t,
Agnode_t h 
)

Definition at line 110 of file gv.cpp.

References agedge(), AGRAPH, AGTYPE, and NULL.

Referenced by edge().

Agedge_t* edge ( Agnode_t t,
Agnode_t h 
)

Definition at line 120 of file gv.cpp.

References agraphof(), and edge().

Agedge_t* edge ( char *  tname,
Agnode_t h 
)

Definition at line 126 of file gv.cpp.

References agraphof(), edge(), and node().

Agedge_t* edge ( Agnode_t t,
char *  hname 
)

Definition at line 132 of file gv.cpp.

References agraphof(), edge(), and node().

Agedge_t* edge ( Agraph_t g,
char *  tname,
char *  hname 
)

Definition at line 138 of file gv.cpp.

References edge(), and node().

Agsym_t* findattr ( Agraph_t g,
char *  name 
)

Definition at line 339 of file gv.cpp.

References agfindattr, and NULL.

Agsym_t* findattr ( Agnode_t n,
char *  name 
)

Definition at line 346 of file gv.cpp.

References agfindattr, and NULL.

Agsym_t* findattr ( Agedge_t e,
char *  name 
)

Definition at line 353 of file gv.cpp.

References agfindattr, and NULL.

Agedge_t* findedge ( Agnode_t t,
Agnode_t h 
)

Definition at line 330 of file gv.cpp.

References agfindedge, AGRAPH, agraphof(), AGTYPE, and NULL.

Agnode_t* findnode ( Agraph_t g,
char *  name 
)

Definition at line 323 of file gv.cpp.

References agnode(), and NULL.

Agraph_t* findsubg ( Agraph_t g,
char *  name 
)

Definition at line 316 of file gv.cpp.

References agsubg(), and NULL.

Agsym_t* firstattr ( Agraph_t g)

Definition at line 709 of file gv.cpp.

References agnxtattr(), AGRAPH, agroot(), and NULL.

Agsym_t* firstattr ( Agnode_t n)

Definition at line 725 of file gv.cpp.

References AGNODE, agnxtattr(), agraphof(), and NULL.

Agsym_t* firstattr ( Agedge_t e)

Definition at line 745 of file gv.cpp.

References AGEDGE, agnxtattr(), agraphof(), agtail(), and NULL.

Agedge_t* firstedge ( Agraph_t g)

Definition at line 539 of file gv.cpp.

References firstout().

Agedge_t* firstedge ( Agnode_t n)

Definition at line 594 of file gv.cpp.

References agfstedge(), agraphof(), and NULL.

Agnode_t* firsthead ( Agnode_t n)

Definition at line 563 of file gv.cpp.

References agfstout(), aghead(), agraphof(), and NULL.

Agedge_t* firstin ( Agraph_t g)

Definition at line 608 of file gv.cpp.

References agfstin(), agfstnode(), and NULL.

Agedge_t* firstin ( Agnode_t n)

Definition at line 636 of file gv.cpp.

References agfstin(), agraphof(), and NULL.

Agnode_t* firstnode ( Agraph_t g)

Definition at line 681 of file gv.cpp.

References agfstnode(), and NULL.

Agnode_t* firstnode ( Agedge_t e)

Definition at line 695 of file gv.cpp.

References agtail(), and NULL.

Agedge_t* firstout ( Agraph_t g)

Definition at line 508 of file gv.cpp.

References agfstnode(), agfstout(), agnxtnode(), and NULL.

Referenced by firstedge().

Agedge_t* firstout ( Agnode_t n)

Definition at line 549 of file gv.cpp.

References agfstout(), agraphof(), and NULL.

Agraph_t* firstsubg ( Agraph_t g)

Definition at line 483 of file gv.cpp.

References agfstsubg(), and NULL.

Agraph_t* firstsupg ( Agraph_t g)

Definition at line 498 of file gv.cpp.

References Agraph_s::parent.

Agnode_t* firsttail ( Agnode_t n)

Definition at line 650 of file gv.cpp.

References agfstin(), agraphof(), agtail(), and NULL.

char* getv ( Agraph_t g,
Agsym_t a 
)

Definition at line 165 of file gv.cpp.

char* getv ( Agraph_t g,
char *  attr 
)

Definition at line 169 of file gv.cpp.

References agfindattr, agroot(), and NULL.

char* getv ( Agnode_t n,
Agsym_t a 
)

Definition at line 214 of file gv.cpp.

References AGRAPH, AGTYPE, and NULL.

char* getv ( Agnode_t n,
char *  attr 
)

Definition at line 222 of file gv.cpp.

References agattr(), AGNODE, AGRAPH, agraphof(), agroot(), AGTYPE, and NULL.

char* getv ( Agedge_t e,
Agsym_t a 
)

Definition at line 265 of file gv.cpp.

References AGRAPH, AGTYPE, and NULL.

char* getv ( Agedge_t e,
char *  attr 
)

Definition at line 273 of file gv.cpp.

References agattr(), AGEDGE, AGRAPH, agraphof(), agtail(), AGTYPE, and NULL.

Agraph_t* graph ( char *  name)

Definition at line 38 of file gv.cpp.

References agopen(), and Agundirected.

Agraph_t* graph ( Agraph_t g,
char *  name 
)

Definition at line 96 of file gv.cpp.

References agsubg().

Agraph_t* graphof ( Agraph_t g)

Definition at line 380 of file gv.cpp.

References agroot(), NULL, and Agraph_s::root.

Agraph_t* graphof ( Agedge_t e)

Definition at line 387 of file gv.cpp.

References AGRAPH, agraphof(), agtail(), AGTYPE, and NULL.

Agraph_t* graphof ( Agnode_t n)

Definition at line 396 of file gv.cpp.

References AGRAPH, agraphof(), AGTYPE, and NULL.

void gv_channel_writer_init ( GVC_t gvc)

Definition at line 4 of file gv_dummy_init.c.

References GVC_s::write_fn.

Referenced by renderchannel().

void gv_string_writer_init ( GVC_t gvc)

Definition at line 3 of file gv_dummy_init.c.

References GVC_s::write_fn.

Referenced by renderresult().

void gv_writer_reset ( GVC_t gvc)

Definition at line 5 of file gv_dummy_init.c.

References NULL, and GVC_s::write_fn.

Referenced by renderchannel(), and renderresult().

Agnode_t* headof ( Agedge_t e)

Definition at line 362 of file gv.cpp.

References aghead(), AGRAPH, AGTYPE, and NULL.

bool layout ( Agraph_t g,
const char *  engine 
)

Definition at line 809 of file gv.cpp.

References gvFreeLayout(), and gvLayout().

Referenced by dotneato_args_initialize(), and osage_layout().

char* nameof ( Agraph_t g)

Definition at line 428 of file gv.cpp.

References agnameof(), and NULL.

char* nameof ( Agnode_t n)

Definition at line 434 of file gv.cpp.

References agnameof(), AGRAPH, AGTYPE, and NULL.

char* nameof ( Agsym_t a)

Definition at line 450 of file gv.cpp.

References Agsym_s::name, and NULL.

Agsym_t* nextattr ( Agraph_t g,
Agsym_t a 
)

Definition at line 717 of file gv.cpp.

References agnxtattr(), AGRAPH, agroot(), and NULL.

Agsym_t* nextattr ( Agnode_t n,
Agsym_t a 
)

Definition at line 735 of file gv.cpp.

References AGNODE, agnxtattr(), agraphof(), and NULL.

Agsym_t* nextattr ( Agedge_t e,
Agsym_t a 
)

Definition at line 755 of file gv.cpp.

References AGEDGE, agnxtattr(), agraphof(), agtail(), and NULL.

Agedge_t* nextedge ( Agraph_t g,
Agedge_t e 
)

Definition at line 544 of file gv.cpp.

References nextout().

Agedge_t* nextedge ( Agnode_t n,
Agedge_t e 
)

Definition at line 601 of file gv.cpp.

References agnxtedge(), agraphof(), and NULL.

Agnode_t* nexthead ( Agnode_t n,
Agnode_t h 
)

Definition at line 575 of file gv.cpp.

References agfindedge, aghead(), AGMKOUT, agnxtout(), agraphof(), and NULL.

Agedge_t* nextin ( Agraph_t g,
Agedge_t e 
)

Definition at line 620 of file gv.cpp.

References agfstin(), aghead(), agnxtin(), agnxtnode(), and NULL.

Agedge_t* nextin ( Agnode_t n,
Agedge_t e 
)

Definition at line 643 of file gv.cpp.

References agnxtin(), agraphof(), and NULL.

Agnode_t* nextnode ( Agraph_t g,
Agnode_t n 
)

Definition at line 688 of file gv.cpp.

References agnxtnode(), and NULL.

Agnode_t* nextnode ( Agedge_t e,
Agnode_t n 
)

Definition at line 702 of file gv.cpp.

References aghead(), agtail(), and NULL.

Agedge_t* nextout ( Agraph_t g,
Agedge_t e 
)

Definition at line 522 of file gv.cpp.

References agfstout(), agnxtnode(), agnxtout(), agtail(), and NULL.

Referenced by nextedge().

Agedge_t* nextout ( Agnode_t n,
Agedge_t e 
)

Definition at line 556 of file gv.cpp.

References agnxtout(), agraphof(), and NULL.

Agraph_t* nextsubg ( Agraph_t g,
Agraph_t sg 
)

Definition at line 490 of file gv.cpp.

References agnxtsubg(), and NULL.

Agraph_t* nextsupg ( Agraph_t g,
Agraph_t sg 
)

Definition at line 503 of file gv.cpp.

References NULL.

Agnode_t* nexttail ( Agnode_t n,
Agnode_t t 
)

Definition at line 662 of file gv.cpp.

References agfindedge, AGMKIN, agnxtin(), agraphof(), agtail(), and NULL.

Agnode_t* node ( Agraph_t g,
char *  name 
)

Definition at line 103 of file gv.cpp.

References agnode(), and NULL.

Referenced by edge(), embed_graph(), s1(), and stackCheck().

bool ok ( Agraph_t g)

Definition at line 458 of file gv.cpp.

bool ok ( Agnode_t n)

Definition at line 464 of file gv.cpp.

bool ok ( Agedge_t e)

Definition at line 470 of file gv.cpp.

bool ok ( Agsym_t a)

Definition at line 476 of file gv.cpp.

Agedge_t* protoedge ( Agraph_t g)

Definition at line 420 of file gv.cpp.

References NULL.

Agnode_t* protonode ( Agraph_t g)

Definition at line 413 of file gv.cpp.

References NULL.

Agraph_t* read ( FILE *  f)

Definition at line 73 of file gv.cpp.

References agread(), and NULL.

Agraph_t* read ( const char *  filename)

Definition at line 80 of file gv.cpp.

References agread(), and NULL.

Agraph_t* readstring ( char *  string)

Definition at line 66 of file gv.cpp.

References agmemread().

bool render ( Agraph_t g)

Definition at line 821 of file gv.cpp.

References attach_attrs().

bool render ( Agraph_t g,
const char *  format 
)

Definition at line 830 of file gv.cpp.

References gvRender().

bool render ( Agraph_t g,
const char *  format,
FILE *  f 
)

Definition at line 841 of file gv.cpp.

References gvRender().

bool render ( Agraph_t g,
const char *  format,
const char *  filename 
)

Definition at line 865 of file gv.cpp.

References gvRenderFilename().

bool renderchannel ( Agraph_t g,
const char *  format,
const char *  channelname 
)

Definition at line 852 of file gv.cpp.

References gv_channel_writer_init(), gv_writer_reset(), and gvRender().

char* renderdata ( Agraph_t g,
const char *  format 
)

Definition at line 911 of file gv.cpp.

References gvRenderData(), and NULL.

char* renderresult ( Agraph_t g,
const char *  format 
)

Definition at line 882 of file gv.cpp.

References BA::data, GD_alg, gv_string_writer_init(), gv_writer_reset(), gvRender(), BA::len, NULL, and BA::sz.

void renderresult ( Agraph_t g,
const char *  format,
char *  outdata 
)

Definition at line 901 of file gv.cpp.

References gv_string_writer_init(), gv_writer_reset(), and gvRender().

bool rm ( Agraph_t g)

Definition at line 765 of file gv.cpp.

References agclose(), agdelete(), agfstsubg(), agnxtsubg(), agparent(), and agroot().

bool rm ( Agnode_t n)

Definition at line 786 of file gv.cpp.

References agdelete(), agnameof(), and agraphof().

bool rm ( Agedge_t e)

Definition at line 797 of file gv.cpp.

References agdelete(), aghead(), agnameof(), agraphof(), agroot(), and agtail().

Agraph_t* rootof ( Agraph_t g)

Definition at line 405 of file gv.cpp.

References agroot(), and NULL.

char* setv ( Agraph_t g,
Agsym_t a,
char *  val 
)

Definition at line 194 of file gv.cpp.

References NULL.

char* setv ( Agraph_t g,
char *  attr,
char *  val 
)

Definition at line 201 of file gv.cpp.

References agfindattr, agraphattr, agroot(), NULL, and Agraph_s::root.

char* setv ( Agnode_t n,
Agsym_t a,
char *  val 
)

Definition at line 235 of file gv.cpp.

References AGRAPH, AGTYPE, and NULL.

char* setv ( Agnode_t n,
char *  attr,
char *  val 
)

Definition at line 244 of file gv.cpp.

References agattr(), AGNODE, agnodeattr, AGRAPH, agraphof(), agroot(), AGTYPE, and NULL.

char* setv ( Agedge_t e,
Agsym_t a,
char *  val 
)

Definition at line 286 of file gv.cpp.

References AGRAPH, AGTYPE, and NULL.

char* setv ( Agedge_t e,
char *  attr,
char *  val 
)

Definition at line 295 of file gv.cpp.

References agattr(), AGEDGE, AGRAPH, agraphof(), agroot(), agtail(), AGTYPE, and NULL.

Agraph_t* strictdigraph ( char *  name)

Definition at line 59 of file gv.cpp.

References agopen(), and Agstrictdirected.

Agraph_t* strictgraph ( char *  name)

Definition at line 52 of file gv.cpp.

References agopen(), and Agstrictundirected.

Agnode_t* tailof ( Agedge_t e)

Definition at line 371 of file gv.cpp.

References AGRAPH, agtail(), AGTYPE, and NULL.

bool tred ( Agraph_t g)

Definition at line 951 of file gv.cpp.

References gvToolTred().

bool write ( Agraph_t g,
FILE *  f 
)

Definition at line 926 of file gv.cpp.

References agwrite().

bool write ( Agraph_t g,
const char *  filename 
)

Definition at line 936 of file gv.cpp.

References agwrite().