105 fn(g, obj, cbstack->
state);
135 fn(g, obj, cbstack->
state, sym);
165 fn(g, obj, cbstack->
state);
170 if (obj == 0)
return NULL;
174 return ((
Agedge_t *) obj)->node->root;
206 stack_ent->
state = state;
217 if (stack_ent->
f == cbd)
220 while (stack_ent && stack_ent->
prev->
f != cbd)
221 stack_ent = stack_ent->
prev;
222 if (stack_ent && stack_ent->
prev)
242 if (subg == g)
return 1;
Memory allocation wrappers that exit on failure.
static void * gv_alloc(size_t size)
void agfreeid(Agraph_t *g, int objtype, IDTYPE id)
int agmapnametoid(Agraph_t *g, int objtype, char *str, IDTYPE *result, bool createflag)
void agupdcb(Agraph_t *g, void *obj, Agsym_t *sym, Agcbstack_t *cbstack)
void agdelcb(Agraph_t *g, void *obj, Agcbstack_t *cbstack)
void aginitcb(Agraph_t *g, void *obj, Agcbstack_t *cbstack)
int agpopdisc(Agraph_t *g, Agcbdisc_t *cbd)
void agmethod_delete(Agraph_t *g, void *obj)
void agpushdisc(Agraph_t *g, Agcbdisc_t *cbd, void *state)
void agmethod_init(Agraph_t *g, void *obj)
void agmethod_upd(Agraph_t *g, void *obj, Agsym_t *sym)
Agedge_t * agsubedge(Agraph_t *g, Agedge_t *e, int createflag)
int agdeledge(Agraph_t *g, Agedge_t *arg_e)
void agerrorf(const char *fmt,...)
void(* agobjupdfn_t)(Agraph_t *g, Agobj_t *obj, void *arg, Agsym_t *sym)
void(* agobjfn_t)(Agraph_t *g, Agobj_t *obj, void *arg)
int agclose(Agraph_t *g)
deletes a graph, freeing its associated storage
Agnode_t * agidnode(Agraph_t *g, IDTYPE id, int createflag)
int agrelabel_node(Agnode_t *n, char *newname)
int agdelnode(Agraph_t *g, Agnode_t *arg_n)
removes a node from a graph or subgraph.
Agraph_t * agraphof(void *obj)
#define AGID(obj)
returns the unique integer ID associated with the object
uint64_t IDTYPE
unique per main graph ID
#define AGTYPE(obj)
returns AGRAPH, AGNODE, or AGEDGE depending on the type of the object
int agdelete(Agraph_t *g, void *obj)
deletes object. Equivalent to agclose, agdelnode, and agdeledge for obj being a graph,...
int agcontains(Agraph_t *g, void *obj)
returns non-zero if obj is a member of (sub)graph
Agraph_t * agroot(void *obj)
Agraph_t * agparent(Agraph_t *g)
Agraph_t * agidsubg(Agraph_t *g, IDTYPE id, int cflag)
int agrename(Agobj_t *obj, char *newname)
client event callbacks, used in Agcbstack_s
struct Agcbdisc_s::@63 edge
struct Agcbdisc_s::@63 graph
struct Agcbdisc_s::@63 node
a generic header of Agraph_s, Agnode_s and Agedge_s
Agraph_t * root
subgraphs - ancestors
Agclos_t * clos
shared resources