Graphviz 12.0.1~dev.20240715.2254
Loading...
Searching...
No Matches
cghdr.h File Reference

cgraph.h additions More...

#include "config.h"
#include <cgraph.h>
#include <ctype.h>
#include <sys/types.h>
#include <stdarg.h>
#include <stdbool.h>
#include <stdlib.h>
#include <string.h>
#include <assert.h>
#include <stdint.h>
Include dependency graph for cghdr.h:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Macros

#define SUCCESS   0
 
#define FAILURE   -1
 
#define LOCALNAMEPREFIX   '%'
 
#define AGDISC(g, d)   ((g)->clos->disc.d)
 
#define AGCLOS(g, d)   ((g)->clos->state.d)
 
#define AGNEW(g, t)   ((t*)(agalloc(g,sizeof(t))))
 

Typedefs

typedef Agobj_t *(* agobjsearchfn_t) (Agraph_t *g, Agobj_t *obj)
 

Enumerations

enum  { SEQ_MASK = (1 << (sizeof(unsigned) * 8 - 4)) - 1 }
 Mask of Agtag_s.seq width. More...
 

Functions

int agapply (Agraph_t *g, Agobj_t *obj, agobjfn_t fn, void *arg, int preorder)
 
Agraph_tagopen1 (Agraph_t *g)
 
int agstrclose (Agraph_t *g)
 
void agmarkhtmlstr (char *s)
 
Agnode_tagfindnode_by_id (Agraph_t *g, IDTYPE id)
 
uint64_t agnextseq (Agraph_t *g, int objtype)
 
Dict_tagdtopen (Agraph_t *g, Dtdisc_t *disc, Dtmethod_t *method)
 
void agdtdisc (Agraph_t *g, Dict_t *dict, Dtdisc_t *disc)
 
int agdtdelete (Agraph_t *g, Dict_t *dict, void *obj)
 
int agdtclose (Agraph_t *g, Dict_t *dict)
 
void agdictobjfree (void *p)
 
Agdatadict_tagdatadict (Agraph_t *g, bool cflag)
 
Agattr_tagattrrec (void *obj)
 
void agraphattr_init (Agraph_t *g)
 
int agraphattr_delete (Agraph_t *g)
 
void agnodeattr_init (Agraph_t *g, Agnode_t *n)
 
void agnodeattr_delete (Agnode_t *n)
 
void agedgeattr_init (Agraph_t *g, Agedge_t *e)
 
void agedgeattr_delete (Agedge_t *e)
 
int aagparse (void)
 
void aglexinit (Agdisc_t *disc, void *ifile)
 
int aaglex (void)
 
void aglexeof (void)
 
void aglexbad (void)
 
int agmapnametoid (Agraph_t *g, int objtype, char *str, IDTYPE *result, bool createflag)
 
int agallocid (Agraph_t *g, int objtype, IDTYPE request)
 
void agfreeid (Agraph_t *g, int objtype, IDTYPE id)
 
char * agprintid (Agobj_t *obj)
 
int aginternalmaplookup (Agraph_t *g, int objtype, char *str, IDTYPE *result)
 
void aginternalmapinsert (Agraph_t *g, int objtype, char *str, IDTYPE result)
 
char * aginternalmapprint (Agraph_t *g, int objtype, IDTYPE id)
 
int aginternalmapdelete (Agraph_t *g, int objtype, IDTYPE id)
 
void aginternalmapclose (Agraph_t *g)
 
void agregister (Agraph_t *g, int objtype, void *obj)
 
void agedgesetop (Agraph_t *g, Agedge_t *e, int insertion)
 
void agdelnodeimage (Agraph_t *g, Agnode_t *node, void *ignored)
 
void agdeledgeimage (Agraph_t *g, Agedge_t *edge, void *ignored)
 
int agrename (Agobj_t *obj, char *newname)
 
void agrecclose (Agobj_t *obj)
 
void agmethod_init (Agraph_t *g, void *obj)
 
void agmethod_upd (Agraph_t *g, void *obj, Agsym_t *sym)
 
void agmethod_delete (Agraph_t *g, void *obj)
 
void aginitcb (Agraph_t *g, void *obj, Agcbstack_t *disc)
 
void agupdcb (Agraph_t *g, void *obj, Agsym_t *sym, Agcbstack_t *disc)
 
void agdelcb (Agraph_t *g, void *obj, Agcbstack_t *disc)
 

Variables

Agraph_tAg_G_global
 
char * AgDataRecName
 
Dtdisc_t Ag_subnode_seq_disc
 
Dtdisc_t Ag_mainedge_id_disc
 
Dtdisc_t Ag_subedge_id_disc
 
Dtdisc_t Ag_mainedge_seq_disc
 
Dtdisc_t Ag_subedge_seq_disc
 
Dtdisc_t Ag_subgraph_id_disc
 
Dtdisc_t Ag_subgraph_seq_disc
 

Macro Definition Documentation

◆ AGCLOS

#define AGCLOS (   g,
 
)    ((g)->clos->state.d)

Definition at line 48 of file cghdr.h.

◆ AGDISC

#define AGDISC (   g,
 
)    ((g)->clos->disc.d)

Definition at line 47 of file cghdr.h.

◆ AGNEW

#define AGNEW (   g,
 
)    ((t*)(agalloc(g,sizeof(t))))

Definition at line 49 of file cghdr.h.

◆ FAILURE

#define FAILURE   -1

Definition at line 44 of file cghdr.h.

◆ LOCALNAMEPREFIX

#define LOCALNAMEPREFIX   '%'

Definition at line 45 of file cghdr.h.

◆ SUCCESS

#define SUCCESS   0

Definition at line 43 of file cghdr.h.

Typedef Documentation

◆ agobjsearchfn_t

typedef Agobj_t *(* agobjsearchfn_t) (Agraph_t *g, Agobj_t *obj)

Definition at line 52 of file cghdr.h.

Enumeration Type Documentation

◆ anonymous enum

anonymous enum
Enumerator
SEQ_MASK 

Definition at line 77 of file cghdr.h.

Function Documentation

◆ aaglex()

int aaglex ( void  )

◆ aagparse()

int aagparse ( void  )

Referenced by agconcat().

Here is the caller graph for this function:

◆ agallocid()

int agallocid ( Agraph_t g,
int  objtype,
IDTYPE  request 
)

Definition at line 141 of file id.c.

References AGCLOS, and AGDISC.

Referenced by agidedge(), agidnode(), and agidsubg().

Here is the caller graph for this function:

◆ agapply()

int agapply ( Agraph_t g,
Agobj_t obj,
agobjfn_t  fn,
void *  arg,
int  preorder 
)

Definition at line 60 of file apply.c.

References agerrorf(), AGINEDGE, AGNODE, AGOUTEDGE, AGRAPH, AGTYPE, FAILURE, rec_apply(), subedge_search(), subgraph_search(), subnode_search(), and SUCCESS.

Referenced by agclean(), agdeledge(), agdelnode(), agdelrec(), agnodebefore(), agrelabel_node(), eval(), init_all_attrs(), and setattr().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ agdeledgeimage()

void agdeledgeimage ( Agraph_t g,
Agedge_t edge,
void *  ignored 
)

Definition at line 304 of file edge.c.

References agfstin(), agfstout(), AGIN2OUT, AGINEDGE, agnxtin(), agnxtout(), AGOUT2IN, agsubrep(), AGTYPE, del(), Agraph_s::e_id, Agraph_s::e_seq, Agsubnode_s::in_id, Agsubnode_s::in_seq, Agedge_s::node, out(), Agsubnode_s::out_id, and Agsubnode_s::out_seq.

Referenced by agdeledge(), and agdelnodeimage().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ agdelnodeimage()

void agdelnodeimage ( Agraph_t g,
Agnode_t node,
void *  ignored 
)

Definition at line 179 of file node.c.

References agdeledgeimage(), agfstedge(), agnxtedge(), Agnode_s::base, dtdelete, Agtag_s::id, Agraph_s::n_id, Agraph_s::n_seq, Agsubnode_s::node, node_set_remove(), and Agobj_s::tag.

Referenced by agdelnode().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ agdictobjfree()

void agdictobjfree ( void *  p)

Definition at line 21 of file utils.c.

References Ag_dictop_G, agfree(), and free().

Here is the call graph for this function:

◆ agdtclose()

int agdtclose ( Agraph_t g,
Dict_t dict 
)

Definition at line 45 of file utils.c.

References Ag_dictop_G, dtclose(), dtdisc(), and NULL.

Referenced by agclose(), agraphattr_delete(), and agstrclose().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ agdtdelete()

int agdtdelete ( Agraph_t g,
Dict_t dict,
void *  obj 
)

Definition at line 39 of file utils.c.

References Ag_dictop_G, dtdelete, and NULL.

Referenced by agstrfree().

Here is the caller graph for this function:

◆ agdtdisc()

void agdtdisc ( Agraph_t g,
Dict_t dict,
Dtdisc_t disc 
)

Definition at line 55 of file utils.c.

References dtdisc(), and NULL.

Referenced by agfindsubg_by_id().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ agdtopen()

Dict_t * agdtopen ( Agraph_t g,
Dtdisc_t disc,
Dtmethod_t method 
)

Definition at line 29 of file utils.c.

References Ag_dictop_G, dtopen(), and NULL.

Referenced by aginternalmapinsert(), agmakedatadict(), agopen1(), and refdict().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ agedgesetop()

void agedgesetop ( Agraph_t g,
Agedge_t e,
int  insertion 
)

◆ agfindnode_by_id()

Agnode_t * agfindnode_by_id ( Agraph_t g,
IDTYPE  id 
)

Definition at line 22 of file node.c.

References Agraph_s::n_id, Agsubnode_s::node, node_set_find(), and NULL.

Referenced by agdelnode(), agfindnode_by_name(), agidnode(), agnode(), agrelabel_node(), and agsubnode().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ agfreeid()

void agfreeid ( Agraph_t g,
int  objtype,
IDTYPE  id 
)

Definition at line 146 of file id.c.

References AGCLOS, AGDISC, aginternalmapdelete(), and id.

Referenced by agclose(), agdeledge(), agdelnode(), agrelabel_node(), and agrename().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ aginternalmapclose()

void aginternalmapclose ( Agraph_t g)

Definition at line 198 of file imap.c.

References Ag_G_global, Agraph_s::clos, closeit(), Agclos_s::lookup_by_id, and Agclos_s::lookup_by_name.

Referenced by agclose().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ aginternalmapdelete()

int aginternalmapdelete ( Agraph_t g,
int  objtype,
IDTYPE  id 
)

Definition at line 151 of file imap.c.

References AGEDGE, agfree(), AGINEDGE, agstrfree(), Agraph_s::clos, dtdelete, find_isym(), Agclos_s::lookup_by_id, Agclos_s::lookup_by_name, and IMapEntry_s::str.

Referenced by agfreeid(), and aginternalmapclearlocalnames().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ aginternalmapinsert()

void aginternalmapinsert ( Agraph_t g,
int  objtype,
char *  str,
IDTYPE  result 
)

Definition at line 104 of file imap.c.

References agdtopen(), AGEDGE, AGINEDGE, AGNEW, agstrdup(), Agraph_s::clos, dtinsert, Dttree, id, IMapEntry_s::id, Agclos_s::lookup_by_id, Agclos_s::lookup_by_name, LookupById, LookupByName, NULL, IMapEntry_s::str, and str.

Referenced by agmapnametoid().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ aginternalmaplookup()

int aginternalmaplookup ( Agraph_t g,
int  objtype,
char *  str,
IDTYPE result 
)

Definition at line 81 of file imap.c.

References AGEDGE, AGINEDGE, agstrbind(), Agraph_s::clos, dtsearch, IMapEntry_s::id, Agclos_s::lookup_by_name, IMapEntry_s::str, and str.

Referenced by agmapnametoid().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ aginternalmapprint()

char * aginternalmapprint ( Agraph_t g,
int  objtype,
IDTYPE  id 
)

Definition at line 141 of file imap.c.

References find_isym(), NULL, and IMapEntry_s::str.

Referenced by agnameof().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ aglexbad()

void aglexbad ( void  )

Definition at line 2483 of file scan.c.

References YY_FLUSH_BUFFER.

Referenced by agconcat().

Here is the caller graph for this function:

◆ aglexeof()

void aglexeof ( void  )

Definition at line 2481 of file scan.c.

References GRAPH_EOF_TOKEN, and unput.

Referenced by endgraph(), and endgraph().

Here is the caller graph for this function:

◆ aglexinit()

void aglexinit ( Agdisc_t disc,
void *  ifile 
)

Definition at line 845 of file scan.c.

References Disc, Disc, graphType, graphType, Ifile, and Ifile.

Referenced by agconcat().

Here is the caller graph for this function:

◆ agmapnametoid()

int agmapnametoid ( Agraph_t g,
int  objtype,
char *  str,
IDTYPE result,
bool  createflag 
)

Definition at line 112 of file id.c.

References AGCLOS, AGDISC, aginternalmapinsert(), aginternalmaplookup(), LOCALNAMEPREFIX, Agiddisc_s::map, NULL, and str.

Referenced by agedge(), agfindnode_by_name(), agnode(), agopen(), agrelabel_node(), agrename(), and agsubg().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ agmarkhtmlstr()

void agmarkhtmlstr ( char *  s)

Definition at line 173 of file refstr.c.

References refstr_t::is_html, key, NULL, and store().

Referenced by agcopyattr().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ agnextseq()

uint64_t agnextseq ( Agraph_t g,
int  objtype 
)

Definition at line 153 of file graph.c.

References Agraph_s::clos, and Agclos_s::seq.

Referenced by agidnode(), agnode(), agopen1(), and newedge().

Here is the caller graph for this function:

◆ agopen1()

Agraph_t * agopen1 ( Agraph_t g)

Definition at line 68 of file graph.c.

References Ag_mainedge_id_disc, Ag_mainedge_seq_disc, Ag_subedge_id_disc, Ag_subedge_seq_disc, Ag_subgraph_id_disc, Ag_subgraph_seq_disc, Ag_subnode_seq_disc, agdtopen(), agmethod_init(), agnextseq(), agparent(), AGRAPH, agraphattr_init(), agroot(), AGSEQ, Agraph_s::desc, dtinsert, Dttree, Agraph_s::e_id, Agraph_s::e_seq, Agraph_s::g_id, Agraph_s::g_seq, Agdesc_s::has_attrs, Agraph_s::n_id, Agraph_s::n_seq, node_set_new(), and SEQ_MASK.

Referenced by agopen(), and localsubg().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ agprintid()

char * agprintid ( Agobj_t obj)

◆ agrecclose()

void agrecclose ( Agobj_t obj)

Definition at line 226 of file rec.c.

References agfree(), agraphof(), agstrfree(), Agobj_s::data, Agrec_s::name, Agrec_s::next, and NULL.

Referenced by agclose(), agdeledge(), and agdelnode().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ agregister()

void agregister ( Agraph_t g,
int  objtype,
void *  obj 
)

Definition at line 185 of file id.c.

References AGCLOS, and AGDISC.

Referenced by agedge(), agnode(), agopen(), and agsubg().

Here is the caller graph for this function:

◆ agrename()

int agrename ( Agobj_t obj,
char *  newname 
)

Definition at line 40 of file obj.c.

References agfreeid(), AGID, agidsubg(), AGINEDGE, agmapnametoid(), AGNODE, AGOUTEDGE, agparent(), AGRAPH, agraphof(), agrelabel_node(), agroot(), AGTYPE, FAILURE, SUCCESS, and UNREACHABLE.

Here is the call graph for this function:

◆ agstrclose()

int agstrclose ( Agraph_t g)

Definition at line 63 of file refstr.c.

References agdtclose(), and refdict().

Referenced by agclose().

Here is the call graph for this function:
Here is the caller graph for this function:

Variable Documentation

◆ Ag_G_global

◆ Ag_mainedge_id_disc

Dtdisc_t Ag_mainedge_id_disc
extern

Definition at line 419 of file edge.c.

Referenced by agopen1().

◆ Ag_mainedge_seq_disc

Dtdisc_t Ag_mainedge_seq_disc
extern

Definition at line 408 of file edge.c.

Referenced by agopen1().

◆ Ag_subedge_id_disc

Dtdisc_t Ag_subedge_id_disc
extern

Definition at line 424 of file edge.c.

Referenced by agopen1().

◆ Ag_subedge_seq_disc

Dtdisc_t Ag_subedge_seq_disc
extern

Definition at line 413 of file edge.c.

Referenced by agopen1().

◆ Ag_subgraph_id_disc

Dtdisc_t Ag_subgraph_id_disc
extern

Definition at line 268 of file graph.c.

Referenced by agfindsubg_by_id(), and agopen1().

◆ Ag_subgraph_seq_disc

Dtdisc_t Ag_subgraph_seq_disc
extern

Definition at line 263 of file graph.c.

Referenced by agopen1().

◆ Ag_subnode_seq_disc

Dtdisc_t Ag_subnode_seq_disc
extern

Definition at line 313 of file node.c.

Referenced by agopen1().

◆ AgDataRecName

char* AgDataRecName
extern

Definition at line 171 of file attr.c.

Referenced by agattrrec(), agedgeattr_delete(), agmakeattrs(), agnodeattr_delete(), newedge(), and newnode().