Graphviz 13.0.0~dev.20241220.2304
|
implementation of dynamic attributes More...
#include <cgraph/cghdr.h>
#include <stdbool.h>
#include <stdlib.h>
#include <util/alloc.h>
#include <util/streq.h>
#include <util/unreachable.h>
Go to the source code of this file.
Macros | |
#define | MINATTR 4 /* minimum allocation */ |
Functions | |
static void | freesym (void *obj) |
static void | init_all_attrs (Agraph_t *g) |
Agdatadict_t * | agdatadict (Agraph_t *g, bool cflag) |
static Dict_t * | agdictof (Agraph_t *g, int kind) |
static Agsym_t * | agnewsym (Agraph_t *g, const char *name, const char *value, int id, int kind) |
static void | agcopydict (Dict_t *src, Dict_t *dest, Agraph_t *g, int kind) |
static Agdatadict_t * | agmakedatadict (Agraph_t *g) |
static Agsym_t * | agdictsym (Dict_t *dict, char *name) |
static Agsym_t * | aglocaldictsym (Dict_t *dict, char *name) |
Agsym_t * | agattrsym (void *obj, char *name) |
looks up a string attribute for a graph object given as an argument | |
static int | topdictsize (Agobj_t *obj) |
static Agrec_t * | agmakeattrs (Agraph_t *context, void *obj) |
static void | freeattr (Agobj_t *obj, Agattr_t *attr) |
Agattr_t * | agattrrec (void *obj) |
static void | addattr (Agraph_t *g, Agobj_t *obj, Agsym_t *sym) |
static Agsym_t * | getattr (Agraph_t *g, int kind, char *name) |
static void | unviewsubgraphsattr (Agraph_t *parent, char *name) |
static Agsym_t * | setattr (Agraph_t *g, int kind, char *name, const char *value) |
Agsym_t * | agattr (Agraph_t *g, int kind, char *name, const char *value) |
creates or looks up attributes of a graph | |
Agsym_t * | agnxtattr (Agraph_t *g, int kind, Agsym_t *attr) |
permits traversing the list of attributes of a given type | |
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) |
char * | agget (void *obj, char *name) |
char * | agxget (void *obj, Agsym_t *sym) |
int | agset (void *obj, char *name, const char *value) |
int | agxset (void *obj, Agsym_t *sym, const char *value) |
int | agsafeset (void *obj, char *name, const char *value, const char *def) |
ensures the given attribute is declared before setting it locally on an object | |
static void | agraphattr_init_wrapper (Agraph_t *g, Agobj_t *ignored1, void *ignored2) |
int | agcopyattr (void *oldobj, void *newobj) |
copies all of the attributes from one object to another | |
Variables | |
Dtdisc_t | AgDataDictDisc |
static char | DataDictName [] = "_AG_datadict" |
static Agdesc_t | ProtoDesc |
static Agraph_t * | ProtoGraph |
char * | AgDataRecName = "_AG_strdata" |
Definition at line 235 of file attr.c.
References agattrrec(), agstrdup(), Agsym_s::defval, gv_recalloc(), Agsym_s::id, MINATTR, NULL, and Agattr_s::str.
Referenced by setattr().
Definition at line 95 of file attr.c.
References agnewsym(), Agsym_s::defval, dtfirst, dtinsert, dtnext, dtsize(), Agsym_s::fixed, Agsym_s::id, Agsym_s::name, and Agsym_s::print.
Referenced by agmakedatadict().
Definition at line 58 of file attr.c.
References agdatadict(), agerrorf(), AGINEDGE, AGNODE, AGOUTEDGE, AGRAPH, Agdatadict_s::dict, Agdatadict_s::e, Agdatadict_s::g, Agdatadict_s::n, and NULL.
Referenced by agmakeattrs(), agnxtattr(), getattr(), setattr(), and topdictsize().
Definition at line 137 of file attr.c.
References dtsearch, and Agsym_s::name.
Referenced by agattrsym(), aglocaldictsym(), getattr(), and setattr().
Definition at line 145 of file attr.c.
References agdictsym(), dtview(), NULL, and view.
Referenced by agxset(), setattr(), and unviewsubgraphsattr().
Definition at line 182 of file attr.c.
References agbindrec(), AgDataRecName, agdictof(), agraphof(), agroot(), agstrdup(), AGTYPE, Agsym_s::defval, Agattr_s::dict, dtfirst, dtnext, gv_calloc(), Agsym_s::id, MINATTR, NULL, Agattr_s::str, and topdictsize().
Referenced by agedgeattr_init(), agnodeattr_init(), and agraphattr_init().
|
static |
Definition at line 108 of file attr.c.
References agbindrec(), agcopydict(), agdatadict(), AgDataDictDisc, agdtopen(), AGEDGE, AGNODE, agparent(), AGRAPH, DataDictName, Agdatadict_s::dict, Dttree, dtview(), Agdatadict_s::e, Agdatadict_s::g, Agdatadict_s::n, and ProtoGraph.
Referenced by agraphattr_init().
|
static |
Definition at line 85 of file attr.c.
References agstrdup(), Agsym_s::defval, gv_alloc(), id, Agsym_s::id, Agsym_s::kind, and Agsym_s::name.
Referenced by agcopydict(), agxset(), setattr(), and unviewsubgraphsattr().
Definition at line 516 of file attr.c.
References agraphattr_init().
Referenced by init_all_attrs().
Definition at line 208 of file attr.c.
References agraphof(), agstrfree(), free(), Agattr_s::str, and topdictsize().
Referenced by agedgeattr_delete(), agnodeattr_delete(), and agraphattr_delete().
|
static |
Definition at line 220 of file attr.c.
References Ag_G_global, agstrfree(), Agsym_s::defval, free(), and Agsym_s::name.
Definition at line 245 of file attr.c.
References agdictof(), and agdictsym().
Referenced by agattr(), and unviewsubgraphsattr().
|
static |
Definition at line 529 of file attr.c.
References agapply(), agedgeattr_init(), agfstnode(), agfstout(), agnodeattr_init(), agnxtnode(), agnxtout(), agraphattr_init_wrapper(), agroot(), and NULL.
Referenced by agdatadict().
Definition at line 275 of file attr.c.
References addattr(), agapply(), agdatadict(), agdictof(), agdictsym(), agfstnode(), agfstout(), AGINEDGE, aglocaldictsym(), agmethod_upd(), agnewsym(), AGNODE, agnxtnode(), agnxtout(), AGOUTEDGE, AGRAPH, agroot(), agstrdup(), agstrfree(), agwarningf(), agxset(), Agsym_s::defval, dtinsert, dtsize(), Agsym_s::id, streq(), UNREACHABLE, and unviewsubgraphsattr().
Referenced by agattr().
|
static |
Definition at line 173 of file attr.c.
References agdictof(), agraphof(), agroot(), AGTYPE, and dtsize().
Referenced by agmakeattrs(), agxget(), agxset(), and freeattr().
|
static |
Definition at line 255 of file attr.c.
References agdatadict(), agfstsubg(), aglocaldictsym(), agnewsym(), agnxtsubg(), AGRAPH, agroot(), agxget(), Agdatadict_s::dict, dtinsert, Agdatadict_s::g, getattr(), Agsym_s::id, and parent.
Referenced by setattr().
Dtdisc_t AgDataDictDisc |
char* AgDataRecName = "_AG_strdata" |
Definition at line 171 of file attr.c.
Referenced by agattrrec(), agedgeattr_delete(), agmakeattrs(), agnodeattr_delete(), newedge(), and newnode().
|
static |
Definition at line 43 of file attr.c.
Referenced by agdatadict(), and agmakedatadict().
|
static |
|
static |
Definition at line 47 of file attr.c.
Referenced by agattr(), and agmakedatadict().