Graphviz 13.0.0~dev.20241220.2304
|
virtual methods of initialization, modification, and finalization of graph objects More...
Data Structures | |
struct | Agcbdisc_s |
client event callbacks, used in Agcbstack_s More... | |
struct | Agcbstack_s |
object event callbacks More... | |
Typedefs | |
typedef struct Agcbdisc_s | Agcbdisc_t |
client event callbacks | |
typedef struct Agcbstack_s | Agcbstack_t |
enclosing state for Agcbdisc_t | |
Functions | |
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) |
void | agpushdisc (Agraph_t *g, Agcbdisc_t *disc, void *state) |
int | agpopdisc (Agraph_t *g, Agcbdisc_t *disc) |
An Agcbdisc_t defines callbacks to be invoked by Libcgraph when initializing, modifying, or finalizing graph objects. Disciplines are kept on a stack. Libcgraph automatically calls the methods on the stack, top-down. Callbacks are installed with agpushdisc, uninstalled with agpopdisc.
typedef struct Agcbdisc_s Agcbdisc_t |
typedef struct Agcbstack_s Agcbstack_t |
void agdelcb | ( | Agraph_t * | g, |
void * | obj, | ||
Agcbstack_t * | disc | ||
) |
Definition at line 143 of file obj.c.
References agdelcb(), AGEDGE, AGNODE, AGRAPH, AGTYPE, Agcbdisc_s::del, Agcbdisc_s::edge, Agcbstack_s::f, Agcbdisc_s::graph, Agcbdisc_s::node, NULL, Agcbstack_s::prev, and Agcbstack_s::state.
Referenced by agdelcb(), and agmethod_delete().
void aginitcb | ( | Agraph_t * | g, |
void * | obj, | ||
Agcbstack_t * | disc | ||
) |
Definition at line 83 of file obj.c.
References AGEDGE, aginitcb(), AGNODE, AGRAPH, AGTYPE, Agcbdisc_s::edge, Agcbstack_s::f, Agcbdisc_s::graph, Agcbdisc_s::ins, Agcbdisc_s::node, NULL, Agcbstack_s::prev, and Agcbstack_s::state.
Referenced by aginitcb(), and agmethod_init().
void agmethod_delete | ( | Agraph_t * | g, |
void * | obj | ||
) |
Definition at line 138 of file obj.c.
References agdelcb(), Agclos_s::cb, and Agraph_s::clos.
Referenced by agclose(), agdeledge(), and agdelnode().
void agmethod_init | ( | Agraph_t * | g, |
void * | obj | ||
) |
Definition at line 78 of file obj.c.
References aginitcb(), Agclos_s::cb, and Agraph_s::clos.
Referenced by agopen1(), initnode(), and newedge().
Definition at line 108 of file obj.c.
References agupdcb(), Agclos_s::cb, and Agraph_s::clos.
Referenced by agxset(), and setattr().
int agpopdisc | ( | Agraph_t * | g, |
Agcbdisc_t * | disc | ||
) |
Definition at line 211 of file obj.c.
References Agclos_s::cb, Agraph_s::clos, Agcbstack_s::f, FAILURE, free(), Agcbstack_s::prev, and SUCCESS.
Referenced by agclose().
void agpushdisc | ( | Agraph_t * | g, |
Agcbdisc_t * | disc, | ||
void * | state | ||
) |
Definition at line 202 of file obj.c.
References Agclos_s::cb, Agraph_s::clos, Agcbstack_s::f, gv_alloc(), Agcbstack_s::prev, and Agcbstack_s::state.
Referenced by dot2_rank().
void agupdcb | ( | Agraph_t * | g, |
void * | obj, | ||
Agsym_t * | sym, | ||
Agcbstack_t * | disc | ||
) |
Definition at line 113 of file obj.c.
References AGEDGE, AGNODE, AGRAPH, AGTYPE, agupdcb(), Agcbdisc_s::edge, Agcbstack_s::f, Agcbdisc_s::graph, Agcbdisc_s::mod, Agcbdisc_s::node, NULL, Agcbstack_s::prev, and Agcbstack_s::state.
Referenced by agmethod_upd(), and agupdcb().