Graphviz 13.0.0~dev.20241220.2304
Loading...
Searching...
No Matches
obj.c File Reference

generic manipulations with Agobj_t and derived objects graphs, nodes and edges More...

#include <cgraph/cghdr.h>
#include <stdlib.h>
#include <util/alloc.h>
#include <util/unreachable.h>
Include dependency graph for obj.c:

Go to the source code of this file.

Functions

int agdelete (Agraph_t *g, void *obj)
 deletes object. Equivalent to agclose, agdelnode, and agdeledge for obj being a graph, node or edge, respectively.
 
int agrename (Agobj_t *obj, char *newname)
 
void agmethod_init (Agraph_t *g, void *obj)
 
void aginitcb (Agraph_t *g, void *obj, Agcbstack_t *cbstack)
 
void agmethod_upd (Agraph_t *g, void *obj, Agsym_t *sym)
 
void agupdcb (Agraph_t *g, void *obj, Agsym_t *sym, Agcbstack_t *cbstack)
 
void agmethod_delete (Agraph_t *g, void *obj)
 
void agdelcb (Agraph_t *g, void *obj, Agcbstack_t *cbstack)
 
Agraph_tagroot (void *obj)
 
Agraph_tagraphof (void *obj)
 
void agpushdisc (Agraph_t *g, Agcbdisc_t *cbd, void *state)
 
int agpopdisc (Agraph_t *g, Agcbdisc_t *cbd)
 
int agcontains (Agraph_t *g, void *obj)
 returns non-zero if obj is a member of (sub)graph
 
int agobjkind (void *arg)
 

Function Documentation

◆ agrename()

int agrename ( Agobj_t obj,
char *  newname 
)

rename an object

Parameters
objTarget to rename
newnameName to assign
Returns
0 on success

Definition at line 41 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: