|
Graphviz 14.0.5~dev.20251116.1015
|
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.
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, bool is_html, 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, void *symbol) |
| static Agsym_t * | getattr (Agraph_t *g, int kind, char *name) |
| static void | unviewsubgraphsattr (Agraph_t *parent, char *name) |
| static int | agxset_ (void *obj, Agsym_t *sym, const char *value, bool is_html) |
| static Agsym_t * | setattr (Agraph_t *g, int kind, char *name, const char *value, bool is_html) |
| static Agsym_t * | agattr_ (Agraph_t *g, int kind, char *name, const char *value, bool is_html) |
| Agsym_t * | agattr_text (Agraph_t *g, int kind, char *name, const char *value) |
| creates or looks up text attributes of a graph | |
| Agsym_t * | agattr_html (Agraph_t *g, int kind, char *name, const char *value) |
agattr_text, but creates HTML-like values | |
| Agsym_t * | agattr (Agraph_t *g, int kind, char *name, const char *value) |
| creates or looks up an attribute, without specifying desired form | |
| 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) |
| static int | agset_ (void *obj, char *name, const char *value, bool is_html) |
| int | agset (void *obj, char *name, const char *value) |
| int | agset_text (void *obj, char *name, const char *value) |
| int | agset_html (void *obj, char *name, const char *value) |
| int | agxset (void *obj, Agsym_t *sym, const char *value) |
| int | agxset_text (void *obj, Agsym_t *sym, const char *value) |
| int | agxset_html (void *obj, Agsym_t *sym, const char *value) |
| int | agsafeset_text (void *obj, char *name, const char *value, const char *def) |
| set an attribute’s value and default, ensuring it is declared before setting it locally | |
| int | agsafeset_html (void *obj, char *name, const char *value, const char *def) |
| set an attribute’s value and default, ensuring it is declared before setting it locally | |
| int | agsafeset (void *obj, char *name, const char *value, const char *def) |
| set an attribute’s value and default, ensuring it is declared before setting it locally | |
| 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 |
| const char | AgDataRecName [] = "_AG_strdata" |
Definition at line 211 of file attr.c.
References agattrrec(), aghtmlstr(), agstrdup(), agstrdup_html(), Agsym_s::defval, gv_recalloc(), Agsym_s::id, NULL, and Agattr_s::str.
Referenced by setattr().
|
static |
Definition at line 318 of file attr.c.
References agopen(), getattr(), NULL, ProtoDesc, ProtoGraph, and setattr().
Referenced by agattr_html(), and agattr_text().
Definition at line 87 of file attr.c.
References aghtmlstr(), agnewsym(), dtfirst, dtinsert, dtnext, dtsize(), Agsym_s::fixed, and Agsym_s::print.
Referenced by agmakedatadict().
Definition at line 56 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 129 of file attr.c.
References dtsearch, and Agsym_s::name.
Referenced by agattrsym(), aglocaldictsym(), getattr(), and setattr().
Definition at line 136 of file attr.c.
References agdictsym(), dtview(), NULL, and view.
Referenced by agxset_(), setattr(), and unviewsubgraphsattr().
Definition at line 163 of file attr.c.
References agbindrec(), AgDataRecName, agdictof(), aghtmlstr(), agraphof(), agroot(), agstrdup(), agstrdup_html(), AGTYPE, Agattr_s::dict, dtfirst, dtnext, gv_calloc(), Agattr_s::h, NULL, Agattr_s::str, and topdictsize().
Referenced by agedgeattr_init(), agnodeattr_init(), and agraphattr_init().
|
static |
Definition at line 100 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 |
| is_html | Is value an HTML-like string? |
Definition at line 76 of file attr.c.
References agstrdup(), agstrdup_html(), Agsym_s::defval, gv_alloc(), id, Agsym_s::id, Agsym_s::kind, Agsym_s::name, and Agsym_s::owner.
Referenced by agcopydict(), agxset_(), setattr(), and unviewsubgraphsattr().
Definition at line 600 of file attr.c.
References agraphattr_init().
Referenced by init_all_attrs().
|
static |
Definition at line 465 of file attr.c.
References agattrsym(), agxset_html(), agxset_text(), FAILURE, and NULL.
Referenced by agset_html(), and agset_text().
|
static |
Definition at line 498 of file attr.c.
References agattrrec(), agdatadict(), aghtmlstr(), aglocaldictsym(), agmethod_upd(), agnewsym(), AGRAPH, agraphof(), agstrdup(), agstrdup_html(), agstrfree(), AGTYPE, Agsym_s::defval, Agdatadict_s::dict, dtinsert, Agdatadict_s::g, Agsym_s::id, Agsym_s::name, Agtag_s::objtype, Agattr_s::str, SUCCESS, Agobj_s::tag, and topdictsize().
Referenced by agxset_html(), agxset_text(), and setattr().
Definition at line 187 of file attr.c.
References aghtmlstr(), agraphof(), agstrfree(), free(), Agattr_s::str, and topdictsize().
Referenced by agedgeattr_delete(), agnodeattr_delete(), and agraphattr_delete().
|
static |
Definition at line 199 of file attr.c.
References aghtmlstr(), agstrfree(), Agsym_s::defval, free(), Agsym_s::name, and Agsym_s::owner.
Definition at line 224 of file attr.c.
References agdictof(), and agdictsym().
Referenced by agattr_(), and unviewsubgraphsattr().
|
static |
Definition at line 613 of file attr.c.
References agapply(), agedgeattr_init(), agfstnode(), agfstout(), agnodeattr_init(), agnxtnode(), agnxtout(), agraphattr_init_wrapper(), agroot(), Agraph_s::base, and NULL.
Referenced by agdatadict().
|
static |
| is_html | Is value an HTML-like string? |
Definition at line 258 of file attr.c.
References addattr(), agapply(), agdatadict(), agdictof(), agdictsym(), agfstnode(), agfstout(), aghtmlstr(), AGINEDGE, aglocaldictsym(), agmethod_upd(), agnewsym(), AGNODE, agnxtnode(), agnxtout(), AGOUTEDGE, AGRAPH, agroot(), agstrdup(), agstrdup_html(), agstrfree(), agwarningf(), agxset_(), Agraph_s::base, Agsym_s::defval, dtinsert, dtsize(), Agsym_s::id, streq(), UNREACHABLE, and unviewsubgraphsattr().
Referenced by agattr_().
|
static |
Definition at line 156 of file attr.c.
References agdictof(), agraphof(), agroot(), AGTYPE, and dtsize().
Referenced by agmakeattrs(), agxget(), agxset_(), and freeattr().
|
static |
Definition at line 233 of file attr.c.
References agdatadict(), agfstsubg(), aghtmlstr(), 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 |
| const char AgDataRecName[] = "_AG_strdata" |
Definition at line 154 of file attr.c.
Referenced by agattrrec(), agedgeattr_delete(), agmakeattrs(), agnodeattr_delete(), newedge(), and newnode().
|
static |
Definition at line 41 of file attr.c.
Referenced by agdatadict(), and agmakedatadict().
|
static |